SophiaFramework UNIVERSE 5.3 |
#include <SFXRefObjectPointer.h.hpp>
class SFXRefObjectPointer;
SFMTYPEDEFCLASS(SFXRefObjectPointer)
The SFXRefObjectPointer class provides functions to automatically manage the reference count regarding the reference counting object class.
Constructor/Destructor |
---|
SFXRefObjectPointer( Void ) Constructor of the SFXRefObjectPointer class.
|
SFXRefObjectPointer(
SFXRefObjectPointer< M > const & param
) Constructor of the SFXRefObjectPointer class.
|
SFXRefObjectPointer(
SFXRefObjectPointer< T > const & param
) Constructor of the SFXRefObjectPointer class.
|
SFXRefObjectPointer(
T * pointer
, Bool retain = true
) Constructor of the SFXRefObjectPointer class.
|
Public Functions | |
---|---|
Void |
Attach(
T * pointer
) Delegate the control privilege of the specified instance of the T type to this SFXRefObjectPointer instance.
|
T * |
Detach( Void ) Delegate the control privilege of this SFXRefObjectPointer instance to the instance of the T type.
|
static SFXRefObjectPointer< T > const & |
EmptyInstance( Void ) Get the reference to a SFXRefObjectPointer instance that is invalid.
|
T * |
Get( Void ) Get the pointer to the instance managed by the SFXRefObjectPointer class.
|
Void |
Release( Void ) Release the SFXRefObjectPointer instance.
|
Void |
Set(
SFXRefObjectPointer< M > const & param
) Set the SFXRefObjectPointer instance.
|
Void |
Set(
SFXRefObjectPointer< T > const & param
) Set the SFXRefObjectPointer instance.
|
Void |
Set(
T * pointer
, Bool retain = true
) Set the SFXRefObjectPointer instance.
|
Bool |
operator!=(
SFXRefObjectPointer< T > const & left
, SFXRefObjectPointer< M > const & right
) Check the != relation.
|
Bool |
operator!=(
SFXRefObjectPointer< T > const & left
, SFORefObjectConstPtr right
) Check the != relation.
|
Bool |
operator!=(
SFORefObjectConstPtr left
, SFXRefObjectPointer< T > const & right
) Check the != relation.
|
T & |
operator*( Void ) Get the instance managed by the SFXRefObjectPointer instance.
|
T * |
operator->( Void ) Call the instance managed by the SFXRefObjectPointer instance.
|
SFXRefObjectPointer< T > & |
operator=(
SFXRefObjectPointer< M > const & param
) Assign a SFXResponderPointer instance.
|
SFXRefObjectPointer< T > & |
operator=(
SFXRefObjectPointer< T > const & param
) Assign a SFXResponderPointer instance.
|
Bool |
operator==(
SFXRefObjectPointer< T > const & left
, SFXRefObjectPointer< M > const & right
) Check the == relation.
|
Bool |
operator==(
SFXRefObjectPointer< T > const & left
, SFORefObjectConstPtr right
) Check the == relation.
|
Bool |
operator==(
SFXRefObjectConstPtr left
, SFXRefObjectPointer< T > const & right
) Check the == relation.
|
[ public, explicit ] SFXRefObjectPointer(Void);
[ public ] SFXRefObjectPointer( SFXRefObjectPointer< M > const & param // const reference to the SFXRefObjectPointer instance to copy );
[ public ] SFXRefObjectPointer( SFXRefObjectPointer< T > const & param // const reference to the SFXRefObjectPointer instance to copy );
[ public, explicit ] SFXRefObjectPointer( T * pointer // pointer to the instance of a T class Bool retain = true // specify whether or not to increase the number of reference counter );
[ public ] Void Attach( T * pointer // pointer to the SFXRefObjectPointer instance );
When the control privilege of the instance of the T type is delegeted to this SFXRefObjectPointer instance, the reference count is managed by the SFXRefObjectPointer instance and it is automatically released after used.
The "SFXRefObjectPointer::Attach(address);" statement is the same as the "SFXRefObjectPointer::Set(address, false);" statement.
[ public ] T * Detach(Void);
Return the instance of the T type for this SFXRefObjectPointer instance.
After executing the SFXRefObjectPointer::Detach function, the instance of the T type is not managed by the SFXRefObjectPointer instance. The reference count is also not managed, and therefore this instance needs to be released after used.
[ public, static ] SFXRefObjectPointer< T > const & EmptyInstance(Void);
Return the reference to a SFXRefObjectPointer instance that is invalid.
Since a reference to the null cannot be created, the SFXRefObjectPointer::EmptyInstance function is used to create an invalid instance.
[ public, const ] T * Get(Void);
[ public ] Void Release(Void);
The reference counter managed by the SFXRefObjectPointer instance is decreased. And the released instance will not be managed.
[ public ] Void Set( SFXRefObjectPointer< M > const & param // const reference to the SFXRefObjectPointer instance to set );
[ public ] Void Set( SFXRefObjectPointer< T > const & param // const reference to the SFXRefObjectPointer instance to set );
[ public ] Void Set( T * pointer // pointer to the instance of a T class Bool retain = true // whether or not to increase the reference counter );
The SFXRefObjectPointer is set after the reference counter regarding the previous instance is decreased.
SFXRefObjectPointer::Get | SFXRefObjectPointer::SFXRefObjectPointer | SFXRefObjectPointer::operator=
SFXRefObjectPointer< T > const_pointer_cast( SFXRefObjectPointer< M > const & param // pointer to the SFXRefObjectPointer instance to cast );
The const_pointer_cast function is used to const_cast a SFXRefObjectPointer instance to another one.
SFXRefObjectPointer::static_pointer_cast | SFXRefObjectPointer::reinterpret_pointer_cast | SFXRefObjectPointer
SFXRefObjectPointer< T > reinterpret_pointer_cast( SFXRefObjectPointer< M > const & param // pointer to the SFXRefObjectPointer instance to cast );
The reinterpret_pointer_cast function is used to reinterpret_cast a SFXRefObjectPointer instance to another one.
SFXRefObjectPointer::static_pointer_cast | SFXRefObjectPointer::const_pointer_cast | SFXRefObjectPointer
SFXRefObjectPointer< T > static_pointer_cast( SFXRefObjectPointer< M > const & param // pointer to the SFXRefObjectPointer instance to cast );
The static_pointer_cast function is used to static_cast a SFXRefObjectPointer instance to another one.
SFXRefObjectPointer::const_pointer_cast | SFXRefObjectPointer::reinterpret_pointer_cast | SFXRefObjectPointer
[ public, const ] T * operator->(Void);
[ public ] SFXRefObjectPointer< T > & operator=( SFXRefObjectPointer< M > const & param // const reference to the SFXRefObjectPointer instance to assign );
[ public ] SFXRefObjectPointer< T > & operator=( SFXRefObjectPointer< T > const & param // const reference to the SFXRefObjectPointer instance to assign );
The SFXRefObjectPointer::operator= operator calls the SFXRefObjectPointer::Set(SFXRefObjectPointer< M > const &) or SFXRefObjectPointer::Set(SFXRefObjectPointer< T > const &) function internally.
[ public, friend ] Bool operator==( SFXRefObjectPointer< T > const & left // const reference to the SFXRefObjectPointer instance to be compared SFXRefObjectPointer< M > const & right // const reference to the SFXRefObject instance to compare with );
[ public, friend ] Bool operator==( SFXRefObjectPointer< T > const & left // const reference to the SFXRefObjectPointer instance to be compared SFORefObjectConstPtr right // const pointer to the SFORefObject instance to compare with );
[ public, friend ] Bool operator==( SFXRefObjectConstPtr left // const pointer to the SFORefObject instance to be compared SFXRefObjectPointer< T > const & right // const reference to the SFXRefObjectPointer instance to compare with );
[ public, const ] T & operator*(Void);
[ public, friend ] Bool operator!=( SFXRefObjectPointer< T > const & left // const reference to the SFXRefObjectPointer instance to be compared SFXRefObjectPointer< M > const & right // const reference to the SFXRefObject instance to compare with );
[ public, friend ] Bool operator!=( SFXRefObjectPointer< T > const & left // const reference to the SFXRefObjectPointer instance to be compared SFORefObjectConstPtr right // const pointer to the SFORefObject instance to compare with );
[ public, friend ] Bool operator!=( SFORefObjectConstPtr left // const pointer to the SFORefObject instance to be compared SFXRefObjectPointer< T > const & right // const reference to the SFXRefObjectPointer instance to compare with );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |