11#include <framework/gearbox/Interface.h>
12#include <framework/gearbox/Gearbox.h>
40 GearDir(
const std::string& path =
"",
int index = 0)
69 virtual std::string
getString(
const std::string& path =
"") const noexcept(false)
override
82 std::string
getString(
const std::string& path,
const std::string& defaultValue)
const
98 virtual std::pair<std::string, std::string>
getStringWithUnit(
const std::string& path =
"") const noexcept(false)
override
112 virtual const TObject*
getTObject(
const std::string& path)
const noexcept(
false)
override
GearDir(const std::string &path="", int index=0)
Create a GearDir with an absolute path and optionally appending an index.
std::string getString(const std::string &path, const std::string &defaultValue) const
Get the parameter path as a string.
void append(const std::string &path)
Append something to the current path, modifying the GearDir in place.
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
virtual const TObject * getTObject(const std::string &path) const noexcept(false) override
Get the parameter path as a TObject.
GearDir(const gearbox::Interface &start, const std::string &path, int index=0)
Create a GearDir starting at a given base path and appending some subpath and optionally an index.
virtual std::pair< std::string, std::string > getStringWithUnit(const std::string &path="") const noexcept(false) override
Get the parameter path as string and also return the unit it was defined with.
GearDir(const GearDir &other)
Copy constructor.
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
virtual std::pair< std::string, std::string > getStringWithUnit(const std::string &path="") const noexcept(false) override
Get the parameter path as string and also return the unit it was defined with.
Exception to be thrown in case of an empty result.
Interface()
default constructor initializing to toplevel parameter space
virtual std::string getString(const std::string &path="") const noexcept(false)=0
Get the parameter path as a string.
std::string addIndex(const std::string &path, int index) const
add [index] to the path (after stripping trailing slashes)
std::string m_path
path of the current interface
std::string ensurePath(const std::string &path) const
make sure the path really corresponds to a path by appending a trailing slash if necessary
static Gearbox & getInstance()
Return reference to the Gearbox instance.
virtual const TObject * getTObject(const std::string &path) const noexcept(false) override
Get the parameter path as a TObject.
Abstract base class for different kinds of events.