|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
To use the virtual constructor mechanism your class
MUST be big! the handle should be derived from RCHandleAC,
and the body should be derived from BodyRefCounterVC.
To load a class use VirtualConstructorBodyC::DynLoad(in);
e.g. RCHandleA ahandle(VirtualConstructorBodyC::DynLoad(in));
will work if the class is the wrong type it will give an invalid
handle.
There should be one instance of this template for each body class you
wish to use with a virtual constructor.
Parent Classes:
Derived Classes:
Methods:
- VCInstC()
-
Default constructor.
- VCInstC(const char * nclassname)
-
Constructor, with class name mapping.
- RCAbstractC Load(istream & in) const
-
Load this type of object from a stream.
- RCAbstractC Create() const
-
Load this type of object from a stream.
- BooleanT IsCreateDefined() const
-
Load this type of object from a stream.
- const type_info & Type() const
-
What type of object ?
- RCAbstractC DynLoad(istream & in)
-
Load an general object.
- RCAbstractC DynCreate(const char * className)
-
Create instance of object with default constructor.
NB. This function is not provided for all classes.
Use IsCreateDefined() to check.
- BooleanT DynIsCreateDefined(const char * className)
-
Test if create is defined for this class.
- VirtualConstructorC Lookup(const char * className)
-
Get handle for class.
- BooleanT IsValid() const
-
Check its a valid handle.
- BooleanT IsValidObject() const
-
Check its a valid handle, and that the object is pointed to is also valid.
- RCHandleC<VirtualConstructorBodyC> & operator=(const RCHandleC<VirtualConstructorBodyC> & oth)
-
Assignment.
- BooleanT operator==(const RCHandleC<VirtualConstructorBodyC> & oth) const
-
Comparison operator.
- BooleanT operator!=(const RCHandleC<VirtualConstructorBodyC> & oth) const
-
Comparison operator.
- UIntT Hash() const
-
Hash function.x
- BooleanT IsConst() const
-
Is object constant ?
- BooleanT IsNotConst() const
-
Is object not constant ?
- void SetConst(void) const
-
Lock the object.
This is const as a convience though it actual modified the
object, often object you wish to ensure are constant already
have const set.
protected:
- void Invalidate()
-
Turn this into an invalid handle.
- VirtualConstructorBodyC & Body()
-
Direct access to body.
- const VirtualConstructorBodyC & Body() const
-
Constant access to body.
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|