summaryrefslogtreecommitdiffabout
path: root/include/sitecing/component_factory.h
Unidiff
Diffstat (limited to 'include/sitecing/component_factory.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/component_factory.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/include/sitecing/component_factory.h b/include/sitecing/component_factory.h
index 9ddf70d..8f103e0 100644
--- a/include/sitecing/component_factory.h
+++ b/include/sitecing/component_factory.h
@@ -1,88 +1,76 @@
1#ifndef __SITECING_COMPONENT_FACTORY_H 1#ifndef __SITECING_COMPONENT_FACTORY_H
2#define __SITECING_COMPONENT_FACTORY_H 2#define __SITECING_COMPONENT_FACTORY_H
3 3
4#include <string> 4#include <string>
5#include <list> 5#include <list>
6#include <stdexcept> 6#include <stdexcept>
7#include "sitecing/file_factory.h" 7#include "sitecing/file_factory.h"
8#include "sitecing/configuration.h" 8#include "sitecing/configuration.h"
9 9
10/** 10/**
11 * @file 11 * @file
12 * @brief The component_factory class declaration. 12 * @brief The component_factory class declaration.
13 */ 13 */
14 14
15namespace sitecing { 15namespace sitecing {
16 using namespace std; 16 using namespace std;
17 17
18 /** 18 /**
19 * @brief The components builder. 19 * @brief The components builder.
20 */ 20 */
21 class component_factory : public file_factory { 21 class component_factory : public file_factory {
22 public: 22 public:
23 /** 23 /**
24 * Path to the source files root. 24 * Path to the source files root.
25 */ 25 */
26 string root_source; 26 string root_source;
27 /** 27 /**
28 * Path to the root of the intermediate files storage. 28 * Path to the root of the intermediate files storage.
29 */ 29 */
30 string root_intermediate; 30 string root_intermediate;
31 /** 31 /**
32 * Output path for .so components. 32 * Output path for .so components.
33 */ 33 */
34 string root_so; 34 string root_so;
35 /** 35 /**
36 * Reference to the configuration container. 36 * Reference to the configuration container.
37 */ 37 */
38 configuration& config; 38 configuration& config;
39 39
40 /** 40 /**
41 * @param c reference to the configuration container. 41 * @param c reference to the configuration container.
42 */ 42 */
43 component_factory(configuration& c); 43 component_factory(configuration& c);
44 44
45 /**
46 * @overload file_factory::get_dependencies()
47 */
48 virtual void get_dependencies(const string& dst,file_list_t& deps); 45 virtual void get_dependencies(const string& dst,file_list_t& deps);
49 /** 46 virtual bool is_uptodate(const string& dst,file_list_t *deps=0);
50 * @overload file_factory::is_uptodate()
51 */
52 virtual bool is_uptodate(const string& dst,file_list_t *deps=NULL);
53 /**
54 * @overload file_factory::build()
55 */
56 virtual void build(const string& dst); 47 virtual void build(const string& dst);
57 /**
58 * @overload file_factory::make()
59 */
60 virtual void make(const string& dst); 48 virtual void make(const string& dst);
61 49
62 /** 50 /**
63 * Helper function for executing external command. 51 * Helper function for executing external command.
64 * @param cmd the command to execute. 52 * @param cmd the command to execute.
65 * @param args the command line arguments. 53 * @param args the command line arguments.
66 * @param stdo stdout for the child process. 54 * @param stdo stdout for the child process.
67 * @param stde stderr for the child process. 55 * @param stde stderr for the child process.
68 * @return exit code. 56 * @return exit code.
69 */ 57 */
70 int execute(const string& cmd,const list<string>& args,int stdo,int stde); 58 int execute(const string& cmd,const list<string>& args,int stdo,int stde);
71 /** 59 /**
72 * Fetch the class name of the component. 60 * Fetch the class name of the component.
73 * @param component the component. 61 * @param component the component.
74 * @return the class name. 62 * @return the class name.
75 */ 63 */
76 string get_classname(const string& component); 64 string get_classname(const string& component);
77 /** 65 /**
78 * Get the components from which the target component has been 66 * Get the components from which the target component has been
79 * derived. 67 * derived.
80 * @param component the target component 68 * @param component the target component
81 * @param rv where to store the list of ancestors. 69 * @param rv where to store the list of ancestors.
82 */ 70 */
83 void get_ancestors(const string& component,file_list_t &rv); 71 void get_ancestors(const string& component,file_list_t &rv);
84 }; 72 };
85 73
86} 74}
87 75
88#endif /* __SITECING_COMPONENT_FACTORY_H */ 76#endif /* __SITECING_COMPONENT_FACTORY_H */