Field3D
|
#include <SparseFieldIO.h>
Public Types | |
typedef SparseFieldIO | class_type |
typedef boost::intrusive_ptr< SparseFieldIO > | Ptr |
![]() | |
typedef FieldIO | class_type |
typedef boost::intrusive_ptr< FieldIO > | Ptr |
![]() | |
typedef boost::intrusive_ptr< RefBase > | Ptr |
typedef boost::weak_ptr< RefBase > | WeakPtr |
Public Member Functions | |
virtual std::string | className () const |
Returns the class name. More... | |
virtual FieldBase::Ptr | read (hid_t layerGroup, const std::string &filename, const std::string &layerPath, DataTypeEnum typeEnum) |
Reads the field at the given location and tries to create a SparseField object from it. More... | |
SparseFieldIO () | |
Ctor. More... | |
const char * | staticClassType () const |
virtual bool | write (hid_t layerGroup, FieldBase::Ptr field) |
Writes the given field to disk. More... | |
virtual | ~SparseFieldIO () |
Dtor. More... | |
![]() | |
FieldIO () | |
Ctor. More... | |
virtual | ~FieldIO () |
Dtor. More... | |
![]() | |
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... | |
RefBase & | operator= (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 FieldIO::Ptr | create () |
![]() | |
static const char * | staticClassType () |
![]() | |
static const char * | staticClassType () |
Public Attributes | |
DEFINE_FIELD_RTTI_CONCRETE_CLASS | |
![]() | |
DEFINE_FIELD_RTTI_ABSTRACT_CLASS | |
Private Types | |
typedef FieldIO | base |
Convenience typedef for referring to base class. More... | |
Private Member Functions | |
template<class Data_T > | |
bool | readData (hid_t location, int numBlocks, const std::string &filename, const std::string &layerPath, typename SparseField< Data_T >::Ptr result) |
Reads the data that is dependent on the data type on disk. More... | |
template<class Data_T > | |
bool | writeInternal (hid_t layerGroup, typename SparseField< Data_T >::Ptr field) |
This call writes all the attributes and sets up the data space. More... | |
Static Private Attributes | |
static const std::string | k_bitsPerComponentStr |
static const std::string | k_blockOrderStr |
static const std::string | k_blockResStr |
static const std::string | k_componentsStr |
static const std::string | k_dataStr |
static const std::string | k_dataWindowStr |
static const std::string | k_extentsStr |
static const std::string | k_numBlocksStr |
static const std::string | k_numOccupiedBlocksStr |
static const std::string | k_versionAttrName |
static const int | k_versionNumber |
Defines the IO for a SparseField object
Definition at line 79 of file SparseFieldIO.h.
typedef boost::intrusive_ptr<SparseFieldIO> SparseFieldIO::Ptr |
Definition at line 86 of file SparseFieldIO.h.
Definition at line 90 of file SparseFieldIO.h.
|
private |
Convenience typedef for referring to base class.
Definition at line 163 of file SparseFieldIO.h.
|
inline |
Ctor.
Definition at line 101 of file SparseFieldIO.h.
|
inlinevirtual |
|
inline |
Definition at line 93 of file SparseFieldIO.h.
|
inlinestatic |
Definition at line 110 of file SparseFieldIO.h.
References read(), and write().
Referenced by initIO().
|
virtual |
Reads the field at the given location and tries to create a SparseField object from it.
Implements FieldIO.
Definition at line 84 of file SparseFieldIO.cpp.
References DataTypeDouble, DataTypeFloat, DataTypeHalf, DataTypeVecDouble, DataTypeVecFloat, DataTypeVecHalf, Msg::print(), Hdf5Util::readAttribute(), SparseField< Data_T >::setBlockOrder(), ResizableField< Data_T >::setSize(), and Msg::SevWarning.
Referenced by create().
|
virtual |
Writes the given field to disk.
Implements FieldIO.
Definition at line 223 of file SparseFieldIO.cpp.
References FIELD3D_NAMESPACE_SOURCE_CLOSE, field_dynamic_cast(), Msg::print(), Msg::SevWarning, and Hdf5Util::writeAttribute().
Referenced by create().
|
inlinevirtual |
Returns the class name.
Implements FieldIO.
Definition at line 127 of file SparseFieldIO.h.
References readData(), and writeInternal().
|
private |
This call writes all the attributes and sets up the data space.
Definition at line 172 of file SparseFieldIO.h.
References Hdf5Util::checkHdf5Gzip(), Sparse::SparseBlock< Data_T >::data, FieldTraits< Data_T >::dataDims(), FieldRes::dataWindow(), Sparse::SparseBlock< Data_T >::emptyValue, FieldRes::extents(), g_hdf5Mutex, DataTypeTraits< T >::h5bits(), DataTypeTraits< T >::h5type(), Hdf5Util::H5Base::id(), Sparse::SparseBlock< Data_T >::isAllocated, k_bitsPerComponentStr, k_blockOrderStr, k_blockResStr, k_componentsStr, k_dataStr, k_dataWindowStr, k_extentsStr, k_numBlocksStr, k_numOccupiedBlocksStr, SparseField< Data_T >::m_blockOrder, SparseField< Data_T >::m_blockRes, SparseField< Data_T >::m_blocks, Msg::print(), Msg::SevWarning, and Hdf5Util::writeAttribute().
Referenced by className().
|
private |
Reads the data that is dependent on the data type on disk.
Definition at line 368 of file SparseFieldIO.h.
References SparseField< Data_T >::addReference(), FieldTraits< Data_T >::dataDims(), SparseFileManager::doLimitMemUse(), Sparse::SparseBlock< Data_T >::emptyValue, FIELD3D_NAMESPACE_HEADER_CLOSE, Sparse::SparseBlock< Data_T >::isAllocated, k_numOccupiedBlocksStr, SparseField< Data_T >::m_blockOrder, SparseField< Data_T >::m_blocks, Hdf5Util::readAttribute(), SparseDataReader< Data_T >::readBlockList(), Sparse::SparseBlock< Data_T >::resize(), SparseField< Data_T >::setupReferenceBlocks(), and SparseFileManager::singleton().
Referenced by className().
SparseFieldIO::DEFINE_FIELD_RTTI_CONCRETE_CLASS |
Definition at line 91 of file SparseFieldIO.h.
|
staticprivate |
Definition at line 148 of file SparseFieldIO.h.
|
staticprivate |
Definition at line 149 of file SparseFieldIO.h.
|
staticprivate |
Definition at line 150 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 151 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 152 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 153 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 154 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 155 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 156 of file SparseFieldIO.h.
Referenced by writeInternal().
|
staticprivate |
Definition at line 157 of file SparseFieldIO.h.
Referenced by readData(), and writeInternal().
|
staticprivate |
Definition at line 158 of file SparseFieldIO.h.
Referenced by writeInternal().