11 #ifndef __GA_IntrinsicManager__
12 #define __GA_IntrinsicManager__
53 {
return myAttributes.entries(); }
64 return isValidHandle(lhandle)
65 ? myAttributes(lhandle)->getGlobalId()
73 return isValidHandle(handle)
74 ? myAttributes(handle)->getName()
81 {
return getStorage(getLocalHandle(name)); }
84 return isValidHandle(handle)
85 ? myAttributes(handle)->getStorage()
93 {
return getReadOnly(getLocalHandle(name)); }
96 return isValidHandle(handle)
97 ? myAttributes(handle)->getReadOnly()
104 {
return getCollapseSingletons(getLocalHandle(name)); }
107 return isValidHandle(handle)
108 ? myAttributes(handle)->getCollapseSingletons()
116 {
return getUserId(getLocalHandle(name)); }
119 return isValidHandle(handle)
120 ? myAttributes(handle)->getUserId()
128 {
return getOptions(getLocalHandle(name)); }
131 return isValidHandle(handle)
132 ? &myAttributes(handle)->getOptions()
169 : myManager(r.myManager)
181 myManager = r.myManager;
191 myOk = myManager->startDefinition(def);
209 h = myManager->addAttribute(store,
210 name, user_id, read_only,
211 collapse_singletons, options);
212 if (!GAisValidGlobalIntrinsic(h))
226 myOk = myManager->endDefinition(*myDef);
264 myManager = src.myManager;
265 myCurrent = src.myCurrent;
266 myEntries = src.myEntries;
277 return !myManager || myCurrent >= myEntries;
284 {
return myManager->getName(myCurrent); }
286 {
return myCurrent; }
289 {
return myCurrent; }
293 : myManager(manager),
295 myEntries(manager->getLocalEntries())
311 {
return h >= 0 && h < myAttributes.entries(); }
314 class ga_IntrinsicAttribute
323 bool collapse_singletons,
327 , myGlobalId(global_id)
328 , myLocalId(local_id)
331 , myReadOnly(read_only)
332 , myCollapseSingletons(collapse_singletons)
335 myOptions = *options;
337 ~ga_IntrinsicAttribute() {}
341 const UT_Options &getOptions()
const {
return myOptions; }
342 int getGlobalId()
const {
return myGlobalId; }
343 int getLocalId()
const {
return myLocalId; }
344 int getUserId()
const {
return myUserId; }
345 bool getReadOnly()
const {
return myReadOnly; }
346 bool getCollapseSingletons()
const
347 {
return myCollapseSingletons; }
356 bool myCollapseSingletons;
382 int user_id,
bool read_only,
383 CollapseSingletons collapse_singletons,
GA_GlobalIntrinsic getGlobalHandle(GA_LocalIntrinsic lhandle) const
bool getOk() const
Return status of the operation.
const UT_StringHolder & getToken() const
Get the current attribute token.
GA_GlobalIntrinsic addAttribute(GA_StorageClass store, const UT_StringRef &name, int user_id, bool read_only, CollapseSingletons collapse_singletons, const UT_Options *options=NULL)
int getLocalEntries() const
Return the number of local handles defined in the manager.
Manager to keep track of global handle to name mappings.
Stores information about intrinsic attributes for classes.
bool getCollapseSingletons(const UT_StringRef &name) const
iterator(const iterator &src)
Copy constructor.
PXL_API const char * getName(const ColorSpace *space)
Return the name of the color space.
static const UT_StringHolder theEmptyString
const UT_Options * getOptions(GA_LocalIntrinsic handle) const
void advance()
Advance to the next iteration.
const UT_Options * getOptions(const UT_StringRef &name) const
GLuint const GLchar * name
bool getReadOnly(GA_LocalIntrinsic handle) const
const iterator & operator=(const iterator &src)
Assignment operator.
int getUserId(GA_LocalIntrinsic handle) const
GA_StorageClass getStorage(const UT_StringRef &name) const
GLfloat GLfloat GLfloat GLfloat h
A map of string to various well defined value types.
Registrar & operator=(const Registrar &r)
Assignment operator.
iterator & operator++()
Increment operator.
bool start(GA_IntrinsicDef &def)
Start defining attributes for the given intrinsic definition.
Registrar(const Registrar &r)
Copy constructor.
bool getReadOnly(const UT_StringRef &name) const
const UT_StringHolder & getName(GA_LocalIntrinsic handle) const
Look up an attribute name from the given handle.
int getIndex() const
Get the current attribute handle (global id)
Container class for all geometry.
bool getCollapseSingletons(GA_LocalIntrinsic handle) const
bool atEnd() const
Test to see if the iteration is complete.
iterator()
Simple default constructor.
Definition of a geometric primitive.
GA_LocalIntrinsic getLocalHandle() const
iterator begin() const
Start traversal of intrinsic attributes names.
int getUserId(const UT_StringRef &name) const
GA_StorageClass getStorage(GA_LocalIntrinsic handle) const
#define GA_INVALID_INTRINSIC_HANDLE