_Handle Class Reference
Handle/Body: Base for Handle classes manipuating a Body.
More...
#include <_Handle.h>
Inheritance diagram for _Handle:
List of all members.
Detailed Description
Handle/Body: Base for Handle classes manipuating a Body.
_Handle provides the basic methods to access and manipulate a _Body (reference counted representation class). It maintains the _Body reference counter on construction, assignment and deletion of the _Handle. It provides operator-> and operator* to access the _Body.
As real life representation class will be derived from _Body, real life handles will be derived from _Handle. For convenience the template class _DHandle is provided. It realizes the handle to a specific Body class.
struct DataRep : public _Body {
void baa() {}
};
class VarAccess {
private:
_DHandle<DataTypeRep> _rep;
public:
void baa() { return _rep->baa(); }
};
class PtrAccess : _DHandle<DataRep> {
};
VarAccess v;
v.baa();
PtrAccess p;
p->baa();
(*p).baa();
Constructor & Destructor Documentation
| _Handle::_Handle |
( |
|
) |
[inline] |
|
| _Handle::_Handle |
( |
_Body * |
body_r |
) |
[inline] |
|
| _Handle::_Handle |
( |
const _Handle & |
rhs |
) |
[inline] |
|
| virtual _Handle::~_Handle |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
| virtual std::ostream& _Handle::dumpOn |
( |
std::ostream & |
str |
) |
const [virtual] |
|
|
|
Derived classes may overload this to realize std::ostream & operator<< for _Handle classes. |
| const _Body& _Handle::operator * |
( |
|
) |
const [inline] |
|
| _Body& _Handle::operator * |
( |
|
) |
[inline] |
|
| _Handle::operator const void * |
( |
|
) |
const [inline] |
|
| static void* _Handle::operator new |
( |
size_t |
|
) |
[static, private] |
|
| const _Body* _Handle::operator-> |
( |
|
) |
const [inline] |
|
| _Body* _Handle::operator-> |
( |
|
) |
[inline] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
Generated on Mon Mar 21 16:25:28 2005 for liby2util by
1.4.1