The Class class is one of the principal structures in HUGIN. More...
Public Member Functions | |
Class (ClassCollection *cColl) | |
Create a new Class object, contained in the given ClassCollection. | |
Domain * | createDomain () const |
Instantiate this Class to a Domain. | |
ClassCollection * | getClassCollection () const |
Return the ClassCollection, in which this Class is contained. | |
NodeList | getInputs () const |
Get a list of all Nodes in this Class, which have been added to the inputs of the Class. | |
NodeList | getInstances () const |
Get a list of all InstanceNodes created from this Class. | |
std::string | getName () |
Retrieve the name of this Class. | |
NodeList | getOutputs () const |
Get a list of all Nodes in this Class, which have been added to the outputs of the Class. | |
void | setName (const char *name) |
Set the name of this Class. | |
void | setName (const std::string &name) |
Set the name of this Class. | |
~Class () throw () | |
Destruct a Class object. |
The Class class is one of the principal structures in HUGIN.
When using the Object Oriented features of HUGIN, Classes must be used for creating the networks. Furthermore, all Classes which are to be used as instances in a given Class must be contained in the same ClassCollection as this.
Classes cannot, however, be used for inference. For this purpose, it is necessary to instantiate the Class into a Domain, which can be used for performing inference.
HAPI::Class::Class | ( | ClassCollection * | cColl | ) | [explicit] |
Create a new Class object, contained in the given ClassCollection.
cColl | A pointer to the ClassCollection in which the newly constructed Class should be placed. |
Domain* HAPI::Class::createDomain | ( | ) | const |
ClassCollection* HAPI::Class::getClassCollection | ( | ) | const |
Return the ClassCollection, in which this Class is contained.
A Class can only be contained in a single ClassCollection, so if a given Class definition is needed in more than one ClassCollection, a copy of the Class must be created in each ClassCollection, and changes to one version of the Class will not be reflected in the others.
NodeList HAPI::Class::getInputs | ( | ) | const |
Get a list of all Nodes in this Class, which have been added to the inputs of the Class.
NodeList HAPI::Class::getInstances | ( | ) | const |
Get a list of all InstanceNodes created from this Class.
std::string HAPI::Class::getName | ( | ) |
NodeList HAPI::Class::getOutputs | ( | ) | const |
Get a list of all Nodes in this Class, which have been added to the outputs of the Class.
void HAPI::Class::setName | ( | const char * | name | ) |