|
Gyoto
|
Go to the source code of this file.
Classes | |
| class | Gyoto::Register::Entry |
| Entry in a register (or a full register) More... | |
Namespaces | |
| Gyoto | |
| Namespace for the Gyoto library. | |
| Gyoto::Register | |
| Gyoto registers. | |
Macros | |
| #define | GYOTO_GETSUBCONTRACTOR(space) |
Defines the getSubcontractor() function for namespace space. More... | |
Functions | |
| void | Gyoto::Register::init (char const *pluglist=NULL) |
| Initialise the various registers. More... | |
| void | Gyoto::Register::list () |
| List the various registers. | |
| void * | Gyoto::loadPlugin (char const *const plugname, int nofail=0) |
| Load a plugin by name. More... | |
| bool | Gyoto::havePlugin (std::string plugname) |
| Check whether a given plug-in has already been loaded. More... | |
| void | Gyoto::requirePlugin (std::string plugname, int nofail=0) |
| Load a plugin by name, only if not loaded yet. More... | |
| std::vector< std::string > | Gyoto::pluginPath () |
| Get a copy of the plug-in path. | |
| void | Gyoto::pluginPath (const std::vector< std::string > &v) |
| Set the plug-in path. | |
Gyoto registers.
Gyoto::Register::Entry instances are used to map kind names to Gyoto::SmartPointee::Subcontractor_t functions used to instantiate objects from XML files through the Gyoto::Factory.
| #define GYOTO_GETSUBCONTRACTOR | ( | space | ) |
Defines the getSubcontractor() function for namespace space.
This macro is called for instance to define Gyoto::Metric::getSubcontractor(). A function defined this way will:
plugin using requirePlugin();plugin until it is not anymore;plugin is empty of contains only fallback plug-ins, look for a subcontractor matching name in the register; if a match is found, insert the name of the corresponding plug-in in plugin and return a pointer to the matching subcontractor;name and one mandatory plug-in from plugin in the relevant register; if a match is found, return the subcontractor;plg: name and plg;plg as a glob pattern, if one exists, try to load it as a plug-in and look for a subcontractor matching pname is it;plg as a glob pattern, if one exists, try to load it as a plug-in and look for a subcontractor matching pname is it; <directory>/libgyoto-<plg>.so for every directory in the plug-in path. If such a file exists, try to load it as a plug-in and look for a subcontractor matching pname is it; At any point, if a matching subcontracting subcontractor is found, return it.Else,
errmode is 1, return NULL;errmode is 0, throw a Gyoto::Error.| [in] | space | a Gyoto namespace such as Metric, Astrobj, Spectrum or Spectrometer. |
1.8.14