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

`#include <Field3DFile.h>`

Inheritance diagram for File::Partition:

## Public Types

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

## Public Member Functions

void | addLayer (const File::Layer &layer)
| Adds a layer.
void | getLayerNames (std::vector< std::string > &names) const
| Gets all the layer names.
OgOGroup & | group () const
| Returns a reference to the OgOGroup.
const File::Layer * | layer (const std::string &name) const
| Finds a layer.
| Partition ()
| Ctor.
void | setGroup (boost::shared_ptr< OgOGroup > ptr)
| Sets the group pointer.
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

boost::shared_ptr< OgOGroup > | m_group
| Group representing the partition.
LayerList | m_layers
| The 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 121 of file Field3DFile.h.

## Member Typedef Documentation

## LayerList

typedef std::vector<Layer> File::Partition::LayerList

Definition at line 125 of file Field3DFile.h.

## Ptr

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

Definition at line 127 of file Field3DFile.h.

## CPtr

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

Definition at line 128 of file Field3DFile.h.

## class_type

typedef Partition File::Partition::class_type

Definition at line 132 of file Field3DFile.h.

## base

typedef RefBase File::Partition::base

private

Convenience typedef for referring to base class.

Definition at line 191 of file Field3DFile.h.

## Constructor & Destructor Documentation

## Partition()

File::Partition::Partition | ( |  | ) |

inline

Ctor.

Definition at line 143 of file Field3DFile.h.

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

References RefBase::RefBase().

## Member Function Documentation

## staticClassType()

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

inline static

Definition at line 135 of file Field3DFile.h.

{
return "Partition";
}

## className()

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

virtual

Definition at line 343 of file Field3DFile.cpp.

{
return k_partitionName;
}

## addLayer()

void File::Partition::addLayer | ( | const File::Layer & | layer | ) |

Adds a layer.

Definition at line 351 of file Field3DFile.cpp.

{
m_layers.push_back(layer);
}
File::Partition::m_layers
LayerList m_layers
The layers belonging to this partition.
Definition Field3DFile.h:184
File::Partition::layer
const File::Layer * layer(const std::string &name) const
Finds a layer.
Definition Field3DFile.cpp:359

References layer(), and m_layers.

## layer()

const Layer * File::Partition::layer | ( | const std::string & | name | ) | const

Finds a layer.

Definition at line 359 of file Field3DFile.cpp.

{
for (LayerList::const_iterator i = m_layers.begin();
i != m_layers.end(); ++i) {
if (i->name == name) {
return &(*i);
}
}
return NULL;
}
File::Partition::name
std::string name
Name of the partition.
Definition Field3DFile.h:175

References m_layers, and name.

Referenced by addLayer().

## getLayerNames()

void File::Partition::getLayerNames | ( | std::vector< std::string > & | names | ) | const

Gets all the layer names.

Definition at line 373 of file Field3DFile.cpp.

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

References m_layers.

## group()

OgOGroup & File::Partition::group | ( |  | ) | const

Returns a reference to the OgOGroup.

Definition at line 385 of file Field3DFile.cpp.

{
return *m_group;
}
File::Partition::m_group
boost::shared_ptr< OgOGroup > m_group
Group representing the partition.
Definition Field3DFile.h:186

References m_group.

## setGroup()

void File::Partition::setGroup | ( | boost::shared_ptr< OgOGroup > | ptr | ) |

Sets the group pointer.

Definition at line 392 of file Field3DFile.cpp.

{
m_group = ptr;
}

References m_group.

## Member Data Documentation

## DEFINE_FIELD_RTTI_CONCRETE_CLASS

File::Partition::DEFINE_FIELD_RTTI_CONCRETE_CLASS

Definition at line 133 of file Field3DFile.h.

## name

std::string File::Partition::name

Name of the partition.

Definition at line 175 of file Field3DFile.h.

Referenced by layer().

## mapping

FieldMapping::Ptr File::Partition::mapping

Pointer to the mapping object.

Definition at line 177 of file Field3DFile.h.

## m_layers

LayerList File::Partition::m_layers

private

The layers belonging to this partition.

Definition at line 184 of file Field3DFile.h.

Referenced by addLayer(), getLayerNames(), and layer().

## m_group

boost::shared_ptr<OgOGroup> File::Partition::m_group

private

Group representing the partition.

Definition at line 186 of file Field3DFile.h.

Referenced by group(), and setGroup().

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

- export/Field3DFile.h
- src/Field3DFile.cpp