00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CVEX_Value__
00020 #define __CVEX_Value__
00021
00022 #include "CVEX_API.h"
00023
00024 class UT_StringArray;
00025
00026 typedef enum {
00027 CVEX_TYPE_INVALID = -1,
00028 CVEX_TYPE_INTEGER,
00029 CVEX_TYPE_FLOAT,
00030 CVEX_TYPE_VECTOR3,
00031 CVEX_TYPE_VECTOR4,
00032 CVEX_TYPE_MATRIX3,
00033 CVEX_TYPE_MATRIX4,
00034 CVEX_TYPE_STRING
00035 } CVEX_Type;
00036
00037 class CVEX_API CVEX_Value {
00038 public:
00039 CVEX_Value(const char *name, CVEX_Type type, bool varying);
00040 ~CVEX_Value();
00041
00042 const char *getName() const { return myName; }
00043 CVEX_Type getType() const { return myType; }
00044 bool isExport() const { return myExport; }
00045 bool isVarying() const { return myVarying; }
00046 int getArraySize() const { return myArraySize; }
00047
00048
00049 void *getData() { return myData; }
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 bool setData(void *data, int array_size);
00064 bool setData(UT_StringArray &stringdata);
00065
00066 private:
00067 static int cvexToVexType(CVEX_Type type);
00068 static CVEX_Type vexToCVexType(int vextype);
00069
00070 void *myData;
00071 const char *myName;
00072 CVEX_Type myType;
00073 int myVexType;
00074 int myVexIndex;
00075 int myArraySize;
00076 bool myExport;
00077 bool myVarying;
00078
00079 friend class CVEX_Context;
00080 };
00081
00082 #endif