next up previous contents index
Next: Run Time Type Identification Up: Objects Previous: Serialisation methods   Contents   Index

Virtual Constructors

Defining the virtual constructors for your objects type is also a simple matter. Unlike the case of the serialisation routines, they can even be done inline in the class definition:

class foo: public object
 virtual object *lnew() {return vnew(this);}
 virtual object *lcopy() {return vcopy(this);}

Russell Standish 2016-09-02