User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
VCInstC::VCInstC(void)
VCInstC::VCInstC(const char *)
VirtualConstructorC::Load(istream &) const
VirtualConstructorC::Create(void) const
VirtualConstructorC::IsCreateDefined(void) const
VirtualConstructorC::Type(void) const
VirtualConstructorC::DynLoad(istream &)
VirtualConstructorC::DynCreate(const char *)
VirtualConstructorC::DynIsCreateDefined(const char *)
VirtualConstructorC::Lookup(const char *)
RCHandleC::IsValid(void) const
RCHandleC::IsValidObject(void) const
RCHandleC::operator=(const RCHandleC &)
RCHandleC::operator==(const RCHandleC &) const
RCHandleC::operator!=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsConst(void) const
RCHandleC::IsNotConst(void) const
RCHandleC::SetConst(void) const
RCHandleC::Invalidate(void)
RCHandleC::Body(void)
RCHandleC::Body(void) const
VCInstC<class BodyT>
 
Virtual Constructor Instance.
 
include "amma/VirtCon.hh"
User Level:Default
Library:MstdIO
Example:exComplx.cc
Section:Basic Types.Refrence Counting
In Scope:std

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.

#include "amma/RCHandle.hh"
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