#include <symbol.h>
Public Member Functions | |
Symbol * | base () const |
InheritDef () | |
Empty constructor. | |
InheritDef (Symbol *bc) | |
Constructs the Inheritance. | |
bool | load (Module *mod, Stream *in) |
bool | save (Stream *out) const |
~InheritDef () |
Every class may be derived from one or more subclasses. Every inheritance will force the class to include all the properties of the subclasses, and to eventually call the base class constructors, if they have. Constructors may be called with parameters, which may be constants or symbols taken from the class symbol table, that is, from the parameters that have been passed to the class.
This structure is needed to record the order and kind of parameters given to subclasses instantation without writing VM code. In this way, each class constructor will handle only its local instantation, and the correct call of each constructor will be handled outside the main VM loop, in a smart and efficient way.
Falcon::InheritDef::InheritDef | ( | Symbol * | bc | ) | [inline] |
Constructs the Inheritance.
The inheritance is initially built without parameters.
bc | the base class this inheritance refers to. |
Falcon::InheritDef::InheritDef | ( | ) | [inline] |
Empty constructor.
Mainly used during deserialization.
Falcon::InheritDef::~InheritDef | ( | ) |
Symbol* Falcon::InheritDef::base | ( | ) | const [inline] |
bool Falcon::InheritDef::save | ( | Stream * | out | ) | const |