Last change
on this file since 9669 was
9669,
checked in by bensch, 18 years ago
|
orxonox/trunk: added a checking environment for the ObjectList
|
File size:
707 bytes
|
Line | |
---|
1 | #include "new_class_id.h" |
---|
2 | #include "new_object_list.h" |
---|
3 | #include <iostream> |
---|
4 | |
---|
5 | class Test |
---|
6 | { |
---|
7 | public: |
---|
8 | Test(); |
---|
9 | ~Test(); |
---|
10 | |
---|
11 | |
---|
12 | NewObjectListDeclaration(Test); |
---|
13 | //ObjectListDeclaration(Test); |
---|
14 | }; |
---|
15 | NewObjectListDefinition(Test); |
---|
16 | |
---|
17 | Test::Test() |
---|
18 | { std::cout << "Test()\n"; }; |
---|
19 | Test::~Test() |
---|
20 | { std::cout << "~Test()\n"; } |
---|
21 | |
---|
22 | class Bone |
---|
23 | { |
---|
24 | public: |
---|
25 | Bone() { std::cout << "Bone()\n"; }; |
---|
26 | ~Bone() { std::cout << "~Bone()\n"; }; |
---|
27 | NewObjectListDeclaration(Bone); |
---|
28 | }; |
---|
29 | NewObjectListDefinition(Bone); |
---|
30 | |
---|
31 | int main() |
---|
32 | { |
---|
33 | Test* test = new Test(); |
---|
34 | |
---|
35 | NewClassID id; |
---|
36 | id.registerObject(test, Test::objectList); |
---|
37 | |
---|
38 | delete test; |
---|
39 | Bone* bone = new Bone(); |
---|
40 | delete bone; |
---|
41 | |
---|
42 | std::cout << NewObjectListBase::classCount() << std::endl; |
---|
43 | } |
---|
44 | |
---|
Note: See
TracBrowser
for help on using the repository browser.