|
| | Pointer () |
| | Default Constructor.
|
| | Pointer (const PointerType value) |
| | Explicit Constructor, creates a Pointer that contains value with a single reference.
|
| | Pointer (const Pointer &value) |
| | Copy constructor.
|
| template<typename T1, typename R1> |
| | Pointer (const Pointer< T1, R1 > &value) |
| | Copy constructor.
|
| template<typename T1, typename R1> |
| | Pointer (const Pointer< T1, R1 > &value, const STATIC_CAST_TOKEN &) |
| | Static Cast constructor.
|
| template<typename T1, typename R1> |
| | Pointer (const Pointer< T1, R1 > &value, const DYNAMIC_CAST_TOKEN &) |
| | Dynamic Cast constructor.
|
| virtual | ~Pointer () |
| void | reset (T *value=NULL) |
| | Resets the Pointer to hold the new value.
|
| T * | release () |
| | Releases the Pointer held and resets the internal pointer value to Null.
|
| PointerType | get () const |
| | Gets the real pointer that is contained within this Pointer.
|
| void | swap (Pointer &value) |
| | Exception Safe Swap Function.
|
| Pointer & | operator= (const Pointer &right) |
| | Assigns the value of right to this Pointer and increments the reference Count.
|
| template<typename T1, typename R1> |
| Pointer & | operator= (const Pointer< T1, R1 > &right) |
| ReferenceType | operator* () |
| | Dereference Operator, returns a reference to the Contained value.
|
| ReferenceType | operator* () const |
| PointerType | operator-> () |
| | Indirection Operator, returns a pointer to the Contained value.
|
| PointerType | operator-> () const |
| bool | operator! () const |
| template<typename T1, typename R1> |
| bool | operator== (const Pointer< T1, R1 > &right) const |
| template<typename T1, typename R1> |
| bool | operator!= (const Pointer< T1, R1 > &right) const |
| template<typename T1> |
| Pointer< T1, CounterType > | dynamicCast () const |
| template<typename T1> |
| Pointer< T1, CounterType > | staticCast () const |
| | AtomicRefCounter () |
| | AtomicRefCounter (const AtomicRefCounter &other) |
| virtual | ~AtomicRefCounter () |
template<typename T, typename REFCOUNTER = decaf::util::concurrent::atomic::AtomicRefCounter>
class activemq::transport::failover::Pointer< T, REFCOUNTER >
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the default Reference Counter is used.
This Pointer type allows for the substitution of different Reference Counter implementations which provide a means of using invasive reference counting if desired using a custom implementation of ReferenceCounter.
The Decaf smart pointer provide comparison operators for comparing Pointer instances in the same manner as normal pointer, except that it does not provide an overload of operators ( <, <=, >, >= ). To allow use of a Pointer in a STL container that requires it, Pointer provides an implementation of std::less.
- Since
- 1.0
template<typename T, typename REFCOUNTER = decaf::util::concurrent::atomic::AtomicRefCounter>
template<typename T1, typename R1>
Dynamic Cast constructor.
Copies the value contained in the pointer to the new instance and increments the reference counter performing a dynamic cast on the value contained in the source Pointer object. If the cast fails and return NULL then this method throws a ClassCastException.
- Parameters
-
| value | Pointer instance to cast to this type using a dynamic_cast. |
- Exceptions
-
| ClassCastException | if the dynamic cast returns NULL |