diff options
Diffstat (limited to 'src/entities/bu-class')
-rw-r--r-- | src/entities/bu-class | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/entities/bu-class b/src/entities/bu-class new file mode 100644 index 0000000..7b25291 --- /dev/null +++ b/src/entities/bu-class | |||
@@ -0,0 +1,48 @@ | |||
1 | <?xml version="1.1" ?> | ||
2 | <entity desc="Basic cpp class, with optional parent class. (.cpp+.h)"> | ||
3 | <param name="name" required="yes" desc="Name of the class"/> | ||
4 | <param name="parent" required="no" desc="Name of the parent class"/> | ||
5 | <file | ||
6 | name="header" | ||
7 | filename="{=name:%tolower}.h" | ||
8 | >#ifndef {=name:%uccsplit:%toupper}_H | ||
9 | #define {=name:%uccsplit:%toupper}_H | ||
10 | |||
11 | #include <stdint.h> | ||
12 | |||
13 | {?parent:"#include \"bu/{=parent:%tolower}.h\" | ||
14 | |||
15 | "}namespace Bu | ||
16 | { | ||
17 | /** | ||
18 | * | ||
19 | */ | ||
20 | class {=name}{?parent:" : public {=parent}"} | ||
21 | { | ||
22 | public: | ||
23 | {=name}(); | ||
24 | virtual ~{=name}(); | ||
25 | |||
26 | private: | ||
27 | |||
28 | }; | ||
29 | } | ||
30 | |||
31 | #endif | ||
32 | </file> | ||
33 | <file | ||
34 | name="source" | ||
35 | filename="{=name:%tolower}.cpp" | ||
36 | >#include "bu/{=name:%tolower}.h" | ||
37 | |||
38 | using namespace Bu; | ||
39 | |||
40 | Bu::{=name}::{=name}() | ||
41 | { | ||
42 | } | ||
43 | |||
44 | Bu::{=name}::~{=name}() | ||
45 | { | ||
46 | } | ||
47 | </file> | ||
48 | </entity> | ||