Field3D
FieldIO Class Reference

#include <FieldIO.h>

Inheritance diagram for FieldIO:
RefBase DenseFieldIO MACFieldIO SparseFieldIO

List of all members.

Public Types

typedef FieldIO class_type
typedef boost::intrusive_ptr
< FieldIO
Ptr

Public Member Functions

virtual std::string className () const =0
 Returns the class name. This is used when registering the class to the FieldIOFactory object.
 FieldIO ()
 Ctor.
virtual FieldBase::Ptr read (hid_t layerGroup, const std::string &filename, const std::string &layerPath, DataTypeEnum typeEnum)=0
 Read the field at the given hdf5 group.
virtual bool write (hid_t layerGroup, FieldBase::Ptr field)=0
 Write the field to the given layer group.
virtual ~FieldIO ()
 Dtor.

Static Public Member Functions

static const char * classType ()

Public Attributes

 DEFINE_FIELD_RTTI_ABSTRACT_CLASS

Private Types

typedef RefBase base
 Convenience typedef for referring to base class.

Detailed Description

A creation class. The application needs to derive from this class for any new voxel field data structions. Within the read and write methods it is expected that the derived object knows how to read and write to an hdf5 file through the layerGroup id.

Todo:
Merge this into ClassFactory.

Definition at line 83 of file FieldIO.h.


Member Typedef Documentation

typedef boost::intrusive_ptr<FieldIO> FieldIO::Ptr

Reimplemented from RefBase.

Reimplemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.

Definition at line 90 of file FieldIO.h.

Reimplemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.

Definition at line 94 of file FieldIO.h.

typedef RefBase FieldIO::base [private]

Convenience typedef for referring to base class.

Reimplemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.

Definition at line 136 of file FieldIO.h.


Constructor & Destructor Documentation

FieldIO::FieldIO ( ) [inline]

Ctor.

Definition at line 105 of file FieldIO.h.

    : RefBase() 
  { }
virtual FieldIO::~FieldIO ( ) [inline, virtual]

Dtor.

Definition at line 110 of file FieldIO.h.

{}

Member Function Documentation

static const char* FieldIO::classType ( ) [inline, static]

Reimplemented from RefBase.

Reimplemented in DenseFieldIO, and MACFieldIO.

Definition at line 97 of file FieldIO.h.

  {
    return "FieldIO";
  }
virtual FieldBase::Ptr FieldIO::read ( hid_t  layerGroup,
const std::string &  filename,
const std::string &  layerPath,
DataTypeEnum  typeEnum 
) [pure virtual]

Read the field at the given hdf5 group.

Returns:
Pointer to the created field, or a null pointer if the field couldn't be read.

Implemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.

virtual bool FieldIO::write ( hid_t  layerGroup,
FieldBase::Ptr  field 
) [pure virtual]

Write the field to the given layer group.

Returns:
Whether the operation was successful

Implemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.

virtual std::string FieldIO::className ( ) const [pure virtual]

Returns the class name. This is used when registering the class to the FieldIOFactory object.

Implemented in DenseFieldIO, MACFieldIO, and SparseFieldIO.


Member Data Documentation


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