Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: tools/gn/xcode_object.h

Issue 2576773002: [Refactor Xcode Objects] Enable navigator paths for file references. (Closed)
Patch Set: Addressed feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/build/tools/convert_gn_xcodeproj.py ('k') | tools/gn/xcode_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 class PBXGroup : public PBXObject { 212 class PBXGroup : public PBXObject {
213 public: 213 public:
214 explicit PBXGroup(const std::string& path = std::string(), 214 explicit PBXGroup(const std::string& path = std::string(),
215 const std::string& name = std::string()); 215 const std::string& name = std::string());
216 ~PBXGroup() override; 216 ~PBXGroup() override;
217 217
218 const std::string& path() const { return path_; } 218 const std::string& path() const { return path_; }
219 219
220 PBXObject* AddChild(std::unique_ptr<PBXObject> child); 220 PBXObject* AddChild(std::unique_ptr<PBXObject> child);
221 PBXFileReference* AddSourceFile(const std::string& source_path); 221 PBXFileReference* AddSourceFile(const std::string& navigator_path,
222 const std::string& source_path);
223 bool is_source() { return is_source_; }
224 void set_is_source(const bool is_source) { is_source_ = is_source; }
222 225
223 // PBXObject implementation. 226 // PBXObject implementation.
224 PBXObjectClass Class() const override; 227 PBXObjectClass Class() const override;
225 std::string Name() const override; 228 std::string Name() const override;
226 void Visit(PBXObjectVisitor& visitor) override; 229 void Visit(PBXObjectVisitor& visitor) override;
227 void Print(std::ostream& out, unsigned indent) const override; 230 void Print(std::ostream& out, unsigned indent) const override;
228 231
229 private: 232 private:
230 std::vector<std::unique_ptr<PBXObject>> children_; 233 std::vector<std::unique_ptr<PBXObject>> children_;
231 std::string name_; 234 std::string name_;
232 std::string path_; 235 std::string path_;
236 bool is_source_ = false;
233 237
234 DISALLOW_COPY_AND_ASSIGN(PBXGroup); 238 DISALLOW_COPY_AND_ASSIGN(PBXGroup);
235 }; 239 };
236 240
237 // PBXNativeTarget ------------------------------------------------------------ 241 // PBXNativeTarget ------------------------------------------------------------
238 242
239 class PBXNativeTarget : public PBXTarget { 243 class PBXNativeTarget : public PBXTarget {
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,
(...skipping 21 matching lines...) Expand all
264 // PBXProject ----------------------------------------------------------------- 268 // PBXProject -----------------------------------------------------------------
265 269
266 class PBXProject : public PBXObject { 270 class PBXProject : public PBXObject {
267 public: 271 public:
268 PBXProject(const std::string& name, 272 PBXProject(const std::string& name,
269 const std::string& config_name, 273 const std::string& config_name,
270 const std::string& source_path, 274 const std::string& source_path,
271 const PBXAttributes& attributes); 275 const PBXAttributes& attributes);
272 ~PBXProject() override; 276 ~PBXProject() override;
273 277
274 void AddSourceFile(const std::string& source_path); 278 void AddSourceFile(const std::string& navigator_path,
279 const std::string& source_path);
275 void AddAggregateTarget(const std::string& name, 280 void AddAggregateTarget(const std::string& name,
276 const std::string& shell_script); 281 const std::string& shell_script);
277 void AddNativeTarget(const std::string& name, 282 void AddNativeTarget(const std::string& name,
278 const std::string& type, 283 const std::string& type,
279 const std::string& output_name, 284 const std::string& output_name,
280 const std::string& output_type, 285 const std::string& output_type,
281 const std::string& shell_script); 286 const std::string& shell_script);
282 287
283 void SetProjectDirPath(const std::string& project_dir_path); 288 void SetProjectDirPath(const std::string& project_dir_path);
284 void SetProjectRoot(const std::string& project_root); 289 void SetProjectRoot(const std::string& project_root);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 void Print(std::ostream& out, unsigned indent) const override; 390 void Print(std::ostream& out, unsigned indent) const override;
386 391
387 private: 392 private:
388 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; 393 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_;
389 const PBXObject* owner_reference_; 394 const PBXObject* owner_reference_;
390 395
391 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); 396 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList);
392 }; 397 };
393 398
394 #endif // TOOLS_GN_XCODE_OBJECT_H_ 399 #endif // TOOLS_GN_XCODE_OBJECT_H_
OLDNEW
« no previous file with comments | « ios/build/tools/convert_gn_xcodeproj.py ('k') | tools/gn/xcode_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698