2#include <cgv/type/standard_types.h>
12 static int ti_counter =
TI_LAST;
13 return TypeId(++ti_counter);
20 static unsigned int type_size_table[] = {
43 return type_size_table[tid];
101 static std::map<const std::string,TypeId> type_name_id_map;
102 if (type_name_id_map.empty()) {
105 type_name_id_map[nti_pairs[i].name] = nti_pairs[i].tip;
107 }
while (nti_pairs[i].name);
109 std::map<const std::string,TypeId>::iterator it = type_name_id_map.find(_type_name.c_str());
110 if (it == type_name_id_map.end())
119 static const char* type_name_table[] = {
168 return type_name_table[tid];
173TypeId get_type_id(const std::string& _type_name)
175 for (TypeId tid = TI_FIRST; tid < TI_LAST; tid = TypeId(tid+1)) {
176 if (_type_name == get_type_name(tid))
complete implementation of method actions that only call one method when entering a node
TypeId get_type_id(const std::string &_type_name)
function that returns the type id of a type name
unsigned int get_type_size(TypeId tid)
function that returns the size of a type specified through TypeId
const char * get_type_name(TypeId tid)
function that returns the name of a type specified through TypeId
TypeId
ids for the different types and type constructs
@ TI_INT16
signed integer stored in 8 bits
@ TI_INT32
signed integer stored in 16 bits
@ TI_STRING
wide character type
@ TI_TYPENAME
a type definition
@ TI_FUNCTION
function or method signature
@ TI_WCHAR
floating point type stored in 64 bits
@ TI_ARRAY
pointer type construct
@ TI_CLASSNAME
an undefined typename used as template parameter
@ TI_INSTANCE
constructor of a compound
@ TI_FLT32
floating point type stored in 16 bits
@ TI_TEMPLATE
an undefined class name used as template parameter
@ TI_MEMBER
base type of a compound type
@ TI_POINTER
reference type construct
@ TI_CONST
union type compound
@ TI_BIT
used for undefined type
@ TI_UINT32
unsigned integer stored in 16 bits
@ TI_UINT8
signed integer stored in 64 bits
@ TI_METHOD
member of a compound
@ TI_SIGNATURE
function or method parameter
@ TI_INT64
signed integer stored in 32 bits
@ TI_CLASS
struct type compound
@ TI_TYPEDEF
an instance not a type
@ TI_FUNCTION_POINTER
array type construct
@ TI_METHOD_POINTER
member pointer type construct
@ TI_STRUCT
method pointer type construct
@ TI_FLT16
unsigned integer stored in 64 bits
@ TI_BASE
function not a function pointer
@ TI_MEMBER_POINTER
function pointer type construct
@ TI_CONSTRUCTOR
method of a compound, not a method pointer
@ TI_EXPRESSION
const modifier
@ TI_UNION
class type compound
@ TI_UINT16
unsigned integer stored in 8 bits
@ TI_FLT64
floating point type stored in 32 bits
@ TI_UINT64
unsigned integer stored in 32 bits
@ TI_REFERENCE
all enum types
@ TI_PARAMETER
expression used for default parameters
@ TI_LAST
a template construct
double flt64_type
this type provides a 64 bit floating point type
DummyEnum
some enum to mark an integral parameter to be of enum type
signed char int8_type
this type provides an 8 bit signed integer type
int int32_type
this type provides an 32 bit signed integer type
short int16_type
this type provides an 16 bit signed integer type
unsigned short uint16_type
this type provides an 16 bit unsigned integer type
unsigned long long uint64_type
this type provides an 64 bit unsigned integer type
unsigned int uint32_type
this type provides an 32 bit unsigned integer type
long long int64_type
this type provides an 64 bit signed integer type
float flt32_type
this type provides a 32 bit floating point type
unsigned char uint8_type
this type provides an 8 bit unsigned integer type