Has a pointer to a TableObjIdIndex and allows to iterate through this index. Is instantiated e.g. for AllSets so that they can iterate through indexes independently.
More...
#include <GloIndexPool.h>
Has a pointer to a TableObjIdIndex and allows to iterate through this index. Is instantiated e.g. for AllSets so that they can iterate through indexes independently.
- Copyright
- © 2010 Helmut Jakoby
- Author
- Helmut Jakoby
◆ TableObjIdIndexIterator() [1/3]
glo::IndexPool::TableObjIdIndexIterator::TableObjIdIndexIterator |
( |
| ) |
|
|
protected |
The default constructor is not available.
◆ TableObjIdIndexIterator() [2/3]
glo::IndexPool::TableObjIdIndexIterator::TableObjIdIndexIterator |
( |
TableObjIdIndex * | pTableObjIdIndex | ) |
|
Constructor with parameter passing.
- Parameters
-
[in] | pTableObjIdIndex | Pointer to a TableObjIdIndex through which an object of this class can iterate independently. |
- Exceptions
-
◆ TableObjIdIndexIterator() [3/3]
Copy constructor.
- Parameters
-
[in] | rT | The data is copied from this object. |
◆ ~TableObjIdIndexIterator()
glo::IndexPool::TableObjIdIndexIterator::~TableObjIdIndexIterator |
( |
| ) |
|
◆ getClassID()
unsigned long glo::IndexPool::TableObjIdIndexIterator::getClassID |
( |
| ) |
const |
◆ getObjIdPosTuple()
Returns in passed reference a pointer to a copied ObjIdPosTuple from the map that manages the stored object IDs and their table position, in relation to eMode.
- Parameters
-
[in,out] | prRetVal | The objects found, if any |
[in] | eMode | The seek mode. |
Parameter examples:
- Returns
- A return < 0 indicates an error.
A return == ERR_RANGE indicates the end of the list.
- Attention
- The calling instance must remove the returned object from memory.
◆ getTableObjIdIndexSize()
std::size_t glo::IndexPool::TableObjIdIndexIterator::getTableObjIdIndexSize |
( |
| ) |
const |
Returns the number of elements in the map which manages the stored object IDs and their table position from m_pTableObjIdIndex.
- Returns
- The quantity.
◆ inObjIdIndex()
bool glo::IndexPool::TableObjIdIndexIterator::inObjIdIndex |
( |
const ObjID & | rObjID | ) |
|
Checks if an ObjIdPosTuple with passed object ID exists in the map, which manages the stored object IDs and their table position.
- Parameters
-
[in] | rObjID | The object ID you are looking for. |
- Returns
- If true, it exists.
◆ operator=()
Assignment operator.
- Parameters
-
[in] | rT | The data is transferred from this object. |
◆ setCurrentObject()
int glo::IndexPool::TableObjIdIndexIterator::setCurrentObject |
( |
const ObjID & | rObjID | ) |
|
Sets the internal iterator to the position of the passed object ID in the map, which manages the stored object IDs and their table position.
- Parameters
-
- Returns
- A return value < 0 indicates an error.
◆ setNearestObject() [1/2]
bool glo::IndexPool::TableObjIdIndexIterator::setNearestObject |
( |
const ObjID & | rObjID | ) |
|
Sets the internal iterator to the "next", in the best case to the exact position of the passed object ID in the map, which manages the stored object IDs and their table position.
- Parameters
-
- Returns
- If true, then was found directly, otherwise the next or none.
◆ setNearestObject() [2/2]
bool glo::IndexPool::TableObjIdIndexIterator::setNearestObject |
( |
std::map< ObjID, ObjIdPosTuple * >::iterator & | rIterator, |
|
|
const ObjID & | rObjID ) |
|
protected |
◆ setPosition()
int glo::IndexPool::TableObjIdIndexIterator::setPosition |
( |
std::size_t | nPosition | ) |
|
Sets internal iterator to the passed position (start is at 0) in the map, which manages the stored object IDs and their table position.
- Parameters
-
[in] | nPosition | The position. |
- Returns
- A return value < 0 indicates an error.
◆ setWithSubClasses()
void glo::IndexPool::TableObjIdIndexIterator::setWithSubClasses |
( |
bool | bWithSubClasses | ) |
|
◆ withSubClasses()
bool glo::IndexPool::TableObjIdIndexIterator::withSubClasses |
( |
| ) |
const |
◆ m_bWithSubClasses
bool glo::IndexPool::TableObjIdIndexIterator::m_bWithSubClasses |
|
private |
If set, then the ObjIdPosTuple of the subclasses are also returned, otherwise not. The referenced TableObjIdIndex has a class ID, but also manages the subclasses.
◆ m_pLastTableObjIdIndexItem
ObjIdPosTuple* glo::IndexPool::TableObjIdIndexIterator::m_pLastTableObjIdIndexItem |
|
private |
The last delivered element (a copy) to be able to start the next iterator step. No own iterator is kept, because between two accesses the referenced element could have been deleted from the m_pTableObjIdIndex.
◆ m_pTableObjIdIndex
TableObjIdIndex* glo::IndexPool::TableObjIdIndexIterator::m_pTableObjIdIndex |
|
private |
A pointer to a TableObjIdIndex, through which an object of this class can iterate independently.
The documentation for this class was generated from the following file: