Detail::VTKPointDescriptorEntryImpl< T, V > Class Template Reference

#include <VTKData.h>

+ Inheritance diagram for Detail::VTKPointDescriptorEntryImpl< T, V >:

Public Member Functions

 VTKPointDescriptorEntryImpl (std::string name, V T::*member, std::size_t nComponents)
 
std::string getTypeName () const override
 Gives the VTKDataType for VTK. More...
 
void emit (std::ostream &out, const T &t) const override
 writes this VTKData to the given output stream for a single T More...
 
std::size_t getNumberOfComponents () const override
 Returns the number of components in this type. More...
 
- Public Member Functions inherited from Detail::VTKPointDescriptorEntry< T >
 VTKPointDescriptorEntry (std::string fieldName)
 initialises this data member with given name. More...
 
virtual ~VTKPointDescriptorEntry ()
 
std::string getName () const
 Returns the name associated with this field. More...
 

Private Attributes

const V T::* member_
 
const std::size_t nComponents_
 

Detailed Description

template<typename T, typename V>
class Detail::VTKPointDescriptorEntryImpl< T, V >

This class contains the typed information about the descriptor. We need to inherit from the type-erased class to be able to put all these into a single array...

Constructor & Destructor Documentation

◆ VTKPointDescriptorEntryImpl()

template<typename T , typename V >
Detail::VTKPointDescriptorEntryImpl< T, V >::VTKPointDescriptorEntryImpl ( std::string  name,
V T::*  member,
std::size_t  nComponents 
)
inline
155  : VTKPointDescriptorEntry<T>(name), member_(member), nComponents_(nComponents)
156  { }
const std::size_t nComponents_
Definition: Tools/VTKData.h:152
const V T::* member_
Definition: Tools/VTKData.h:151
std::string name
Definition: MercuryProb.h:48

Member Function Documentation

◆ emit()

template<typename T , typename V >
void Detail::VTKPointDescriptorEntryImpl< T, V >::emit ( std::ostream &  out,
const T &  t 
) const
inlineoverridevirtual

writes this VTKData to the given output stream for a single T

Parameters
outthe output stream
tthe backing dataobject

Implements Detail::VTKPointDescriptorEntry< T >.

164  {
165  emitProxy(out, t, nComponents_, member_);
166  }
std::enable_if< std::is_array< V >::value||std::is_pointer< V >::value, void >::type emitProxy(std::ostream &out, const T &t, std::size_t nComponents, V T::*member)
This function actually writes the correct datatype to ostream.
Definition: Tools/VTKData.h:130

References Detail::emitProxy(), Detail::VTKPointDescriptorEntryImpl< T, V >::member_, and Detail::VTKPointDescriptorEntryImpl< T, V >::nComponents_.

◆ getNumberOfComponents()

template<typename T , typename V >
std::size_t Detail::VTKPointDescriptorEntryImpl< T, V >::getNumberOfComponents ( ) const
inlineoverridevirtual

Returns the number of components in this type.

Implements Detail::VTKPointDescriptorEntry< T >.

169  {
170  return nComponents_;
171  }

References Detail::VTKPointDescriptorEntryImpl< T, V >::nComponents_.

◆ getTypeName()

template<typename T , typename V >
std::string Detail::VTKPointDescriptorEntryImpl< T, V >::getTypeName ( ) const
inlineoverridevirtual

Gives the VTKDataType for VTK.

Returns
the VTK datatype in string format.

Implements Detail::VTKPointDescriptorEntry< T >.

159  {
160  return toVTKDataType<V>();
161  }

Member Data Documentation

◆ member_

template<typename T , typename V >
const V T::* Detail::VTKPointDescriptorEntryImpl< T, V >::member_
private

◆ nComponents_

template<typename T , typename V >
const std::size_t Detail::VTKPointDescriptorEntryImpl< T, V >::nComponents_
private

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