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.
 
void addVectorLayer (const FileHDF5::Layer &layer)
 Adds a vector layer.
 
void getScalarLayerNames (std::vector< std::string > &names) const
 Gets all the scalar layer names.
 
void getVectorLayerNames (std::vector< std::string > &names) const
 Gets all the vector layer names.
 
 Partition ()
 Ctor.
 
const FileHDF5::LayerscalarLayer (const std::string &name) const
 Finds a scalar layer.
 
const FileHDF5::LayervectorLayer (const std::string &name) const
 Finds a vector layer.
 
From RefBase
virtual std::string className () const
 
- Public Member Functions inherited from RefBase
void ref () const
 Used by boost::intrusive_pointer.
 
size_t refcnt ()
 Used by boost::intrusive_pointer.
 
void unref () const
 Used by boost::intrusive_pointer.
 
WeakPtr weakPtr () const
 
 RefBase ()
 
 RefBase (const RefBase &)
 Copy constructor.
 
RefBaseoperator= (const RefBase &)
 Assignment operator.
 
virtual ~RefBase ()
 Destructor.
 
virtual bool checkRTTI (const char *typenameStr)=0
 This function is only implemented by concrete classes and triggers the actual RTTI check through matchRTTI();.
 
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.
 

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.
 
std::string name
 Name of the partition.
 

Private Types

typedef RefBase base
 Convenience typedef for referring to base class.
 

Private Attributes

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

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

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

Definition at line 152 of file Field3DFileHDF5.h.

◆ CPtr

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

Definition at line 153 of file Field3DFileHDF5.h.

◆ class_type

◆ 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 { }
RefBase()
Definition RefCount.h:120

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}
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.

References m_scalarLayers.

◆ 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}
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.

References m_vectorLayers.

◆ 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}
std::string name
Name of the partition.

References m_scalarLayers, and name.

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

References m_vectorLayers, and name.

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

References m_scalarLayers.

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

References m_vectorLayers.

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.

Referenced by scalarLayer(), and vectorLayer().

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

Referenced by addScalarLayer(), getScalarLayerNames(), and scalarLayer().

◆ m_vectorLayers

VectorLayerList FileHDF5::Partition::m_vectorLayers
private

The vector-valued layers belonging to this partition.

Definition at line 212 of file Field3DFileHDF5.h.

Referenced by addVectorLayer(), getVectorLayerNames(), and vectorLayer().


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