MercuryDPM  Alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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...

Definition at line 136 of file VTKData.h.

Constructor & Destructor Documentation

template<typename T, typename V>
Detail::VTKPointDescriptorEntryImpl< T, V >::VTKPointDescriptorEntryImpl ( std::string  name,
V T::*  member,
std::size_t  nComponents 
)
inline

Definition at line 141 of file VTKData.h.

142  : VTKPointDescriptorEntry<T>(name), member_(member), nComponents_(nComponents)
143  { }
const std::size_t nComponents_
Definition: VTKData.h:139

Member Function Documentation

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

Definition at line 150 of file VTKData.h.

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

151  {
152  emitProxy(out, t, nComponents_, member_);
153  }
const std::size_t nComponents_
Definition: VTKData.h:139
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: VTKData.h:117
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 >.

Definition at line 155 of file VTKData.h.

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

156  {
157  return nComponents_;
158  }
const std::size_t nComponents_
Definition: VTKData.h:139
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 >.

Definition at line 145 of file VTKData.h.

146  {
147  return toVTKDataType<V>();
148  }

Member Data Documentation

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

Definition at line 138 of file VTKData.h.

Referenced by Detail::VTKPointDescriptorEntryImpl< T, V >::emit().

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: