Flow123d
DF_patch_fe_data_tables-9d4017b
|
Base class for nodes of a data storage tree. More...
#include <storage.hh>
Public Member Functions | |
virtual std::int64_t | get_int () const |
virtual double | get_double () const |
virtual bool | get_bool () const |
virtual const std::string & | get_string () const |
virtual void | set_item (unsigned int index, StorageBase *item) |
virtual StorageBase * | get_item (const unsigned int index) const |
virtual bool | is_null () const =0 |
virtual unsigned int | get_array_size () const |
virtual StorageBase * | deep_copy () const =0 |
virtual void | print (std::ostream &stream, int pad=0) const =0 |
virtual | ~StorageBase () |
Base class for nodes of a data storage tree.
This class as well as its descendants is meant for internal usage only as part of the implementation of the input interface.
The leave nodes of the data storage tree can be of types StorageBool
, StorageInt
, StorageDouble
, and StorageNull. The branching nodes of the tree are of type StorageArray. The data storage tree serves to store data with structure described by Input::Type classes. Therefore it provides no way to ask for the type of stored data and an exception ExcStorageTypeMismatch
is thrown if you use getter that do not match actual type of the node. Moreover, the tree can be only created using bottom-up approach and than can not be modified ( this can change if we want to use same storage for buffered reading of large data). However, we provide a method for deep copy of any subtree.
Definition at line 68 of file storage.hh.
|
virtual |
Definition at line 84 of file storage.cc.
|
pure virtual |
Implemented in Input::StorageNull, Input::StorageString, Input::StorageDouble, Input::StorageInt, Input::StorageBool, and Input::StorageArray.
|
virtual |
Reimplemented in Input::StorageArray.
Definition at line 79 of file storage.cc.
|
virtual |
Reimplemented in Input::StorageBool.
Definition at line 43 of file storage.cc.
|
virtual |
Reimplemented in Input::StorageDouble.
Definition at line 36 of file storage.cc.
|
virtual |
Reimplemented in Input::StorageInt.
Definition at line 29 of file storage.cc.
|
virtual |
Reimplemented in Input::StorageArray.
Definition at line 66 of file storage.cc.
|
virtual |
Reimplemented in Input::StorageString.
Definition at line 50 of file storage.cc.
|
pure virtual |
Implemented in Input::StorageNull, Input::StorageString, Input::StorageDouble, Input::StorageInt, Input::StorageBool, and Input::StorageArray.
Definition at line 73 of file storage.cc.
|
pure virtual |
Implemented in Input::StorageNull, Input::StorageString, Input::StorageDouble, Input::StorageInt, Input::StorageBool, and Input::StorageArray.
|
virtual |
Reimplemented in Input::StorageArray.
Definition at line 60 of file storage.cc.