Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core2/src/orxonox/objects/test3.h @ 1049

Last change on this file since 1049 was 1030, checked in by landauf, 17 years ago

extracted all config-value related macros from CoreIncludes.h and moved them to ConfigValueIncludes.h.

ConfigValueContainer can now handle std::vector<x> where 'x' is is any type supported by MultiTypeMath (all primitives, pointer, string, vector2, vector3, quaternion, colourvalue, radian, degree).

the vectors size is currently limited to 256 elements. this is just a practical limit, it can be raised if it's necessary. the reason for the limit is: you can add new elements to a vector by simply typing 'set classname varname index value' into the console or adding a new entry in the config-file. if 'index' is bigger than the vectors size, all elements up to 'index' are inserted. if the user accidentally enters a big number, he could end up with >4*109 elements in his config-file, resulting in 10-100gb on the hdd and a completely filled memory. and that's not exactly what i want ;)

File size: 1.2 KB
Line 
1#ifndef _Test3_H__
2#define _Test3_H__
3
4#include <vector>
5
6#include "core/BaseObject.h"
7#include "util/Math.h"
8
9namespace orxonox
10{
11    class Test1;
12    class Test2;
13
14    class Test3 : public BaseObject
15    {
16        public:
17            Test3();
18            virtual ~Test3();
19
20            void setConfigValues();
21
22            void usefullClassesIsATest(Test1* test1);
23            void usefullClassesIsATest(Test2* test2);
24
25            void configOutput();
26
27        private:
28            int                 value_int_;
29            unsigned int        value_uint_;
30            char                value_char_;
31            unsigned char       value_uchar_;
32            float               value_float_;
33            double              value_double_;
34            bool                value_bool_;
35            std::string         value_string_;
36            const char*         value_constchar_;
37            Vector2             value_vector2_;
38            Vector3             value_vector3_;
39            ColourValue         value_colourvalue_;
40
41            std::vector<int>         vector_int_;
42            std::vector<std::string> vector_string_;
43            std::vector<Vector3>     vector_vector3_;
44    };
45}
46
47#endif
Note: See TracBrowser for help on using the repository browser.