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

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

Issue 2576773002: [Refactor Xcode Objects] Enable navigator paths for file references. (Closed)
Patch Set: update convert_gn_xcodeproj.py 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
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 void SetIsSource(const bool is_source) { is_source_ = is_source; }
sdefresne 2016/12/16 23:47:58 I think it should be called "set_is_source" accord
liaoyuke 2016/12/19 08:04:39 Done.
222 224
223 // PBXObject implementation. 225 // PBXObject implementation.
224 PBXObjectClass Class() const override; 226 PBXObjectClass Class() const override;
225 std::string Name() const override; 227 std::string Name() const override;
226 void Visit(PBXObjectVisitor& visitor) override; 228 void Visit(PBXObjectVisitor& visitor) override;
227 void Print(std::ostream& out, unsigned indent) const override; 229 void Print(std::ostream& out, unsigned indent) const override;
228 230
229 private: 231 private:
230 std::vector<std::unique_ptr<PBXObject>> children_; 232 std::vector<std::unique_ptr<PBXObject>> children_;
231 std::string name_; 233 std::string name_;
232 std::string path_; 234 std::string path_;
235 bool is_source_ = false;
233 236
234 DISALLOW_COPY_AND_ASSIGN(PBXGroup); 237 DISALLOW_COPY_AND_ASSIGN(PBXGroup);
235 }; 238 };
236 239
237 // PBXNativeTarget ------------------------------------------------------------ 240 // PBXNativeTarget ------------------------------------------------------------
238 241
239 class PBXNativeTarget : public PBXTarget { 242 class PBXNativeTarget : public PBXTarget {
240 public: 243 public:
241 PBXNativeTarget(const std::string& name, 244 PBXNativeTarget(const std::string& name,
242 const std::string& shell_script, 245 const std::string& shell_script,
(...skipping 21 matching lines...) Expand all
264 // PBXProject ----------------------------------------------------------------- 267 // PBXProject -----------------------------------------------------------------
265 268
266 class PBXProject : public PBXObject { 269 class PBXProject : public PBXObject {
267 public: 270 public:
268 PBXProject(const std::string& name, 271 PBXProject(const std::string& name,
269 const std::string& config_name, 272 const std::string& config_name,
270 const std::string& source_path, 273 const std::string& source_path,
271 const PBXAttributes& attributes); 274 const PBXAttributes& attributes);
272 ~PBXProject() override; 275 ~PBXProject() override;
273 276
274 void AddSourceFile(const std::string& source_path); 277 void AddSourceFile(const std::string& navigator_path,
278 const std::string& source_path);
275 void AddAggregateTarget(const std::string& name, 279 void AddAggregateTarget(const std::string& name,
276 const std::string& shell_script); 280 const std::string& shell_script);
277 void AddNativeTarget(const std::string& name, 281 void AddNativeTarget(const std::string& name,
278 const std::string& type, 282 const std::string& type,
279 const std::string& output_name, 283 const std::string& output_name,
280 const std::string& output_type, 284 const std::string& output_type,
281 const std::string& shell_script); 285 const std::string& shell_script);
282 286
283 void SetProjectDirPath(const std::string& project_dir_path); 287 void SetProjectDirPath(const std::string& project_dir_path);
284 void SetProjectRoot(const std::string& project_root); 288 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; 389 void Print(std::ostream& out, unsigned indent) const override;
386 390
387 private: 391 private:
388 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; 392 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_;
389 const PBXObject* owner_reference_; 393 const PBXObject* owner_reference_;
390 394
391 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); 395 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList);
392 }; 396 };
393 397
394 #endif // TOOLS_GN_XCODE_OBJECT_H_ 398 #endif // TOOLS_GN_XCODE_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698