moab
|
#include <TagCompare.hpp>
Public Member Functions | |
TagVarTypeLess (const void *v, int s) | |
bool | operator() (const void *data) const |
bool | operator() (const VarLenTag &vdata) const |
Private Attributes | |
const T * | value |
int | size |
Compare variable-length tags containing a known data type
Definition at line 190 of file TagCompare.hpp.
moab::TagVarTypeLess< T >::TagVarTypeLess | ( | const void * | v, |
int | s | ||
) | [inline] |
Definition at line 196 of file TagCompare.hpp.
bool moab::TagVarTypeLess< T >::operator() | ( | const void * | data | ) | const [inline] |
Definition at line 200 of file TagCompare.hpp.
{ const VarLenTag* vdata = reinterpret_cast<const VarLenTag*>(data); const T* ddata = reinterpret_cast<const T*>(vdata->data()); if ((int)vdata->size() < sizeof(T)*size) { for (int i = 0; i < vdata->size()/sizeof(T); ++i) if (value[i] < ddata[i]) return false; } else { for (int i = 0; i < vdata->size()/sizeof(T); ++i) if (value[i] <= ddata[i]) return false; } return true; }
bool moab::TagVarTypeLess< T >::operator() | ( | const VarLenTag & | vdata | ) | const [inline] |
Definition at line 215 of file TagCompare.hpp.
{ const T* ddata = reinterpret_cast<const T*>(vdata.data()); if ((int)vdata.size() < sizeof(T)*size) { for (int i = 0; i < vdata.size()/sizeof(T); ++i) if (value[i] < ddata[i]) return false; } else { for (int i = 0; i < vdata.size()/sizeof(T); ++i) if (value[i] <= ddata[i]) return false; } return true; }
int moab::TagVarTypeLess< T >::size [private] |
Definition at line 194 of file TagCompare.hpp.
const T* moab::TagVarTypeLess< T >::value [private] |
Definition at line 193 of file TagCompare.hpp.