class ClassCollection

A ClassCollection is one of the principal structures in HUGIN

Public Methods

ClassCollection() throw(ExceptionHugin)
Construct a new empty ClassCollection object
ClassList getMembers() throw(ExceptionHugin)
Retrieve a ClassList containing all the Classes contained in this ClassCollection
Class* getClassByName( const std::string& name) const throw(ExceptionHugin)
Retrieves a Class from the ClassCollection, identified by its name
void saveAsNet( const std::string& fileName ) throw(ExceptionHugin)
Save the ClassCollection as a net file
void parseClasses(const std::string& fileName, ClassParseListener* listener ) throw(ExceptionHugin)
Parse the given net into a Class

Documentation

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.
ClassCollection() throw(ExceptionHugin)
Construct a new empty ClassCollection object

ClassList getMembers() throw(ExceptionHugin)
Retrieve a ClassList containing all the Classes contained in this ClassCollection
Returns:
A ClassList containing all members of the ClassCollection.

Class* getClassByName( const std::string& name) const throw(ExceptionHugin)
Retrieves a Class from the ClassCollection, identified by its name.

Returns:
A reference to the Class with the given name. On error an exception will be thrown.
Parameters:
name - The name of the Class to return.

void saveAsNet( const std::string& fileName ) throw(ExceptionHugin)
Save the ClassCollection as a net file. This will write the definition of each Class from the ClassCollection into the same netfile.

Parameters:
fileName - The name of the file in which to save the ClassCollection.

void parseClasses(const std::string& fileName, ClassParseListener* listener ) throw(ExceptionHugin)
Parse the given net into a Class. This may involve parsing additional nets located in the same file, or in separate files. All the created Classes are inserted into the ClassCollection. When the Class to load references other classes, placed in different files, it is the responsibility of the user to provide a function for locating the files for these classes, and insert them into the ClassCollection. This is done by overloading the insertClass() function in the ClassParseListener class.
See Also:
ClassParseListener


This class has no child classes.
See Also:
Class

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de