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

#include <TagCompare.hpp>

Public Member Functions

 TagOneTypeEqual (const void *v)
 
bool operator() (const void *data) const
 

Private Attributes

T value
 
int size
 

Detailed Description

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

Compare single-value tags containing a known data type Optimization of TagTypeEqual for 1-value case.

Definition at line 132 of file TagCompare.hpp.

Constructor & Destructor Documentation

◆ TagOneTypeEqual()

template<typename T >
moab::TagOneTypeEqual< T >::TagOneTypeEqual ( const void *  v)
inline

Definition at line 139 of file TagCompare.hpp.

139 : value( *reinterpret_cast< const T* >( v ) ), size( 0 ) {}

Member Function Documentation

◆ operator()()

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

Definition at line 141 of file TagCompare.hpp.

142  {
143  const T* ddata = reinterpret_cast< const T* >( data );
144  return *ddata == value;
145  }

References T, and moab::TagOneTypeEqual< T >::value.

Member Data Documentation

◆ size

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

Definition at line 136 of file TagCompare.hpp.

◆ value

template<typename T >
T moab::TagOneTypeEqual< T >::value
private

Definition at line 135 of file TagCompare.hpp.

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


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