A ClassCollection is one of the principal structures in HUGIN.
More...
List of all members.
Detailed Description
A ClassCollection is one of the principal structures in HUGIN.
All classes must be contained in a ClassCollection, and Classes can only contain instances of Classes contained in the same ClassCollection. That is, each Class may contain instances of other Classes of the ClassCollection, but not of Classes of other ClassCollections.
- See also:
- Class
Constructor & Destructor Documentation
HAPI::ClassCollection::ClassCollection |
( |
const std::string & |
filename ) |
[explicit] |
Construct a class collection by loading the corresponding Hugin Knowledge Base (HKB) file.
The HKB file must contain a class collection.
- Parameters:
-
filename | the name of the HKB file |
HAPI::ClassCollection::ClassCollection |
( |
const std::string & |
filename, |
|
|
const std::string & |
password |
|
) |
| |
Construct a class collection by loading the corresponding password protected Hugin Knowledge Base (HKB) file.
The HKB file must contain a class collection. If the given password does not match the password stored in the HKB file, an exception is thrown.
- Parameters:
-
filename | the name of the HKB file |
password | the password of the HKB file |
Member Function Documentation
Class* HAPI::ClassCollection::getClassByName |
( |
const std::string & |
name ) |
const |
Retrieves a Class from the ClassCollection, identified by its name.
- Parameters:
-
name | The name of the Class to return. |
- Returns:
- A pointer to the Class with the given name.
ClassList HAPI::ClassCollection::getMembers |
( |
) |
const |
void HAPI::ClassCollection::parseClasses |
( |
const std::string & |
netStringOrFileName, |
|
|
ClassParseListener * |
listener |
|
) |
| |
Construct one or more classes from a NET file or a NET description given as a string.
- See also:
- ClassParseListener
- Parameters:
-
netStringOrFileName | a string containing a NET description or the name of a NET file |
pl | a ClassParseListener. |
void HAPI::ClassCollection::saveAsKB |
( |
const std::string & |
filename ) |
|
Save this ClassCollection as a Hugin Knowledge Base (HKB) file.
- Parameters:
-
filename | name of the HKB file |
void HAPI::ClassCollection::saveAsKB |
( |
const std::string & |
filename, |
|
|
const std::string & |
password |
|
) |
| |
Save this ClassCollection as a password protected Hugin Knowledge Base (HKB) file.
- Parameters:
-
filename | name of the HKB file |
password | the password for the HKB file. |
void HAPI::ClassCollection::saveAsNet |
( |
const std::string & |
netName ) |
|
Save a NET description of this ClassCollection to a file.
- Parameters:
-
netName | The name of the NET file. |
std::string HAPI::ClassCollection::toNetString |
( |
) |
const |
Create a NET description of this ClassCollection.
- Returns:
- A string containing the NET description.