HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_IntrinsicMacros.h File Reference
#include <GA/GA_IntrinsicDef.h>
#include <GA/GA_IntrinsicEval.h>
#include <UT/UT_Assert.h>
#include <UT/UT_StringArray.h>
#include <UT/UT_StackAlloc.h>
#include <stdio.h>
+ Include dependency graph for GA_IntrinsicMacros.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GA_START_INTRINSIC_DEF(CLASS, NUM_INTRINSICS)
 
#define GA_END_INTRINSIC_DEF(CLASS, BASECLASS)
 
#define GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, STORAGE)
 
#define GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, STORAGE)
 
#define GA_INTRINSIC_OPTIONS(ID, OPTIONS)   myEval[ID].myOptions = &OPTIONS;
 
#define GA_INTRINSIC_COLLAPSE_SINGLETONS(ID, BOOL)   myEval[ID].myCollapseSingletons = BOOL;
 
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_INT)
 
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_INT)
 
#define GA_INTRINSIC_I(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_I(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_I(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_I(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_I(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_I(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_I(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_I(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_I(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_I(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_I(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_FLOAT)
 
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_FLOAT)
 
#define GA_INTRINSIC_F(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_F(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_F(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_F(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_F(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_F(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_F(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_F(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_F(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_F(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_F(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_STRING)
 
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_STRING)
 
#define GA_INTRINSIC_S(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_S(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_S(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_S(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_S(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_S(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_S(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_S(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_S(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_S(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_S(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)   GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_DICT)
 
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)   GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_DICT)
 
#define GA_INTRINSIC_D(CLASS, ID, NAME, EVAL)
 
#define GA_INTRINSIC_CONST_D(CLASS, ID, NAME, VALUE)
 
#define GA_INTRINSIC_METHOD_D(CLASS, ID, NAME, METHOD)
 
#define GA_INTRINSIC_TUPLE_D(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_TUPLE_METHOD_D(CLASS, ID, NAME, TUPLESIZE, EVAL)
 
#define GA_INTRINSIC_ARRAY_D(CLASS, ID, NAME, ARRAY_TYPE, METHOD)
 
#define GA_INTRINSIC_VARYING_D(CLASS, ID, NAME, TSIZE, EVAL)
 
#define GA_INTRINSIC_SET_D(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_METHOD_D(CLASS, ID, METHOD)
 
#define GA_INTRINSIC_SET_TUPLE_D(CLASS, ID, SETFUNC)
 
#define GA_INTRINSIC_SET_TUPLE_METHOD_D(CLASS, ID, METHOD)
 

Macro Definition Documentation

#define GA_END_INTRINSIC_DEF (   CLASS,
  BASECLASS 
)
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 280 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_D (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
for (exint i = 0; i < size; ++i) { v[i].append(array(i)); } \
return v.entries(); \
} \
}; \
GA_INTRINSIC_DEF_VARYING_D(ID, NAME, callbacks::tsize) \
myEval[ID].myDA = callbacks::eval; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
HUSD_API bool eval(VtValue &val, T &ret_val)
GLsizeiptr size
Definition: glcorearb.h:664
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 865 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_F (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size size) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
size = SYSmin(size, array.entries()); \
for (exint i = 0; i < size; ++i) { v[i] = array(i); } \
return size; \
} \
}; \
GA_INTRINSIC_DEF_VARYING_F(ID, NAME, callbacks::tsize) \
myEval[ID].myF = callbacks::eval; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)
HUSD_API bool eval(VtValue &val, T &ret_val)
GLsizeiptr size
Definition: glcorearb.h:664
#define SYSmin(a, b)
Definition: SYS_Math.h:1571
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 636 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_I (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size size) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
size = SYSmin(size, array.entries()); \
for (exint i = 0; i < size; ++i) { v[i] = array(i); } \
return size; \
} \
}; \
GA_INTRINSIC_DEF_VARYING_I(ID, NAME, callbacks::tsize) \
myEval[ID].myI = callbacks::eval; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
GLsizeiptr size
Definition: glcorearb.h:664
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)
#define SYSmin(a, b)
Definition: SYS_Math.h:1571
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 517 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_ARRAY_S (   CLASS,
  ID,
  NAME,
  ARRAY_TYPE,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size tsize(const CLASS *o) { return o->METHOD().entries(); } \
static GA_Size eval(const CLASS *o, UT_StringArray &v) \
{ \
const ARRAY_TYPE &array = o->METHOD(); \
for (exint i = 0; i < size; ++i) { v[i].append(array(i)); } \
return v.entries(); \
} \
}; \
GA_INTRINSIC_DEF_VARYING_S(ID, NAME, callbacks::tsize) \
myEval[ID].mySA = callbacks::eval; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)
GLsizeiptr size
Definition: glcorearb.h:664
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 740 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_COLLAPSE_SINGLETONS (   ID,
  BOOL 
)    myEval[ID].myCollapseSingletons = BOOL;

Definition at line 448 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_D (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *, UT_OptionsHolder &v) \
{ v = VALUE; return 1; } \
static GA_Size evalDA(const CLASS *, UT_Array<UT_OptionsHolder> &v) \
{ v.append(VALUE); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
const GLdouble * v
Definition: glcorearb.h:837
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 831 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_F (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *, fpreal64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 608 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_I (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *, int64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
static GA_Size evalF(const CLASS *, fpreal64 *v, GA_Size) \
{ v[0] = VALUE; return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)

Definition at line 469 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_CONST_S (   CLASS,
  ID,
  NAME,
  VALUE 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *, UT_String &v) \
{ v = VALUE; return 1; } \
static GA_Size evalSA(const CLASS *, UT_StringArray &v) \
{ v.append(VALUE); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 706 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_D (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *o, UT_OptionsHolder &v) \
{ v = EVAL(o); return 1; } \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ v.append(EVAL(o)); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
const GLdouble * v
Definition: glcorearb.h:837
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 820 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF (   ID,
  NAME,
  TUPLESIZE,
  STORAGE 
)
Value:
myEval[ID].myId = ID; \
myEval[ID].myName = NAME; \
myEval[ID].myStore = STORAGE; \
myEval[ID].myTupleSize = TUPLESIZE;

Definition at line 428 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_D (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_DICT)

Definition at line 814 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_F (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_FLOAT)

Definition at line 594 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_I (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_INT)

Definition at line 452 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_S (   ID,
  NAME,
  TUPLESIZE 
)    GA_INTRINSIC_DEF(ID, NAME, TUPLESIZE, GA_STORECLASS_STRING)

Definition at line 689 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING (   ID,
  NAME,
  TUPLESIZE_FUNC,
  STORAGE 
)
Value:
myEval[ID].myId = ID; \
myEval[ID].myName = NAME; \
myEval[ID].myStore = STORAGE; \
myEval[ID].myTupleSizeCB = TUPLESIZE_FUNC;

Definition at line 433 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_D (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_DICT)

Definition at line 817 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_F (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_FLOAT)

Definition at line 597 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_I (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_INT)

Definition at line 455 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_DEF_VARYING_S (   ID,
  NAME,
  TUPLESIZE_FUNC 
)    GA_INTRINSIC_DEF_VARYING(ID, NAME, TUPLESIZE_FUNC, GA_STORECLASS_STRING)

Definition at line 692 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_F (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 600 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_I (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = EVAL(o); return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 458 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_D (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size evalD(const CLASS *o, UT_OptionsHolder &v) \
{ v = o->METHOD(); return 1; } \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ v.append(o->METHOD()); return 1; } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, 1) \
myEval[ID].myD = callbacks::evalD; \
myEval[ID].myDA = callbacks::evalDA; \
}
const GLdouble * v
Definition: glcorearb.h:837
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 842 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_F (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, 1) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 616 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_I (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size) \
{ v[0] = o->METHOD(); return 1; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, 1) \
myEval[ID].myI = callbacks::eval; \
myEval[ID].myF = callbacks::evalF; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)

Definition at line 480 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_METHOD_S (   CLASS,
  ID,
  NAME,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *o, UT_String &v) \
{ v = o->METHOD(); return 1; } \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ v.append(o->METHOD()); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 717 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_OPTIONS (   ID,
  OPTIONS 
)    myEval[ID].myOptions = &OPTIONS;

Definition at line 442 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_S (   CLASS,
  ID,
  NAME,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalS(const CLASS *o, UT_String &v) \
{ v = EVAL(o); return 1; } \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ v.append(EVAL(o)); return 1; } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, 1) \
myEval[ID].myS = callbacks::evalS; \
myEval[ID].mySA = callbacks::evalSA; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 695 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_D (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return SETFUNC(o, a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 883 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_F (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ SETFUNC(o, v[0]); return 1; } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201

Definition at line 655 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_I (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116

Definition at line 536 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_D (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return o->METHOD(a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 894 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_F (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ o->METHOD(v[0]); return 1; } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201

Definition at line 663 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_I (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116

Definition at line 547 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_METHOD_S (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setSS(CLASS *o, const char **v, GA_Size) \
{ return o->METHOD(v[0]) ? 1 : 0; } \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return o->METHOD(a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 769 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_S (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ return SETFUNC(o, v[0]) ? 1 : 0; } \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return SETFUNC(o, a(0)) ? 1 : 0; } \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236

Definition at line 758 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_D (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return SETFUNC(o, a); } \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ \
UT_Array<UT_OptionsHolder> array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return SETFUNC(o, array); \
} \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 905 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_F (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return SETFUNC(o, v, sz); } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201

Definition at line 671 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_I (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return SETFUNC(o, v, sz); } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ \
int64 *tmp = (int64 *)UTstackAlloc(sizeof(int64) * sz); \
for (exint i = 0; i < sz; i++) { tmp[i] = v[i]; } \
int result = SETFUNC(o, tmp, sz); \
UTstackFree(tmp); \
return result; \
} \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
**But if you need a result
Definition: thread.h:613
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
#define UTstackAlloc(size)
Definition: UT_StackAlloc.h:34
long long int64
Definition: SYS_Types.h:116
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685
#define UTstackFree(ptr)
Definition: UT_StackAlloc.h:38

Definition at line 558 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_D (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setDA(CLASS *o, const UT_Array<UT_OptionsHolder> &a) \
{ return o->METHOD(a); } \
static GA_Size setDS(CLASS *o, const UT_OptionsHolder *v, GA_Size sz) \
{ \
UT_Array<UT_OptionsHolder> array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return o->METHOD(array); \
} \
}; \
myEval[ID].mySetDS = callbacks::setDS; \
myEval[ID].mySetDA = callbacks::setDA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 921 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_F (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ return o->METHOD(v[0], sz); } \
}; \
myEval[ID].mySetF = callbacks::setFunc; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201

Definition at line 679 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_I (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setFunc(CLASS *o, const int64 *v, GA_Size sz) \
{ return o->METHOD(v[0], sz); } \
static GA_Size setFuncF(CLASS *o, const fpreal64 *v, GA_Size sz) \
{ \
int64 *tmp = (int64 *)UTstackAlloc(sizeof(int64) * sz); \
for (exint i = 0; i < sz; i++) { tmp[i] = v[i]; } \
int result = o->SETFUNC(tmp, sz); \
UTstackFree(tmp); \
return result; \
} \
}; \
myEval[ID].mySetI = callbacks::setFunc; \
myEval[ID].mySetF = callbacks::setFuncF; \
myEval[ID].myReadOnly = false; \
}
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
**But if you need a result
Definition: thread.h:613
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
#define UTstackAlloc(size)
Definition: UT_StackAlloc.h:34
long long int64
Definition: SYS_Types.h:116
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685
#define UTstackFree(ptr)
Definition: UT_StackAlloc.h:38

Definition at line 575 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_METHOD_S (   CLASS,
  ID,
  METHOD 
)
Value:
{ \
struct callbacks { \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return o->METHOD(a); } \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ \
UT_StringArray array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return o->METHOD(array); \
} \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 796 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_SET_TUPLE_S (   CLASS,
  ID,
  SETFUNC 
)
Value:
{ \
struct callbacks { \
static GA_Size setSA(CLASS *o, const UT_StringArray &a) \
{ return SETFUNC(o, a); } \
static GA_Size setSS(CLASS *o, const char **v, GA_Size sz) \
{ \
UT_StringArray array; \
array.resize(sz); \
for (exint i = 0; i < sz; ++i) array(i) = v[i]; \
return SETFUNC(o, array); \
} \
}; \
myEval[ID].mySetSS = callbacks::setSS; \
myEval[ID].mySetSA = callbacks::setSA; \
myEval[ID].myReadOnly = false; \
}
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:1222
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 780 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_D (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE) \
myEval[ID].myDA = EVAL; \
}
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)

Definition at line 853 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_F (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE) \
myEval[ID].myF = EVAL; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)

Definition at line 624 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_I (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ int64 tmp[TUPLESIZE]; \
int result = EVAL(o, tmp, SYSmin(sz, TUPLESIZE)); \
for (int i = 0; i < SYSmin(sz, TUPLESIZE); i++) \
v[i] = tmp[i]; \
return result; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE) \
myEval[ID].myI = EVAL; \
myEval[ID].myF = callbacks::evalF; \
}
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const GLdouble * v
Definition: glcorearb.h:837
**But if you need a result
Definition: thread.h:613
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
#define SYSmin(a, b)
Definition: SYS_Math.h:1571
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 491 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_D (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalDA(const CLASS *o, UT_Array<UT_OptionsHolder> &v) \
{ o->EVAL(v); return v.entries(); } \
}; \
GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE) \
myEval[ID].myDA = callbacks::eval; \
}
const GLdouble * v
Definition: glcorearb.h:837
#define GA_INTRINSIC_DEF_D(ID, NAME, TUPLESIZE)
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 857 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_F (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ return o->EVAL(v, sz); } \
}; \
GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE) \
myEval[ID].myF = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_F(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 628 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_I (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size eval(const CLASS *o, int64 *v, GA_Size sz) \
{ return o->EVAL(v, sz); } \
static GA_Size evalF(const CLASS *o, fpreal64 *v, GA_Size sz) \
{ int64 tmp[TUPLESIZE]; \
int result = o->EVAL(tmp, SYSmin(sz, TUPLESIZE)); \
for (exint i = 0; i < SYSmin(sz, TUPLESIZE); i++) { v[i] = tmp[i]; } \
return result; } \
}; \
GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE) \
myEval[ID].myI = callbacks::eval; \
}
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const GLdouble * v
Definition: glcorearb.h:837
int64 exint
Definition: SYS_Types.h:125
**But if you need a result
Definition: thread.h:613
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
double fpreal64
Definition: SYS_Types.h:201
long long int64
Definition: SYS_Types.h:116
HUSD_API bool eval(VtValue &val, T &ret_val)
#define GA_INTRINSIC_DEF_I(ID, NAME, TUPLESIZE)
#define SYSmin(a, b)
Definition: SYS_Math.h:1571
* for(int i=0;i< n_subtasks;++i)*tasks.push(pool-> push(myfunc))
Definition: UT_RTreeImpl.h:685

Definition at line 504 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_METHOD_S (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
struct callbacks { \
static GA_Size evalSA(const CLASS *o, UT_StringArray &v) \
{ o->EVAL(v); return v.entries(); } \
}; \
GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE) \
myEval[ID].mySA = callbacks::eval; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)
const GLdouble * v
Definition: glcorearb.h:837
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:236
HUSD_API bool eval(VtValue &val, T &ret_val)

Definition at line 732 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_TUPLE_S (   CLASS,
  ID,
  NAME,
  TUPLESIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE) \
myEval[ID].mySA = EVAL; \
}
#define GA_INTRINSIC_DEF_S(ID, NAME, TUPLESIZE)

Definition at line 728 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_D (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TSIZE) \
myEval[ID].myDA = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_D(ID, NAME, TUPLESIZE_FUNC)

Definition at line 878 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_F (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TSIZE) \
myEval[ID].myF = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_F(ID, NAME, TUPLESIZE_FUNC)

Definition at line 650 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_I (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TSIZE) \
myEval[ID].myI = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_I(ID, NAME, TUPLESIZE_FUNC)

Definition at line 531 of file GA_IntrinsicMacros.h.

#define GA_INTRINSIC_VARYING_S (   CLASS,
  ID,
  NAME,
  TSIZE,
  EVAL 
)
Value:
{ \
GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TSIZE) \
myEval[ID].mySA = EVAL; \
}
#define GA_INTRINSIC_DEF_VARYING_S(ID, NAME, TUPLESIZE_FUNC)

Definition at line 753 of file GA_IntrinsicMacros.h.

#define GA_START_INTRINSIC_DEF (   CLASS,
  NUM_INTRINSICS 
)

The intrinsic macros help declaring intrinsic attributes for an object (i.e. a primitive). Typically, you'll have code like

enum {
ga_INTRINISIC_VAR1,
ga_INTRINISIC_VAR2,
ga_NUM_INTRINSICS
}
GA_START_INTRINSIC_DEF(ClassName, ga_NUM_INTRINSICS)
GA_INTRINSIC_I(ClassName, ga_INTRINSIC_VAR1, "name1",
EvaluationCallback)
GA_INTRINSIC_VARYING_F(ClassName, ga_INTRINISIC_VAR2, "name2",
TupleSizeMethod,
EvaluationCallback)
GA_END_INTRINSIC_DEF(ClassName, BaseClassName)

There are several ways to declare intrinsic access methods:

GA_INTRINSIC_I(ClassName, Enum, Name, Callback)

  • Tuple size is fixed at 1
  • Callback returns value: static exint callback(const ClassName *obj); static fpreal callback(const ClassName *obj); static const char *callback(const ClassName *obj);

GA_INTRINSIC_CONST_I(ClassName, Enum, Name, Value)

  • Tuple size is fixed at 1
  • int/float/(const char *) Value is specified

GA_INTRINSIC_METHOD_I(ClassName, Enum, Name, MethodName)

  • Tuple size is fixed at 1
  • MethodName specifies a public method on ClassName which returns the value. exint ClassName::MethodName() const; fpreal ClassName::MethodName() const; const char *ClassName::MethodName() const;

GA_INTRINSIC_TUPLE_I(ClassName, Enum, Name, TUPLE_SIZE, Callback)

  • TUPLE_SIZE is a constant value
  • Callback fills value (returning number of items set): static int callback(const ClassName *obj, int64 *v, GA_Size sz); static int callback(const ClassName *obj, fpreal64 *v, GA_Size sz); static void callback(const ClassName *obj, UT_StringArray &v);

GA_INTRINSIC_TUPLE_METHOD_I(ClassName, Enum, Name, TUPLE_SIZE, MethodName)

  • TUPLE_SIZE is a constant value
  • MethodName is a public method on ClassName which fills the value, returning the number of items set: int ClassName::MethodName(int64 *v, GA_Size sz) const; int ClassName::MethodName(fpreal64 *v, GA_Size sz) const; void ClassName::MethodName(UT_StringArray &v, GA_Size sz) const;

GA_INTRINSIC_ARRAY_I(ClassName, Enum, Name, ArrayType, MethodName)

  • ArrayType specifies an array which has:
    • entries() const: Return number of elements in the array
    • operator()(exint i) const: Returning the element of the array
  • MethodName is a public method on ClassName which returns the a const reference to an ArrayType object. const ArrayType &ClassName::MethodName() const

GA_INTRINSIC_VARYING_I(ClassName, Enum, Name, TupleSizeCallback, Callback)

  • TupleSizeCallback is a function returning the tuple size static int tuplesizecallback(const ClassName *obj)
  • Callback fills value, returning number of items set: static int callback(const ClassName *obj, int64 *v, GA_Size sz); static int callback(const ClassName *obj, fpreal64 *v, GA_Size sz); static int callback(const ClassName *obj, UT_StringArray &v);

For setting values, there are similar macros. The tuple size and name are usually defined by the evaluation macros. If there is no "get" method, you can still declare the intrinsic using: GA_INTRINSIC_DEF_I(Enum, Name, TupleSize) GA_INTRINSIC_DEF_VARYING_I(Enum, Name, TupleSizeFunc)

GA_INTRINSIC_SET_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning false if unable to set (i.e. invalid value). The function can take a 32/64 bit value. static bool set(ClassName *o, exint v); static bool set(ClassName *o, fpreal v); static bool set(ClassName *o, const char *v);

GA_INTRINSIC_SET_METHOD_I(ClassName, Enum, MethodName)

  • MethodName specifies a public method on ClassName which sets the value. The method can take 32/64 bit values bool ClassName::MethodName(exint value); bool ClassName::MethodName(fpreal value);

GA_INTRINSIC_SET_TUPLE_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning the number of values set. static int set(ClassName *o, const int64 *v, int tuple_size); static int set(ClassName *o, const fpreal64 *v, int tuple_size); static int set(ClassName *o, const UT_StringArray &v);

GA_INTRINSIC_SET_TUPLE_METHOD_I(ClassName, Enum, Callback)

  • Callback specifies a static function which sets the value, returning the number of values set. int ClassName::set(const int64 *v, int tuple_size); int ClassName::set(const fpreal64 *v, int tuple_size); int ClassName::set(const UT_StringArray &v);
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 125 of file GA_IntrinsicMacros.h.