Correct blacklist entry message
[chromium-blink-merge.git] / tools / gn / gyp_target_writer.h
blob27346b0ceea063b95ca0da4bec339b5fe68986e3
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.
5 #ifndef TOOLS_GN_GYP_TARGET_WRITER_H_
6 #define TOOLS_GN_GYP_TARGET_WRITER_H_
8 #include <iosfwd>
9 #include <vector>
11 #include "base/basictypes.h"
12 #include "tools/gn/gyp_helper.h"
14 class Err;
15 class Settings;
16 class SourceFile;
17 class Target;
19 class GypTargetWriter {
20 public:
21 struct TargetGroup {
22 TargetGroup()
23 : debug(NULL),
24 release(NULL),
25 host_debug(NULL),
26 host_release(NULL) {
28 const Target* debug;
29 const Target* release;
30 const Target* host_debug;
31 const Target* host_release;
34 GypTargetWriter(const Target* target, std::ostream& out);
35 virtual ~GypTargetWriter();
37 static void WriteFile(const SourceFile& gyp_file,
38 const std::vector<TargetGroup>& targets,
39 Err* err);
41 virtual void Run() = 0;
43 protected:
44 const Settings* settings_; // Non-owning.
45 const Target* target_; // Non-owning.
46 std::ostream& out_;
48 GypHelper helper_;
50 private:
51 DISALLOW_COPY_AND_ASSIGN(GypTargetWriter);
54 #endif // TOOLS_GN_GYP_TARGET_WRITER_H_