Mesh Oriented datABase  (version 5.5.0)
An array-based unstructured mesh library
moab::TagVarBytesEqual Class Reference

#include <TagCompare.hpp>

Public Member Functions

 TagVarBytesEqual (const void *v, int s)
 
bool operator() (const void *data) const
 
bool operator() (const VarLenTag &vdata) const
 

Private Attributes

const void * value
 
int size
 

Detailed Description

Test variable-length opaque tags for equality

Definition at line 42 of file TagCompare.hpp.

Constructor & Destructor Documentation

◆ TagVarBytesEqual()

moab::TagVarBytesEqual::TagVarBytesEqual ( const void *  v,
int  s 
)
inline

Definition at line 49 of file TagCompare.hpp.

49 : value( v ), size( s ) {}

Member Function Documentation

◆ operator()() [1/2]

bool moab::TagVarBytesEqual::operator() ( const VarLenTag vdata) const
inline

Definition at line 55 of file TagCompare.hpp.

56  {
57  return (int)vdata.size() == size && !memcmp( value, vdata.data(), size );
58  }

References moab::VarLenTag::data(), size, moab::VarLenTag::size(), and value.

◆ operator()() [2/2]

bool moab::TagVarBytesEqual::operator() ( const void *  data) const
inline

Definition at line 50 of file TagCompare.hpp.

51  {
52  const VarLenTag* vdata = reinterpret_cast< const VarLenTag* >( data );
53  return (int)vdata->size() == size && !memcmp( value, vdata->data(), size );
54  }

References moab::VarLenTag::data(), size, moab::VarLenTag::size(), and value.

Member Data Documentation

◆ size

int moab::TagVarBytesEqual::size
private

Definition at line 46 of file TagCompare.hpp.

Referenced by operator()().

◆ value

const void* moab::TagVarBytesEqual::value
private

Definition at line 45 of file TagCompare.hpp.

Referenced by operator()().


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