#include <mcllib/MCInterface.h>
Inheritance diagram for MCIMgrBase:
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. | |
MCIMgrBase & | operator= (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 |
MCInterface * | m_pInterface |
The interface itself. |
Manages the contained interface ensuring it is of the correct interface identifier by calling isa() on it.
|
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. |
|
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. |
|
Copy constructor. Attaches another reference to the interface contained in mgr. |