#include <Plugin.hh>
Public Member Functions | |
Plugin () | |
Default constructor. | |
Plugin (const Plugin &_plugin) | |
Copy constructor. | |
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. | |
Plugin (Plugin &&_plugin) noexcept | |
Move constructor. | |
Plugin (sdf::Errors &_errors, 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. | |
~Plugin () | |
Default destructor. | |
void | ClearContents () |
Remove the contents of the plugin, this is everything that is a child element of the <plugin> . | |
const std::vector< sdf::ElementPtr > & | Contents () const |
Get the plugin contents. | |
sdf::ElementPtr | Element () const |
Get a pointer to the SDF element that was used during load. | |
const std::string & | Filename () const |
Get the filename of the shared library. | |
void | InsertContent (const sdf::ElementPtr _elem) |
Insert an element into the plugin content. | |
bool | InsertContent (const std::string _content) |
Insert XML content into this plugin. | |
void | InsertContent (sdf::Errors &_errors, const sdf::ElementPtr _elem) |
Insert an element into the plugin content. | |
bool | InsertContent (sdf::Errors &_errors, const std::string _content) |
Insert XML content into this plugin. | |
Errors | Load (ElementPtr _sdf) |
Load the plugin based on a element pointer. | |
const std::string & | Name () const |
Get the name of the plugin. | |
bool | operator!= (const Plugin &_plugin) const |
Plugin inequality operator. | |
Plugin & | operator= (const Plugin &_plugin) |
Copy assignment operator. | |
Plugin & | operator= (Plugin &&_plugin) noexcept |
Move assignment operator. | |
bool | operator== (const Plugin &_plugin) const |
Plugin equality operator. | |
void | SetFilename (const std::string &_filename) |
Set the filename of the shared library. | |
void | SetName (const std::string &_name) |
Set the name of the plugin. | |
sdf::ElementPtr | ToElement () const |
Create and return an SDF element filled with data from this plugin. | |
sdf::ElementPtr | ToElement (sdf::Errors &_errors) const |
Create and return an SDF element filled with data from this plugin. | |
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. |
sdf::SDF_VERSION_NAMESPACE::Plugin::Plugin | ( | sdf::Errors & | _errors, |
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.
[out] | _errors | Vector of errors. |
[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 |
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 | ) |
Insert an element into the plugin content.
This does not modify the values in the sdf::ElementPtr returned by the Element()
function.
[in] | _elem | Element to insert. |
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. |
void sdf::SDF_VERSION_NAMESPACE::Plugin::InsertContent | ( | sdf::Errors & | _errors, |
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.
[out] | _errors | Vector of errors. |
[in] | _elem | Element to insert. |
bool sdf::SDF_VERSION_NAMESPACE::Plugin::InsertContent | ( | sdf::Errors & | _errors, |
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.
[out] | _errors | Vector of errors. |
[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 | ) |
const 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 |
sdf::ElementPtr sdf::SDF_VERSION_NAMESPACE::Plugin::ToElement | ( | sdf::Errors & | _errors | ) | const |