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

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

Issue 2577753002: [Refactor Xcode Objects] Decouple file references and indexing target. (Closed)
Patch Set: Rename one PBXProject::AddSourceFile to PBXProject::AddSourceFileForIndexingTarget 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 | « no previous file | 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // PBXProject ----------------------------------------------------------------- 264 // PBXProject -----------------------------------------------------------------
265 265
266 class PBXProject : public PBXObject { 266 class PBXProject : public PBXObject {
267 public: 267 public:
268 PBXProject(const std::string& name, 268 PBXProject(const std::string& name,
269 const std::string& config_name, 269 const std::string& config_name,
270 const std::string& source_path, 270 const std::string& source_path,
271 const PBXAttributes& attributes); 271 const PBXAttributes& attributes);
272 ~PBXProject() override; 272 ~PBXProject() override;
273 273
274 void AddSourceFile(const std::string& source_path); 274 void AddSourceFileToIndexingTarget(const std::string& source_path);
275 void AddSourceFile(const std::string& source_path, PBXNativeTarget* target);
276
275 void AddAggregateTarget(const std::string& name, 277 void AddAggregateTarget(const std::string& name,
276 const std::string& shell_script); 278 const std::string& shell_script);
277 void AddNativeTarget(const std::string& name, 279 void AddIndexingTarget();
278 const std::string& type, 280 PBXNativeTarget* AddNativeTarget(const std::string& name,
sdefresne 2016/12/16 23:51:55 Why do you change the return value of this method?
liaoyuke 2016/12/19 08:03:35 Done. Yes, it is for a followup CL, I will move th
279 const std::string& output_name, 281 const std::string& type,
280 const std::string& output_type, 282 const std::string& output_name,
281 const std::string& shell_script); 283 const std::string& output_type,
284 const std::string& shell_script);
282 285
283 void SetProjectDirPath(const std::string& project_dir_path); 286 void SetProjectDirPath(const std::string& project_dir_path);
284 void SetProjectRoot(const std::string& project_root); 287 void SetProjectRoot(const std::string& project_root);
285 void AddTarget(std::unique_ptr<PBXTarget> target); 288 void AddTarget(std::unique_ptr<PBXTarget> target);
286 289
287 // PBXObject implementation. 290 // PBXObject implementation.
288 PBXObjectClass Class() const override; 291 PBXObjectClass Class() const override;
289 std::string Name() const override; 292 std::string Name() const override;
290 std::string Comment() const override; 293 std::string Comment() const override;
291 void Visit(PBXObjectVisitor& visitor) override; 294 void Visit(PBXObjectVisitor& visitor) override;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 void Print(std::ostream& out, unsigned indent) const override; 388 void Print(std::ostream& out, unsigned indent) const override;
386 389
387 private: 390 private:
388 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_; 391 std::vector<std::unique_ptr<XCBuildConfiguration>> configurations_;
389 const PBXObject* owner_reference_; 392 const PBXObject* owner_reference_;
390 393
391 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList); 394 DISALLOW_COPY_AND_ASSIGN(XCConfigurationList);
392 }; 395 };
393 396
394 #endif // TOOLS_GN_XCODE_OBJECT_H_ 397 #endif // TOOLS_GN_XCODE_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | tools/gn/xcode_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698