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
134  : VTKPointDescriptorEntry<T>(name), member_(member), nComponents_(nComponents)
135  { }
const std::size_t nComponents_
Definition: Tools/VTKData.h:131
const V T::* member_
Definition: Tools/VTKData.h:130
string name
Definition: plotDoE.py:33

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 >.

143  {
145  }
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:109
t
Definition: plotPSD.py:36
std::ofstream out("Result.txt")

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

◆ 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 >.

148  {
149  return nComponents_;
150  }

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 >.

138  {
139  return toVTKDataType<V>();
140  }

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: