| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 
|  | 2 // Use of this source code is governed by a BSD-style license that can be | 
|  | 3 // found in the LICENSE file. | 
|  | 4 | 
|  | 5 #ifndef TOOLS_GN_QT_CREATOR_WRITER_H_ | 
|  | 6 #define TOOLS_GN_QT_CREATOR_WRITER_H_ | 
|  | 7 | 
|  | 8 #include <set> | 
|  | 9 #include <string> | 
|  | 10 | 
|  | 11 #include "base/files/file_path.h" | 
|  | 12 #include "base/macros.h" | 
|  | 13 #include "tools/gn/err.h" | 
|  | 14 #include "tools/gn/target.h" | 
|  | 15 | 
|  | 16 class Builder; | 
|  | 17 class BuildSettings; | 
|  | 18 | 
|  | 19 class QtCreatorWriter { | 
|  | 20  public: | 
|  | 21   static bool RunAndWriteFile(const BuildSettings* build_settings, | 
|  | 22                               const Builder* builder, | 
|  | 23                               Err* err, | 
|  | 24                               const std::string& root_target); | 
|  | 25 | 
|  | 26  private: | 
|  | 27   QtCreatorWriter(const BuildSettings* build_settings, | 
|  | 28                   const Builder* builder, | 
|  | 29                   const base::FilePath& project_prefix, | 
|  | 30                   const std::string& root_target_name); | 
|  | 31   ~QtCreatorWriter(); | 
|  | 32 | 
|  | 33   void Run(); | 
|  | 34 | 
|  | 35   bool DiscoverTargets(); | 
|  | 36   void HandleTarget(const Target* target); | 
|  | 37 | 
|  | 38   void CollectDeps(const Target* target); | 
|  | 39   void AddToSources(const Target::FileList& files); | 
|  | 40   void GenerateFile(const char* suffix, const std::set<std::string>& items); | 
|  | 41 | 
|  | 42   const BuildSettings* build_settings_; | 
|  | 43   const Builder* builder_; | 
|  | 44   base::FilePath project_prefix_; | 
|  | 45   std::string root_target_name_; | 
|  | 46   std::set<const Target*> targets_; | 
|  | 47   std::set<std::string> sources_; | 
|  | 48   std::set<std::string> includes_; | 
|  | 49   std::set<std::string> defines_; | 
|  | 50   Err err_; | 
|  | 51 | 
|  | 52   DISALLOW_COPY_AND_ASSIGN(QtCreatorWriter); | 
|  | 53 }; | 
|  | 54 | 
|  | 55 #endif  // TOOLS_GN_QT_CREATOR_WRITER_H_ | 
| OLD | NEW | 
|---|