Loading [MathJax]/extensions/tex2jax.js
Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

◆ data_type

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

Definition at line 449 of file TagCompare.hpp.

Constructor & Destructor Documentation

◆ ByteArrayIterator() [1/2]

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

Definition at line 456 of file TagCompare.hpp.

457  : step( tag_size ), data( start_handle, reinterpret_cast< const char* >( data_array ) ) 458  459  { 460  }

◆ ByteArrayIterator() [2/2]

moab::ByteArrayIterator::ByteArrayIterator ( EntityHandle  start_handle,
const void *  data_array,
const TagInfo tag_info 
)
inline

Definition at line 461 of file TagCompare.hpp.

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

Member Function Documentation

◆ operator!=()

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

Definition at line 470 of file TagCompare.hpp.

471  { 472  return data.first != other.data.first; 473  }

References data.

◆ operator*()

const data_type& moab::ByteArrayIterator::operator* ( ) const
inline

Definition at line 514 of file TagCompare.hpp.

515  { 516  return data; 517  }

References data.

◆ operator++() [1/2]

ByteArrayIterator& moab::ByteArrayIterator::operator++ ( )
inline

Definition at line 474 of file TagCompare.hpp.

475  { 476  ++data.first; 477  data.second += step; 478  return *this; 479  }

References data, and step.

Referenced by operator++().

◆ operator++() [2/2]

ByteArrayIterator moab::ByteArrayIterator::operator++ ( int  )
inline

Definition at line 480 of file TagCompare.hpp.

481  { 482  ByteArrayIterator result( *this ); 483  operator++(); 484  return result; 485  }

References operator++().

◆ operator+=()

ByteArrayIterator& moab::ByteArrayIterator::operator+= ( size_t  amt)
inline

Definition at line 498 of file TagCompare.hpp.

499  { 500  data.first += amt; 501  data.second += amt * step; 502  return *this; 503  }

References data, and step.

◆ operator-()

EntityHandle moab::ByteArrayIterator::operator- ( const ByteArrayIterator other) const
inline

Definition at line 510 of file TagCompare.hpp.

511  { 512  return data.first - other.data.first; 513  }

References data.

◆ operator--() [1/2]

ByteArrayIterator& moab::ByteArrayIterator::operator-- ( )
inline

Definition at line 486 of file TagCompare.hpp.

487  { 488  --data.first; 489  data.second -= step; 490  return *this; 491  }

References data, and step.

Referenced by operator--().

◆ operator--() [2/2]

ByteArrayIterator moab::ByteArrayIterator::operator-- ( int  )
inline

Definition at line 492 of file TagCompare.hpp.

493  { 494  ByteArrayIterator result( *this ); 495  operator--(); 496  return result; 497  }

References operator--().

◆ operator-=()

ByteArrayIterator& moab::ByteArrayIterator::operator-= ( size_t  amt)
inline

Definition at line 504 of file TagCompare.hpp.

505  { 506  data.first -= amt; 507  data.second -= amt * step; 508  return *this; 509  }

References data, and step.

◆ operator->()

const data_type* moab::ByteArrayIterator::operator-> ( ) const
inline

Definition at line 518 of file TagCompare.hpp.

519  { 520  return &data; 521  }

References data.

◆ operator==()

bool moab::ByteArrayIterator::operator== ( const ByteArrayIterator other) const
inline

Definition at line 466 of file TagCompare.hpp.

467  { 468  return data.first == other.data.first; 469  }

References data.

Member Data Documentation

◆ data

◆ step

size_t moab::ByteArrayIterator::step
private

Definition at line 452 of file TagCompare.hpp.

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


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