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