#include <OSGStateChunk.h>
Class Access | |
| typedef std::vector< std::string >::const_iterator | iterator |
| *static const Char8 * | getName (UInt32 index) |
| static Int32 | getNumSlots (UInt32 index) |
| static UInt32 | getUsedSlots (void) |
| static iterator | begin () |
| static iterator | end () |
Public Member Functions | |
Constructor | |
| * | StateChunkClass (Char8 *name, UInt32 numslots=1) |
Instance Access | |
| *UInt32 | getId (void) const |
| const Char8 * | getName (void) const |
| Int32 | getNumSlots (void) const |
Private Attributes | |
| UInt32 | _classId |
Static Private Attributes | |
| static std::vector< std::string > * | _classNames = NULL |
| static std::vector< UInt32 > * | _numslots = NULL |
Definition at line 58 of file OSGStateChunk.h.
|
|
Iterator type to access the chunk class list. Definition at line 86 of file OSGStateChunk.h. |
|
||||||||||||
|
Constructor. The name is mandatory, the number of concurrently active slots is optional, default is 1. Definition at line 106 of file OSGStateChunk.cpp. References _classId, _classNames, and _numslots. 00107 { 00108 if(!_classNames) 00109 { 00110 _classNames = new std::vector<std::string>(0); 00111 _numslots = new std::vector< UInt32>(0); 00112 } 00113 00114 _classId = _classNames->size(); 00115 00116 for(unsigned i = 0; i < numslots; i++) 00117 { 00118 _classNames->push_back(std::string(name)); 00119 _numslots->push_back (numslots); 00120 } 00121 }
|
|
|
|
Definition at line 128 of file OSGStateChunk.cpp. References _classId. 00129 { 00130 return(*_classNames)[_classId].c_str(); 00131 }
|
|
|
Definition at line 133 of file OSGStateChunk.cpp. References _classId. Referenced by osg::State::activate(), osg::State::changeFrom(), osg::State::chunkPresent(), osg::State::deactivate(), and osg::State::subChunk(). 00134 { 00135 return(*_numslots)[_classId]; 00136 }
|
|
|
Access the name for the class whose id is index. Definition at line 141 of file OSGStateChunk.cpp. 00142 { 00143 if(index >=(*_classNames).size()) 00144 return "<Unknown StatChunkClass!>"; 00145 00146 return(*_classNames)[index].c_str(); 00147 }
|
|
|
Access the number of slots for the class whose id is index. Definition at line 152 of file OSGStateChunk.cpp. References _numslots. 00153 { 00154 if(index >= (*_numslots).size()) 00155 return -1; 00156 00157 return (*_numslots)[index]; 00158 }
|
|
|
Iterator type to access the chunk class list. Definition at line 68 of file OSGStateChunk.inl. References _numslots. 00069 { 00070 return StateChunkClass::_numslots->size(); 00071 }
|
|
|
Iterator to allow access to all known StateChunkClasses. Definition at line 168 of file OSGStateChunk.cpp. References _classNames. 00169 { 00170 return _classNames->begin(); 00171 }
|
|
|
Iterator to allow access to all known StateChunkClasses. Definition at line 176 of file OSGStateChunk.cpp. References _classNames. 00177 { 00178 return _classNames->end(); 00179 }
|
|
|
The numerical ID associated with each StateChunkClass. It is used to uniquely identify and quickly compare the class. Dev: The classId is consecutive in the number of slots allocated to the chunk class, i.e. if a class has id 4 and 4 chunks, the next registered class will get id 8. The classId is used as an index into the osg::State's chunk vector, which necessitates this behaviour. Referenced by getId(), getName(), getNumSlots(), and StateChunkClass(). |
|
|
The global vector of known StateChunkClasses' names. Use StateChunkClass::getName with the Classes ID to access it. Dev: See the osg::StateChunkClass::_classId for details. Definition at line 91 of file OSGStateChunk.cpp. Referenced by begin(), end(), and StateChunkClass(). |
|
|
The global vector of known StateChunkClasses' number of concurrently active slots. Use StateChunkClass::getNumSlots with the Class's ID to access it. Dev: See the osg::StateChunkClass::_classId for details. Definition at line 100 of file OSGStateChunk.cpp. Referenced by getNumSlots(), getUsedSlots(), and StateChunkClass(). |
1.4.3