#include <Plugin.hh>
Public Member Functions | |
Plugin () | |
Default constructor. More... | |
Plugin (const Plugin &_plugin) | |
Copy constructor. More... | |
Plugin (const std::string &_filename, const std::string &_name, const std::string &_xmlContent="") | |
A constructor that initializes the plugin's filename, name, and optionally the content. 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... | |
bool | InsertContent (const std::string _content) |
Insert XML content into this plugin. 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... | |
bool | operator!= (const Plugin &_plugin) const |
Plugin inequality operator. More... | |
Plugin & | operator= (const Plugin &_plugin) |
Copy assignment operator. More... | |
Plugin & | operator= (Plugin &&_plugin) noexcept |
Move assignment operator. More... | |
bool | operator== (const Plugin &_plugin) const |
Plugin equality 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... | |
sdf::SDF_VERSION_NAMESPACE::Plugin::Plugin | ( | ) |
Default constructor.
sdf::SDF_VERSION_NAMESPACE::Plugin::~Plugin | ( | ) |
Default destructor.
sdf::SDF_VERSION_NAMESPACE::Plugin::Plugin | ( | const Plugin & | _plugin | ) |
Copy constructor.
[in] | _plugin | Plugin to copy. |
|
noexcept |
Move constructor.
[in] | _plugin | Plugin to copy. |
sdf::SDF_VERSION_NAMESPACE::Plugin::Plugin | ( | const std::string & | _filename, |
const std::string & | _name, | ||
const std::string & | _xmlContent = "" |
||
) |
A constructor that initializes the plugin's filename, name, and optionally the content.
[in] | _filename | Filename of the shared library associated with this plugin. |
[in] | _name | The name of the plugin. |
[in] | _xmlContent | Optional XML content that will be stored in this plugin. |
void sdf::SDF_VERSION_NAMESPACE::Plugin::ClearContents | ( | ) |
Remove the contents of the plugin, this is everything that is a child element of the <plugin>
.
const std::vector<sdf::ElementPtr>& sdf::SDF_VERSION_NAMESPACE::Plugin::Contents | ( | ) | const |
Get the plugin contents.
This is all the SDF elements that are children of the <plugin>
.
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plugin::Element | ( | ) | const |
std::string sdf::SDF_VERSION_NAMESPACE::Plugin::Filename | ( | ) | const |
Get the filename of the shared library.
void sdf::SDF_VERSION_NAMESPACE::Plugin::InsertContent | ( | const sdf::ElementPtr | _elem | ) |
bool sdf::SDF_VERSION_NAMESPACE::Plugin::InsertContent | ( | const std::string | _content | ) |
Insert XML content into this plugin.
This function does not modify the values in the sdf::ElementPtr returned by the Element()
function. The provided content must be valid XML.
[in] | _content | A string that contains valid XML. The XML is inserted into this plugin if it is valid. |
Errors sdf::SDF_VERSION_NAMESPACE::Plugin::Load | ( | ElementPtr | _sdf | ) |
std::string sdf::SDF_VERSION_NAMESPACE::Plugin::Name | ( | ) | const |
Get the name of the plugin.
The name of the plugin should be unique within the scope of its parent.
bool sdf::SDF_VERSION_NAMESPACE::Plugin::operator!= | ( | const Plugin & | _plugin | ) | const |
bool sdf::SDF_VERSION_NAMESPACE::Plugin::operator== | ( | const Plugin & | _plugin | ) | const |
void sdf::SDF_VERSION_NAMESPACE::Plugin::SetFilename | ( | const std::string & | _filename | ) |
Set the filename of the shared library.
[in] | _filename | Filename of the shared library associated with this plugin. |
void sdf::SDF_VERSION_NAMESPACE::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.
[in] | _name | Name of the plugin. |
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plugin::ToElement | ( | ) | const |
std::unique_ptr<sdf::PluginPrivate> sdf::SDF_VERSION_NAMESPACE::Plugin::dataPtr |
Private data pointer.