Field3D

#include <Field3DFileHDF5.h>

Inheritance diagram for FileHDF5::Partition:
RefBase

Public Types

typedef Partition class_type
 
typedef boost::intrusive_ptr< const PartitionCPtr
 
typedef boost::intrusive_ptr< PartitionPtr
 
typedef std::vector< LayerScalarLayerList
 
typedef std::vector< LayerVectorLayerList
 
- Public Types inherited from RefBase
typedef boost::intrusive_ptr< RefBasePtr
 
typedef boost::weak_ptr< RefBaseWeakPtr
 

Public Member Functions

void addScalarLayer (const FileHDF5::Layer &layer)
 Adds a scalar layer. More...
 
void addVectorLayer (const FileHDF5::Layer &layer)
 Adds a vector layer. More...
 
void getScalarLayerNames (std::vector< std::string > &names) const
 Gets all the scalar layer names. More...
 
void getVectorLayerNames (std::vector< std::string > &names) const
 Gets all the vector layer names. More...
 
 Partition ()
 Ctor. More...
 
const FileHDF5::LayerscalarLayer (const std::string &name) const
 Finds a scalar layer. More...
 
const FileHDF5::LayervectorLayer (const std::string &name) const
 Finds a vector layer. More...
 
From RefBase
virtual std::string className () const
 
- Public Member Functions inherited from RefBase
void ref () const
 Used by boost::intrusive_pointer. More...
 
size_t refcnt ()
 Used by boost::intrusive_pointer. More...
 
void unref () const
 Used by boost::intrusive_pointer. More...
 
WeakPtr weakPtr () const
 
 RefBase ()
 
 RefBase (const RefBase &)
 Copy constructor. More...
 
RefBaseoperator= (const RefBase &)
 Assignment operator. More...
 
virtual ~RefBase ()
 Destructor. More...
 
virtual bool checkRTTI (const char *typenameStr)=0
 This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();. More...
 
bool matchRTTI (const char *typenameStr)
 Performs a check to see if the given typename string matches this class' This needs to be implemented in -all- subclasses, even abstract ones. More...
 

Static Public Member Functions

static const char * staticClassType ()
 
- Static Public Member Functions inherited from RefBase
static const char * staticClassType ()
 

Public Attributes

 DEFINE_FIELD_RTTI_CONCRETE_CLASS
 
FieldMapping::Ptr mapping
 Pointer to the mapping object. More...
 
std::string name
 Name of the partition. More...
 

Private Types

typedef RefBase base
 Convenience typedef for referring to base class. More...
 

Private Attributes

ScalarLayerList m_scalarLayers
 The scalar-valued layers belonging to this partition. More...
 
VectorLayerList m_vectorLayers
 The vector-valued layers belonging to this partition. More...
 

Detailed Description

This class represents the partition-level node in a f3D file. The partition contains one "Mapping" and N "Fields" that all share that mapping.

Definition at line 145 of file Field3DFileHDF5.h.

Member Typedef Documentation

◆ ScalarLayerList

Definition at line 149 of file Field3DFileHDF5.h.

◆ VectorLayerList

Definition at line 150 of file Field3DFileHDF5.h.

◆ Ptr

typedef boost::intrusive_ptr<Partition> FileHDF5::Partition::Ptr

Definition at line 152 of file Field3DFileHDF5.h.

◆ CPtr

typedef boost::intrusive_ptr<const Partition> FileHDF5::Partition::CPtr

Definition at line 153 of file Field3DFileHDF5.h.

◆ class_type

Definition at line 157 of file Field3DFileHDF5.h.

◆ base

Convenience typedef for referring to base class.

Definition at line 217 of file Field3DFileHDF5.h.

Constructor & Destructor Documentation

◆ Partition()

FileHDF5::Partition::Partition ( )
inline

Ctor.

Definition at line 168 of file Field3DFileHDF5.h.

169  : RefBase()
170  { }

Member Function Documentation

◆ staticClassType()

static const char* FileHDF5::Partition::staticClassType ( )
inlinestatic

Definition at line 160 of file Field3DFileHDF5.h.

161  {
162  return "Partition";
163  }

◆ className()

std::string Partition::className ( ) const
virtual

Definition at line 213 of file Field3DFileHDF5.cpp.

214 {
215  return k_partitionName;
216 }

◆ addScalarLayer()

void Partition::addScalarLayer ( const FileHDF5::Layer layer)

Adds a scalar layer.

Definition at line 221 of file Field3DFileHDF5.cpp.

222 {
223  m_scalarLayers.push_back(layer);
224 }

◆ addVectorLayer()

void Partition::addVectorLayer ( const FileHDF5::Layer layer)

Adds a vector layer.

Definition at line 229 of file Field3DFileHDF5.cpp.

230 {
231  m_vectorLayers.push_back(layer);
232 }

◆ scalarLayer()

const Layer * Partition::scalarLayer ( const std::string &  name) const

Finds a scalar layer.

Definition at line 237 of file Field3DFileHDF5.cpp.

238 {
239  for (ScalarLayerList::const_iterator i = m_scalarLayers.begin();
240  i != m_scalarLayers.end(); ++i) {
241  if (i->name == name)
242  return &(*i);
243  }
244  return NULL;
245 }

◆ vectorLayer()

const Layer * Partition::vectorLayer ( const std::string &  name) const

Finds a vector layer.

Definition at line 250 of file Field3DFileHDF5.cpp.

251 {
252  for (VectorLayerList::const_iterator i = m_vectorLayers.begin();
253  i != m_vectorLayers.end(); ++i) {
254  if (i->name == name)
255  return &(*i);
256  }
257  return NULL;
258 }

◆ getScalarLayerNames()

void Partition::getScalarLayerNames ( std::vector< std::string > &  names) const

Gets all the scalar layer names.

Definition at line 263 of file Field3DFileHDF5.cpp.

264 {
265  // We don't want to do names.clear() here, since this gets called
266  // inside some loops that want to accumulate names.
267  for (ScalarLayerList::const_iterator i = m_scalarLayers.begin();
268  i != m_scalarLayers.end(); ++i) {
269  names.push_back(i->name);
270  }
271 }

◆ getVectorLayerNames()

void Partition::getVectorLayerNames ( std::vector< std::string > &  names) const

Gets all the vector layer names.

Definition at line 276 of file Field3DFileHDF5.cpp.

277 {
278  // We don't want to do names.clear() here, since this gets called
279  // inside some loops that want to accumulate names.
280  for (VectorLayerList::const_iterator i = m_vectorLayers.begin();
281  i != m_vectorLayers.end(); ++i) {
282  names.push_back(i->name);
283  }
284 }

Member Data Documentation

◆ DEFINE_FIELD_RTTI_CONCRETE_CLASS

FileHDF5::Partition::DEFINE_FIELD_RTTI_CONCRETE_CLASS

Definition at line 158 of file Field3DFileHDF5.h.

◆ name

std::string FileHDF5::Partition::name

Name of the partition.

Definition at line 201 of file Field3DFileHDF5.h.

◆ mapping

FieldMapping::Ptr FileHDF5::Partition::mapping

Pointer to the mapping object.

Definition at line 203 of file Field3DFileHDF5.h.

◆ m_scalarLayers

ScalarLayerList FileHDF5::Partition::m_scalarLayers
private

The scalar-valued layers belonging to this partition.

Definition at line 210 of file Field3DFileHDF5.h.

◆ m_vectorLayers

VectorLayerList FileHDF5::Partition::m_vectorLayers
private

The vector-valued layers belonging to this partition.

Definition at line 212 of file Field3DFileHDF5.h.


The documentation for this class was generated from the following files:
FileHDF5::Partition::name
std::string name
Name of the partition.
Definition: Field3DFileHDF5.h:201
RefBase::RefBase
RefBase()
Definition: RefCount.h:120
FileHDF5::Partition::m_scalarLayers
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.
Definition: Field3DFileHDF5.h:210
FileHDF5::Partition::m_vectorLayers
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.
Definition: Field3DFileHDF5.h:212