MOAB: Mesh Oriented datABase  (version 5.2.1)
moab::ByteArrayIterator Class Reference

#include <TagCompare.hpp>

Public Types

typedef std::pair
< EntityHandle, const char * > 
data_type

Public Member Functions

 ByteArrayIterator (EntityHandle start_handle, const void *data_array, size_t tag_size)
 ByteArrayIterator (EntityHandle start_handle, const void *data_array, const TagInfo &tag_info)
bool operator== (const ByteArrayIterator &other) const
bool operator!= (const ByteArrayIterator &other) const
ByteArrayIteratoroperator++ ()
ByteArrayIterator operator++ (int)
ByteArrayIteratoroperator-- ()
ByteArrayIterator operator-- (int)
ByteArrayIteratoroperator+= (size_t amt)
ByteArrayIteratoroperator-= (size_t amt)
EntityHandle operator- (const ByteArrayIterator &other) const
const data_typeoperator* () const
const data_typeoperator-> () const

Private Attributes

size_t step
data_type data

Detailed Description

Iterator to use in find_tag_values_equal for arrays of data

Definition at line 425 of file TagCompare.hpp.


Member Typedef Documentation

typedef std::pair< EntityHandle, const char* > moab::ByteArrayIterator::data_type

Definition at line 428 of file TagCompare.hpp.


Constructor & Destructor Documentation

moab::ByteArrayIterator::ByteArrayIterator ( EntityHandle  start_handle,
const void *  data_array,
size_t  tag_size 
) [inline]

Definition at line 435 of file TagCompare.hpp.

        : step( tag_size ), data( start_handle, reinterpret_cast< const char* >( data_array ) )

    {
    }
moab::ByteArrayIterator::ByteArrayIterator ( EntityHandle  start_handle,
const void *  data_array,
const TagInfo tag_info 
) [inline]

Definition at line 440 of file TagCompare.hpp.

        : step( tag_info.get_size() == MB_VARIABLE_LENGTH ? sizeof( VarLenTag ) : tag_info.get_size() ),
          data( start_handle, reinterpret_cast< const char* >( data_array ) )
    {
    }

Member Function Documentation

bool moab::ByteArrayIterator::operator!= ( const ByteArrayIterator other) const [inline]

Definition at line 449 of file TagCompare.hpp.

References data.

    {
        return data.first != other.data.first;
    }
const data_type& moab::ByteArrayIterator::operator* ( ) const [inline]

Definition at line 493 of file TagCompare.hpp.

References data.

    {
        return data;
    }
ByteArrayIterator& moab::ByteArrayIterator::operator++ ( ) [inline]

Definition at line 453 of file TagCompare.hpp.

References data, and step.

Referenced by operator++().

    {
        ++data.first;
        data.second += step;
        return *this;
    }
ByteArrayIterator moab::ByteArrayIterator::operator++ ( int  ) [inline]

Definition at line 459 of file TagCompare.hpp.

References operator++().

    {
        ByteArrayIterator result( *this );
        operator++();
        return result;
    }
ByteArrayIterator& moab::ByteArrayIterator::operator+= ( size_t  amt) [inline]

Definition at line 477 of file TagCompare.hpp.

References data, and step.

    {
        data.first += amt;
        data.second += amt * step;
        return *this;
    }
EntityHandle moab::ByteArrayIterator::operator- ( const ByteArrayIterator other) const [inline]

Definition at line 489 of file TagCompare.hpp.

References data.

    {
        return data.first - other.data.first;
    }
ByteArrayIterator& moab::ByteArrayIterator::operator-- ( ) [inline]

Definition at line 465 of file TagCompare.hpp.

References data, and step.

Referenced by operator--().

    {
        --data.first;
        data.second -= step;
        return *this;
    }
ByteArrayIterator moab::ByteArrayIterator::operator-- ( int  ) [inline]

Definition at line 471 of file TagCompare.hpp.

References operator--().

    {
        ByteArrayIterator result( *this );
        operator--();
        return result;
    }
ByteArrayIterator& moab::ByteArrayIterator::operator-= ( size_t  amt) [inline]

Definition at line 483 of file TagCompare.hpp.

References data, and step.

    {
        data.first -= amt;
        data.second -= amt * step;
        return *this;
    }
const data_type* moab::ByteArrayIterator::operator-> ( ) const [inline]

Definition at line 497 of file TagCompare.hpp.

References data.

    {
        return &data;
    }
bool moab::ByteArrayIterator::operator== ( const ByteArrayIterator other) const [inline]

Definition at line 445 of file TagCompare.hpp.

References data.

    {
        return data.first == other.data.first;
    }

Member Data Documentation

Definition at line 431 of file TagCompare.hpp.

Referenced by operator++(), operator+=(), operator--(), and operator-=().

List of all members.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines