Public Member Functions | Public Attributes | List of all members
sdf::v12::Plugin Class Reference

#include <Plugin.hh>

Public Member Functions

 Plugin ()
 Default constructor. More...
 
 Plugin (const Plugin &_plugin)
 Copy constructor. More...
 
 Plugin (Plugin &&_plugin) noexcept
 Move constructor. More...
 
 ~Plugin ()
 Default destructor. More...
 
void ClearContents ()
 Remove the contents of the plugin, this is everything that is a child element of the <plugin>. More...
 
const std::vector< sdf::ElementPtr > & Contents () const
 Get the plugin contents. More...
 
sdf::ElementPtr Element () const
 Get a pointer to the SDF element that was used during load. More...
 
std::string Filename () const
 Get the filename of the shared library. More...
 
void InsertContent (const sdf::ElementPtr _elem)
 Insert an element into the plugin content. More...
 
Errors Load (ElementPtr _sdf)
 Load the plugin based on a element pointer. More...
 
std::string Name () const
 Get the name of the plugin. More...
 
Pluginoperator= (const Plugin &_plugin)
 Copy assignment operator. More...
 
Pluginoperator= (Plugin &&_plugin) noexcept
 Move assignment operator. More...
 
void SetFilename (const std::string &_filename)
 Set the filename of the shared library. More...
 
void SetName (const std::string &_name)
 Set the name of the plugin. More...
 
sdf::ElementPtr ToElement () const
 Create and return an SDF element filled with data from this plugin. More...
 

Public Attributes

std::unique_ptr< sdf::PluginPrivate > dataPtr
 Private data pointer. More...
 

Constructor & Destructor Documentation

◆ Plugin() [1/3]

sdf::v12::Plugin::Plugin ( )

Default constructor.

◆ ~Plugin()

sdf::v12::Plugin::~Plugin ( )

Default destructor.

◆ Plugin() [2/3]

sdf::v12::Plugin::Plugin ( const Plugin _plugin)

Copy constructor.

Parameters
[in]_pluginPlugin to copy.

◆ Plugin() [3/3]

sdf::v12::Plugin::Plugin ( Plugin &&  _plugin)
noexcept

Move constructor.

Parameters
[in]_pluginPlugin to copy.

Member Function Documentation

◆ ClearContents()

void sdf::v12::Plugin::ClearContents ( )

Remove the contents of the plugin, this is everything that is a child element of the <plugin>.

◆ Contents()

const std::vector<sdf::ElementPtr>& sdf::v12::Plugin::Contents ( ) const

Get the plugin contents.

This is all the SDF elements that are children of the <plugin>.

Returns
The child elements of this plugin.

◆ Element()

sdf::ElementPtr sdf::v12::Plugin::Element ( ) const

Get a pointer to the SDF element that was used during load.

Returns
SDF element pointer. The value will be nullptr if Load has not been called.

◆ Filename()

std::string sdf::v12::Plugin::Filename ( ) const

Get the filename of the shared library.

Returns
Filename of the shared library associated with the plugin.

◆ InsertContent()

void sdf::v12::Plugin::InsertContent ( const sdf::ElementPtr  _elem)

Insert an element into the plugin content.

This does not modify the values in the sdf::ElementPtr returned by the Element() function.

Parameters
[in]_elemElement to insert.

◆ Load()

Errors sdf::v12::Plugin::Load ( ElementPtr  _sdf)

Load the plugin based on a element pointer.

This is not the usual entry point. Typical usage of the SDF DOM is through the Root object.

Parameters
[in]_sdfThe SDF Element pointer
Returns
Errors, which is a vector of Error objects. Each Error includes an error code and message. An empty vector indicates no error.

◆ Name()

std::string sdf::v12::Plugin::Name ( ) const

Get the name of the plugin.

The name of the plugin should be unique within the scope of its parent.

Returns
Name of the plugin.

◆ operator=() [1/2]

Plugin& sdf::v12::Plugin::operator= ( const Plugin _plugin)

Copy assignment operator.

Parameters
[in]_pluginPlugin to copy
Returns
A reference to this plugin

◆ operator=() [2/2]

Plugin& sdf::v12::Plugin::operator= ( Plugin &&  _plugin)
noexcept

Move assignment operator.

Parameters
[in]_pluginPlugin to move
Returns
A reference to this plugin

◆ SetFilename()

void sdf::v12::Plugin::SetFilename ( const std::string &  _filename)

Set the filename of the shared library.

Parameters
[in]_filenameFilename of the shared library associated with this plugin.

◆ SetName()

void sdf::v12::Plugin::SetName ( const std::string &  _name)

Set the name of the plugin.

The name of the plugin should be unique within the scope of its parent.

Parameters
[in]_nameName of the plugin.

◆ ToElement()

sdf::ElementPtr sdf::v12::Plugin::ToElement ( ) const

Create and return an SDF element filled with data from this plugin.

Note that parameter passing functionality is not captured with this function.

Returns
SDF element pointer with updated plugin values.

Member Data Documentation

◆ dataPtr

std::unique_ptr<sdf::PluginPrivate> sdf::v12::Plugin::dataPtr

Private data pointer.


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