MOAB: Mesh Oriented datABase  (version 5.4.1)
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

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

Definition at line 49 of file TagCompare.hpp.

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

Member Function Documentation

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

Definition at line 50 of file TagCompare.hpp.

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

    {
        const VarLenTag* vdata = reinterpret_cast< const VarLenTag* >( data );
        return (int)vdata->size() == size && !memcmp( value, vdata->data(), size );
    }
bool moab::TagVarBytesEqual::operator() ( const VarLenTag vdata) const [inline]

Definition at line 55 of file TagCompare.hpp.

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

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

Member Data Documentation

Definition at line 46 of file TagCompare.hpp.

Referenced by operator()().

const void* moab::TagVarBytesEqual::value [private]

Definition at line 45 of file TagCompare.hpp.

Referenced by 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