]> git.tdb.fi Git - builder.git/blob - source/binarycomponent.h
Remove most container typedefs and refactor others
[builder.git] / source / binarycomponent.h
1 #ifndef BINARYCOMPONENT_H_
2 #define BINARYCOMPONENT_H_
3
4 #include "component.h"
5
6 class BinaryComponent: public Component
7 {
8 public:
9         class Loader: public Msp::DataFile::DerivedObjectLoader<BinaryComponent, Component::Loader>
10         {
11         public:
12                 Loader(BinaryComponent &);
13         private:
14                 void use(const std::string &);
15         };
16
17         enum Type
18         {
19                 LIBRARY,
20                 PROGRAM,
21                 MODULE
22         };
23
24 private:
25         Type type;
26         std::list<const Component *> uses;
27
28 public:
29         BinaryComponent(SourcePackage &, const std::string &, Type);
30
31         Type get_type() const { return type; }
32
33         void create_build_info() override;
34         void update_exported_build_info(BuildInfo &) const override;
35         void create_targets() const override;
36 };
37
38 #endif