an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
More...
#include <ExtensionPoint.hpp>
|
rw::core::PropertyMap & | getSchema () |
| the schema describe the possible properties/configurations elements which is used in the PropertyMap. The schema property map should just be loaded with all possible configuration options which the extension might use. More...
|
|
template<class ExtensionInterface>
class rw::core::ExtensionPoint< ExtensionInterface >
an extension point is a class that defines a point where Extension can be added. This is typically used together with plugins, however any class may register extensions to an extension point.
◆ ExtensionPoint()
Constructor.
- Parameters
-
id | [in] unique identifier of this extension point |
name | [in] human readable name of this extension point |
plugin | [in] the plugin from which this extension point is defined, NULL if not defined from plugin |
◆ getSchema()
the schema describe the possible properties/configurations elements which is used in the PropertyMap. The schema property map should just be loaded with all possible configuration options which the extension might use.
subclassing the ExtensionPoint class enables you to add extra configuration options. This might be done as simply as this:
getSchema().
add(
"SupportedFormats",
"Comma seperated String of supported formats",
std::string(
"GIF,PNG,JPEG"));
getSchema().
add(
"ShowLights",
"Should lights be on as
default?", true);
...
const rw::core::PropertyMap & getSchema() const
the schema describe the possible properties/configurations elements which is used in the PropertyMap....
Definition: core/ExtensionPoint.hpp:60
rw::core::Ptr< rw::core::Property< T > > add(const std::string &identifier, const std::string &description, const T &value)
Add a property to the map. If a property with the same identifier already exists then nothing is adde...
Definition: core/PropertyMap.hpp:140
which will enable the loading of these options from the plugin xml file descriptor
<plugin ... >
...
<extension>
...
<SupportedFormats>GIF,PNG,JPEG</SupportedFormats>
<ShowLights>false</ShowLights>
</extension>
</plugin>
- Returns
The documentation for this class was generated from the following file: