Merge 12735:15568 from xmlbuildsystem branch
[reactos.git] / reactos / tools / rbuild / backend / backend.h
1 #ifndef __BACKEND_H
2 #define __BACKEND_H
3
4 #include "../rbuild.h"
5
6 class Backend;
7
8 typedef Backend* BackendFactory ( Project& project,
9 Configuration& configuration );
10
11 class Backend
12 {
13 public:
14 class Factory
15 {
16 static std::map<std::string,Factory*>* factories;
17 static int ref;
18
19 protected:
20
21 Factory ( const std::string& name_ );
22 virtual ~Factory();
23
24 virtual Backend* operator() ( Project&,
25 Configuration& configuration ) = 0;
26
27 public:
28 static Backend* Create ( const std::string& name,
29 Project& project,
30 Configuration& configuration );
31 };
32
33 protected:
34 Backend ( Project& project,
35 Configuration& configuration );
36
37 public:
38 virtual void Process () = 0;
39 Project& ProjectNode;
40 Configuration& configuration;
41 };
42
43 #endif /* __BACKEND_H */