![]() |
SheafSystem
0.0.0.0
|
An encapsulation of an HDF file containing sheaf data. More...
#include <sheaf_file.h>
Public Types | |
| enum | access_mode { NONE, READ_ONLY, READ_WRITE } |
| File access modes. More... | |
Public Member Functions | |
| sheaf_file () | |
| Default constructor. More... | |
| sheaf_file (const sheaf_file &xother) | |
| Copy constructor. More... | |
| virtual sheaf_file * | clone () const |
| Virtual constructor; makes a new instance of the same type as this. More... | |
| virtual | ~sheaf_file () |
| Destructor. More... | |
| virtual bool | invariant () const |
| Class invariant. More... | |
| virtual bool | is_ancestor_of (const any *other) const |
| Conformance test; true if other conforms to this. More... | |
| std::string | name () const |
| The name of this file. More... | |
| void | open (const std::string &xname, access_mode xmode=READ_WRITE, bool xclobber=true) |
| Opens a file with name xname, with access mode xmode. If xclobber and the file already exists, delete it first. More... | |
| bool | is_open () const |
| True if this file is open. More... | |
| access_mode | mode () const |
| The current access mode. More... | |
| void | close () |
| Closes the file. More... | |
| data_type_map & | type_map () |
| Data type map for primitive types in this file (mutable version) More... | |
| const data_type_map & | type_map () const |
| Data type map for primitive types in this file (const version) More... | |
| bool | type_map_defined () const |
| True if type map previously defined. More... | |
Public Member Functions inherited from sheaf::any | |
| bool | is_same_type (const any *other) const |
| True if other is the same type as this. More... | |
| virtual | ~any () |
| Destructor. More... | |
| bool | invariant_check () const |
| True if invariant checking is enabled. More... | |
| void | enable_invariant_check () const |
| Enable invariant checking. More... | |
| void | disable_invariant_check () const |
| Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
| int | disable_invariance_check_request_depth () const |
| Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Friends | |
| class | data_type_map |
| class | record_set |
| class | attributes_record_set |
| class | member_record_set |
| class | dof_tuple_record_set |
Additional Inherited Members | |
Protected Member Functions inherited from sheaf::any | |
| any () | |
| default constructor More... | |
An encapsulation of an HDF file containing sheaf data.
Definition at line 49 of file sheaf_file.h.
File access modes.
Definition at line 111 of file sheaf_file.h.
| sheaf::sheaf_file::sheaf_file | ( | ) |
Default constructor.
Definition at line 43 of file sheaf_file.cc.
References invariant().
Referenced by clone().
| sheaf::sheaf_file::sheaf_file | ( | const sheaf_file & | xother | ) |
Copy constructor.
Definition at line 70 of file sheaf_file.cc.
References clone(), and invariant().
|
virtual |
Destructor.
Definition at line 116 of file sheaf_file.cc.
References invariant().
Referenced by clone().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Reimplemented from sheaf::any.
Definition at line 92 of file sheaf_file.cc.
References sheaf::any::is_same_type(), sheaf_file(), and ~sheaf_file().
Referenced by sheaf_file().
| void sheaf::sheaf_file::close | ( | ) |
Closes the file.
Definition at line 351 of file sheaf_file.cc.
References is_open(), and type_map().
Referenced by mode().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 136 of file sheaf_file.cc.
References sheaf::any::disable_invariant_check(), sheaf::any::enable_invariant_check(), sheaf::any::invariant(), sheaf::any::invariant_check(), is_ancestor_of(), is_open(), and type_map_defined().
Referenced by open(), sheaf_file(), and ~sheaf_file().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 174 of file sheaf_file.cc.
References open().
Referenced by invariant().
| bool sheaf::sheaf_file::is_open | ( | ) | const |
True if this file is open.
Definition at line 306 of file sheaf_file.cc.
References mode().
Referenced by sheaf::attributes_record_set::attributes_record_set(), close(), sheaf::dof_tuple_record_set::dof_tuple_record_set(), invariant(), sheaf::member_record_set::member_record_set(), open(), sheaf::record_set::record_set(), type_map(), and type_map_defined().
| sheaf::sheaf_file::access_mode sheaf::sheaf_file::mode | ( | ) | const |
The current access mode.
Definition at line 330 of file sheaf_file.cc.
References close().
Referenced by is_open(), open(), and sheaf::record_set::open().
|
inline |
| void sheaf::sheaf_file::open | ( | const std::string & | xname, |
| access_mode | xmode = READ_WRITE, |
||
| bool | xclobber = true |
||
| ) |
Opens a file with name xname, with access mode xmode. If xclobber and the file already exists, delete it first.
Definition at line 201 of file sheaf_file.cc.
References invariant(), is_open(), mode(), and name().
Referenced by is_ancestor_of().
| sheaf::data_type_map & sheaf::sheaf_file::type_map | ( | ) |
Data type map for primitive types in this file (mutable version)
Definition at line 393 of file sheaf_file.cc.
References is_open().
Referenced by close().
| const sheaf::data_type_map & sheaf::sheaf_file::type_map | ( | ) | const |
Data type map for primitive types in this file (const version)
Definition at line 413 of file sheaf_file.cc.
References is_open(), and type_map_defined().
| bool sheaf::sheaf_file::type_map_defined | ( | ) | const |
True if type map previously defined.
Definition at line 436 of file sheaf_file.cc.
References is_open().
Referenced by invariant(), and type_map().