Navigation
API > API/Runtime > API/Runtime/uLangCore > API/Runtime/uLangCore/uLang > API/Runtime/uLangCore/uLang/Common > API/Runtime/uLangCore/uLang/Common/Containers
References
| Module | uLangCore |
| Header | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/SharedPointer.h |
| Include | #include "uLang/Common/Containers/SharedPointer.h" |
Syntax
template<class ObjectType, bool AllowNull, class AllocatorType, typename... AllocatorArgsType>
class TSPtrG
Remarks
TSPtr is a convenience class - it wraps around a pointer to an object that is a subclass of CSharedMix [or any class that has the methods: Reference() & Dereference()] and acts just like a regular pointer except that it automatically references and dereferences the object as needed. The AllocatorType must provide the methods void * Allocate(size_t) and void Deallocate(void *)
Variables
| Type | Name | Description | |
|---|---|---|---|
| AllocatorType | _Allocator | How to deallocate the object This allocator can be 0 in size | |
| ObjectType * | _Object | Pointer to original object. | |
| ReleaseFuncType | _ReleaseFunc |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| ULANG_FORCEINLINE | TSPtrG
(
NullPtrType NullPtr |
||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | TSPtrG
(
ObjectType* Object, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| ULANG_FORCEINLINE | ~TSPtrG () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| ULANG_FORCEINLINE const TSPtrG< OtherObjectType, AllowNull, AllocatorType, AllocatorArgsType... > & | As () |
||
| ULANG_FORCEINLINETSPtrG< OtherObjectType, AllowNull, AllocatorType, AllocatorArgsType... > & | As () |
||
| ULANG_FORCEINLINETSPtrG< ObjectType, false, AllocatorType, AllocatorArgsType... > & | AsRef () |
||
| ULANG_FORCEINLINETSPtrG< ObjectType, false, AllocatorType, AllocatorArgsType... > | AsRef () |
||
| ULANG_FORCEINLINE const TSPtrG< ObjectType, false, AllocatorType, AllocatorArgsType... > & | AsRef () |
||
| ULANG_FORCEINLINETSPtrG & | AssignCopy
(
const TSPtrG< OtherObjectType, OtherAllowNull, AllocatorType, AllocatorArgsType... >& Other |
||
| ULANG_FORCEINLINETSPtrG & | AssignMove
(
TSPtrG< OtherObjectType, OtherAllowNull, AllocatorType, AllocatorArgsType... >&& Other |
||
| ULANG_FORCEINLINE void | Set the release function pointer to a valid value. | ||
| ULANG_FORCEINLINE ObjectType * | Get () |
||
| ULANG_FORCEINLINE const AllocatorType & | GetAllocator () |
||
| ULANG_FORCEINLINE bool | IsValid () |
||
| ULANG_FORCEINLINETSPtrG | New
(
AllocatorArgsType&&... AllocatorArgs, |
||
| ULANG_FORCEINLINE void | Release () |
Let go of our object. | |
| ULANG_FORCEINLINE void | Reset () |
||
| ULANG_FORCEINLINETSPtrG & | SetNew
(
CtorArgsType&&... CtorArgs |
Operators
| Type | Name | Description | |
|---|---|---|---|
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE | |||
| ULANG_FORCEINLINE bool | operator! () |
||
| ULANG_FORCEINLINE bool | operator!=
(
OtherObjectType* Object |
||
| ULANG_FORCEINLINE bool | operator!=
(
const TSPtrG< OtherObjectType, OtherAllowNull, AllocatorType, AllocatorArgsType... >& Other |
||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE bool | operator!=
(
const TSPtrG& Other |
||
| ULANG_FORCEINLINE ObjectType & | operator* () |
||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE bool | operator<
(
OtherObjectType* Object |
||
| ULANG_FORCEINLINETSPtrG & | |||
| ULANG_FORCEINLINETSPtrG & | |||
| ULANG_FORCEINLINETSPtrG & | |||
| ULANG_FORCEINLINETSPtrG & | |||
| ULANG_FORCEINLINETSPtrG & | operator=
(
NullPtrType |
||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE bool | operator==
(
const TSPtrG& Other |
||
| ULANG_FORCEINLINE bool | operator==
(
const TSPtrG< OtherObjectType, OtherAllowNull, AllocatorType, AllocatorArgsType... >& Other |
||
| ULANG_FORCEINLINE bool | operator==
(
OtherObjectType* Object |
||
| ULANG_FORCEINLINE bool | operator>
(
OtherObjectType* Object |
||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE bool | |||
| ULANG_FORCEINLINE ObjectType * | operator-> () |
Typedefs
| Name | Description |
|---|---|
| ReleaseFuncType | Indirection to keep knowledge about ObjectType out of default constructor and destructor so that TSPtrG can be forward declared with an incomplete ObjectType argument The price we pay is 8 more bytes of memory, indirect function call on each release, and that we have to (re-)initialize this function pointer in all methods that can set the pointer to something non-null |