MercuryDPM  Beta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VTKPointDescriptor< T > Class Template Reference

#include <VTKData.h>

Public Member Functions

 VTKPointDescriptor ()
 
 ~VTKPointDescriptor ()
 
template<typename DATATYPE >
std::enable_if< std::is_array
< DATATYPE >::value,
VTKPointDescriptor & >::type 
addProperty (std::string name, DATATYPE T::*m, bool isPrimary=false)
 
template<typename DATATYPE >
std::enable_if<!std::is_array
< DATATYPE >::value,
VTKPointDescriptor & >::type 
addProperty (std::string name, DATATYPE T::*m, bool isPrimary=false)
 
template<typename DATATYPE >
VTKPointDescriptoraddProperty (std::string name, DATATYPE T::*m, std::size_t nComponents, bool isPrimary=false)
 

Private Attributes

std::vector
< Detail::VTKPointDescriptorEntry
< T > * > 
entries_
 
Detail::VTKPointDescriptorEntry
< T > * 
positionEntry_
 

Friends

template<typename VT >
class VTKUnstructuredGrid
 

Detailed Description

template<typename T>
class VTKPointDescriptor< T >

This class serves as a descriptor to be used for defining VTK Output files. Once again, this class contains a lot of black magic.

Usage: VTKPointDescriptor<CLASS> descr; descr.addDescriptor("Name", & CLASS::Member ) .addDescriptor("Name2", & CLASS::Member2 );

Definition at line 171 of file VTKData.h.

Constructor & Destructor Documentation

template<typename T>
VTKPointDescriptor< T >::VTKPointDescriptor ( )
inline

Definition at line 176 of file VTKData.h.

176  : positionEntry_(nullptr)
177  {
178  }
Detail::VTKPointDescriptorEntry< T > * positionEntry_
Definition: VTKData.h:174
template<typename T>
VTKPointDescriptor< T >::~VTKPointDescriptor ( )
inline

Definition at line 180 of file VTKData.h.

References VTKPointDescriptor< T >::entries_.

181  {
182  for (auto * d : entries_)
183  delete d;
184  }
std::vector< Detail::VTKPointDescriptorEntry< T > * > entries_
Definition: VTKData.h:173

Member Function Documentation

template<typename T>
template<typename DATATYPE >
std::enable_if<std::is_array<DATATYPE>::value, VTKPointDescriptor&>::type VTKPointDescriptor< T >::addProperty ( std::string  name,
DATATYPE T::*  m,
bool  isPrimary = false 
)
inline

Definition at line 188 of file VTKData.h.

References VTKPointDescriptor< T >::entries_, and VTKPointDescriptor< T >::positionEntry_.

Referenced by transformMercuryToVTK().

189  {
191  = new Detail::VTKPointDescriptorEntryImpl<T,DATATYPE>(name, m, std::extent<DATATYPE>::value);
192  entries_.push_back(data);
193  if (isPrimary)
194  positionEntry_ = entries_.back();
195 
196  return *this;
197  }
Detail::VTKPointDescriptorEntry< T > * positionEntry_
Definition: VTKData.h:174
std::vector< Detail::VTKPointDescriptorEntry< T > * > entries_
Definition: VTKData.h:173
template<typename T>
template<typename DATATYPE >
std::enable_if<!std::is_array<DATATYPE>::value, VTKPointDescriptor&>::type VTKPointDescriptor< T >::addProperty ( std::string  name,
DATATYPE T::*  m,
bool  isPrimary = false 
)
inline

Definition at line 201 of file VTKData.h.

References VTKPointDescriptor< T >::entries_, and VTKPointDescriptor< T >::positionEntry_.

202  {
205  entries_.push_back(data);
206  if (isPrimary)
207  positionEntry_ = entries_.back();
208 
209  return *this;
210  }
Detail::VTKPointDescriptorEntry< T > * positionEntry_
Definition: VTKData.h:174
std::vector< Detail::VTKPointDescriptorEntry< T > * > entries_
Definition: VTKData.h:173
template<typename T>
template<typename DATATYPE >
VTKPointDescriptor& VTKPointDescriptor< T >::addProperty ( std::string  name,
DATATYPE T::*  m,
std::size_t  nComponents,
bool  isPrimary = false 
)
inline

Definition at line 213 of file VTKData.h.

References VTKPointDescriptor< T >::entries_, and VTKPointDescriptor< T >::positionEntry_.

214  {
216  = new Detail::VTKPointDescriptorEntryImpl<T,DATATYPE>(name, m, nComponents);
217  entries_.push_back(data);
218  if (isPrimary)
219  positionEntry_ = entries_.back();
220 
221  return *this;
222  }
Detail::VTKPointDescriptorEntry< T > * positionEntry_
Definition: VTKData.h:174
std::vector< Detail::VTKPointDescriptorEntry< T > * > entries_
Definition: VTKData.h:173

Friends And Related Function Documentation

template<typename T>
template<typename VT >
friend class VTKUnstructuredGrid
friend

Definition at line 226 of file VTKData.h.

Member Data Documentation

template<typename T>
std::vector< Detail::VTKPointDescriptorEntry<T>* > VTKPointDescriptor< T >::entries_
private
template<typename T>
Detail::VTKPointDescriptorEntry<T>* VTKPointDescriptor< T >::positionEntry_
private

Definition at line 174 of file VTKData.h.

Referenced by VTKPointDescriptor< T >::addProperty().


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