MOAB: Mesh Oriented datABase  (version 5.4.1)
moab::TagVarBytesLess Class Reference

#include <TagCompare.hpp>

Public Member Functions

 TagVarBytesLess (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 if variable-length opaque tag values are less than a value

Definition at line 61 of file TagCompare.hpp.


Constructor & Destructor Documentation

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

Definition at line 68 of file TagCompare.hpp.

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

Member Function Documentation

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

Definition at line 69 of file TagCompare.hpp.

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

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

Definition at line 77 of file TagCompare.hpp.

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

    {
        if( (int)vdata.size() < size )
            return 0 <= memcmp( vdata.data(), value, vdata.size() );
        else
            return 0 < memcmp( vdata.data(), value, size );
    }

Member Data Documentation

Definition at line 65 of file TagCompare.hpp.

Referenced by operator()().

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

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