|
Om
|
A polymorphic object with value semantics. More...
#include "owner.hpp"
Inheritance diagram for Om::Owner< ThisValue >:
Collaboration diagram for Om::Owner< ThisValue >:Public Types | |
| typedef void(Owner::* | Boolean) () const |
| The implementation of the Safe Boolean idiom. More... | |
Public Member Functions | |
| Owner () | |
| Owner (Owner const &) | |
| template<typename TheValue > | |
| Owner (std::auto_ptr< TheValue >) | |
| Owner & | operator= (Owner) |
| ThisValue & | operator* () |
| ThisValue const & | operator* () const |
| ThisValue * | operator-> () |
| ThisValue const * | operator-> () const |
| bool | operator! () const |
| operator Boolean () const | |
| Implements the Safe Boolean idiom. More... | |
| void | Clear () |
| ThisValue * | GetValue () |
| ThisValue const * | GetValue () const |
| bool | IsEmpty () const |
| template<typename TheValue > | |
| void | SetValue (std::auto_ptr< TheValue >) |
| void | Swap (Owner &) |
Public Member Functions inherited from Om::Taker< Owner< ThisValue > > | |
| virtual | ~Taker ()=0 |
| void | Take (Owner< ThisValue > &) |
| Swaps. More... | |
| void | Take (Owner< ThisValue > const &) |
| Assigns. More... | |
Private Member Functions | |
| void | UncomparableBoolean () const |
Private Attributes | |
| boost::intrusive_ptr< ThisValue > | thisValue |
| The pointer to the contained, lazily-copied value. More... | |
| bool | thisWasExposed |
| True if the contained value was exposed for modification. More... | |
This class can be considered a smart pointer with deep copy semantics, such that copying the pointer also copies the pointee (lazily).
| typedef void(Owner::* Om::Owner< ThisValue >::Boolean) () const |
|
explicit |
| ThisValue& Om::Owner< ThisValue >::operator* | ( | ) |
| ThisValue const& Om::Owner< ThisValue >::operator* | ( | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| ThisValue* Om::Owner< ThisValue >::operator-> | ( | ) |
| ThisValue const* Om::Owner< ThisValue >::operator-> | ( | ) | const |
| bool Om::Owner< ThisValue >::operator! | ( | ) | const |
| void Om::Owner< ThisValue >::Clear | ( | ) |
| ThisValue* Om::Owner< ThisValue >::GetValue | ( | ) |
| ThisValue const* Om::Owner< ThisValue >::GetValue | ( | ) | const |
| bool Om::Owner< ThisValue >::IsEmpty | ( | ) | const |
| void Om::Owner< ThisValue >::SetValue | ( | std::auto_ptr< TheValue > | ) |
|
private |
|
private |
|
private |