summaryrefslogtreecommitdiffabout
path: root/include/sitecing/acomponent.h
Unidiff
Diffstat (limited to 'include/sitecing/acomponent.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/acomponent.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sitecing/acomponent.h b/include/sitecing/acomponent.h
index 160e854..461f8a6 100644
--- a/include/sitecing/acomponent.h
+++ b/include/sitecing/acomponent.h
@@ -1,78 +1,79 @@
1#ifndef __SITECING_ACOMPONENT_H 1#ifndef __SITECING_ACOMPONENT_H
2#define __SITECING_ACOMPONENT_H 2#define __SITECING_ACOMPONENT_H
3 3
4#include <cstdarg>
4#include "sitecing/sitecing_interface.h" 5#include "sitecing/sitecing_interface.h"
5 6
6/** 7/**
7 * @file 8 * @file
8 * @brief The acomponent class declaration. 9 * @brief The acomponent class declaration.
9 */ 10 */
10 11
11namespace sitecing { 12namespace sitecing {
12 13
13 /** 14 /**
14 * An abstract base class for sitecing components. 15 * An abstract base class for sitecing components.
15 */ 16 */
16 class acomponent { 17 class acomponent {
17 public: 18 public:
18 /** 19 /**
19 * Pointer to the interface object, used to communicate with the 20 * Pointer to the interface object, used to communicate with the
20 * site-C-ing core. 21 * site-C-ing core.
21 */ 22 */
22 sitecing_interface *__SCIF; 23 sitecing_interface *__SCIF;
23 24
24 acomponent(); 25 acomponent();
25 virtual ~acomponent(); 26 virtual ~acomponent();
26 27
27 /** 28 /**
28 * Set the interface to core pointer. 29 * Set the interface to core pointer.
29 * @param scif the pointer to the interface object. 30 * @param scif the pointer to the interface object.
30 */ 31 */
31 virtual void __set_interface(sitecing_interface *scif=0); 32 virtual void __set_interface(sitecing_interface *scif=0);
32 /** 33 /**
33 * Invoked if the interface to the core has changed. 34 * Invoked if the interface to the core has changed.
34 * @param oscif pointer to the old interface object. 35 * @param oscif pointer to the old interface object.
35 */ 36 */
36 virtual void __on_change_interface(sitecing_interface *oscif); 37 virtual void __on_change_interface(sitecing_interface *oscif);
37 38
38 /** 39 /**
39 * do import components. 40 * do import components.
40 */ 41 */
41 virtual void __do_imports(); 42 virtual void __do_imports();
42 /** 43 /**
43 * invoked on components imports. 44 * invoked on components imports.
44 */ 45 */
45 virtual void __on_imports(); 46 virtual void __on_imports();
46 /** 47 /**
47 * fetch the pointer to the most derived component. 48 * fetch the pointer to the most derived component.
48 * @returns pointer to the most derived object. 49 * @returns pointer to the most derived object.
49 */ 50 */
50 virtual void *__the_most_derived_this() = 0; 51 virtual void *__the_most_derived_this() = 0;
51 52
52 /** 53 /**
53 * Do the job. 54 * Do the job.
54 * @param __magic the magic number used as a key to decipher the 55 * @param __magic the magic number used as a key to decipher the
55 * rest of parameters. 56 * rest of parameters.
56 * @param __args the parameters. 57 * @param __args the parameters.
57 */ 58 */
58 virtual void main(int __magic,va_list __args) = 0; 59 virtual void main(int __magic,va_list __args) = 0;
59 60
60 /** 61 /**
61 * Run the component. Convenience helper for calling main(). 62 * Run the component. Convenience helper for calling main().
62 * @param __magic the magic number. 63 * @param __magic the magic number.
63 * @param ... the rest of parameters. 64 * @param ... the rest of parameters.
64 * @see main(); 65 * @see main();
65 */ 66 */
66 void run(int __magic,...); 67 void run(int __magic,...);
67 68
68 /** 69 /**
69 * Helper function (which doesn't necessarily belongs here!) for 70 * Helper function (which doesn't necessarily belongs here!) for
70 * reading the file and passing it to the output stream. 71 * reading the file and passing it to the output stream.
71 * @param fn the file name. 72 * @param fn the file name.
72 */ 73 */
73 void pass_file_through(const char *fn); 74 void pass_file_through(const char *fn);
74 }; 75 };
75 76
76} 77}
77 78
78#endif /* __SITECING_ACOMPONENT_H */ 79#endif /* __SITECING_ACOMPONENT_H */