Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MCIMgrBase Class Reference

Base class for templatized run-time type-safe interface manager class. More...

#include <mcllib/MCInterface.h>

Inheritance diagram for MCIMgrBase:

MCIMgr List of all members.

Protected Member Functions

 MCIMgrBase (const MCIMgrBase &mgr)
 Copy constructor.
 MCIMgrBase (const MCIMgrBase &mgr, const MCIID &iid)
 Construct from an existing manager with a new iid (down cast).
 MCIMgrBase (MCInterface *pInterface, const MCIID &iid)
 Construct from an interface base class.
MCIMgrBaseoperator= (const MCIMgrBase &mgr)
 Assignment operator - manage reference count.
 ~MCIMgrBase ()
 Destructor - decrement reference count.

Static Protected Member Functions

void checkPtr (const char *msg, const void *ptr)
 Helper method to throw msg if ptr is null.

Protected Attributes

MCIID m_iid
MCInterfacem_pInterface
 The interface itself.

Detailed Description

Base class for templatized run-time type-safe interface manager class.

Manages the contained interface ensuring it is of the correct interface identifier by calling isa() on it.


Constructor & Destructor Documentation

MCIMgrBase MCInterface pInterface,
const MCIID iid
[protected]
 

Construct from an interface base class.

Ensures that the interface is an implementation of the specified interface identifier by calling isa() on the interface. If the interface is not of the appropriate type (as specified by iid) an exception is thrown.

MCIMgrBase const MCIMgrBase mgr,
const MCIID iid
[protected]
 

Construct from an existing manager with a new iid (down cast).

This allows collections of interface identifiers representing inherited interfaces to be supported. Assumes that mgr implements the interface described by iid, calling isa() on the interface contained in the mgr to verify this. If the interface is not of the appropriate type (as specified by iid) an exception is thrown.

MCIMgrBase const MCIMgrBase mgr  )  [protected]
 

Copy constructor.

Attaches another reference to the interface contained in mgr.


Generated on Wed Jan 12 19:05:49 2005 for MCLLIB by  doxygen 1.3.9.1