SophiaFramework UNIVERSE 5.3 |
The SFXBrewPointer class provides functions to automatically manage the reference count regarding the wrapper class for the BREW interface.
Constructor/Destructor |
---|
SFXBrewPointer( Void ) Constructor of the SFXBrewPointer class.
|
SFXBrewPointer(
SFXBrewPointer< M > const & param
) Constructor of the SFXBrewPointer class.
|
SFXBrewPointer(
SFXBrewPointer< T > const & param
) Constructor of the SFXBrewPointer class.
|
SFXBrewPointer(
T * pointer
, Bool increment = true
) Constructor of the SFXBrewPointer class.
|
Public Functions | |
---|---|
Void |
Attach(
T * pointer
) Delegate the control privilege of the specified instance of the T type to this SFXBrewPointer instance.
|
T * |
Detach( Void ) Delegate the control privilege of this SFXBrewPointer instance to the instance of the T type.
|
static SFXBrewPointer< T > const & |
EmptyInstance( Void ) Get the reference to a SFXBrewPointer instance that is invalid.
|
T * |
Get( Void ) Get the pointer to the instance managed by the SFXBrewPointer class.
|
Void |
Release( Void ) Release the SFXBrewPointer instance.
|
Void |
Set(
SFXBrewPointer< M > const & param
) Set the SFXBrewPointer instance.
|
Void |
Set(
SFXBrewPointer< T > const & param
) Set the SFXBrewPointer instance.
|
Void |
Set(
T * pointer
, Bool increment = true
) Set the SFXBrewPointer instance.
|
T * |
operator->( Void ) Call the instance managed by the SFXBrewPointer instance.
|
SFXBrewPointer< T > & |
operator=(
SFXBrewPointer< M > const & param
) Assign a SFXBrewPointer instance.
|
SFXBrewPointer< T > & |
operator=(
SFXBrewPointer< T > const & param
) Assign a SFXBrewPointer instance.
|
Bool |
operator==(
SFXBrewPointer< T > const & left
, SFXBrewPointer< M > const & right
) Check the "==" relation.
|
Bool |
operator==(
SFXBrewPointer< T > const & left
, SFBBaseConstPtr right
) Check the "==" relation.
|
Bool |
operator==(
SFBBaseConstPtr left
, SFXBrewPointer< T > const & right
) Check the "==" relation.
|
Bool |
operator!=(
SFXBrewPointer< T > const & left
, SFXBrewPointer< M > const & right
) Check the "!=" relation.
|
Bool |
operator!=(
SFXBrewPointer< T > const & left
, SFBBaseConstPtr right
) Check the "!=" relation.
|
Bool |
operator!=(
SFBBaseConstPtr left
, SFXBrewPointer< T > const & right
) Check the "!=" relation.
|
Global Functions | |
---|---|
SFXBrewPointer< T > |
const_pointer_cast(
SFXBrewPointer< M > const & param
) Perform the const_cast operation between two SFXBrewPointer instances.
|
SFXBrewPointer< T > |
dynamic_pointer_cast(
SFXBrewPointer< M > const & param
) Perform the dynamic_cast operation between two SFXBrewPointer instances.
|
SFXBrewPointer< T > |
reinterpret_pointer_cast(
SFXBrewPointer< M > const & param
) Perform the reinterpret_cast operation between two SFXBrewPointer instances.
|
SFXBrewPointer< T > |
static_pointer_cast(
SFXBrewPointer< M > const & param
) Perform the static_cast operation between two SFXBrewPointer instances.
|
Bool |
operator==(
SFXBrewPointer< T > const & left
, SFXBrewPointer< M > const & right
) Check the "==" relation.
|
Bool |
operator==(
SFXBrewPointer< T > const & left
, SFBBaseConstPtr right
) Check the "==" relation.
|
Bool |
operator==(
SFBBaseConstPtr left
, SFXBrewPointer< T > const & right
) Check the "==" relation.
|
T & |
operator*( Void ) Get the instance managed by the SFXBrewPointer instance.
|
Bool |
operator!=(
SFXBrewPointer< T > const & left
, SFXBrewPointer< M > const & right
) Check the "!=" relation.
|
Bool |
operator!=(
SFXBrewPointer< T > const & left
, SFBBaseConstPtr right
) Check the "!=" relation.
|
Bool |
operator!=(
SFBBaseConstPtr left
, SFXBrewPointer< T > const & right
) Check the "!=" relation.
|
[ public, explicit ] SFXBrewPointer(Void);
[ public ] SFXBrewPointer( SFXBrewPointer< M > const & param // reference to the SFXBrewPointer instance );
[ public ] SFXBrewPointer( SFXBrewPointer< T > const & param // reference to the SFXBrewPointer instance );
[ public, explicit ] SFXBrewPointer( 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 instance of BREW interface );
When the control privilege of the instance of the T type is delegeted to this SFXBrewPointer instance, the reference count is managed by the SFXBrewPointer instance and it is automatically released after used.
The "SFXBrewPointer::Attach(address);" statement is the same as the "SFXBrewPointer::Set(address, false);" statement.
[ public ] T * Detach(Void);
Return the instance of the T type for this SFXBrewPointer instance.
After executing the SFXBrewPointer::Detach function, the instance of the T type is not managed by the SFXBrewPointer instance. The reference count is also not managed, and therefore this instance needs to be released after used.
[ public, static ] SFXBrewPointer< T > const & EmptyInstance(Void);
Return the reference to a SFXBrewPointer instance that is invalid.
Since a reference to the null cannot be created, the SFXBrewPointer::EmptyInstance function is used to create an invalid instance.
[ public, const ] T * Get(Void);
[ public ] Void Release(Void);
The reference counter managed by the SFXBrewPointer instance is decreased. And the released instance will not be managed.
[ public ] Void Set( SFXBrewPointer< M > const & param // reference to the SFXBrewPointer instance );
[ public ] Void Set( SFXBrewPointer< T > const & param // reference to the SFXBrewPointer instance );
[ 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 SFXBrewPointer instance is set after the reference counter regarding the previous instance is decreased.
SFXBrewPointer< T > const_pointer_cast( SFXBrewPointer< M > const & param // pointer to the SFXBrewPointer instance );
The const_pointer_cast function is used to const_cast a SFXBrewPointer instance to another one.
static_pointer_cast | dynamic_pointer_cast | reinterpret_pointer_cast
SFXBrewPointer< T > dynamic_pointer_cast( SFXBrewPointer< M > const & param // pointer to the SFXBrewPointer instance );
The dynamic_pointer_cast function is used to dynamic_cast a SFXBrewPointer instance to another one.
static_pointer_cast | const_pointer_cast | reinterpret_pointer_cast
SFXBrewPointer< T > reinterpret_pointer_cast( SFXBrewPointer< M > const & param // pointer to the SFXBrewPointer instance );
The reinterpret_pointer_cast function is used to reinterpret_cast a SFXBrewPointer instance to another one.
static_pointer_cast | const_pointer_cast | dynamic_pointer_cast
SFXBrewPointer< T > static_pointer_cast( SFXBrewPointer< M > const & param // pointer to the SFXBrewPointer instance );
The static_pointer_cast function is used to static_cast a SFXBrewPointer instance to another one.
const_pointer_cast | dynamic_pointer_cast | reinterpret_pointer_cast
[ public, const ] T * operator->(Void);
[ public ] SFXBrewPointer< T > & operator=( SFXBrewPointer< M > const & param // reference to the SFXBrewPointer instance );
[ public ] SFXBrewPointer< T > & operator=( SFXBrewPointer< T > const & param // reference to the SFXBrewPointer instance );
The SFXBrewPointer::operator= operator calls the SFXBrewPointer::Set(SFXBrewPointer< M > const &) or SFXBrewPointer::Set(SFXBrewPointer< T > const &) function internally.
[ public, friend ] Bool operator==( SFXBrewPointer< T > const & left // reference to the SFXBrewPointer instance SFXBrewPointer< M > const & right // reference to the SFXBrewPointer instance );
[ public, friend ] Bool operator==( SFXBrewPointer< T > const & left // reference to the SFXBrewPointer instance SFBBaseConstPtr right // pointer to the SFBBase instance );
[ public, friend ] Bool operator==( SFBBaseConstPtr left // pointer to the SFBBase instance SFXBrewPointer< T > const & right // reference to the SFXBrewPointer instance );
[ const ] T & operator*(Void);
[ public, friend ] Bool operator!=( SFXBrewPointer< T > const & left // reference to the SFXBrewPointer instance SFXBrewPointer< M > const & right // reference to the SFXBrewPointer instance );
[ public, friend ] Bool operator!=( SFXBrewPointer< T > const & left // reference to the SFXBrewPointer instance SFBBaseConstPtr right // pointer to the SFBBase instance );
[ public, friend ] Bool operator!=( SFBBaseConstPtr left // pointer to the SFBBase instance SFXBrewPointer< T > const & right // reference to the SFXBrewPointer instance );
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |