FileHDF5::Partition Class Reference
Classes and functions used to implement this library » Field IO classes under-the-hood

`#include <Field3DFileHDF5.h>`

Inheritance diagram for FileHDF5::Partition:

## Public Types

typedef Partition | class_type
typedef boost::intrusive_ptr< const Partition > | CPtr
typedef boost::intrusive_ptr< Partition > | Ptr
typedef std::vector< Layer > | ScalarLayerList
typedef std::vector< Layer > | VectorLayerList
Public Types inherited from RefBase
typedef boost::intrusive_ptr< RefBase > | Ptr
typedef boost::weak_ptr< RefBase > | WeakPtr

## 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::Layer * | scalarLayer (const std::string &name) const
| Finds a scalar layer.
const FileHDF5::Layer * | vectorLayer (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.
RefBase & | operator= (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 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

typedef std::vector<Layer> FileHDF5::Partition::ScalarLayerList

Definition at line 149 of file Field3DFileHDF5.h.

## VectorLayerList

typedef std::vector<Layer> FileHDF5::Partition::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

typedef Partition FileHDF5::Partition::class_type

Definition at line 157 of file Field3DFileHDF5.h.

## base

typedef RefBase FileHDF5::Partition::base

private

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.

: RefBase()
{ }
RefBase::RefBase
RefBase()
Definition RefCount.h:120

References RefBase::RefBase().

## Member Function Documentation

## staticClassType()

const char * FileHDF5::Partition::staticClassType | ( |  | ) |

inline static

Definition at line 160 of file Field3DFileHDF5.h.

{
return "Partition";
}

## className()

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

virtual

Definition at line 213 of file Field3DFileHDF5.cpp.

{
return k_partitionName;
}

## addScalarLayer()

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

Adds a scalar layer.

Definition at line 221 of file Field3DFileHDF5.cpp.

{
m_scalarLayers.push_back(layer);
}
FileHDF5::Partition::m_scalarLayers
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.
Definition Field3DFileHDF5.h:210

References m_scalarLayers.

## addVectorLayer()

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

Adds a vector layer.

Definition at line 229 of file Field3DFileHDF5.cpp.

{
m_vectorLayers.push_back(layer);
}
FileHDF5::Partition::m_vectorLayers
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.
Definition Field3DFileHDF5.h:212

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.

{
for (ScalarLayerList::const_iterator i = m_scalarLayers.begin();
i != m_scalarLayers.end(); ++i) {
if (i->name == name)
return &(*i);
}
return NULL;
}
FileHDF5::Partition::name
std::string name
Name of the partition.
Definition Field3DFileHDF5.h:201

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.

{
for (VectorLayerList::const_iterator i = m_vectorLayers.begin();
i != m_vectorLayers.end(); ++i) {
if (i->name == name)
return &(*i);
}
return NULL;
}

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.

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

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.

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

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:

- export/Field3DFileHDF5.h
- src/Field3DFileHDF5.cpp