HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_PrimitiveFactory Class Reference

#include <GA_PrimitiveFactory.h>

Classes

class  iterator
 Class to traverse all primitive definitions in the factory. More...
 

Public Types

typedef UT_StringMap
< UT_StringHolder
ga_DSODefinitions
 

Public Member Functions

 GA_PrimitiveFactory (const UT_FSATable *factory_ids, unsigned non_factory_id_start, int nentries_hint=0, bool isforprimarydetail=true)
 
 ~GA_PrimitiveFactory ()
 
GA_PrimitiveDefinitionregisterDefinition (const UT_StringHolder &name, GA_PrimitiveBlockConstructor construct, GA_PrimitiveFamilyMask mask=GA_FAMILY_NONE, const UT_StringHolder &label=UT_StringHolder(), const UT_StringHolder &icon=UT_StringHolder())
 
int getPrimTypeCount () const
 
const GA_PrimitiveDefinitionlookupDefinition (const UT_StringRef &name) const
 
const GA_PrimitiveDefinitionlookupDefinition (const GA_PrimitiveTypeId &id) const
 
const GA_PrimitiveDefinitionlookupDefinition (int id) const
 
GA_PrimitiveTypeId getFactoryTypeId (int id) const
 Given a factory type id, return the corresponding GA_PrimitiveTypeId. More...
 
GA_PrimitiveTypeMask getTypeMaskAll () const
 
void getDefinitionIdRange (unsigned &first, unsigned &last) const
 Query the first and last primitive type id in this factory. More...
 
void getDetailIntrinsicNames (UT_StringArray &names) const
 
bool isForPrimaryDetail () const
 
iterator begin () const
 
void addPrimitiveIntrinsicNames (const GA_PrimitiveTypeId &id, UT_Set< std::string > &names) const
 
bool registerIO (GA_IO *io)
 
const GA_IO * findIO (const char *name)
 
void getIONames (UT_StringArray &names)
 

Static Public Member Functions

static const ga_DSODefinitionsdsoDefinitions ()
 Return a list of all primitives defined by DSOs. More...
 

Friends

class GA_Detail
 
class GA_PrimitiveDefinition
 

Detailed Description

Member Typedef Documentation

Constructor & Destructor Documentation

GA_PrimitiveFactory::GA_PrimitiveFactory ( const UT_FSATable factory_ids,
unsigned  non_factory_id_start,
int  nentries_hint = 0,
bool  isforprimarydetail = true 
)
GA_PrimitiveFactory::~GA_PrimitiveFactory ( )

Member Function Documentation

void GA_PrimitiveFactory::addPrimitiveIntrinsicNames ( const GA_PrimitiveTypeId id,
UT_Set< std::string > &  names 
) const

Fill out the list of intrinsic names for the given primitive type. The intrinsic names are added to the set.

iterator GA_PrimitiveFactory::begin ( void  ) const
inline

Definition at line 183 of file GA_PrimitiveFactory.h.

static const ga_DSODefinitions& GA_PrimitiveFactory::dsoDefinitions ( )
static

Return a list of all primitives defined by DSOs.

const GA_IO* GA_PrimitiveFactory::findIO ( const char *  name)
inline

Interface to the IO table – this may not exist in future versions

Definition at line 189 of file GA_PrimitiveFactory.h.

void GA_PrimitiveFactory::getDefinitionIdRange ( unsigned &  first,
unsigned &  last 
) const

Query the first and last primitive type id in this factory.

void GA_PrimitiveFactory::getDetailIntrinsicNames ( UT_StringArray names) const
inline

Get the names of all detail intrinsics. You can avoid creating a detail to do this by calling GUgetFactory().getDetailIntrinsics(names);

Definition at line 106 of file GA_PrimitiveFactory.h.

GA_PrimitiveTypeId GA_PrimitiveFactory::getFactoryTypeId ( int  id) const
inline

Given a factory type id, return the corresponding GA_PrimitiveTypeId.

Definition at line 78 of file GA_PrimitiveFactory.h.

void GA_PrimitiveFactory::getIONames ( UT_StringArray names)
inline

Interface to the IO table – this may not exist in future versions

Definition at line 191 of file GA_PrimitiveFactory.h.

int GA_PrimitiveFactory::getPrimTypeCount ( ) const
inline

Return the number of possible primitive types in this factory. Primitive type id's may not always be contiguous (i.e. there may be invalid primitive id's in the range).

Definition at line 67 of file GA_PrimitiveFactory.h.

GA_PrimitiveTypeMask GA_PrimitiveFactory::getTypeMaskAll ( ) const

Get a primitive type mask representing all known types registered by this primitive factory.

bool GA_PrimitiveFactory::isForPrimaryDetail ( ) const
inline

Returns true if this factory is for use by GEO_Detail and false if this type is for use by GD_Detail.

Definition at line 113 of file GA_PrimitiveFactory.h.

const GA_PrimitiveDefinition* GA_PrimitiveFactory::lookupDefinition ( const UT_StringRef name) const

Lookup an existing primitive definition, by either token or primitive identifier.

const GA_PrimitiveDefinition* GA_PrimitiveFactory::lookupDefinition ( const GA_PrimitiveTypeId id) const
const GA_PrimitiveDefinition* GA_PrimitiveFactory::lookupDefinition ( int  id) const
GA_PrimitiveDefinition* GA_PrimitiveFactory::registerDefinition ( const UT_StringHolder name,
GA_PrimitiveBlockConstructor  construct,
GA_PrimitiveFamilyMask  mask = GA_FAMILY_NONE,
const UT_StringHolder label = UT_StringHolder(),
const UT_StringHolder icon = UT_StringHolder() 
)

Register a new primitive definition. In the event of a name collision with an existing definition, we return NULL.

Examples:
tetprim/GEO_PrimTetra.C.
bool GA_PrimitiveFactory::registerIO ( GA_IO *  io)
inline

Interface to the IO table – this may not exist in future versions

Definition at line 187 of file GA_PrimitiveFactory.h.

Friends And Related Function Documentation

friend class GA_Detail
friend

Definition at line 223 of file GA_PrimitiveFactory.h.

friend class GA_PrimitiveDefinition
friend

Definition at line 224 of file GA_PrimitiveFactory.h.


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