|
AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
An object to convert Conduit Nodes into Records. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/sina/core/Record.hpp>
Public Types | |
| using | TypeLoader = std::function< std::unique_ptr< Record >(conduit::Node const &)> |
Public Member Functions | |
| void | addTypeLoader (std::string const &type, TypeLoader loader) |
| Add a function for loading records of the specified type. More... | |
| std::unique_ptr< Record > | load (conduit::Node const &recordAsNode) const |
| Load a Record from its conduit Node representation. More... | |
| bool | canLoad (std::string const &type) const |
| Check whether this loader can load records of the given type. More... | |
An object to convert Conduit Nodes into Records.
A RecordLoader is used to convert conduit::Node instances which represent Sina Records into instances of their corresponding axom::sina::Record subclasses. For convenience, a RecordLoader capable of handling Records of all known types can be created using createRecordLoaderWithAllKnownTypes:
| using axom::sina::RecordLoader::TypeLoader = std::function<std::unique_ptr<Record>(conduit::Node const &)> |
A TypeLoader is a function which converts records of a specific type to their corresponding sub classes.
| void axom::sina::RecordLoader::addTypeLoader | ( | std::string const & | type, |
| TypeLoader | loader | ||
| ) |
Add a function for loading records of the specified type.
| type | the type of records this function can load |
| loader | the function which can load the records |
| std::unique_ptr<Record> axom::sina::RecordLoader::load | ( | conduit::Node const & | recordAsNode | ) | const |
| bool axom::sina::RecordLoader::canLoad | ( | std::string const & | type | ) | const |
Check whether this loader can load records of the given type.
| type | the type of the records to check |