All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GA_IteratorState Class Reference

#include <GA_IteratorState.h>

+ Inheritance diagram for GA_IteratorState:

Public Member Functions

 GA_IteratorState ()
 ~GA_IteratorState ()
void copyState (const GA_IteratorState &src)
 Copy the POD state (not including nested state) More...
GA_IteratorStatecreateNestedState ()
void clearNestedState ()
 Clear the nested pointer. More...
GA_IteratorStategetNestedState () const
 Access to the nested state. More...

Public Attributes

GA_Offset myOffset
GA_Index myIndex
GA_Size mySize

Additional Inherited Members

- Protected Member Functions inherited from UT_NonCopyableNS::UT_NonCopyable
 UT_NonCopyable ()=default
 ~UT_NonCopyable ()=default
 UT_NonCopyable (const UT_NonCopyable &)=delete
UT_NonCopyableoperator= (const UT_NonCopyable &)=delete

Detailed Description

State information for a GA_Iterator. This stores unique information for each iterator which the GA_Range bound to the iterator can reference.

Definition at line 24 of file GA_IteratorState.h.

Constructor & Destructor Documentation

GA_IteratorState::GA_IteratorState ( )

Definition at line 27 of file GA_IteratorState.h.

GA_IteratorState::~GA_IteratorState ( )

Member Function Documentation

void GA_IteratorState::clearNestedState ( )

Clear the nested pointer.

void GA_IteratorState::copyState ( const GA_IteratorState src)

Copy the POD state (not including nested state)

Definition at line 38 of file GA_IteratorState.h.

GA_IteratorState& GA_IteratorState::createNestedState ( )

Some ranges contain nested ranges. These RTIs can create nested states. These nested states should be used to store the iteration state for the nested range. Call createNestedState() in GA_RangeTypeInterface::iterateCreate(). And it should only be called once. For example, a nested range might have code like:

GA_RTINested::iterateCreate(GA_IteratorState &state)
// Use any data in state to store the parent's state information
GA_RTINested::iterateDestroy(GA_IteratorState &state)
// Do any cleanup on state that you need
GA_RTINested::iterateRewind(GA_IteratorState &state,
GA_Offset &start, GA_Offset &end) const
GA_Offset n_start, n_end;
myBase->iterateRewind(state.getNestedState(), n_start, n_end);
// Use base_start base_end and the state to rewind the parent
GA_RTINested::iterateCopy(GA_IteratorState &d,
const GA_IteratorState &s)
myBase->iterateCopy(nest, src.getNestedState());
GA_IteratorState& GA_IteratorState::getNestedState ( ) const

Access to the nested state.

Member Data Documentation

GA_Index GA_IteratorState::myIndex

Definition at line 51 of file GA_IteratorState.h.

GA_Offset GA_IteratorState::myOffset

Definition at line 50 of file GA_IteratorState.h.

void* GA_IteratorState::myPointer

These variables provide easy storage to GA_RangeTypeInterface without the style necessarily having to allocate state information (i.e. the named storage)

Definition at line 49 of file GA_IteratorState.h.

GA_Size GA_IteratorState::mySize

Definition at line 52 of file GA_IteratorState.h.

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