Drake
SdfSpec Class Reference

This class provides a representation for an SDF specification. More...

#include <drake/multibody/parsing/sdf_spec.h>

Public Member Functions

 SdfSpec (const std::string &version)
 Creates a new SDF specification with the given version. More...
 
const std::string & version () const
 Returns the version of this specification. More...
 
int get_num_models ()
 Returns the number of models, corresponding to <model> elements, in this specification. More...
 
bool HasModel (const std::string &model_name) const
 Returns true if this specification contains a model named model_name. More...
 
const SdfModelGetModelByName (const std::string &model_name) const
 Returns a const reference to a model uniquely identified by its name, model_name. More...
 
SdfModelAddModel (const std::string &model_name)
 Adds a new model, named model_name, to this specification. More...
 
Does not allow copy, move, or assignment
 SdfSpec (const SdfSpec &)=delete
 
SdfSpecoperator= (const SdfSpec &)=delete
 
 SdfSpec (SdfSpec &&)=delete
 
SdfSpecoperator= (SdfSpec &&)=delete
 

Detailed Description

This class provides a representation for an SDF specification.

For details on the SDF specification, including conventions and default values, please refer to the documentation for the SDFormat library.

Constructor & Destructor Documentation

SdfSpec ( const SdfSpec )
delete
SdfSpec ( SdfSpec &&  )
delete
SdfSpec ( const std::string &  version)
inlineexplicit

Creates a new SDF specification with the given version.

Member Function Documentation

SdfModel& AddModel ( const std::string &  model_name)
inline

Adds a new model, named model_name, to this specification.

Here is the call graph for this function:

int get_num_models ( )
inline

Returns the number of models, corresponding to <model> elements, in this specification.

Here is the caller graph for this function:

const SdfModel& GetModelByName ( const std::string &  model_name) const
inline

Returns a const reference to a model uniquely identified by its name, model_name.

This method throws an std::runtime_error If model_name is no present in this specification.

bool HasModel ( const std::string &  model_name) const
inline

Returns true if this specification contains a model named model_name.

SdfSpec& operator= ( SdfSpec &&  )
delete
SdfSpec& operator= ( const SdfSpec )
delete
const std::string& version ( ) const
inline

Returns the version of this specification.


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