WARPXM v1.10.0
Loading...
Searching...
No Matches
WxIoTmpl Class Referenceabstract

WxIoTmpl is the base class for access to a hierarchical file system with groups, data sets, and attributes for those datasets. More...

#include <wxiotmpl.h>

Inheritance diagram for WxIoTmpl:
WxHdf5IoTmpl

Detailed Description

WxIoTmpl is the base class for access to a hierarchical file system with groups, data sets, and attributes for those datasets.

The exemplar is HDF5, but one may eventually other systems, like netCDF, PDB, or ?

This is the base class. It will provide for output of the basic data structures of the STL library. Derived classes will allow for output of Facets objects, such as Facets arrays, whether distributed or not.

Public Member Functions

virtual ~WxIoTmpl ()
 Virtual destructor.
 
virtual WxIoNodeType writeDataSet (WxIoNodeType node, const std::string &dataName, const std::vector< std::pair< int, int > > &fileSpaceCorners, const std::vector< std::pair< int, int > > &memorySpaceCorners, const std::vector< std::pair< int, int > > &writeSelectionCorners, const WmConstOpaquePtr &data) const =0
 Write a new data set under a node.
 
virtual void writeToDataSet (WxIoNodeType node, const WxRange &memoryRange, const WxRange &memorySubRange, const WxRange &fileRange, const WxRange &fileSubRange, const WmConstOpaquePtr &data) const =0
 Write to an open dataset (independent)
 
virtual WxIoNodeType readDataSet (WxIoNodeType node, const std::string &dataName, const std::vector< std::pair< int, int > > &memorySpaceCorners, const std::vector< std::pair< int, int > > &readSelectionCorners, WmOpaquePtr &data) const =0
 Read a new data set under a node.
 
virtual void readFromDataSet (WxIoNodeType node, const WxRange &memoryRange, const WxRange &memorySubRange, const WxRange &fileRange, const WxRange &fileSubRange, WmOpaquePtr &data) const =0
 Read from an open dataset (independent)
 
virtual WxIoNodeType getDataShape (WxIoNodeType node, const std::string &dataSetName, WxRange &dataShape) const =0
 Obtain simple data shape for a data set under a node.
 
virtual void writeAttribute (WxIoNodeType node, const std::string &attribName, const WmConstOpaquePtr &attrib) const =0
 Write an attribute.
 
virtual void writeVecAttribute (WxIoNodeType node, const std::string &attribName, const WmConstOpaquePtr &attribStorage, int count) const =0
 Write a vector attribute.
 
virtual void readAttribute (WxIoNodeType node, const std::string &attribName, WmOpaquePtr &attrib) const =0
 Read an attribute.
 
virtual int readVecAttribute (WxIoNodeType node, const std::string &attribName, WmOpaquePtr &attribStorage, int count) const =0
 Read a vector attribute.
 

Protected Member Functions

 WxIoTmpl ()
 Constructor is protected, as this class cannot be made standalone.
 

Constructor & Destructor Documentation

◆ ~WxIoTmpl()

virtual WxIoTmpl::~WxIoTmpl ( )
inlinevirtual

Virtual destructor.

◆ WxIoTmpl()

WxIoTmpl::WxIoTmpl ( )
inlineprotected

Constructor is protected, as this class cannot be made standalone.

Member Function Documentation

◆ getDataShape()

virtual WxIoNodeType WxIoTmpl::getDataShape ( WxIoNodeType  node,
const std::string &  dataSetName,
WxRange dataShape 
) const
pure virtual

Obtain simple data shape for a data set under a node.

Parameters
nodethe node under which to find the dataset
dataNamethe name of the data
dataShapethe data set shape is returned by reference
Returns
the node to the dataset found

Implemented in WxHdf5IoTmpl.

◆ readAttribute()

virtual void WxIoTmpl::readAttribute ( WxIoNodeType  node,
const std::string &  attribName,
WmOpaquePtr attrib 
) const
pure virtual

Read an attribute.

Parameters
nodethe node to which this attribute belongs
attribNamethe name of the attribute
attribthe attribute to be read

Implemented in WxHdf5IoTmpl.

◆ readDataSet()

virtual WxIoNodeType WxIoTmpl::readDataSet ( WxIoNodeType  node,
const std::string &  dataName,
const std::vector< std::pair< int, int > > &  memorySpaceCorners,
const std::vector< std::pair< int, int > > &  readSelectionCorners,
WmOpaquePtr data 
) const
pure virtual

Read a new data set under a node.

Parameters
nodethe node to write under
dataNamethe name of the data
memorySpaceCornersvector of (start, stop) pairs for each dimension that specify local extent held in contiguous allocation
readSelectionCornersvector of (start, stop) pairs for each dimension that specify subarea of local extent to read
datathe data to be written
Returns
the node to the written data

Implemented in WxHdf5IoTmpl.

◆ readFromDataSet()

virtual void WxIoTmpl::readFromDataSet ( WxIoNodeType  node,
const WxRange memoryRange,
const WxRange memorySubRange,
const WxRange fileRange,
const WxRange fileSubRange,
WmOpaquePtr data 
) const
pure virtual

Read from an open dataset (independent)

Parameters
nodethe node to read under
memoryRangeRange that specifies total extent on host
memorySubRangeRange that specifies local extent on host
fileRangeRange that specifies total extent on file
fileSubRangeRange that specifies local extent on file
datathe destination for data to be read. This is returned in ROW MAJOR ordering.

Implemented in WxHdf5IoTmpl.

◆ readVecAttribute()

virtual int WxIoTmpl::readVecAttribute ( WxIoNodeType  node,
const std::string &  attribName,
WmOpaquePtr attribStorage,
int  count 
) const
pure virtual

Read a vector attribute.

Parameters
nodethe node to which this attribute belongs
attribNamethe name of the attribute
attribStoragethe vector attribute to be read
countmaximum number of items to read; the amount of memory provided by attribStorage
Returns
number of items actually read

Implemented in WxHdf5IoTmpl.

◆ writeAttribute()

virtual void WxIoTmpl::writeAttribute ( WxIoNodeType  node,
const std::string &  attribName,
const WmConstOpaquePtr attrib 
) const
pure virtual

Write an attribute.

Parameters
nodethe node to write under
attribNamethe name of the attribute
attribthe attribute to be written

Implemented in WxHdf5IoTmpl.

◆ writeDataSet()

virtual WxIoNodeType WxIoTmpl::writeDataSet ( WxIoNodeType  node,
const std::string &  dataName,
const std::vector< std::pair< int, int > > &  fileSpaceCorners,
const std::vector< std::pair< int, int > > &  memorySpaceCorners,
const std::vector< std::pair< int, int > > &  writeSelectionCorners,
const WmConstOpaquePtr data 
) const
pure virtual

Write a new data set under a node.

Parameters
nodethe node to write under
dataNamethe name of the data
fileSpaceCornersvector of (start, stop) pairs for each dimension that specify the global data space extent
memorySpaceCornersvector of (start, stop) pairs for each dimension that specify local extent held in contiguous allocation
writeSelectionCornersvector of (start, stop) pairs for each dimension that specify subarea of local extent to write
datathe data to be written
Returns
the node to the written data

Implemented in WxHdf5IoTmpl.

◆ writeToDataSet()

virtual void WxIoTmpl::writeToDataSet ( WxIoNodeType  node,
const WxRange memoryRange,
const WxRange memorySubRange,
const WxRange fileRange,
const WxRange fileSubRange,
const WmConstOpaquePtr data 
) const
pure virtual

Write to an open dataset (independent)

Parameters
nodethe node to write under
memoryRangeRange that specifies total extent on host
memorySubRangeRange that specifies local extent on host
fileRangeRange that specifies total extent on file
fileSubRangeRange that specifies local extent on file
datathe destination for data to be written. This is returned in ROW MAJOR ordering.

Implemented in WxHdf5IoTmpl.

◆ writeVecAttribute()

virtual void WxIoTmpl::writeVecAttribute ( WxIoNodeType  node,
const std::string &  attribName,
const WmConstOpaquePtr attribStorage,
int  count 
) const
pure virtual

Write a vector attribute.

Parameters
nodethe node to write under
attribNamethe name of the attribute
attribStroragethe vector attribute to be written

Implemented in WxHdf5IoTmpl.


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