Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab::TagTypeEqual< T > Class Template Reference

#include <TagCompare.hpp>

Public Member Functions

 TagTypeEqual (const void *v, int s)
 
bool operator() (const void *data) const
 

Private Attributes

const Tvalue
 
int size
 

Detailed Description

template<typename T>
class moab::TagTypeEqual< T >

Compare fixed-length tags containing a known data type

Definition at line 90 of file TagCompare.hpp.

Constructor & Destructor Documentation

◆ TagTypeEqual()

template<typename T >
moab::TagTypeEqual< T >::TagTypeEqual ( const void *  v,
int  s 
)
inline

Definition at line 97 of file TagCompare.hpp.

97 : value( reinterpret_cast< const T* >( v ) ), size( s / sizeof( T ) ) {}

Member Function Documentation

◆ operator()()

template<typename T >
bool moab::TagTypeEqual< T >::operator() ( const void *  data) const
inline

Definition at line 99 of file TagCompare.hpp.

100  {
101  const T* ddata = reinterpret_cast< const T* >( data );
102  for( int i = 0; i < size; ++i )
103  if( value[i] != ddata[i] ) return false;
104  return true;
105  }

References moab::TagTypeEqual< T >::size, T, and moab::TagTypeEqual< T >::value.

Member Data Documentation

◆ size

template<typename T >
int moab::TagTypeEqual< T >::size
private

Definition at line 94 of file TagCompare.hpp.

Referenced by moab::TagTypeEqual< T >::operator()().

◆ value

template<typename T >
const T* moab::TagTypeEqual< T >::value
private

Definition at line 93 of file TagCompare.hpp.

Referenced by moab::TagTypeEqual< T >::operator()().


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