|
Gyoto
|
Entry in a register (or a full register) More...
#include <GyotoRegister.h>
Public Member Functions | |
| Entry (std::string name, Gyoto::SmartPointee::Subcontractor_t *subcontractor, Entry *next) | |
| Constructor. | |
| ~Entry () | |
| Destructor. | |
| Gyoto::SmartPointee::Subcontractor_t * | getSubcontractor (std::string name, std::string &plugin, int errmode=0) |
| Get subcontractor for a given name. | |
Protected Attributes | |
| std::string | name_ |
| Kind name for the entry, as found in the "kind" XML attribute. | |
| Gyoto::SmartPointee::Subcontractor_t * | subcontractor_ |
| Pointer to the Gyoto::SmartPointee::Subcontractor_t function that produces an object of this kind. | |
| Register::Entry * | next_ |
| Next entry in the register, or NULL. | |
| const std::string | plugin_ |
| Plug-in from which this Entry was loaded. | |
Friends | |
| void | Gyoto::Register::list () |
| List the various registers. | |
Entry in a register (or a full register)
A register is actually a chained list of Register::Entry instances.
| Gyoto::SmartPointee::Subcontractor_t * Gyoto::Register::Entry::getSubcontractor | ( | std::string | name, |
| std::string & | plugin, | ||
| int | errmode = 0 |
||
| ) |
Get subcontractor for a given name.
Search through the register for an Entry matching name and return the corresponding subcontractor. If plugin is specified, only a subcontractor matching both name and plugin will be returned. Note that Gyoto::Entry::getSubcontractor() will not load the plug-in for you, contrary to e.g. Gyoto::Metric::getSubcontractor(). If plugin is the empty string, then the first subcontractor matching name will be returned, and the name of the plug-in it belongs to will be returned in plugin upon output.
| [in] | name | Name of the kind to look for. |
| [in,out] | plugin | e.g. "stdplug". |
| [in] | errmode | 1 if getSubContractor() should return NULL upon failure. Else a Gyoto::Error is thrown. |