Skip to content
Snippets Groups Projects
Commit 0b728162 authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Added Get-only functions to accomodate XML

parent fb938370
No related branches found
No related tags found
1 merge request!177Switch to pugixml
......@@ -79,6 +79,18 @@ IO &ADIOS::DeclareIO(const std::string ioName)
return ioPair.first->second;
}
IO &ADIOS::GetIO(const std::string name)
{
auto itIO = m_IOs.find(name);
if (itIO == m_IOs.end())
{
throw std::invalid_argument(
"ERROR: Unable to find previously defined IO object with name \"" +
name + "\" in call to GetIO.");
}
return itIO->second;
}
// PRIVATE FUNCTIONS
void ADIOS::CheckMPI() const
{
......
......@@ -80,6 +80,11 @@ public:
*/
IO &DeclareIO(const std::string ioName);
/**
* Retrieve an already defined IO object
*/
IO &GetIO(const std::string name);
protected: // no const member to allow default empty and copy constructors
/** XML File to be read containing configuration information */
std::string m_ConfigFile;
......
......@@ -45,6 +45,8 @@ void IO::SetIOMode(const IOMode ioMode) { m_IOMode = ioMode; };
void IO::SetParameters(const Params &parameters) { m_Parameters = parameters; }
const Params &IO::GetParameters() const { return m_Parameters; }
unsigned int IO::AddTransport(const std::string type,
const std::vector<std::string> &parametersVector)
{
......
......@@ -87,6 +87,11 @@ public:
*/
void SetParameters(const Params &parameters = Params());
/**
* Retrieve existing parameter set
*/
const Params &GetParameters() const;
/**
* Adds a transport and its parameters for the method
* @param type must be a supported transport type under /include/transport
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment