blocxx
|
PURPOSE: Make it easy to define immutable classes or handle classes, making it inexpensive to copy them, while keeping implementation details out of the header file. More...
#include <RefCountedPimpl.hpp>
Protected Member Functions | |
RefCountedPimpl () | |
RefCountedPimpl (Impl *p) | |
RefCountedPimpl (IntrusiveCountableBase *p) | |
Impl * | pimpl () const |
bool | null () const |
Private Attributes | |
IntrusiveReference < IntrusiveCountableBase > | m_impl |
PURPOSE: Make it easy to define immutable classes or handle classes, making it inexpensive to copy them, while keeping implementation details out of the header file.
This is done by declaring
class FooImpl; class Foo : private RefcountedPimpl<FooImpl> { ... };
and using pimpl()
in Foo
member functions to access the internal data. The Foo
object is a wrapper around a reference-counted pointer to a FooImpl
object.
BloCxx::IntrusiveCountableBase
. Definition at line 64 of file RefCountedPimpl.hpp.
BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::RefCountedPimpl | ( | ) | [inline, protected] |
Definition at line 79 of file RefCountedPimpl.hpp.
BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::RefCountedPimpl | ( | Impl * | p | ) | [inline, protected] |
Definition at line 86 of file RefCountedPimpl.hpp.
BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::RefCountedPimpl | ( | IntrusiveCountableBase * | p | ) | [inline, protected] |
Definition at line 94 of file RefCountedPimpl.hpp.
bool BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::null | ( | ) | const [inline, protected] |
Definition at line 108 of file RefCountedPimpl.hpp.
References BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::m_impl.
Impl* BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::pimpl | ( | ) | const [inline, protected] |
*this
. Definition at line 101 of file RefCountedPimpl.hpp.
References BLOCXX_NAMESPACE::IntrusiveReference< T >::getPtr(), and BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::m_impl.
IntrusiveReference<IntrusiveCountableBase> BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::m_impl [private] |
Definition at line 118 of file RefCountedPimpl.hpp.
Referenced by BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::null(), and BLOCXX_NAMESPACE::RefCountedPimpl< Impl >::pimpl().