Developer Documentation
PluginFunctions::ObjectIterator Class Reference

Core Data Iterator. More...

#include <OpenFlipper/BasePlugin/PluginFunctions.hh>

Public Types

typedef BaseObjectData value_type
 type of the Objects the iterator works on
 
typedef BaseObjectDatavalue_handle
 handle type (just an int)
 
typedef value_typereference
 reference type
 
typedef value_typepointer
 basic pointer type
 

Public Member Functions

 ObjectIterator (IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 Use this constructor for iterating through your data. More...
 
 ObjectIterator (BaseObjectData *pos, IteratorRestriction _restriction=ALL_OBJECTS, DataType _dataType=DATA_ALL)
 additional constructor starting at a given position
 
 ObjectIterator (const ObjectIterator &)=default
 
 operator value_handle ()
 return the current position of the iterator
 
bool operator== (const ObjectIterator &_rhs) const
 compare iterators
 
bool operator!= (const ObjectIterator &_rhs) const
 compare iterators
 
ObjectIteratoroperator= (const ObjectIterator &)=default
 assign iterators
 
pointer operator-> ()
 dereference
 
ObjectIteratoroperator++ ()
 next element
 
ObjectIteratoroperator-- ()
 last element
 
BaseObjectDataoperator* ()
 dereference the iterator More...
 
BaseObjectDataindex ()
 return current position of the iterator
 

Private Member Functions

void proceedToNextBaseObjectData (BaseObject *&_object)
 

Private Attributes

BaseObjectDatapos_
 current position of the iterator
 
DataType dataType_
 returned data types of the iterator
 
IteratorRestriction restriction_
 Restriction of the iterator.
 

Detailed Description

Core Data Iterator.

This is the core iterator for the whole framework. You should use this iterator to access your data.
You can choose if the iterator returns only Target, Source or all objects.
Additionally you can set the type of objects returned by the iterator. The ObjectIterator will only return real Objects. Groups are not considered to be objects

Definition at line 441 of file PluginFunctions.hh.

Constructor & Destructor Documentation

◆ ObjectIterator()

PluginFunctions::ObjectIterator::ObjectIterator ( IteratorRestriction  _restriction = ALL_OBJECTS,
DataType  _dataType = DATA_ALL 
)

Use this constructor for iterating through your data.

Parameters
_restrictionUse this parameter to define which objects will be returned.
You can select between ALL_OBJECTS , TARGET_OBJECTS , SOURCE_OBJECTS.
_dataTypeUse this parameter to select the returned object types. You can use DATA_ALL DATA_POLY_MESH DATA_TRIANGLE_MESH DATA_VOLUME

Definition at line 56 of file PluginFunctionsIterator.cc.

Member Function Documentation

◆ operator*()

BaseObjectData * PluginFunctions::ObjectIterator::operator* ( )

dereference the iterator

This operator returns a pointer to the current object the iterator points to.

Returns
Pointer to the current ObjectData

Definition at line 165 of file PluginFunctionsIterator.cc.

◆ proceedToNextBaseObjectData()

void PluginFunctions::ObjectIterator::proceedToNextBaseObjectData ( BaseObject *&  _object)
inlineprivate

Takes an object and goes through the object tree to the next BaseObjectData It stops at the root node.

Definition at line 174 of file PluginFunctionsIterator.cc.


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