much better factory implementation - thanks art yerkes
[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
10 class Backend
11 {
12 public:
13 class Factory
14 {
15 static std::vector<Factory*>* factories;
16 std::string name;
17
18 protected:
19
20 Factory ( const std::string& name_ );
21
22 virtual Backend* operator() ( Project& ) = 0;
23
24 public:
25 static Backend* Create ( const std::string& name, Project& project );
26
27 private:
28 };
29
30 protected:
31 Backend ( Project& project );
32
33 public:
34 virtual void Process () = 0;
35
36 protected:
37 Project& ProjectNode;
38 };
39
40 #endif /* __BACKEND_H */