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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 // PXBObject implementation. | 144 // PXBObject implementation. |
| 145 PBXObjectClass Class() const override; | 145 PBXObjectClass Class() const override; |
| 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 enum class CompilerFlags { | |
|
sdefresne
2016/12/19 08:05:36
nit: move at the top of the file with other enums
liaoyuke
2016/12/19 08:17:42
Done.
| |
| 155 NONE, | |
| 156 HELP, | |
| 157 }; | |
| 158 | |
| 154 class PBXBuildFile : public PBXObject { | 159 class PBXBuildFile : public PBXObject { |
| 155 public: | 160 public: |
| 156 PBXBuildFile(const PBXFileReference* file_reference, | 161 PBXBuildFile(const PBXFileReference* file_reference, |
| 157 const PBXSourcesBuildPhase* build_phase); | 162 const PBXSourcesBuildPhase* build_phase, |
| 163 const CompilerFlags compiler_flag); | |
| 158 ~PBXBuildFile() override; | 164 ~PBXBuildFile() override; |
| 159 | 165 |
| 160 // PXBObject implementation. | 166 // PXBObject implementation. |
| 161 PBXObjectClass Class() const override; | 167 PBXObjectClass Class() const override; |
| 162 std::string Name() const override; | 168 std::string Name() const override; |
| 163 void Print(std::ostream& out, unsigned indent) const override; | 169 void Print(std::ostream& out, unsigned indent) const override; |
| 164 | 170 |
| 165 private: | 171 private: |
| 166 const PBXFileReference* file_reference_; | 172 const PBXFileReference* file_reference_; |
| 167 const PBXSourcesBuildPhase* build_phase_; | 173 const PBXSourcesBuildPhase* build_phase_; |
| 174 const CompilerFlags compiler_flag_; | |
| 168 | 175 |
| 169 DISALLOW_COPY_AND_ASSIGN(PBXBuildFile); | 176 DISALLOW_COPY_AND_ASSIGN(PBXBuildFile); |
| 170 }; | 177 }; |
| 171 | 178 |
| 172 // PBXFileReference ----------------------------------------------------------- | 179 // PBXFileReference ----------------------------------------------------------- |
| 173 | 180 |
| 174 class PBXFileReference : public PBXObject { | 181 class PBXFileReference : public PBXObject { |
| 175 public: | 182 public: |
| 176 PBXFileReference(const std::string& name, | 183 PBXFileReference(const std::string& name, |
| 177 const std::string& path, | 184 const std::string& path, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 public: | 247 public: |
| 241 PBXNativeTarget(const std::string& name, | 248 PBXNativeTarget(const std::string& name, |
| 242 const std::string& shell_script, | 249 const std::string& shell_script, |
| 243 const std::string& config_name, | 250 const std::string& config_name, |
| 244 const PBXAttributes& attributes, | 251 const PBXAttributes& attributes, |
| 245 const std::string& product_type, | 252 const std::string& product_type, |
| 246 const std::string& product_name, | 253 const std::string& product_name, |
| 247 const PBXFileReference* product_reference); | 254 const PBXFileReference* product_reference); |
| 248 ~PBXNativeTarget() override; | 255 ~PBXNativeTarget() override; |
| 249 | 256 |
| 250 void AddFileForIndexing(const PBXFileReference* file_reference); | 257 void AddFileForIndexing(const PBXFileReference* file_reference, |
| 258 const CompilerFlags compiler_flag); | |
| 251 | 259 |
| 252 // PBXObject implementation. | 260 // PBXObject implementation. |
| 253 PBXObjectClass Class() const override; | 261 PBXObjectClass Class() const override; |
| 254 void Print(std::ostream& out, unsigned indent) const override; | 262 void Print(std::ostream& out, unsigned indent) const override; |
| 255 | 263 |
| 256 private: | 264 private: |
| 257 const PBXFileReference* product_reference_; | 265 const PBXFileReference* product_reference_; |
| 258 std::string product_type_; | 266 std::string product_type_; |
| 259 std::string product_name_; | 267 std::string product_name_; |
| 260 | 268 |
| 261 DISALLOW_COPY_AND_ASSIGN(PBXNativeTarget); | 269 DISALLOW_COPY_AND_ASSIGN(PBXNativeTarget); |
| 262 }; | 270 }; |
| 263 | 271 |
| 264 // PBXProject ----------------------------------------------------------------- | 272 // PBXProject ----------------------------------------------------------------- |
| 265 | 273 |
| 266 class PBXProject : public PBXObject { | 274 class PBXProject : public PBXObject { |
| 267 public: | 275 public: |
| 268 PBXProject(const std::string& name, | 276 PBXProject(const std::string& name, |
| 269 const std::string& config_name, | 277 const std::string& config_name, |
| 270 const std::string& source_path, | 278 const std::string& source_path, |
| 271 const PBXAttributes& attributes); | 279 const PBXAttributes& attributes); |
| 272 ~PBXProject() override; | 280 ~PBXProject() override; |
| 273 | 281 |
| 274 void AddSourceFile(const std::string& source_path); | 282 void AddSourceFile(const std::string& source_path, |
| 283 const CompilerFlags compiler_flag); | |
| 275 void AddAggregateTarget(const std::string& name, | 284 void AddAggregateTarget(const std::string& name, |
| 276 const std::string& shell_script); | 285 const std::string& shell_script); |
| 277 void AddNativeTarget(const std::string& name, | 286 void AddNativeTarget(const std::string& name, |
| 278 const std::string& type, | 287 const std::string& type, |
| 279 const std::string& output_name, | 288 const std::string& output_name, |
| 280 const std::string& output_type, | 289 const std::string& output_type, |
| 281 const std::string& shell_script); | 290 const std::string& shell_script); |
| 282 | 291 |
| 283 void SetProjectDirPath(const std::string& project_dir_path); | 292 void SetProjectDirPath(const std::string& project_dir_path); |
| 284 void SetProjectRoot(const std::string& project_root); | 293 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; | 394 void Print(std::ostream& out, unsigned indent) const override; |
| 386 | 395 |
| 387 private: | 396 private: |
| 388 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; | 397 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; |
| 389 const PBXObject* owner_reference_; | 398 const PBXObject* owner_reference_; |
| 390 | 399 |
| 391 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); | 400 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); |
| 392 }; | 401 }; |
| 393 | 402 |
| 394 #endif // TOOLS_GN_XCODE_OBJECT_H_ | 403 #endif // TOOLS_GN_XCODE_OBJECT_H_ |
| OLD | NEW |