Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_XCODE_OBJECT_H_ | 5 #ifndef TOOLS_GN_XCODE_OBJECT_H_ |
| 6 #define TOOLS_GN_XCODE_OBJECT_H_ | 6 #define TOOLS_GN_XCODE_OBJECT_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 void Print(std::ostream& out, unsigned indent) const override; | 146 void Print(std::ostream& out, unsigned indent) const override; |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 DISALLOW_COPY_AND_ASSIGN(PBXAggregateTarget); | 149 DISALLOW_COPY_AND_ASSIGN(PBXAggregateTarget); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 // PBXBuildFile --------------------------------------------------------------- | 152 // PBXBuildFile --------------------------------------------------------------- |
| 153 | 153 |
| 154 class PBXBuildFile : public PBXObject { | 154 class PBXBuildFile : public PBXObject { |
| 155 public: | 155 public: |
| 156 enum HelpCompilerFlagEnabled { HELP_FLAG_ENABLED, HELP_FLAG_DISABLED }; | |
|
sdefresne
2016/12/17 00:07:27
I don't really like the redundancy of the enumerat
liaoyuke
2016/12/19 08:02:40
Thank you for explaining the details. This is a mu
| |
| 157 | |
| 156 PBXBuildFile(const PBXFileReference* file_reference, | 158 PBXBuildFile(const PBXFileReference* file_reference, |
| 157 const PBXSourcesBuildPhase* build_phase); | 159 const PBXSourcesBuildPhase* build_phase, |
| 160 const HelpCompilerFlagEnabled help_flag_enabled); | |
| 158 ~PBXBuildFile() override; | 161 ~PBXBuildFile() override; |
| 159 | 162 |
| 160 // PXBObject implementation. | 163 // PXBObject implementation. |
| 161 PBXObjectClass Class() const override; | 164 PBXObjectClass Class() const override; |
| 162 std::string Name() const override; | 165 std::string Name() const override; |
| 163 void Print(std::ostream& out, unsigned indent) const override; | 166 void Print(std::ostream& out, unsigned indent) const override; |
| 164 | 167 |
| 165 private: | 168 private: |
| 166 const PBXFileReference* file_reference_; | 169 const PBXFileReference* file_reference_; |
| 167 const PBXSourcesBuildPhase* build_phase_; | 170 const PBXSourcesBuildPhase* build_phase_; |
| 171 const HelpCompilerFlagEnabled help_flag_enabled_; | |
| 168 | 172 |
| 169 DISALLOW_COPY_AND_ASSIGN(PBXBuildFile); | 173 DISALLOW_COPY_AND_ASSIGN(PBXBuildFile); |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 // PBXFileReference ----------------------------------------------------------- | 176 // PBXFileReference ----------------------------------------------------------- |
| 173 | 177 |
| 174 class PBXFileReference : public PBXObject { | 178 class PBXFileReference : public PBXObject { |
| 175 public: | 179 public: |
| 176 PBXFileReference(const std::string& name, | 180 PBXFileReference(const std::string& name, |
| 177 const std::string& path, | 181 const std::string& path, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 public: | 244 public: |
| 241 PBXNativeTarget(const std::string& name, | 245 PBXNativeTarget(const std::string& name, |
| 242 const std::string& shell_script, | 246 const std::string& shell_script, |
| 243 const std::string& config_name, | 247 const std::string& config_name, |
| 244 const PBXAttributes& attributes, | 248 const PBXAttributes& attributes, |
| 245 const std::string& product_type, | 249 const std::string& product_type, |
| 246 const std::string& product_name, | 250 const std::string& product_name, |
| 247 const PBXFileReference* product_reference); | 251 const PBXFileReference* product_reference); |
| 248 ~PBXNativeTarget() override; | 252 ~PBXNativeTarget() override; |
| 249 | 253 |
| 250 void AddFileForIndexing(const PBXFileReference* file_reference); | 254 void AddFileForIndexing(const PBXFileReference* file_reference, |
| 255 const PBXBuildFile::HelpCompilerFlagEnabled); | |
| 251 | 256 |
| 252 // PBXObject implementation. | 257 // PBXObject implementation. |
| 253 PBXObjectClass Class() const override; | 258 PBXObjectClass Class() const override; |
| 254 void Print(std::ostream& out, unsigned indent) const override; | 259 void Print(std::ostream& out, unsigned indent) const override; |
| 255 | 260 |
| 256 private: | 261 private: |
| 257 const PBXFileReference* product_reference_; | 262 const PBXFileReference* product_reference_; |
| 258 std::string product_type_; | 263 std::string product_type_; |
| 259 std::string product_name_; | 264 std::string product_name_; |
| 260 | 265 |
| 261 DISALLOW_COPY_AND_ASSIGN(PBXNativeTarget); | 266 DISALLOW_COPY_AND_ASSIGN(PBXNativeTarget); |
| 262 }; | 267 }; |
| 263 | 268 |
| 264 // PBXProject ----------------------------------------------------------------- | 269 // PBXProject ----------------------------------------------------------------- |
| 265 | 270 |
| 266 class PBXProject : public PBXObject { | 271 class PBXProject : public PBXObject { |
| 267 public: | 272 public: |
| 268 PBXProject(const std::string& name, | 273 PBXProject(const std::string& name, |
| 269 const std::string& config_name, | 274 const std::string& config_name, |
| 270 const std::string& source_path, | 275 const std::string& source_path, |
| 271 const PBXAttributes& attributes); | 276 const PBXAttributes& attributes); |
| 272 ~PBXProject() override; | 277 ~PBXProject() override; |
| 273 | 278 |
| 274 void AddSourceFile(const std::string& source_path); | 279 void AddSourceFile( |
| 280 const std::string& source_path, | |
| 281 const PBXBuildFile::HelpCompilerFlagEnabled help_flag_enabled); | |
| 275 void AddAggregateTarget(const std::string& name, | 282 void AddAggregateTarget(const std::string& name, |
| 276 const std::string& shell_script); | 283 const std::string& shell_script); |
| 277 void AddNativeTarget(const std::string& name, | 284 void AddNativeTarget(const std::string& name, |
| 278 const std::string& type, | 285 const std::string& type, |
| 279 const std::string& output_name, | 286 const std::string& output_name, |
| 280 const std::string& output_type, | 287 const std::string& output_type, |
| 281 const std::string& shell_script); | 288 const std::string& shell_script); |
| 282 | 289 |
| 283 void SetProjectDirPath(const std::string& project_dir_path); | 290 void SetProjectDirPath(const std::string& project_dir_path); |
| 284 void SetProjectRoot(const std::string& project_root); | 291 void SetProjectRoot(const std::string& project_root); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 void Print(std::ostream& out, unsigned indent) const override; | 392 void Print(std::ostream& out, unsigned indent) const override; |
| 386 | 393 |
| 387 private: | 394 private: |
| 388 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; | 395 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; |
| 389 const PBXObject* owner_reference_; | 396 const PBXObject* owner_reference_; |
| 390 | 397 |
| 391 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); | 398 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); |
| 392 }; | 399 }; |
| 393 | 400 |
| 394 #endif // TOOLS_GN_XCODE_OBJECT_H_ | 401 #endif // TOOLS_GN_XCODE_OBJECT_H_ |
| OLD | NEW |