Go to the documentation of this file.
26 #include "sdf/sdf_config.h"
34 #pragma warning(disable: 4251)
42 inline namespace SDF_VERSION_NAMESPACE {
63 std::string
findFile(
const std::string &_filename,
64 bool _searchLocalPath =
true,
65 bool _useCallback =
false);
72 void addURIPath(
const std::string &_uri,
const std::string &_path);
91 public:
void Write(
const std::string &_filename);
130 public:
static void Version(
const std::string &_version);
151 const std::string &_filename,
const bool _quiet);
155 private: std::unique_ptr<SDFPrivate> dataPtr;
159 private:
static std::string version;
void SetFromString(const std::string &_sdfData)
Set SDF values from a string.
SDFORMAT_VISIBLE void addURIPath(const std::string &_uri, const std::string &_path)
Associate paths to a URI.
std::shared_ptr< SDF > SDFPtr
Definition: SDFImpl.hh:50
namespace for Simulation Description Format parser
Definition: Actor.hh:33
void SetFilePath(const std::string &_path)
Set the path on disk.
const std::string & OriginalVersion() const
Get the spec version that this was originally parsed from.
static ElementPtr WrapInRoot(const ElementPtr &_sdf)
wraps the SDF element into a root element with the version info.
void Clear()
Clear the data in this object.
static void Version(const std::string &_version)
Set the version string.
void Write(const std::string &_filename)
void Root(const ElementPtr _root)
Set the root pointer.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
SDFORMAT_VISIBLE std::string findFile(const std::string &_filename, bool _searchLocalPath=true, bool _useCallback=false)
Find the absolute path of a file.
std::string FilePath() const
Get the path to the SDF document on disk.
void SetOriginalVersion(const std::string &_version)
Set the spec version that this was originally parsed from.
static std::string Version()
Get the version.
ElementPtr Root() const
Get a pointer to the root element.
Base SDF class.
Definition: SDFImpl.hh:84
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
std::string ToString() const
SDFORMAT_VISIBLE void setFindCallback(std::function< std::string(const std::string &)> _cb)
Set the callback to use when SDF can't find a file.
static const std::string & EmbeddedSpec(const std::string &_filename, const bool _quiet)
Get a string representation of an SDF specification file.