Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
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 446 of file TagCompare.hpp.


Member Typedef Documentation

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

Definition at line 449 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 456 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 461 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 470 of file TagCompare.hpp.

References data.

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

Definition at line 514 of file TagCompare.hpp.

References data.

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

Definition at line 474 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 480 of file TagCompare.hpp.

References operator++().

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

Definition at line 498 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 510 of file TagCompare.hpp.

References data.

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

Definition at line 486 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 492 of file TagCompare.hpp.

References operator--().

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

Definition at line 504 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 518 of file TagCompare.hpp.

References data.

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

Definition at line 466 of file TagCompare.hpp.

References data.

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

Member Data Documentation

Definition at line 452 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