OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef TOOLS_GN_CONFIG_VALUES_H_ | |
6 #define TOOLS_GN_CONFIG_VALUES_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "base/basictypes.h" | |
12 #include "tools/gn/source_dir.h" | |
13 | |
14 // Holds the values (includes, defines, compiler flags, etc.) for a given | |
15 // config or target. | |
16 class ConfigValues { | |
17 public: | |
18 ConfigValues(); | |
19 ~ConfigValues(); | |
20 | |
21 const std::vector<SourceDir>& includes() const { return includes_; } | |
22 void swap_in_includes(std::vector<SourceDir>* lo) { includes_.swap(*lo); } | |
23 | |
24 const std::vector<std::string>& defines() const { return defines_; } | |
25 void swap_in_defines(std::vector<std::string>* d) { defines_.swap(*d); } | |
26 | |
27 const std::vector<std::string>& cflags() const { return cflags_; } | |
28 void swap_in_cflags(std::vector<std::string>* lo) { cflags_.swap(*lo); } | |
29 | |
30 const std::vector<std::string>& cflags_c() const { return cflags_c_; } | |
31 void swap_in_cflags_c(std::vector<std::string>* lo) { cflags_c_.swap(*lo); } | |
32 | |
33 const std::vector<std::string>& cflags_cc() const { return cflags_cc_; } | |
34 void swap_in_cflags_cc(std::vector<std::string>* lo) { cflags_cc_.swap(*lo); } | |
35 | |
36 const std::vector<std::string>& ldflags() const { return ldflags_; } | |
37 void swap_in_ldflags(std::vector<std::string>* lo) { ldflags_.swap(*lo); } | |
38 | |
39 private: | |
40 std::vector<SourceDir> includes_; | |
41 std::vector<std::string> defines_; | |
42 std::vector<std::string> cflags_; | |
43 std::vector<std::string> cflags_c_; | |
44 std::vector<std::string> cflags_cc_; | |
45 std::vector<std::string> ldflags_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(ConfigValues); | |
48 }; | |
49 | |
50 #endif // TOOLS_GN_CONFIG_VALUES_H_ | |
OLD | NEW |