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

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

Issue 1155303008: Allow directories for GN data lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@path
Patch Set: add dir test Created 5 years, 6 months 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 | « tools/gn/command_refs.cc ('k') | tools/gn/output_file.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_OUTPUT_FILE_H_ 5 #ifndef TOOLS_GN_OUTPUT_FILE_H_
6 #define TOOLS_GN_OUTPUT_FILE_H_ 6 #define TOOLS_GN_OUTPUT_FILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "tools/gn/build_settings.h" 11 #include "tools/gn/build_settings.h"
12 12
13 class SourceFile; 13 class SourceFile;
14 14
15 // A simple wrapper around a string that indicates the string is a path 15 // A simple wrapper around a string that indicates the string is a path
16 // relative to the output directory. 16 // relative to the output directory.
17 class OutputFile { 17 class OutputFile {
18 public: 18 public:
19 OutputFile(); 19 OutputFile();
20 explicit OutputFile(const base::StringPiece& str); 20 explicit OutputFile(std::string&& v);
21 explicit OutputFile(const std::string& v);
21 OutputFile(const BuildSettings* build_settings, 22 OutputFile(const BuildSettings* build_settings,
22 const SourceFile& source_file); 23 const SourceFile& source_file);
23 ~OutputFile(); 24 ~OutputFile();
24 25
25 std::string& value() { return value_; } 26 std::string& value() { return value_; }
26 const std::string& value() const { return value_; } 27 const std::string& value() const { return value_; }
27 28
28 // Converts to a SourceFile by prepending the build directory to the file. 29 // Converts to a SourceFile by prepending the build directory to the file.
29 // The *Dir version requires that the current OutputFile ends in a slash, and 30 // The *Dir version requires that the current OutputFile ends in a slash, and
30 // the *File version is the opposite. 31 // the *File version is the opposite.
(...skipping 23 matching lines...) Expand all
54 } 55 }
55 }; 56 };
56 57
57 } // namespace BASE_HASH_NAMESPACE 58 } // namespace BASE_HASH_NAMESPACE
58 59
59 inline void swap(OutputFile& lhs, OutputFile& rhs) { 60 inline void swap(OutputFile& lhs, OutputFile& rhs) {
60 lhs.value().swap(rhs.value()); 61 lhs.value().swap(rhs.value());
61 } 62 }
62 63
63 #endif // TOOLS_GN_OUTPUT_FILE_H_ 64 #endif // TOOLS_GN_OUTPUT_FILE_H_
OLDNEW
« no previous file with comments | « tools/gn/command_refs.cc ('k') | tools/gn/output_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698