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 );

Constructor & Destructor Documentation

◆ VTKPointDescriptor()

template<typename T >
VTKPointDescriptor< T >::VTKPointDescriptor ( )
inline
189  : positionEntry_(nullptr)
190  {
191  }
Detail::VTKPointDescriptorEntry< T > * positionEntry_
Definition: Tools/VTKData.h:187

◆ ~VTKPointDescriptor()

template<typename T >
VTKPointDescriptor< T >::~VTKPointDescriptor ( )
inline
194  {
195  for (auto * d : entries_)
196  delete d;
197  }
std::vector< Detail::VTKPointDescriptorEntry< T > * > entries_
Definition: Tools/VTKData.h:186

References VTKPointDescriptor< T >::entries_.

Member Function Documentation

◆ addProperty() [1/3]

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
202  {
204  = new Detail::VTKPointDescriptorEntryImpl<T,DATATYPE>(name, m, std::extent<DATATYPE>::value);
205  entries_.push_back(data);
206  if (isPrimary)
207  positionEntry_ = entries_.back();
208 
209  return *this;
210  }
Definition: Tools/VTKData.h:150
Definition: Tools/VTKData.h:46
std::string name
Definition: MercuryProb.h:48

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

Referenced by transformMercuryToVTK().

◆ addProperty() [2/3]

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
215  {
218  entries_.push_back(data);
219  if (isPrimary)
220  positionEntry_ = entries_.back();
221 
222  return *this;
223  }

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

◆ addProperty() [3/3]

template<typename T >
template<typename DATATYPE >
VTKPointDescriptor& VTKPointDescriptor< T >::addProperty ( std::string  name,
DATATYPE T::*  m,
std::size_t  nComponents,
bool  isPrimary = false 
)
inline
227  {
230  entries_.push_back(data);
231  if (isPrimary)
232  positionEntry_ = entries_.back();
233 
234  return *this;
235  }

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

Friends And Related Function Documentation

◆ VTKUnstructuredGrid

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

Member Data Documentation

◆ entries_

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

◆ positionEntry_

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

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