Public Member Functions | Public Attributes | List of all members
sdf::SDF_VERSION_NAMESPACE::ElementPrivate Class Reference

#include <Element.hh>

Public Member Functions

void PrintAttributes (bool _includeDefaultAttributes, const PrintConfig &_config, std::ostringstream &_out) const
 Generate the string (XML) for the attributes. More...
 
void PrintAttributes (sdf::Errors &_errors, bool _includeDefaultAttributes, const PrintConfig &_config, std::ostringstream &_out) const
 Generate the string (XML) for the attributes. More...
 

Public Attributes

Param_V attributes
 
bool copyChildren
 True if element's children should be copied. More...
 
std::string description
 Element description. More...
 
ElementPtr_V elementDescriptions
 
ElementPtr_V elements
 
bool explicitlySetInFile
 True if the element was set in the SDF file. More...
 
ElementPtr includeElement
 The element that was used to load this entity. More...
 
std::optional< int > lineNumber
 Line number in file where this element came from. More...
 
std::string name
 Element name. More...
 
std::string originalVersion
 Spec version that this was originally parsed from. More...
 
ElementWeakPtr parent
 Element's parent. More...
 
std::string path
 Path to file where this element came from. More...
 
std::string referenceSDF
 Name of reference sdf. More...
 
std::string required
 True if element is required. More...
 
ParamPtr value
 
std::string xmlPath
 XML path of this element. More...
 

Member Function Documentation

◆ PrintAttributes() [1/2]

void sdf::SDF_VERSION_NAMESPACE::ElementPrivate::PrintAttributes ( bool  _includeDefaultAttributes,
const PrintConfig _config,
std::ostringstream &  _out 
) const

Generate the string (XML) for the attributes.

Parameters
[in]_includeDefaultAttributesflag to include default attributes.
[in]_configConfiguration for printing attributes.
[out]_outthe std::ostringstream to write output to.

◆ PrintAttributes() [2/2]

void sdf::SDF_VERSION_NAMESPACE::ElementPrivate::PrintAttributes ( sdf::Errors _errors,
bool  _includeDefaultAttributes,
const PrintConfig _config,
std::ostringstream &  _out 
) const

Generate the string (XML) for the attributes.

Parameters
[out]_errorsVector of errors.
[in]_includeDefaultAttributesflag to include default attributes.
[in]_configConfiguration for printing attributes.
[out]_outthe std::ostringstream to write output to.

Member Data Documentation

◆ attributes

Param_V sdf::SDF_VERSION_NAMESPACE::ElementPrivate::attributes

◆ copyChildren

bool sdf::SDF_VERSION_NAMESPACE::ElementPrivate::copyChildren

True if element's children should be copied.

◆ description

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::description

Element description.

◆ elementDescriptions

ElementPtr_V sdf::SDF_VERSION_NAMESPACE::ElementPrivate::elementDescriptions

◆ elements

ElementPtr_V sdf::SDF_VERSION_NAMESPACE::ElementPrivate::elements

◆ explicitlySetInFile

bool sdf::SDF_VERSION_NAMESPACE::ElementPrivate::explicitlySetInFile

True if the element was set in the SDF file.

◆ includeElement

ElementPtr sdf::SDF_VERSION_NAMESPACE::ElementPrivate::includeElement

The element that was used to load this entity.

For example, given the following SDFormat: <sdf version='1.8'> <world name='default'> <uri>model_uri</uri> <pose>1 2 3 0 0 0</pose> </world> </sdf> The ElementPtr associated with the model loaded from model_uri will have the includeElement set to <uri>model_uri</uri> <pose>1 2 3 0 0 0</pose>

This can be used to retrieve additional information available under the tag after the entity has been loaded. An example use case for this is when saving a loaded world back to SDFormat.

◆ lineNumber

std::optional<int> sdf::SDF_VERSION_NAMESPACE::ElementPrivate::lineNumber

Line number in file where this element came from.

◆ name

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::name

Element name.

◆ originalVersion

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::originalVersion

Spec version that this was originally parsed from.

◆ parent

ElementWeakPtr sdf::SDF_VERSION_NAMESPACE::ElementPrivate::parent

Element's parent.

◆ path

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::path

Path to file where this element came from.

◆ referenceSDF

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::referenceSDF

Name of reference sdf.

◆ required

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::required

True if element is required.

◆ value

ParamPtr sdf::SDF_VERSION_NAMESPACE::ElementPrivate::value

◆ xmlPath

std::string sdf::SDF_VERSION_NAMESPACE::ElementPrivate::xmlPath

XML path of this element.


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