/cygdrive/d/src/svn/vrut/trunk/modules/scripting/jsmemory.h File Reference

Go to the source code of this file.

Namespaces

namespace  VRUT

Classes

struct  VRUT::JSMemoryStruct

Defines

#define JSMEM_TYPES_COUNT   (sizeof (memoryTypes) / sizeof (JSMemoryStruct))
#define IS_JSMEM_TYPE(_type)   (_type > 0 && unsigned(_type) <= JSMEM_TYPES_COUNT)

Enumerations

enum  VRUT::JSMEM_TYPE { VRUT::JSMEM_INT = 1, VRUT::JSMEM_FLOAT, VRUT::JSMEM_MATRIX, VRUT::JSMEM_NULL }
 The memory types. More...

Functions

static JSMemoryStruct * getMemoryType (int type)

Variables

static JSMemoryStruct memoryTypes []


Define Documentation

#define IS_JSMEM_TYPE ( _type   )     (_type > 0 && unsigned(_type) <= JSMEM_TYPES_COUNT)

Definition at line 39 of file jsmemory.h.

#define JSMEM_TYPES_COUNT   (sizeof (memoryTypes) / sizeof (JSMemoryStruct))

Definition at line 37 of file jsmemory.h.


Function Documentation

static JSMemoryStruct* getMemoryType ( int  type  )  [static]

Definition at line 41 of file jsmemory.h.

00042 {
00043        JSMEM_TYPE mType = JSMEM_TYPE(type);
00044        for (unsigned i = 0; i < JSMEM_TYPES_COUNT; i++)
00045        {
00046               if (mType == memoryTypes[i].type)
00047                      return &memoryTypes[i];
00048        }
00049        return NULL;
00050 }


Variable Documentation

JSMemoryStruct memoryTypes[] [static]

Initial value:

 {
       {JSMEM_INT, "INT", sizeof (int)},
       {JSMEM_FLOAT, "FLOAT", sizeof (float)},
       {JSMEM_MATRIX, "MATRIX", sizeof (MATRIX)}
}

Definition at line 30 of file jsmemory.h.


Generated on Tue Mar 10 14:41:36 2009 for VRUT by  doxygen 1.5.5