AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
Abstract base class defining the interface of all Reader classes. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/inlet/Reader.hpp>
Public Member Functions | |
virtual | ~Reader () |
Virtual destructor. More... | |
virtual bool | parseFile (const std::string &filePath)=0 |
Parses the given input file. More... | |
virtual bool | parseString (const std::string &inputString)=0 |
Parses the given string. More... | |
virtual ReaderResult | getBool (const std::string &id, bool &value)=0 |
Return a boolean out of the input file. More... | |
virtual ReaderResult | getDouble (const std::string &id, double &value)=0 |
Return a double out of the input file. More... | |
virtual ReaderResult | getInt (const std::string &id, int &value)=0 |
Return a int out of the input file. More... | |
virtual ReaderResult | getString (const std::string &id, std::string &value)=0 |
Return a string out of the input file. More... | |
virtual ReaderResult | getIntMap (const std::string &id, std::unordered_map< int, int > &values)=0 |
Get an index-integer mapping for the given array. More... | |
virtual ReaderResult | getIntMap (const std::string &id, std::unordered_map< VariantKey, int > &values)=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual ReaderResult | getBoolMap (const std::string &id, std::unordered_map< int, bool > &values)=0 |
Get an index-bool mapping for the given array. More... | |
virtual ReaderResult | getBoolMap (const std::string &id, std::unordered_map< VariantKey, bool > &values)=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual ReaderResult | getDoubleMap (const std::string &id, std::unordered_map< int, double > &values)=0 |
Get an index-double mapping for the given array. More... | |
virtual ReaderResult | getDoubleMap (const std::string &id, std::unordered_map< VariantKey, double > &values)=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual ReaderResult | getStringMap (const std::string &id, std::unordered_map< int, std::string > &values)=0 |
Get an index-string mapping for the given Lua array. More... | |
virtual ReaderResult | getStringMap (const std::string &id, std::unordered_map< VariantKey, std::string > &values)=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual ReaderResult | getIndices (const std::string &id, std::vector< int > &indices)=0 |
Get the list of indices for a collection. More... | |
virtual ReaderResult | getIndices (const std::string &id, std::vector< VariantKey > &indices)=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
virtual FunctionVariant | getFunction (const std::string &id, const FunctionTag ret_type, const std::vector< FunctionTag > &arg_types)=0 |
Get a function from the input deck. More... | |
virtual std::vector< std::string > | getAllNames ()=0 |
Retrieves all paths present in the input file. More... | |
Abstract base class defining the interface of all Reader classes.
Concrete instances need to inherit from this class and implement these functions.You will need to add your Reader using Reader::initialize
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Parses the given input file.
This performs any setup work and parses the given input file. It is required that this is called before using the Reader and overrides any state that was previously there.
[in] | filePath | The Input file to be read |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Parses the given string.
This performs any setup work and parses the given string. It is required that this is called before using the Reader and overrides any state that was previously there.
[in] | inputString | The Input file to be read |
Implemented in axom::inlet::ConduitReader, and axom::inlet::LuaReader.
|
pure virtual |
Return a boolean out of the input file.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the bool that will be retrieved |
[out] | value | The value of the bool that was retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Return a double out of the input file.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the double that will be retrieved |
[out] | value | The value of the double that was retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Return a int out of the input file.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the int that will be retrieved |
[out] | value | The value of the int that was retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Return a string out of the input file.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the string that will be retrieved |
[out] | value | The value of the string that was retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get an index-integer mapping for the given array.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the string that will be retrieved |
[out] | map | The values of the ints that were retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get an index-bool mapping for the given array.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the string that will be retrieved |
[out] | map | The values of the bools that were retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get an index-double mapping for the given array.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the string that will be retrieved |
[out] | map | The values of the doubles that were retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get an index-string mapping for the given Lua array.
This performs any necessary retrieval and mapping from the given identifier to what is in the input file.
[in] | id | The identifier to the string that will be retrieved |
[out] | map | The values of the strings that were retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get the list of indices for a collection.
[in] | id | The identifier to the collection that will be retrieved |
[out] | indices | The values of the indices that were retrieved |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Get a function from the input deck.
[in] | id | The identifier to the function that will be retrieved |
[in] | ret_type | The return type of the function |
[in] | arg_types | The argument types of the function |
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.
|
pure virtual |
Retrieves all paths present in the input file.
Implemented in axom::inlet::LuaReader, and axom::inlet::ConduitReader.