Changeset 5135 in orxonox.OLD for trunk/src/defs
- Timestamp:
- Aug 26, 2005, 12:51:27 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/functor_list.h
r5133 r5135 16 16 */ 17 17 18 /** 19 useable FunctionParameters are: 20 l_INT: int 21 l_LONG: long 22 l_SHORT: short 23 l_FLOAT: float 24 l_STRING: const char* 25 l_XML_ELEM: TiXmlElement* 26 */ 18 27 19 //! makes functions with one string loadable 28 #ifndef __FUNCTOR_PARAMETERS__ 29 #define __FUNCTOR_PARAMETERS__ 30 31 typedef enum ParameterType 32 { 33 ParameterNull, 34 ParameterBool, 35 ParameterChar, 36 ParameterString, 37 ParameterInt, 38 ParameterUInt, 39 ParameterFloat, 40 ParameterLong, 41 /* ... */ 42 }; 43 44 45 #define l_BOOL_TYPE bool //!< The type of an BOOL 46 #define l_BOOL_FUNC isBool //!< The function to call to parse BOOL 47 #define l_BOOL_NAME "bool" //!< The name of an BOOL 48 #define l_BOOL_PARAM ParameterBool //!< the type of the parameter BOOL 49 #define l_BOOL_DEFAULT false //!< a default Value for an BOOL 50 51 52 #define l_INT_TYPE int //!< The type of an INT 53 #define l_INT_FUNC isInt //!< The function to call to parse INT 54 #define l_INT_NAME "int" //!< The name of an INT 55 #define l_INT_PARAM ParameterInt //!< the type of the parameter INT 56 #define l_INT_DEFAULT 0 //!< a default Value for an INT 57 58 #define l_UINT_TYPE unsigned int //!< The type of an UINT 59 #define l_UINT_FUNC isInt //!< The function to call to parse UINT 60 #define l_UINT_NAME "unsigned int" //!< The name of an UINT 61 #define l_UINT_PARAM ParameterUInt //!< the type of the parameter UINT 62 #define l_UINT_DEFAULT 0 //!< a default Value for an UINT 63 64 #define l_LONG_TYPE long //!< The type of a LONG 65 #define l_LONG_FUNC isInt //!< The function to parse a LONG 66 #define l_LONG_NAME "long" //!< The name of a LONG 67 #define l_LONG_PARAM ParameterLong //!< the type of the parameter LONG 68 #define l_LONG_DEFAULT 0 //!< a default Value for a LONG 69 70 // #define l_SHORT_TYPE short //!< The type of a SHORT 71 // #define l_SHORT_FUNC atoi //!< The function to parse a SHORT 72 // #define l_SHORT_NAME "short" //!< The name of a SHORT 73 //#define l_SHORT_PARAM ParameterShort //!< the type of the parameter SHORT 74 // #define l_SHORT_DEFAULT 0 //!< a default Value for a SHORT 75 76 #define l_FLOAT_TYPE float //!< The type of a FLOAT 77 #define l_FLOAT_FUNC isFloat //!< The function to parse a FLOAT 78 #define l_FLOAT_NAME "float" //!< The name of a FLOAT 79 #define l_FLOAT_PARAM ParameterFloat //!< the type of the parameter FLOAT 80 #define l_FLOAT_DEFAULT 0.0 //!< a default Value for a FLOAT 81 82 //#define l_VECTOR_TYPE const Vector& //!< The type of a VECTOR 83 //#define l_VECTOR_FUNC isVector //!< The function to parse a VECTOR 84 //#define l_VECTOR_NAME "Vector[x/y/z]" //!< The name of a VECTOR 85 //#define l_VECTOR_DEFAULT Vector(0,0,0) //!< Default value for a VECTOR 86 87 #define l_STRING_TYPE const char* //!< The type of a STRING 88 #define l_STRING_FUNC isString //!< The function to parse a STRING 89 #define l_STRING_NAME "string" //!< The name of a STRING 90 #define l_STRING_PARAM ParameterString //!< the type of the parameter STRING 91 #define l_STRING_DEFAULT "" //!< a default Value for an STRING 92 93 #define l_XML_ELEM_TYPE const TiXmlElement* //!< The type of an XML_ELEM 94 #define l_XML_ELEM_FUNC //!< The function to parse an XML_ELEM 95 #define l_XML_ELEM_NAME "XML" //!< The name of an XML_ELEM 96 //#define l_XML_ELEM_PARAM Parameter //!< the type of the parameter XML_ELEM 97 #define l_XML_ELEM_DEFAULT NULL //!< The dafault Value for an XML_ELEM 98 99 #endif /* __FUNCTOR_PARAMETERS__ */ 100 101 102 #ifdef FUNCTOR_LIST 103 //! makes functions with one string 20 104 FUNCTOR_LIST(1)(l_STRING); 21 //! makes functions with two strings loadable105 //! makes functions with two strings 22 106 FUNCTOR_LIST(2)(l_STRING, l_STRING); 23 //! makes functions with three strings loadable107 //! makes functions with three strings 24 108 FUNCTOR_LIST(3)(l_STRING, l_STRING, l_STRING); 25 //! makes functions with four strings loadable109 //! makes functions with four strings 26 110 FUNCTOR_LIST(4)(l_STRING, l_STRING, l_STRING, l_STRING); 27 111 28 //! makes functions with one bool loadeable112 //! makes functions with one bool 29 113 FUNCTOR_LIST(1)(l_BOOL); 30 114 31 //! makes functions with one int loadable115 //! makes functions with one int 32 116 FUNCTOR_LIST(1)(l_INT); 33 //! makes functions with two ints loadable117 //! makes functions with two ints 34 118 FUNCTOR_LIST(2)(l_INT, l_INT); 35 //! makes functions with three ints loadable119 //! makes functions with three ints 36 120 FUNCTOR_LIST(3)(l_INT, l_INT, l_INT); 37 //! makes functions with four ints loadable121 //! makes functions with four ints 38 122 FUNCTOR_LIST(4)(l_INT, l_INT, l_INT, l_INT); 39 123 40 124 41 //! makes functions with one unsigned int loadable125 //! makes functions with one unsigned int 42 126 FUNCTOR_LIST(1)(l_UINT); 43 //! makes functions with two unsigned ints loadable127 //! makes functions with two unsigned ints 44 128 FUNCTOR_LIST(2)(l_UINT, l_UINT); 45 //! makes functions with three unsigned ints loadable129 //! makes functions with three unsigned ints 46 130 FUNCTOR_LIST(3)(l_UINT, l_UINT, l_UINT); 47 //! makes functions with four unsigned ints loadable131 //! makes functions with four unsigned ints 48 132 FUNCTOR_LIST(4)(l_UINT, l_UINT, l_UINT, l_UINT); 49 133 50 //! makes functions with one float loadable134 //! makes functions with one float 51 135 FUNCTOR_LIST(1)(l_FLOAT); 52 //! makes functions with two floats loadable136 //! makes functions with two floats 53 137 FUNCTOR_LIST(2)(l_FLOAT, l_FLOAT); 54 //! makes functions with three floats loadable138 //! makes functions with three floats 55 139 FUNCTOR_LIST(3)(l_FLOAT, l_FLOAT, l_FLOAT); 56 //! makes functions with four floats loadable140 //! makes functions with four floats 57 141 FUNCTOR_LIST(4)(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT); 58 //! makes functions with four floats loadable142 //! makes functions with four floats 59 143 FUNCTOR_LIST(5)(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT); 60 144 61 145 //! mixed values: 62 146 FUNCTOR_LIST(2)(l_STRING, l_FLOAT); 147 #endif /* FUNCTOR_LIST */ 63 148 64
Note: See TracChangeset
for help on using the changeset viewer.