37 #ifndef Alembic_Abc_TypedPropertyTraits_h
38 #define Alembic_Abc_TypedPropertyTraits_h
54 #define ALEMBIC_ABC_DECLARE_TYPE_TRAITS( VAL, POD, EXTENT, INTERP, PTDEF ) \
57 static const PlainOldDataType pod_enum = POD; \
58 static const int extent = EXTENT; \
59 typedef VAL value_type; \
60 static const char * interpretation() { return ( INTERP ) ; } \
61 static const char * name() { return #PTDEF; } \
62 static AbcA::DataType dataType() \
63 { return AbcA::DataType( POD, EXTENT ) ; } \
64 static value_type defaultValue() \
65 { value_type v; return v; } \
70 #define DECLARE_POD_TRAITS( POD_TYPE , PTDEF ) \
73 static const PlainOldDataType pod_enum = \
74 PODTraitsFromType< POD_TYPE >::pod_enum; \
75 static const int extent = 1; \
76 typedef POD_TYPE value_type; \
77 static const char * interpretation() { return ""; } \
78 static const char * name() { return #PTDEF; } \
79 static AbcA::DataType dataType() \
80 { return AbcA::DataType( PODTraitsFromType< POD_TYPE >::pod_enum, 1 ); } \
81 static value_type defaultValue() \
82 { return PODTraitsFromType< POD_TYPE >::default_value(); } \
101 #undef DECLARE_POD_TRAITS
ALEMBIC_ABC_DECLARE_TYPE_TRAITS(V2s, kInt16POD, 2,"vector", V2sTPTraits)
DECLARE_POD_TRAITS(bool_t, BooleanTPTraits)
#define ALEMBIC_VERSION_NS