HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HDK_Sample::geo_PrimTetraJSON Class Reference
+ Inheritance diagram for HDK_Sample::geo_PrimTetraJSON:

Public Types

enum  { geo_TBJ_VERTEX, geo_TBJ_ENTRIES }
 

Public Member Functions

 geo_PrimTetraJSON ()
 
virtual ~geo_PrimTetraJSON ()
 
const GEO_PrimTetratet (const GA_Primitive *p) const
 
GEO_PrimTetratet (GA_Primitive *p) const
 
virtual int getEntries () const
 Return the number of data fields in the primitive private schema. More...
 
virtual const char * getKeyword (int i) const
 
virtual bool saveField (const GA_Primitive *pr, int i, UT_JSONWriter &w, const GA_SaveMap &map) const
 
virtual bool saveField (const GA_Primitive *pr, int i, UT_JSONValue &v, const GA_SaveMap &map) const
 
virtual bool loadField (GA_Primitive *pr, int i, UT_JSONParser &p, const GA_LoadMap &map) const
 
virtual bool loadField (GA_Primitive *pr, int i, UT_JSONParser &p, const UT_JSONValue &v, const GA_LoadMap &map) const
 
virtual bool isEqual (int i, const GA_Primitive *p0, const GA_Primitive *p1) const
 
- Public Member Functions inherited from GA_PrimitiveJSON
 GA_PrimitiveJSON ()
 
virtual ~GA_PrimitiveJSON ()
 
virtual bool shouldSaveField (const GA_Primitive *prim, int i, const GA_SaveMap &save) const
 
virtual bool save (const GA_Primitive *prim, UT_JSONWriter &w, const GA_SaveMap &map) const
 
virtual bool save (const GA_Primitive *prim, UT_JSONValue &v, const GA_SaveMap &map) const
 Save a single primitive to a UT_JSONValue. More...
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &map) const
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const UT_JSONValue &value, const GA_LoadMap &map) const
 Load a single primitive from a UT_JSONValue. More...
 

Additional Inherited Members

- Protected Member Functions inherited from GA_PrimitiveJSON
virtual bool getRunFields (const GA_Primitive **list, int list_size, const GA_SaveMap &save, UT_StringArray &varying, UT_JSONValue &uniform, uint &user_flags) const
 
virtual bool matchRun (const GA_Primitive *prim0, const GA_Primitive *prim1, const UT_StringArray &varying, const UT_JSONValue &uniform, uint user_flags) const
 
virtual bool saveRunFields (const GA_Primitive *prim, const GA_SaveMap &save, const UT_StringArray &varying, UT_JSONWriter &w, uint user_flags) const
 
virtual bool load (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &load, const UT_StringArray &varying, const GA_JSONUniformBlock &uniform) const
 
virtual bool loadUniform (GA_Primitive *prim, UT_JSONParser &p, const GA_LoadMap &map, const GA_JSONUniformBlock &uniform) const
 
virtual bool loadUnknownToken (GA_Primitive *prim, const char *token, UT_JSONParser &p, const GA_LoadMap &load) const
 
void init ()
 
- Protected Attributes inherited from GA_PrimitiveJSON
UT_FSAmyTokens
 
int myEntries
 

Detailed Description

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 265 of file GEO_PrimTetra.C.

Member Enumeration Documentation

anonymous enum
Enumerator
geo_TBJ_VERTEX 
geo_TBJ_ENTRIES 

Definition at line 273 of file GEO_PrimTetra.C.

Constructor & Destructor Documentation

HDK_Sample::geo_PrimTetraJSON::geo_PrimTetraJSON ( )
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 268 of file GEO_PrimTetra.C.

virtual HDK_Sample::geo_PrimTetraJSON::~geo_PrimTetraJSON ( )
inlinevirtual
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 271 of file GEO_PrimTetra.C.

Member Function Documentation

virtual int HDK_Sample::geo_PrimTetraJSON::getEntries ( ) const
inlinevirtual

Return the number of data fields in the primitive private schema.

Implements GA_PrimitiveJSON.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 284 of file GEO_PrimTetra.C.

virtual const char* HDK_Sample::geo_PrimTetraJSON::getKeyword ( int  i) const
inlinevirtual

Return the keyword associated with the i'th entry of the schema. Keywords are case insensitive, but must be specified as lower case by this method.

Implements GA_PrimitiveJSON.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 285 of file GEO_PrimTetra.C.

virtual bool HDK_Sample::geo_PrimTetraJSON::isEqual ( int  i,
const GA_Primitive prim1,
const GA_Primitive prim2 
) const
inlinevirtual

Determine if the i'th entry of a primitive's private schema is equal to the value in another primitive. This determines whether the data can be created as "uniform" data a run of sequential primitives.

Implements GA_PrimitiveJSON.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 346 of file GEO_PrimTetra.C.

virtual bool HDK_Sample::geo_PrimTetraJSON::loadField ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const GA_LoadMap load 
) const
inlinevirtual

Load the i'th entry of the primitive's private schema from a JSON stream.

Implements GA_PrimitiveJSON.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 320 of file GEO_PrimTetra.C.

virtual bool HDK_Sample::geo_PrimTetraJSON::loadField ( GA_Primitive prim,
int  i,
UT_JSONParser p,
const UT_JSONValue value,
const GA_LoadMap load 
) const
inlinevirtual

Load the i'th entry of the primitive's private schema from a JSON value. The parser is passed in so that errors/warnings can be added.

The default implementation just calls:

UT_AutoJSONIStream is(p, value);
return loadField(prim, i, p, load);

Reimplemented from GA_PrimitiveJSON.

Definition at line 333 of file GEO_PrimTetra.C.

virtual bool HDK_Sample::geo_PrimTetraJSON::saveField ( const GA_Primitive prim,
int  i,
UT_JSONWriter w,
const GA_SaveMap save 
) const
inlinevirtual

Save the i'th entry of the primitive's schema to the JSON stream. You can assume that the GA_Primitive is the correct type (i.e. a static cast is ok).

Implements GA_PrimitiveJSON.

Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 295 of file GEO_PrimTetra.C.

virtual bool HDK_Sample::geo_PrimTetraJSON::saveField ( const GA_Primitive prim,
int  i,
UT_JSONValue value,
const GA_SaveMap save 
) const
inlinevirtual

Save the i'th entry of the primitive's schema to a JSON Value. This method should only be called when saving uniform data, which only happens if the equality checking returned true for the i'th entry. If the comparison fails, then this method will never be called.

The default method just calls:

return saveField(prim, i, *w, save);

Reimplemented from GA_PrimitiveJSON.

Definition at line 307 of file GEO_PrimTetra.C.

const GEO_PrimTetra* HDK_Sample::geo_PrimTetraJSON::tet ( const GA_Primitive p) const
inline
Examples:
tetprim/GEO_PrimTetra.C.

Definition at line 279 of file GEO_PrimTetra.C.

GEO_PrimTetra* HDK_Sample::geo_PrimTetraJSON::tet ( GA_Primitive p) const
inline

Definition at line 281 of file GEO_PrimTetra.C.


The documentation for this class was generated from the following file: