Field3D

#include <FieldIO.h>

Inheritance diagram for FieldIO:
RefBase

Public Types

typedef FieldIO class_type
 
typedef boost::intrusive_ptr< FieldIOPtr
 
- Public Types inherited from RefBase
typedef boost::intrusive_ptr< RefBasePtr
 
typedef boost::weak_ptr< RefBaseWeakPtr
 

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 (const OgIGroup &layerGroup, const std::string &filename, const std::string &layerPath, OgDataType typeEnum)=0
 Read the field at the given Ogawa group.
 
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 bool write (OgOGroup &layerGroup, FieldBase::Ptr field)=0
 Write the field to the given layer group.
 
virtual ~FieldIO ()
 Dtor.
 
- 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_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 84 of file FieldIO.h.

Member Typedef Documentation

◆ Ptr

boost::intrusive_ptr<FieldIO> FieldIO::Ptr

Definition at line 91 of file FieldIO.h.

◆ class_type

Definition at line 95 of file FieldIO.h.

◆ base

Convenience typedef for referring to base class.

Definition at line 149 of file FieldIO.h.

Constructor & Destructor Documentation

◆ FieldIO()

FieldIO::FieldIO ( )
inline

Ctor.

Definition at line 106 of file FieldIO.h.

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

◆ ~FieldIO()

virtual FieldIO::~FieldIO ( )
inlinevirtual

Dtor.

Definition at line 111 of file FieldIO.h.

111{}

Member Function Documentation

◆ staticClassType()

static const char * FieldIO::staticClassType ( )
inlinestatic

Definition at line 98 of file FieldIO.h.

99 {
100 return "FieldIO";
101 }

◆ read() [1/2]

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.

◆ read() [2/2]

virtual FieldBase::Ptr FieldIO::read ( const OgIGroup & layerGroup,
const std::string & filename,
const std::string & layerPath,
OgDataType typeEnum )
pure virtual

Read the field at the given Ogawa group.

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

◆ write() [1/2]

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

◆ write() [2/2]

virtual bool FieldIO::write ( OgOGroup & layerGroup,
FieldBase::Ptr field )
pure virtual

Write the field to the given layer group.

Returns
Whether the operation was successful

◆ className()

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

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

Member Data Documentation

◆ DEFINE_FIELD_RTTI_ABSTRACT_CLASS

FieldIO::DEFINE_FIELD_RTTI_ABSTRACT_CLASS

Definition at line 96 of file FieldIO.h.


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