Public Member Functions | Static Public Member Functions | List of all members
sdf::v9::SDF Class Reference

Base SDF class. More...

#include <SDFImpl.hh>

Public Member Functions

 SDF ()
 ~SDF ()
 Destructor. More...
std::string FilePath () const
 Get the path to the SDF document on disk. More...
void PrintDescription ()
void PrintDoc ()
void PrintValues ()
ElementPtr Root () const
 Get a pointer to the root element. More...
void Root (const ElementPtr _root)
 Set the root pointer. More...
void SetFilePath (const std::string &_path)
 Set the path on disk. More...
void SetFromString (const std::string &_sdfData)
 Set SDF values from a string. More...
std::string ToString () const
void Write (const std::string &_filename)

Static Public Member Functions

static const std::string & EmbeddedSpec (const std::string &_filename, const bool _quiet)
 Get a string representation of an SDF specification file. More...
static std::string Version ()
 Get the version. More...
static void Version (const std::string &_version)
 Set the version string. More...
static ElementPtr WrapInRoot (const ElementPtr &_sdf)
 wraps the SDF element into a root element with the version info. More...

Detailed Description

Base SDF class.

Constructor & Destructor Documentation

◆ SDF()

sdf::v9::SDF::SDF ( )

◆ ~SDF()

sdf::v9::SDF::~SDF ( )


Member Function Documentation

◆ EmbeddedSpec()

static const std::string& sdf::v9::SDF::EmbeddedSpec ( const std::string &  _filename,
const bool  _quiet 

Get a string representation of an SDF specification file.

This function uses a built-in version of a .sdf file located in the sdf directory. The code uses this function, which avoids touching the filesystem.

Most people should not use this function.

[in]_filenameBase name of the SDF specification file to load. For example "root.sdf" or "world.sdf".
[in]_quietTrue to suppress console messages.
A string that contains the contents of the specified _filename. An empty string is returned if the _filename could not be found.

◆ FilePath()

std::string sdf::v9::SDF::FilePath ( ) const

Get the path to the SDF document on disk.

The full path to the SDF document.

◆ PrintDescription()

void sdf::v9::SDF::PrintDescription ( )

◆ PrintDoc()

void sdf::v9::SDF::PrintDoc ( )

◆ PrintValues()

void sdf::v9::SDF::PrintValues ( )

◆ Root() [1/2]

ElementPtr sdf::v9::SDF::Root ( ) const

Get a pointer to the root element.

Pointer to the root element

◆ Root() [2/2]

void sdf::v9::SDF::Root ( const ElementPtr  _root)

Set the root pointer.

[in]_rootRoot element

◆ SetFilePath()

void sdf::v9::SDF::SetFilePath ( const std::string &  _path)

Set the path on disk.

[in]_pathPath on disk.

◆ SetFromString()

void sdf::v9::SDF::SetFromString ( const std::string &  _sdfData)

Set SDF values from a string.

◆ ToString()

std::string sdf::v9::SDF::ToString ( ) const

◆ Version() [1/2]

static std::string sdf::v9::SDF::Version ( )

Get the version.

The version as a string

◆ Version() [2/2]

static void sdf::v9::SDF::Version ( const std::string &  _version)

Set the version string.

[in]_versionSDF version string.

◆ WrapInRoot()

static ElementPtr sdf::v9::SDF::WrapInRoot ( const ElementPtr _sdf)

wraps the SDF element into a root element with the version info.

[in]_sdfthe sdf element. Will be cloned by this function.
a wrapped clone of the SDF element

◆ Write()

void sdf::v9::SDF::Write ( const std::string &  _filename)

The documentation for this class was generated from the following file: