| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef TOOLS_GN_COMMANDS_H_ | 5 #ifndef TOOLS_GN_COMMANDS_H_ |
| 6 #define TOOLS_GN_COMMANDS_H_ | 6 #define TOOLS_GN_COMMANDS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/strings/string_piece.h" | 12 #include "base/strings/string_piece.h" |
| 13 | 13 |
| 14 class Target; | 14 class Target; |
| 15 | 15 |
| 16 // Each "Run" command returns the value we should return from main(). | 16 // Each "Run" command returns the value we should return from main(). |
| 17 | 17 |
| 18 namespace commands { | 18 namespace commands { |
| 19 | 19 |
| 20 typedef int (*CommandRunner)(const std::vector<std::string>&); | 20 typedef int (*CommandRunner)(const std::vector<std::string>&); |
| 21 | 21 |
| 22 extern const char kArgs[]; | 22 extern const char kArgs[]; |
| 23 extern const char kArgs_HelpShort[]; | 23 extern const char kArgs_HelpShort[]; |
| 24 extern const char kArgs_Help[]; | 24 extern const char kArgs_Help[]; |
| 25 int RunArgs(const std::vector<std::string>& args); | 25 int RunArgs(const std::vector<std::string>& args); |
| 26 | 26 |
| 27 extern const char kCheck[]; |
| 28 extern const char kCheck_HelpShort[]; |
| 29 extern const char kCheck_Help[]; |
| 30 int RunCheck(const std::vector<std::string>& args); |
| 31 |
| 27 extern const char kDesc[]; | 32 extern const char kDesc[]; |
| 28 extern const char kDesc_HelpShort[]; | 33 extern const char kDesc_HelpShort[]; |
| 29 extern const char kDesc_Help[]; | 34 extern const char kDesc_Help[]; |
| 30 int RunDesc(const std::vector<std::string>& args); | 35 int RunDesc(const std::vector<std::string>& args); |
| 31 | 36 |
| 32 extern const char kGen[]; | 37 extern const char kGen[]; |
| 33 extern const char kGen_HelpShort[]; | 38 extern const char kGen_HelpShort[]; |
| 34 extern const char kGen_Help[]; | 39 extern const char kGen_Help[]; |
| 35 int RunGen(const std::vector<std::string>& args); | 40 int RunGen(const std::vector<std::string>& args); |
| 36 | 41 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // | 73 // |
| 69 // Note that a lot of memory is leaked to avoid proper teardown under the | 74 // Note that a lot of memory is leaked to avoid proper teardown under the |
| 70 // assumption that you will only run this once and exit. | 75 // assumption that you will only run this once and exit. |
| 71 // | 76 // |
| 72 // On failure, prints an error message and returns NULL. | 77 // On failure, prints an error message and returns NULL. |
| 73 const Target* GetTargetForDesc(const std::vector<std::string>& args); | 78 const Target* GetTargetForDesc(const std::vector<std::string>& args); |
| 74 | 79 |
| 75 } // namespace commands | 80 } // namespace commands |
| 76 | 81 |
| 77 #endif // TOOLS_GN_COMMANDS_H_ | 82 #endif // TOOLS_GN_COMMANDS_H_ |
| OLD | NEW |