HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_IntrinsicManager::Registrar Class Reference

#include <GA_IntrinsicManager.h>

Public Member Functions

 Registrar (const Registrar &r)
 Copy constructor. More...
 
 ~Registrar ()
 Destructor. More...
 
Registraroperator= (const Registrar &r)
 Assignment operator. More...
 
bool start (GA_IntrinsicDef &def)
 Start defining attributes for the given intrinsic definition. More...
 
GA_GlobalIntrinsic addAttribute (GA_StorageClass store, const UT_StringRef &name, int user_id, bool read_only, const UT_Options *options=NULL)
 
bool getOk () const
 Return status of the operation. More...
 

Friends

class GA_Primitive
 
class GA_Detail
 

Detailed Description

The Registrar class is used to register intrinsic attributes Sample usage for a GA_Primitive sub-class might be something like:

static GA_IntrinsicDef theClassIntrinsics;
MyClass::registerIntrinsics(GA_PrimitiveDefinition &def)
{
MyBaseClass:registerIntrinsics(def);
if (r.start(theClassIntrinsics))
{
r.addAttribute(GA_STORECLASS_STRING, "intrinsic1", 0, true);
r.addAttribute(GA_STORECLASS_FLOAT, "intrinsic2", 1, true);
}
return r;
}

Definition at line 145 of file GA_IntrinsicManager.h.

Constructor & Destructor Documentation

GA_IntrinsicManager::Registrar::Registrar ( const Registrar r)
inline

Copy constructor.

Definition at line 149 of file GA_IntrinsicManager.h.

GA_IntrinsicManager::Registrar::~Registrar ( )
inline

Destructor.

Definition at line 155 of file GA_IntrinsicManager.h.

Member Function Documentation

GA_GlobalIntrinsic GA_IntrinsicManager::Registrar::addAttribute ( GA_StorageClass  store,
const UT_StringRef name,
int  user_id,
bool  read_only,
const UT_Options options = NULL 
)
inline

Method to add an intrinsic attribute.

  • The name must be unique through the inheritance hierarchy
  • The user_id is used for evaluation (see GA_IntrinsicEval)

Definition at line 180 of file GA_IntrinsicManager.h.

bool GA_IntrinsicManager::Registrar::getOk ( ) const
inline

Return status of the operation.

Definition at line 200 of file GA_IntrinsicManager.h.

Registrar& GA_IntrinsicManager::Registrar::operator= ( const Registrar r)
inline

Assignment operator.

Definition at line 160 of file GA_IntrinsicManager.h.

bool GA_IntrinsicManager::Registrar::start ( GA_IntrinsicDef def)
inline

Start defining attributes for the given intrinsic definition.

Definition at line 167 of file GA_IntrinsicManager.h.

Friends And Related Function Documentation

friend class GA_Detail
friend

Definition at line 215 of file GA_IntrinsicManager.h.

friend class GA_Primitive
friend

Definition at line 214 of file GA_IntrinsicManager.h.


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