HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_RTIElementGroup Class Reference

Iterate over a group of elements Iterate over a group of elements. If no group is specified, this is is an empty range. More...

#include <GA_RTIElementGroup.h>

+ Inheritance diagram for GA_RTIElementGroup:

Public Member Functions

 GA_RTIElementGroup (const GA_IndexMap &index_map, const char *name, bool complement, bool ignore_order)
 
 GA_RTIElementGroup (const GA_IndexMap &index_map, const GA_ElementGroup *group, bool complement, bool ignore_order)
 
 GA_RTIElementGroup (const GA_RTIElementGroup &i)
 Copy constructor. More...
 
virtual ~GA_RTIElementGroup ()
 Destructor. More...
 
virtual void iterateRewind (GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const
 
virtual void iterateNext (GA_IteratorState &state, GA_Offset &start, GA_Offset &end) const
 
virtual GA_RangeTypeInterfacegetRemainder (const GA_IteratorState &state, const GA_Offset current) const
 
virtual GA_RangeTypeInterfacecopy () const
 
virtual bool isSplittable () const
 
virtual bool isEmpty () const
 
virtual GA_Size getMaxEntries () const
 
virtual GA_Size getEntries () const
 
virtual bool split (GA_RangeTypeInterface *list[2]) const
 
virtual bool isEqual (const GA_RangeTypeInterface &src) const
 
virtual void iterateCopy (GA_IteratorState &dest, const GA_IteratorState &src) const
 
virtual bool isOrdered () const
 
virtual bool areTraversalDeletionsSafe () const
 
virtual bool canContainDuplicates () const
 
virtual const GA_RangeMemberQueryallocMemberQuery () const
 
virtual GA_Size getPageCount () const
 
virtual bool getPageElementRange (GA_Range &, GA_Size, GA_Size) const
 
virtual GA_Offset getFirstOffsetInPage (GA_Size) const
 
- Public Member Functions inherited from GA_RTISingle
 GA_RTISingle (const GA_IndexMap &list)
 
 GA_RTISingle (const GA_RTISingle &other)
 
virtual ~GA_RTISingle ()
 
- 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...
 
bool splitIntoRanges (GA_Range &r1, GA_Range &r2) const
 Split into two existing ranges. More...
 
const GA_IndexMapgetIndexMap () const
 Accessor for the index map. More...
 
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

 GA_RTIElementGroup (const GA_ElementGroup &group, GA_Offset start, GA_Offset end, bool complement)
 Constructor used in splitting range. More...
 
void nextSpan (GA_IteratorState &state) const
 Move to the next span. More...
 
void incState (GA_IteratorState &state) const
 Move to the next offset in the current span. More...
 
bool ordered () const
 
virtual void singleRewind (GA_IteratorState &state) const
 
virtual bool singleGet (const GA_IteratorState &state, GA_Offset &value) const
 
virtual void singleNext (GA_IteratorState &state) const
 
- 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

Iterate over a group of elements Iterate over a group of elements. If no group is specified, this is is an empty range.

There are some caveats when specifying the complement of a group:

  • The order of elements is undefined, even if the group is ordered
  • If there is no group specified, the range will be empty The first caveate may be expected, the second may be non-intuitive.
See Also
GA_RangeTypeInterface

Definition at line 39 of file GA_RTIElementGroup.h.

Constructor & Destructor Documentation

GA_RTIElementGroup::GA_RTIElementGroup ( const GA_IndexMap index_map,
const char *  name,
bool  complement,
bool  ignore_order 
)

Construct given a group name (may be NULL)

If complement is false, the range will be composed of elements in the group. If complement is true, the complement of the group will be contained in the range.

GA_RTIElementGroup::GA_RTIElementGroup ( const GA_IndexMap index_map,
const GA_ElementGroup group,
bool  complement,
bool  ignore_order 
)

Construct given an optional group (the group owner should match the index map owner)

GA_RTIElementGroup::GA_RTIElementGroup ( const GA_RTIElementGroup i)

Copy constructor.

virtual GA_RTIElementGroup::~GA_RTIElementGroup ( )
virtual

Destructor.

GA_RTIElementGroup::GA_RTIElementGroup ( const GA_ElementGroup group,
GA_Offset  start,
GA_Offset  end,
bool  complement 
)
protected

Constructor used in splitting range.

Member Function Documentation

virtual const GA_RangeMemberQuery* GA_RTIElementGroup::allocMemberQuery ( ) const
virtual

RangeTypeInterface implementation

Reimplemented from GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::areTraversalDeletionsSafe ( ) const
virtual

RangeTypeInterface implementation

Reimplemented from GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::canContainDuplicates ( ) const
inlinevirtual

RangeTypeInterface implementation

Reimplemented from GA_RangeTypeInterface.

Definition at line 78 of file GA_RTIElementGroup.h.

virtual GA_RangeTypeInterface* GA_RTIElementGroup::copy ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual GA_Size GA_RTIElementGroup::getEntries ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual GA_Offset GA_RTIElementGroup::getFirstOffsetInPage ( GA_Size  ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual GA_Size GA_RTIElementGroup::getMaxEntries ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual GA_Size GA_RTIElementGroup::getPageCount ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::getPageElementRange ( GA_Range ,
GA_Size  ,
GA_Size   
) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual GA_RangeTypeInterface* GA_RTIElementGroup::getRemainder ( const GA_IteratorState state,
const GA_Offset  current 
) const
virtual

Get a GA_RangeTypeInterface representing the remainder of the range after iterating over part of it, as specified by state and current. NOTE: The caller is responsible for deleting the returned GA_RangeTypeInterface!

void GA_RTIElementGroup::incState ( GA_IteratorState state) const
protected

Move to the next offset in the current span.

virtual bool GA_RTIElementGroup::isEmpty ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::isEqual ( const GA_RangeTypeInterface src) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::isOrdered ( ) const
virtual

RangeTypeInterface implementation

Reimplemented from GA_RangeTypeInterface.

virtual bool GA_RTIElementGroup::isSplittable ( ) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual void GA_RTIElementGroup::iterateCopy ( GA_IteratorState dest,
const GA_IteratorState src 
) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.

virtual void GA_RTIElementGroup::iterateNext ( GA_IteratorState state,
GA_Offset start,
GA_Offset end 
) const
virtual

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

Reimplemented from GA_RTISingle.

virtual void GA_RTIElementGroup::iterateRewind ( GA_IteratorState state,
GA_Offset start,
GA_Offset end 
) const
virtual

We partially override these iterates. We pass down to the RTISingle for ordered groups, but unordered groups we can do a fast path. 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

Reimplemented from GA_RTISingle.

void GA_RTIElementGroup::nextSpan ( GA_IteratorState state) const
protected

Move to the next span.

bool GA_RTIElementGroup::ordered ( ) const
inlineprotected

Test if the group is ordered. When the range specifies the complement of the group, there can be no order.

Definition at line 128 of file GA_RTIElementGroup.h.

virtual bool GA_RTIElementGroup::singleGet ( const GA_IteratorState state,
GA_Offset value 
) const
protectedvirtual

RangeTypeInterface implementation

Implements GA_RTISingle.

virtual void GA_RTIElementGroup::singleNext ( GA_IteratorState state) const
protectedvirtual

RangeTypeInterface implementation

Implements GA_RTISingle.

virtual void GA_RTIElementGroup::singleRewind ( GA_IteratorState state) const
protectedvirtual

RangeTypeInterface implementation

Implements GA_RTISingle.

virtual bool GA_RTIElementGroup::split ( GA_RangeTypeInterface list[2]) const
virtual

RangeTypeInterface implementation

Implements GA_RangeTypeInterface.


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