summaryrefslogtreecommitdiffabout
path: root/share/component.skel
blob: f96c5b3baa27ff0dd2f91c60adc30a4121b70e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%%#.cc
#include "<%component_basename%>.h"
#undef __THIS_CLASS
#define __THIS_CLASS <%class_name%>
<%impl%>

<%member_functions:impl%>

void *<%class_name%>::__the_most_derived_this() {
    return this;
}
void <%class_name%>::__do_imports() {
    __base_class::__do_imports();
    <%ancestors:import%>
    <%imports:import%>
}

extern "C" sitecing::acomponent* _egg () {
    return dynamic_cast<sitecing::acomponent*>(new <%class_name%>());
}
%%#.h
#ifndef __<%class_name%>_H
#define __<%class_name%>_H
#include "<%baseclass_header%>"
<%ancestors:includes%>
<%imports:includes%>
#undef __THIS_CLASS
#define __THIS_CLASS <%class_name%>
<%decl%>

class <%class_name%> : virtual public <%baseclass_name%><%ancestors:base_clause_part%> {
    public:
	typedef <%baseclass_name%> __base_class;
	typedef <%class_name%> __this_class;
	<%ancestors:typedefs%>
	<%member_variables:decl%>

	<%member_functions:decl%>

	virtual void *__the_most_derived_this();
	virtual void __do_imports();
};

#undef __THIS_CLASS
#endif /* __<%class_name%>_H */
%%.imports
<%imports:list%>
%%.classname
<%class_name%>
%%.basecomponent
<%base_component%>
%%.ancestors
<%ancestors:component_list%>