|
WARPXM v1.10.0
|
Provides an abstract interface for access to hierachical datasets. More...
#include <wxiobase.h>
Provides an abstract interface for access to hierachical datasets.
Classes | |
| struct | AtttributeNotFoundException |
| Exception class for reporting when an attribute does not exist. More... | |
Public Member Functions | |
| virtual | ~WxIoBase () |
| Virtual destructor. | |
| void | setBaseName (const std::string &bn) |
| Set the base name. | |
| std::string | getBaseName () |
| Get the base name. | |
| void | setDumpNo (int d) |
| Set the dump number. | |
| int | getDumpNo () |
| Get the dump number. | |
| virtual WxIoNodeType | createFile (const std::string &fileName)=0 |
| Create a file. | |
| virtual WxIoNodeType | createDumpFile (const std::string &dataName) |
| Create a file with base name prepended and dump and suffix appended. | |
| virtual WxIoNodeType | openFile (const std::string &fileName, const std::string &perms)=0 |
| Open a file. | |
| virtual WxIoNodeType | openDumpFile (const std::string &dataName, const std::string &perms) |
| Open a file with the base name prepended and the dump and suffix appended. | |
| virtual void | closeFile (WxIoNodeType fileNode)=0 |
| Close a file node. | |
| virtual std::string | getDumpFileName (const std::string &dataName) |
| Get the dump name for a given data name. | |
| virtual WxIoNodeType | createGroup (WxIoNodeType node, const std::string &dataName) const =0 |
| Create an empty group. | |
| virtual WxIoNodeType | openGroup (WxIoNodeType node, const std::string &dataName) const =0 |
| Open a group. | |
| virtual std::list< std::string > | getGroupNames (WxIoNodeType node) const =0 |
| Get list of group names under the supplied node. | |
| virtual WxIoNodeType | createDataSet (WxIoNodeType node, const std::string &name, const WxRange &range, const std::type_info &typeinfo) const =0 |
| Collective dataset allocation. | |
| virtual WxIoNodeType | createDataSet (WxIoNodeType node, const std::string &dataName) const =0 |
| Create an empty node. | |
| virtual WxIoNodeType | openDataSet (WxIoNodeType node, const std::string &dataName) const =0 |
| Open a node. | |
| template<typename T > | |
| 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 T *data) const |
| Write a new data set under a node. | |
| template<typename T > | |
| void | writeToDataSet (WxIoNodeType node, const WxRange &memoryRange, const WxRange &memorySubRange, const WxRange &fileRange, const WxRange &fileSubRange, const T *data) const |
| Write to an open dataset (independent) | |
| template<typename T > | |
| WxIoNodeType | readDataSet (WxIoNodeType node, const std::string &dataName, const std::vector< std::pair< int, int > > &memorySpaceCorners, const std::vector< std::pair< int, int > > &readSelectionCorners, T *data) const |
| Read a new data set under a node. | |
| template<typename T > | |
| void | readFromDataSet (WxIoNodeType node, const WxRange &memoryRange, const WxRange &memorySubRange, const WxRange &fileRange, const WxRange &fileSubRange, T *data) const |
| Read from an open dataset (independent) | |
| WxIoNodeType | getDataShape (WxIoNodeType node, const std::string &dataSetName, WxRange &dataShape) const |
| Obtain simple data shape for a data set under a node. | |
| virtual void | closeNode (WxIoNodeType node) const =0 |
| Close a data set. | |
| template<typename T > | |
| void | writeAttribute (WxIoNodeType node, const std::string &attribName, const T *attrib) |
| Write an attribute. | |
| template<typename T > | |
| void | writeVecAttribute (WxIoNodeType node, const std::string &attribName, const std::vector< T > &attrib) |
| Write an attribute (vector). | |
| template<typename T > | |
| void | writeVecAttribute (WxIoNodeType node, const std::string &attribName, const T *attribStorage, int count) |
| Write a vector of attributes. | |
| virtual void | writeStrAttribute (WxIoNodeType node, const std::string &attribName, const std::string &attrib) const =0 |
| Write a string attribute. | |
| virtual void | writeStrVecAttribute (WxIoNodeType node, const std::string &attribName, const std::vector< std::string > &stringsvector) const =0 |
| Write a vector of strings as attribute. | |
| virtual void | readStrAttribute (WxIoNodeType node, const std::string &attribName, std::string &attrib) const =0 |
| Read a string attribute. | |
| virtual std::vector< std::string > | readStrVecAttribute (WxIoNodeType node, const std::string &attribName) const =0 |
| Read a vector of strings attribute. | |
| template<typename T > | |
| void | readAttribute (WxIoNodeType node, const std::string &attribName, T *attrib) |
| Read an attribute. | |
| template<typename T > | |
| int | readVecAttribute (WxIoNodeType node, const std::string &attribName, T *attribStorage, int count) |
| Read a vector attribute. | |
Protected Member Functions | |
| WxIoBase () | |
| Default constructor - no dump, basename or suffix. | |
| WxIoBase (const std::string &sfx) | |
| Constructor is protected, as this class cannot be made standalone. | |
| WxIoBase (const std::string &bn, int d, const std::string &sfx) | |
| Constructor is protected, as this class cannot be made standalone. | |
| virtual void | addOpenFile (WxIoNodeType node) |
| Add a file to the list of open files. | |
| virtual void | removeOpenFile (WxIoNodeType node) |
| Remove a file from the list of open files. | |
| virtual void | closeOpenFiles () |
| Close any files currently open. | |
| void | setIo (const WxIoTmpl *b) |
| Sets the new io object implementation. | |
Protected Attributes | |
| std::string | suffix |
|
virtual |
Virtual destructor.
|
protected |
Default constructor - no dump, basename or suffix.
|
protected |
Constructor is protected, as this class cannot be made standalone.
Construct with suffix only.
| sfx | the suffix for file names |
|
protected |
Constructor is protected, as this class cannot be made standalone.
| bn | the base for file names |
| d | the dump number for file names |
| sfx | the suffix for file names |
|
protectedvirtual |
Add a file to the list of open files.
| node | the file node |
|
pure virtual |
Close a file node.
Implemented in WxHdf5Io.
|
pure virtual |
|
protectedvirtual |
Close any files currently open.
|
pure virtual |
Create an empty node.
| node | the node to write under |
| dataName | the name of the data |
Implemented in WxHdf5Io.
|
pure virtual |
Collective dataset allocation.
| node | the node to write under |
| name | the name of the data |
| range | the name of the data |
Implemented in WxHdf5Io.
|
virtual |
Create a file with base name prepended and dump and suffix appended.
| dataName | the name for the file. Assumed to be rw. |
|
pure virtual |
Create a file.
| fileName | the name for the file. (an appropriate extension is added to the supplied filename.) Assumed to be rw. |
Implemented in WxHdf5Io.
|
pure virtual |
Create an empty group.
| node | the node to write under |
| dataName | the name of the data |
Implemented in WxHdf5Io.
|
inline |
Get the base name.
|
inline |
Obtain simple data shape for a data set under a node.
| node | the node under which to find the dataset |
| dataName | the name of the data |
| dataShape | the data set shape is returned by reference |
|
virtual |
Get the dump name for a given data name.
|
inline |
Get the dump number.
|
pure virtual |
Get list of group names under the supplied node.
| node | the node to look in |
Implemented in WxHdf5Io.
|
pure virtual |
Open a node.
| node | the node to look in |
| dataName | the name of the node to open |
Implemented in WxHdf5Io.
|
virtual |
Open a file with the base name prepended and the dump and suffix appended.
| dataName | used to compose the name of the file |
| perms | the read and write permissions. "r" or "rw" |
|
pure virtual |
Open a file.
| fileName | the name for the file |
| perms | the read and write permissions. "r" or "rw" |
Implemented in WxHdf5Io.
|
pure virtual |
Open a group.
| node | the node to look in |
| dataName | the name of the data to open |
Implemented in WxHdf5Io.
|
inline |
Read an attribute.
| node | the node to write under |
| attribName | the name of the attribute |
| attrib | the attribute to be read |
|
inline |
Read a new data set under a node.
| node | the node to read under |
| dataName | the name of the data |
| memorySpaceCorners | vector of (start, stop) pairs for each dimension that specify local extent held in contiguous allocation |
| readSelectionCorners | vector of (start, stop) pairs for each dimension that specify subarea of local extent to read |
| data | the destination for data to be read. This is returned in ROW MAJOR ordering. |
|
inline |
Read from an open dataset (independent)
| node | the node to read under |
| memoryRange | Range that specifies total extent on host |
| memorySubRange | Range that specifies local extent on host |
| fileRange | Range that specifies total extent on file |
| fileSubRange | Range that specifies local extent on file |
| data | the destination for data to be read. This is returned in ROW MAJOR ordering. |
|
pure virtual |
Read a string attribute.
| node | the node to read under |
| attribName | the name of the attribute |
| attrib | the string value of the attribute |
Implemented in WxHdf5Io.
|
pure virtual |
Read a vector of strings attribute.
| node | the node to read under |
| attribName | the name of the attribute |
| AtttributeNotFoundException | if attribName is not found at node. |
| WxExcept | on all other errors |
Implemented in WxHdf5Io.
|
inline |
Read a vector attribute.
| node | the node to which this attribute belongs |
| attribName | the name of the attribute |
| attribStorage | the vector attribute to be read |
| count | maximum number of items to read; the amount of memory provided by attribStorage |
|
protectedvirtual |
Remove a file from the list of open files.
| node | the file node |
|
inline |
Set the base name.
| bn | the base name |
|
inline |
Set the dump number.
| d | the dump number. Not used if negative. |
|
inlineprotected |
Sets the new io object implementation.
The derived class should call this to setup WxIoBase properly.
|
inline |
Write an attribute.
| node | the node to write under |
| attribName | the name of the attribute |
| attrib | the attribute to be written |
|
inline |
Write a new data set under a node.
| node | the node to write under |
| dataName | the name of the data |
| fileSpaceCorners | vector of (start, stop) pairs for each dimension that specify the global data space extent |
| memorySpaceCorners | vector of (start, stop) pairs for each dimension that specify local extent held in contiguous allocation |
| writeSelectionCorners | vector of (start, stop) pairs for each dimension that specify subarea of local extent to write |
| data | the data to be written. This is expected in ROW MAJOR ordering. |
|
pure virtual |
Write a string attribute.
| node | the node to write under |
| attribName | the name of the attribute |
| attrib | the string value of the attribute |
Implemented in WxHdf5Io.
|
pure virtual |
Write a vector of strings as attribute.
| node | the node to write under |
| attribName | the name of the attribute |
| the | vector of strings for the attribute |
Implemented in WxHdf5Io.
|
inline |
Write to an open dataset (independent)
| node | the node to write under |
| memoryRange | Range that specifies total extent on host |
| memorySubRange | Range that specifies local extent on host |
| fileRange | Range that specifies total extent on file |
| fileSubRange | Range that specifies local extent on file |
| data | the destination for data to be written. This is returned in ROW MAJOR ordering. |
|
inline |
Write an attribute (vector).
| node | the node to write under |
| attribName | the name of the attribute |
| attrib | the attribute vector to be written |
|
inline |
Write a vector of attributes.
| node | the node to write under |
| attribName | the name of the attribute |
| attribStorage | the vector attribute to be written |
| count | number of items to write |
|
protected |