You can directly subclass one of those interfaces and implement all of the abstract functions in order to create a plug-in. However, it is highly recommended that you subclass one of our Shell classes. These Shell classes implement large portions of these interfaces for you and require you write less code. A complete list of Shell classes is shown below:
1 - DesktopServices and SessionExplorer are only available when ApplicationServices::isBatch() returns false.
The easiest method to access these Services is to use the Service template specialization, so
#include "ConfigurationSettings.h" #include <string> void foo() { std::string version = Service<ConfigurationSettings>()->getVersion(); //Fetch the application version # from the ConfigurationSettings Service. //OR, another way to do the above Service<ConfigurationSettings> pConfSett; std::string version = pConfSett->getVersion(); //OR, yet another way to do the above ConfigurationSettings* pConfPointer = pConfSett.get(); version = pConfPointer->getVersion(); }
There is a Service template specialization for each of the Services mentioned above. The Service classes can be used anywhere inside your plug-in library (i.e. .dll, .so).
Now that you have created a plug-in subclass, you need to register it with the application. Please read Registering your plug-in for more details.