|
| strongPtr (TYPE *p=std::nullptr_t{}) |
| Construct from raw pointer.
|
|
| strongPtr (const strongPtr &other) |
| Copy constructor shares ownership.
|
|
strongPtr & | operator= (const strongPtr &other) |
| Copy assignment shares ownership.
|
|
| strongPtr (strongPtr &&other) noexcept |
| Move constructor transfers ownership.
|
|
template<typename U , typename DEL = DELETER::template rebound_deleter<U>> |
strongPtr< U, DEL > | staticCastTo () |
| Static cast to different pointer type.
|
|
template<typename U , typename DEL = DELETER::template rebound_deleter<const U>> |
strongPtr< const U, DEL > | staticCastTo () const |
| Static cast to const pointer type.
|
|
template<typename U , typename DEL = DELETER::template rebound_deleter<U>> |
strongPtr< U, DEL > | dynamicCastTo () |
| Dynamic cast to different pointer type.
|
|
template<typename U , typename DEL = DELETER::template rebound_deleter<const U>> |
strongPtr< const U, DEL > | dynamicCastTo () const |
| Dynamic cast to const pointer type.
|
|
template<typename U , typename DEL = DELETER::template rebound_deleter<U>> |
strongPtr< U, DEL > | constCastTo () const |
| Const cast to remove/add const qualifier.
|
|
void | reset () noexcept |
| Resets the smart pointer and releases the managed object.
|
|
strongPtr & | operator= (strongPtr &&other) noexcept |
| Move assignment transfers ownership.
|
|
std::string | className () const override |
| Get class identifier.
|
|
| ~strongPtr () override |
| Destructor decreases strong references count.
|
|
bool | operator== (const refCntPtr< TYPE, O_DERIVED, DELETER > &other) const |
| Equality comparison operator.
|
|
bool | operator!= (const refCntPtr< TYPE, O_DERIVED, DELETER > &other) const |
| Inequality comparison operator.
|
|
std::string | toString (bool enter) const override |
| Formatted string with reference info.
|
|
| ~refCntPtr () override=default |
| Default destructor of refCntPtr.
|
|
u_integer | strongRefs () const |
| Get strong reference count.
|
|
u_integer | weakRefs () const |
| Get weak reference count.
|
|
bool | exist () const |
| Check active ownership.
|
|
bool | expired () const |
| Check resource validity.
|
|
| operator bool () const |
| Boolean conversion operator.
|
|
bool | operator! () const |
| Logical NOT operator.
|
|
const TYPE * | get () const |
| Get managed pointer const version.
|
|
TYPE * | get () |
| Get managed pointer.
|
|
virtual const TYPE & | operator* () const |
| Const dereference operator.
|
|
virtual const TYPE * | operator-> () const |
| Const member access operator.
|
|
virtual const TYPE & | operator[] (u_integer index) const |
| Const array access operator.
|
|
virtual TYPE & | operator* () |
| Mutable dereference operator.
|
|
virtual TYPE * | operator-> () |
| Mutable member access operator.
|
|
virtual TYPE & | operator[] (u_integer index) |
| Mutable array access operator.
|
|
void | swap (autoPtr &other) noexcept |
| Swaps the reference counters between two autoPtr instances.
|
|
integer | compareTo (const autoPtr &other) const override |
| Compare reference counters.
|
|
u_integer | toHash () const noexcept override |
| Compute hash value for the pointer.
|
|
bool | equals (const autoPtr &other) const noexcept override |
| Equality comparison.
|
|
| ~autoPtr () override |
| Destructor triggers reference cleanup.
|
|
| operator std::string () const |
| Explicit conversion to std::string.
|
|
| operator const char * () const |
| Explicit conversion to C-style string.
|
|
const char * | toCString (bool enter) const |
| Direct C-string access with formatting control.
|
|
template<typename TYPE > |
auto | formatString (const TYPE &t) -> std::string |
|
template<typename TYPE > |
auto | formatCString (const TYPE &t) -> const char * |
|
template<typename TYPE > |
auto | formatEnum (const TYPE &t) -> std::string |
|
template<typename TYPE > |
auto | formatString (TYPE *const &ptr) -> std::string |
|
bool | operator== (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is equal to another.
|
|
bool | operator!= (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is not equal to another.
|
|
bool | operator< (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is less than another.
|
|
bool | operator> (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is greater than another.
|
|
bool | operator<= (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is less than or equal to another.
|
|
bool | operator>= (const autoPtr< TYPE, DERIVED, DELETER > &other) const |
| Checks if the current object is greater than or equal to another.
|
|
virtual | ~comparable ()=default |
| Virtual destructor for proper cleanup of derived objects.
|
|
virtual bool | equals (const autoPtr< TYPE, DERIVED, DELETER > &other) const noexcept |
| Compares two objects for equality.
|
|
virtual | ~hashable ()=0 |
| Virtual destructor.
|
|
Shared ownership smart pointer with strong references.
- Template Parameters
-
TYPE | Managed object type |
DELETER | Deletion policy type (default: deleter<TYPE>) |
Maintains object lifetime through reference counting:
- Increases strong count on copy
- Decreases strong count on destruction
- Destroys object when strong count reaches zero
- Supports copy/move semantics for shared ownership