AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
A Reader that is able to read variables from a Lua file. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.4.0/src/axom/inlet/LuaReader.hpp>
Public Member Functions | |
bool | parseFile (const std::string &filePath) |
Parses the given input file. More... | |
bool | parseString (const std::string &luaString) |
Parses the given Lua string. More... | |
bool | getBool (const std::string &id, bool &value) |
Return a boolean out of the input file. More... | |
bool | getDouble (const std::string &id, double &value) |
Return a double out of the input file. More... | |
bool | getInt (const std::string &id, int &value) |
Return a int out of the input file. More... | |
bool | getString (const std::string &id, std::string &value) |
Return a string out of the input file. More... | |
bool | getIntMap (const std::string &id, std::unordered_map< int, int > &values) |
Get an index-integer mapping for the given Lua array. More... | |
bool | getDoubleMap (const std::string &id, std::unordered_map< int, double > &values) |
Get an index-double mapping for the given Lua array. More... | |
bool | getBoolMap (const std::string &id, std::unordered_map< int, bool > &values) |
Get an index-bool mapping for the given Lua array. More... | |
bool | getStringMap (const std::string &id, std::unordered_map< int, std::string > &values) |
Get an index-string mapping for the given Lua array. More... | |
|
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 Lua state that was previously there.
[in] | filePath | The Input file to be read |
Implements axom::inlet::Reader.
|
virtual |
Parses the given Lua string.
This performs any setup work and parses the given Lua string. It is required that this is called before using the Reader and overrides any Lua state that was previously there.
[in] | luaString | The Input file to be read |
Implements axom::inlet::Reader.
|
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 |
Implements axom::inlet::Reader.
|
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 |
Implements axom::inlet::Reader.
|
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 from the file |
[out] | value | The value of the int that was retrieved from the file |
Implements axom::inlet::Reader.
|
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 |
Implements axom::inlet::Reader.
|
virtual |
Get an index-integer 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 ints that were retrieved |
Implements axom::inlet::Reader.
|
virtual |
Get an index-double 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 doubles that were retrieved |
Implements axom::inlet::Reader.
|
virtual |
Get an index-bool 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 bools that were retrieved |
Implements axom::inlet::Reader.
|
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 |
Implements axom::inlet::Reader.