| 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_TARGET_GENERATOR_H_ | 5 #ifndef TOOLS_GN_TARGET_GENERATOR_H_ |
| 6 #define TOOLS_GN_TARGET_GENERATOR_H_ | 6 #define TOOLS_GN_TARGET_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Fills the variables in a Target object from a Scope (the result of a script | 23 // Fills the variables in a Target object from a Scope (the result of a script |
| 24 // execution). Target-type-specific derivations of this class will be used | 24 // execution). Target-type-specific derivations of this class will be used |
| 25 // for each different type of function call. This class implements the common | 25 // for each different type of function call. This class implements the common |
| 26 // behavior. | 26 // behavior. |
| 27 class TargetGenerator { | 27 class TargetGenerator { |
| 28 public: | 28 public: |
| 29 TargetGenerator(Target* target, | 29 TargetGenerator(Target* target, |
| 30 Scope* scope, | 30 Scope* scope, |
| 31 const FunctionCallNode* function_call, | 31 const FunctionCallNode* function_call, |
| 32 Err* err); | 32 Err* err); |
| 33 ~TargetGenerator(); | 33 virtual ~TargetGenerator(); |
| 34 | 34 |
| 35 void Run(); | 35 void Run(); |
| 36 | 36 |
| 37 // The function call is the parse tree node that invoked the target. | 37 // The function call is the parse tree node that invoked the target. |
| 38 // err() will be set on failure. | 38 // err() will be set on failure. |
| 39 static void GenerateTarget(Scope* scope, | 39 static void GenerateTarget(Scope* scope, |
| 40 const FunctionCallNode* function_call, | 40 const FunctionCallNode* function_call, |
| 41 const std::vector<Value>& args, | 41 const std::vector<Value>& args, |
| 42 const std::string& output_type, | 42 const std::string& output_type, |
| 43 Err* err); | 43 Err* err); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool FillGenericConfigs(const char* var_name, | 78 bool FillGenericConfigs(const char* var_name, |
| 79 UniqueVector<LabelConfigPair>* dest); | 79 UniqueVector<LabelConfigPair>* dest); |
| 80 bool FillGenericDeps(const char* var_name, LabelTargetVector* dest); | 80 bool FillGenericDeps(const char* var_name, LabelTargetVector* dest); |
| 81 | 81 |
| 82 bool FillForwardDependentConfigs(); | 82 bool FillForwardDependentConfigs(); |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); | 84 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 #endif // TOOLS_GN_TARGET_GENERATOR_H_ | 87 #endif // TOOLS_GN_TARGET_GENERATOR_H_ |
| OLD | NEW |