HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RTISingle Class Referenceabstract

Base class for ranges providing consolidation to contiguous blocks. More...

#include <GA_RTISingle.h>

+ Inheritance diagram for GA_RTISingle:

Public Member Functions

 GA_RTISingle (const GA_IndexMap &list)
 
 GA_RTISingle (const GA_RTISingle &other)
 
 ~GA_RTISingle () override
 
void iterateRewind (GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const override
 
void iterateNext (GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const override
 
- Public Member Functions inherited from GA_RangeTypeInterface
 GA_RangeTypeInterface (const GA_IndexMap &list)
 
 GA_RangeTypeInterface (const GA_RangeTypeInterface &other)
 
virtual ~GA_RangeTypeInterface ()
 
GA_AttributeOwner getOwner () const
 Query type of element. More...
 
bool is_divisible () const
 Convenience method to test whether the range is divisible. More...
 
virtual GA_RangeTypeInterfacecopy () const =0
 Method to create a copy of this selection. More...
 
bool splitIntoRanges (GA_Range &r1, GA_Range &r2) const
 Split into two existing ranges. More...
 
virtual bool split (GA_RangeTypeInterface *list[2]) const =0
 
virtual bool isSplittable () const =0
 
virtual GA_Size getPageCount () const =0
 For splittable ranges, return the number of pages contained in the range. More...
 
virtual bool getPageElementRange (GA_Range &range, GA_Size relative_page, GA_Size npages=1) const =0
 
virtual GA_Offset getFirstOffsetInPage (GA_Size relative_page) const =0
 
virtual bool isEmpty () const =0
 Check whether the range is empty. More...
 
virtual GA_Size getMaxEntries () const =0
 Get an upper bound on the size of the range. More...
 
virtual GA_Size getEntries () const =0
 
virtual void iterateCopy (GA_IteratorState &dest, const GA_IteratorState &src) const =0
 Copy iterator state. The dest state will not have been constructed. More...
 
virtual bool isOrdered () const
 Query if the RTI is ordered according to the index. More...
 
virtual bool areTraversalDeletionsSafe () const
 
virtual bool canContainDuplicates () const
 
virtual const GA_RangeMemberQueryallocMemberQuery () const
 
const GA_IndexMapgetIndexMap () const
 Accessor for the index map. More...
 
virtual bool isEqual (const GA_RangeTypeInterface &src) const =0
 
bool operator== (const GA_RangeTypeInterface &src) const
 
virtual void iterateCreate (GA_IteratorState &state) const
 
virtual void iterateDestroy (GA_IteratorState &state) const
 
void incref () const
 
void decref () const
 

Protected Member Functions

virtual void singleRewind (GA_IteratorState &state) const =0
 
virtual bool singleGet (const GA_IteratorState &state, GA_Offset &value) const =0
 
virtual void singleNext (GA_IteratorState &state) const =0
 
- Protected Member Functions inherited from GA_RangeTypeInterface
bool getPageElementRangeNonSplittable () const
 Method which can be called for getPageElementRange() More...
 
GA_Offset getFirstOffsetInPageNonSplittable () const
 Method which can be called for getFirstOffsetInPage() More...
 
GA_Size computeEntries () const
 This method creates an iterator and counts the entries. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GA_RangeTypeInterface
static voidoperator new (size_t size, void *p)
 
static voidoperator new (size_t size)
 
static void operator delete (void *p, size_t size)
 

Detailed Description

Base class for ranges providing consolidation to contiguous blocks.

GA_Iterator uses contiguous blocks for iteration, but it is often easier to implement iteration over single elements. Such range implementations can derive from this class to automatically perform the required consolidation.

See Also
GA_Range

Definition at line 31 of file GA_RTISingle.h.

Constructor & Destructor Documentation

GA_RTISingle::GA_RTISingle ( const GA_IndexMap list)
GA_RTISingle::GA_RTISingle ( const GA_RTISingle other)
GA_RTISingle::~GA_RTISingle ( )
override

Member Function Documentation

void GA_RTISingle::iterateNext ( GA_IteratorState state,
GA_Offset start,
GA_Offset end 
) const
overridevirtual

Choose the next contiguous range. If the iteration is complete, start should be set to a value greater than end.

Implements GA_RangeTypeInterface.

void GA_RTISingle::iterateRewind ( GA_IteratorState state,
GA_Offset start,
GA_Offset end 
) const
overridevirtual

Rewind the iterator (i.e. reset the iterator state). The start/offset should be initialized so that they define the first contiguous "block" for iteration. If the range is empty, start should be greater than end

Implements GA_RangeTypeInterface.

virtual bool GA_RTISingle::singleGet ( const GA_IteratorState state,
GA_Offset value 
) const
protectedpure virtual

Some iterators are not set up to perform block iteration. These methods can be used to define single iteration. The default iterateRewind() and iterateNext() methods will call these methods to collate single iterations into a block.

Iteration using the single interface goes something like:

for (singleRewind(state); singleGet(state, offset); singleNext(state))
Warning
Even if you've optimized the iterateRewind()/iterateNext() code, you still need to implement these methods.

Implemented in GA_RTIElementGroup.

virtual void GA_RTISingle::singleNext ( GA_IteratorState state) const
protectedpure virtual

Some iterators are not set up to perform block iteration. These methods can be used to define single iteration. The default iterateRewind() and iterateNext() methods will call these methods to collate single iterations into a block.

Iteration using the single interface goes something like:

for (singleRewind(state); singleGet(state, offset); singleNext(state))
Warning
Even if you've optimized the iterateRewind()/iterateNext() code, you still need to implement these methods.

Implemented in GA_RTIElementGroup.

virtual void GA_RTISingle::singleRewind ( GA_IteratorState state) const
protectedpure virtual

Some iterators are not set up to perform block iteration. These methods can be used to define single iteration. The default iterateRewind() and iterateNext() methods will call these methods to collate single iterations into a block.

Iteration using the single interface goes something like:

for (singleRewind(state); singleGet(state, offset); singleNext(state))
Warning
Even if you've optimized the iterateRewind()/iterateNext() code, you still need to implement these methods.

Implemented in GA_RTIElementGroup.


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