Classes | |
class | sdf::AssertionInternalError |
Class for generating Exceptions which come from sdf assertions. More... | |
class | sdf::Console |
Message, error, warning, and logging functionality. More... | |
class | sdf::ConsolePrivate |
class | sdf::Element |
SDF Element class. More... | |
class | sdf::ElementPrivate |
class | sdf::Exception |
Class for generating exceptions. More... | |
class | sdf::InternalError |
Class for generating Internal Gazebo Errors: those errors which should never happend and represent programming bugs. More... | |
class | sdf::SDF |
Base SDF class. More... | |
Macros | |
#define | sdfdbg |
Output a debug message. More... | |
#define | sdferr |
Output an error message. More... | |
#define | sdfmsg |
Output a message. More... | |
#define | sdfthrow(msg) |
This macro logs an error to the throw stream and throws an exception that contains the file name and line number. More... | |
#define | sdfwarn |
Output a warning message. More... | |
Typedefs | |
typedef std::shared_ptr< Console > | sdf::ConsolePtr |
Functions | |
SDFORMAT_VISIBLE void | sdf::addURIPath (const std::string &_uri, const std::string &_path) |
Associate paths to a URI. More... | |
SDFORMAT_VISIBLE std::string | sdf::findFile (const std::string &_filename, bool _searchLocalPath=true, bool _useCallback=false) |
Find the absolute path of a file. More... | |
template<typename T > | |
T | sdf::Element::Get (const std::string &_key="") |
Get the value of a key. More... | |
template<typename T > | |
std::pair< T, bool > | sdf::Element::Get (const std::string &_key, const T &_defaultValue) |
Get the value of a key. More... | |
template<class T > | |
Console::ConsoleStream & | sdf::Console::ConsoleStream::operator<< (const T &_rhs) |
template<typename T > | |
bool | sdf::Element::Set (const T &_value) |
SDFORMAT_VISIBLE void | sdf::setFindCallback (std::function< std::string(const std::string &)> _cb) |
Set the callback to use when SDF can't find a file. More... | |
#define sdfdbg |
Output a debug message.
#define sdferr |
Output an error message.
Referenced by sdf::Param::Get(), sdf::Element::Get(), sdf::Param::GetDefault(), and sdf::Param::Set().
#define sdfmsg |
Output a message.
#define sdfthrow | ( | msg | ) |
This macro logs an error to the throw stream and throws an exception that contains the file name and line number.
#define sdfwarn |
Output a warning message.
typedef std::shared_ptr<Console> sdf::ConsolePtr |
SDFORMAT_VISIBLE void sdf::addURIPath | ( | const std::string & | _uri, |
const std::string & | _path | ||
) |
Associate paths to a URI.
Example paramters: "model://", "/usr/share/models:~/.gazebo/models"
[in] | _uri | URI that will be mapped to _path |
[in] | _path | Colon separated set of paths. |
SDFORMAT_VISIBLE std::string sdf::findFile | ( | const std::string & | _filename, |
bool | _searchLocalPath = true , |
||
bool | _useCallback = false |
||
) |
Find the absolute path of a file.
[in] | _filename | Name of the file to find. |
[in] | _searchLocalPath | True to search for the file in the current working directory. |
[in] | _useCallback | True to find a file based on a registered callback if the file is not found via the normal mechanism. |
T sdf::Element::Get | ( | const std::string & | _key = "" | ) |
Get the value of a key.
This function assumes the _key exists.
[in] | _key | The name of a child attribute or element. |
References sdf::Element::GetAttribute(), sdf::Element::GetElementDescription(), sdf::Element::GetElementImpl(), sdf::Element::HasElement(), sdf::Element::HasElementDescription(), sdferr, and sdf::ElementPrivate::value.
std::pair< T, bool > sdf::Element::Get | ( | const std::string & | _key, |
const T & | _defaultValue | ||
) |
Get the value of a key.
[in] | _key | The name of a child attribute or element. |
[in] | _defaultValue | A default value to use if _key is not found. |
References sdf::Element::GetAttribute(), sdf::Element::GetElementImpl(), sdf::Element::HasElement(), sdf::Element::HasElementDescription(), and sdf::ElementPrivate::value.
Console::ConsoleStream& sdf::Console::ConsoleStream::operator<< | ( | const T & | _rhs | ) |
References sdf::Console::Instance().
bool sdf::Element::Set | ( | const T & | _value | ) |
References sdf::ElementPrivate::value.
SDFORMAT_VISIBLE void sdf::setFindCallback | ( | std::function< std::string(const std::string &)> | _cb | ) |
Set the callback to use when SDF can't find a file.
The callback should return a complete path to the requested file, or and empty string if the file was not found in the callback.
[in] | _cb | The callback function. |