Interface for the SDFormat Editor's Parser.
More...
#include <sdformat_parser_interface.h>
|
| virtual void | Initialize (const std::string file_path, bool &success)=0 |
| | Initialization of the Parser. Will re-initalize the parser if initalized already.
|
| |
| virtual sdf::SDFPtr | GetSDFElement ()=0 |
| | Returns the main sdfElement associated this this SDFormatParser instance.
|
| |
| virtual std::vector< sdf::ElementPtr > | LookupElementsByAttributeType (const std::string &attribute_type)=0 |
| | Provides a list of elements which have an attribute of the given attribute type.
|
| |
| virtual std::vector< sdf::ElementPtr > | LookupElementsByAttributeTypeAndValue (const std::string &attribute_type, const std::string &attribute_value)=0 |
| | Provides a list of elements which have an attribute of the given attribute type and the given attribute value.
|
| |
| virtual std::vector< sdf::ElementPtr > | LookupElementsByType (const std::string &type)=0 |
| | Provides a list of elements which are of a given type.
|
| |
| virtual Mentions | FindMentions (std::string key)=0 |
| | Finds the elements and attributes which mention a given key.
|
| |
| virtual Mentions | FindMentions (std::string key, sdf::ElementPtr element_to_exclude)=0 |
| | Finds the elements and attributes which mention a given key.
|
| |
| virtual Mentions | FindMentions (std::string key, sdf::ParamPtr attribute_to_exclude)=0 |
| | Finds the elements and attributes which mention a given key.
|
| |
| virtual Mentions | FindMentions (std::string key, sdf::ElementPtr element_to_exclude, sdf::ParamPtr attribute_to_exclude)=0 |
| | Finds the elements and attributes which mention a given key.
|
| |
| virtual std::string | GetSDFTreePathToElement (sdf::ElementPtr element)=0 |
| | Get the tree path to a given element.
|
| |
| virtual std::pair< std::vector< ModelViewerI::ModelInfo >, std::vector< ModelViewerI::PresetModelInfo > > | GetModelsFromSDFTree (bool render_collisions=false)=0 |
| | Gets information about all models in the sdf tree in a format that can be interperted by the model viewer.
|
| |
Interface for the SDFormat Editor's Parser.
◆ FindMentions() [1/4]
| virtual Mentions SDFormatParserI::FindMentions |
( |
std::string |
key | ) |
|
|
pure virtual |
Finds the elements and attributes which mention a given key.
- Parameters
-
| [in] | key | the string to search for |
- Returns
- The elements and attributes that mention the given key
Implemented in SDFormatParser.
◆ FindMentions() [2/4]
| virtual Mentions SDFormatParserI::FindMentions |
( |
std::string |
key, |
|
|
sdf::ElementPtr |
element_to_exclude |
|
) |
| |
|
pure virtual |
Finds the elements and attributes which mention a given key.
- Parameters
-
| [in] | key | the string to search for |
| [in] | element_to_exclude | the element to exclude in the search |
- Returns
- The elements and attributes that mention the given key
Implemented in SDFormatParser.
◆ FindMentions() [3/4]
| virtual Mentions SDFormatParserI::FindMentions |
( |
std::string |
key, |
|
|
sdf::ElementPtr |
element_to_exclude, |
|
|
sdf::ParamPtr |
attribute_to_exclude |
|
) |
| |
|
pure virtual |
Finds the elements and attributes which mention a given key.
- Parameters
-
| [in] | key | the string to search for |
| [in] | element_to_exclude | the element to exclude in the search |
| [in] | attribute_to_exclude | the attribute to exclude in the search |
- Returns
- The elements and attributes that mention the given key
Implemented in SDFormatParser.
◆ FindMentions() [4/4]
| virtual Mentions SDFormatParserI::FindMentions |
( |
std::string |
key, |
|
|
sdf::ParamPtr |
attribute_to_exclude |
|
) |
| |
|
pure virtual |
Finds the elements and attributes which mention a given key.
- Parameters
-
| [in] | key | the string to search for |
| [in] | attribute_to_exclude | the attribute to exclude in the search |
- Returns
- The elements and attributes that mention the given key
Implemented in SDFormatParser.
◆ GetModelsFromSDFTree()
Gets information about all models in the sdf tree in a format that can be interperted by the model viewer.
- Parameters
-
| [in] | render_collisions | indicates if collision meshes and shapes are included as well |
- Returns
- A pair of vectors condaining structs of the model viewer interfaces's ModelInfo and Preset Model Info, which in turn contain the necessary information to render models
Implemented in SDFormatParser.
◆ GetSDFElement()
| virtual sdf::SDFPtr SDFormatParserI::GetSDFElement |
( |
| ) |
|
|
pure virtual |
◆ GetSDFTreePathToElement()
| virtual std::string SDFormatParserI::GetSDFTreePathToElement |
( |
sdf::ElementPtr |
element | ) |
|
|
pure virtual |
Get the tree path to a given element.
- Parameters
-
| [in] | element | element that we want a tree path for |
- Returns
- Tree path as a string
Implemented in SDFormatParser.
◆ Initialize()
| virtual void SDFormatParserI::Initialize |
( |
const std::string |
file_path, |
|
|
bool & |
success |
|
) |
| |
|
pure virtual |
Initialization of the Parser. Will re-initalize the parser if initalized already.
- Parameters
-
| [in] | file_path | The relative or absolute filepath to the SDF model. If relative, a relative_to path must be specified. |
| [out] | success | True if SDFParser initalization is successful |
Implemented in SDFormatParser.
◆ LookupElementsByAttributeType()
| virtual std::vector< sdf::ElementPtr > SDFormatParserI::LookupElementsByAttributeType |
( |
const std::string & |
attribute_type | ) |
|
|
pure virtual |
Provides a list of elements which have an attribute of the given attribute type.
- Parameters
-
| [in] | attribute_type | The attribute type to use for lookup |
- Returns
- A list of elements with a given attribute type
Implemented in SDFormatParser.
◆ LookupElementsByAttributeTypeAndValue()
| virtual std::vector< sdf::ElementPtr > SDFormatParserI::LookupElementsByAttributeTypeAndValue |
( |
const std::string & |
attribute_type, |
|
|
const std::string & |
attribute_value |
|
) |
| |
|
pure virtual |
Provides a list of elements which have an attribute of the given attribute type and the given attribute value.
- Parameters
-
| [in] | attribute_type | The attribute type to use for lookup |
| [in] | attribute_value | The attribute type to use for lookup |
- Returns
- A list of elements with the given attribute type and the given attribute value
Implemented in SDFormatParser.
◆ LookupElementsByType()
| virtual std::vector< sdf::ElementPtr > SDFormatParserI::LookupElementsByType |
( |
const std::string & |
type | ) |
|
|
pure virtual |
Provides a list of elements which are of a given type.
- Parameters
-
| [in] | type | The type by which to lookup elements |
- Returns
- A list of elements with a given attribute type
Implemented in SDFormatParser.
The documentation for this class was generated from the following file: