Gyoto
Public Member Functions | Protected Attributes | Friends | List of all members
Gyoto::Register::Entry Class Reference

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_tgetSubcontractor (std::string name, 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_tsubcontractor_
 Pointer to the Gyoto::SmartPointee::Subcontractor_t function that produces an object of this kind.
Register::Entrynext_
 Next entry in the register, or NULL.

Friends

void Gyoto::Register::list ()
 List the various registers.

Detailed Description

Entry in a register (or a full register)

A register is actually a chained list of Register::Entry instances.

Member Function Documentation

Gyoto::SmartPointee::Subcontractor_t* Gyoto::Register::Entry::getSubcontractor ( std::string  name,
int  errmode = 0 
)

Get subcontractor for a given name.

Search through the register for an Entry matching name and return the corresponding subcontractor.

Parameters
nameName of the kind to look for.
errmode1 if getSubContractor() should return NULL upon failure. Else a Gyoto::Error is thrown.
Returns
Pointer to subcontractor function.

The documentation for this class was generated from the following file: