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

MCBase Class Reference

Base class for most mcllib classes that manage resources. More...

#include <mcllib/MCBase.h>

Inheritance diagram for MCBase:

MCDBConnection MCDBResultSet MCSqlStatement MCDictionary MCDirEnum MCGetOpt MCIniFile MCIniSection MCIOBase MCLibrary MCLibrarySym MCNetAddr MCProcess MCSerializer MCString MCStringStream MCSystem MCThread MCThreadJob MCThreadPool MCOid MCPdu MCSnmp MCSnmpTarget List of all members.

Public Member Functions

 MCBase (const MCBase &)
 copy constructor
 MCBase ()
 Default constructor.
bool operator!= (const MCBase &) const
 Test for in-equality on the implementation.
bool operator< (const MCBase &) const
 Test for less-than on the implementation.
MCBaseoperator= (const MCBase &)
 assignment operator
bool operator== (const MCBase &) const
 Test for equality on the implementation.
 ~MCBase ()

Protected Member Functions

void attach (void *impl)
 safe attach to the implementation specified by impl.
void detach ()
 safe detach from the implementation
 MCBase (void *impl)
 Constructor with an implementation.


class mclpriv::MCBaseAccessor

Detailed Description

Base class for most mcllib classes that manage resources.

Derived class constructors must provide a pointer to a private implementation class derived from MCBaseImpl which is reference counted to promote fast and simple copying. It is still better to pass as const references instead of by value to avoid the reference counting overhead.

Constructor & Destructor Documentation

MCBase void *  impl  )  [protected]

Constructor with an implementation.

The implementation pointer must be derived from the private class MCBaseImpl.

Member Function Documentation

void attach void *  impl  )  [protected]

safe attach to the implementation specified by impl.

See note on MCBase(void* impl) constructor

bool operator< const MCBase  )  const

Test for less-than on the implementation.

Useful in conjunction with STL containers, sorting etc.

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