Field3D

#include <Field3DFile.h>

Inheritance diagram for File::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 File::Layer &layer)
 Adds a scalar layer. More...
 
void addVectorLayer (const File::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 File::LayerscalarLayer (const std::string &name) const
 Finds a scalar layer. More...
 
const File::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 Field3DFile.h.

Member Typedef Documentation

Definition at line 149 of file Field3DFile.h.

Definition at line 150 of file Field3DFile.h.

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

Definition at line 152 of file Field3DFile.h.

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

Definition at line 153 of file Field3DFile.h.

Definition at line 157 of file Field3DFile.h.

typedef RefBase File::Partition::base
private

Convenience typedef for referring to base class.

Definition at line 217 of file Field3DFile.h.

Constructor & Destructor Documentation

File::Partition::Partition ( )
inline

Ctor.

Definition at line 168 of file Field3DFile.h.

References File::Layer::name.

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

Member Function Documentation

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

Definition at line 160 of file Field3DFile.h.

161  {
162  return "Partition";
163  }
std::string Partition::className ( ) const
virtual

Definition at line 197 of file Field3DFile.cpp.

198 {
199  return k_partitionName;
200 }
void Partition::addScalarLayer ( const File::Layer layer)

Adds a scalar layer.

Definition at line 205 of file Field3DFile.cpp.

206 {
207  m_scalarLayers.push_back(layer);
208 }
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.
Definition: Field3DFile.h:210
void Partition::addVectorLayer ( const File::Layer layer)

Adds a vector layer.

Definition at line 213 of file Field3DFile.cpp.

214 {
215  m_vectorLayers.push_back(layer);
216 }
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.
Definition: Field3DFile.h:212
const Layer * Partition::scalarLayer ( const std::string &  name) const

Finds a scalar layer.

Definition at line 221 of file Field3DFile.cpp.

222 {
223  for (ScalarLayerList::const_iterator i = m_scalarLayers.begin();
224  i != m_scalarLayers.end(); ++i) {
225  if (i->name == name)
226  return &(*i);
227  }
228  return NULL;
229 }
std::string name
Name of the partition.
Definition: Field3DFile.h:201
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.
Definition: Field3DFile.h:210
const Layer * Partition::vectorLayer ( const std::string &  name) const

Finds a vector layer.

Definition at line 234 of file Field3DFile.cpp.

235 {
236  for (VectorLayerList::const_iterator i = m_vectorLayers.begin();
237  i != m_vectorLayers.end(); ++i) {
238  if (i->name == name)
239  return &(*i);
240  }
241  return NULL;
242 }
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.
Definition: Field3DFile.h:212
std::string name
Name of the partition.
Definition: Field3DFile.h:201
void Partition::getScalarLayerNames ( std::vector< std::string > &  names) const

Gets all the scalar layer names.

Definition at line 247 of file Field3DFile.cpp.

248 {
249  // We don't want to do names.clear() here, since this gets called
250  // inside some loops that want to accumulate names.
251  for (ScalarLayerList::const_iterator i = m_scalarLayers.begin();
252  i != m_scalarLayers.end(); ++i) {
253  names.push_back(i->name);
254  }
255 }
ScalarLayerList m_scalarLayers
The scalar-valued layers belonging to this partition.
Definition: Field3DFile.h:210
void Partition::getVectorLayerNames ( std::vector< std::string > &  names) const

Gets all the vector layer names.

Definition at line 260 of file Field3DFile.cpp.

261 {
262  // We don't want to do names.clear() here, since this gets called
263  // inside some loops that want to accumulate names.
264  for (VectorLayerList::const_iterator i = m_vectorLayers.begin();
265  i != m_vectorLayers.end(); ++i) {
266  names.push_back(i->name);
267  }
268 }
VectorLayerList m_vectorLayers
The vector-valued layers belonging to this partition.
Definition: Field3DFile.h:212

Member Data Documentation

File::Partition::DEFINE_FIELD_RTTI_CONCRETE_CLASS

Definition at line 158 of file Field3DFile.h.

std::string File::Partition::name

Name of the partition.

Definition at line 201 of file Field3DFile.h.

FieldMapping::Ptr File::Partition::mapping

Pointer to the mapping object.

Definition at line 203 of file Field3DFile.h.

ScalarLayerList File::Partition::m_scalarLayers
private

The scalar-valued layers belonging to this partition.

Definition at line 210 of file Field3DFile.h.

VectorLayerList File::Partition::m_vectorLayers
private

The vector-valued layers belonging to this partition.

Definition at line 212 of file Field3DFile.h.


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