CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
|
Internal data storage class which hides data members and enforces neccessary asserts around them. More...
#include <smart_ptr.h>
Public Member Functions | |
Data (SmartPtrMode mode) | |
Initializes Data structure. Doesn't set any members except for m_mode. More... | |
Data (const Data &)=delete | |
Data (Data &&)=delete | |
Data & | operator= (const Data &)=delete |
Data & | operator= (Data &&)=delete |
SmartPtrMode | GetMode () const |
Gets current pointer mode. More... | |
void | SetMode (SmartPtrMode mode) |
Sets pointer mode. Doesn't do any reference count or pointer changes. More... | |
T * | GetPointee () const |
Gets pointed object (if any) or nullptr. More... | |
T * | GetComparable () const |
Gets pointed object (if set and not yet deleted) or nullptr. More... | |
bool | IsNull () const |
Checks if referenced object is set and not yet deleted. More... | |
void | SetNull () |
Sets pointer to null. More... | |
bool | HoldsReference () const |
Checks if pointer actually holds a shared or weak reference to an object. More... | |
Pointee_ * | WeakGetPointee () const |
Gets referenced object. Asserts that pointer is weak. More... | |
System::Detail::SmartPtrCounter * | WeakGetCounter () const |
Gets referenced object reference counter. Asserts that pointer is weak. Doesn't null-check. More... | |
System::Detail::SmartPtrCounter * | WeakGetCounterOrNull () const |
Gets referenced object (if any) reference counter or null. Asserts that pointer is weak. More... | |
void | WeakSetPointer (Pointee_ *pointee, Object *object, System::Detail::SmartPtrCounter *counter) |
Sets pointer value. Asserts that pointer is weak. More... | |
Pointee_ * | SharedGetPointee () const |
Gets referenced object. Asserts that pointer is shared. More... | |
Object * | SharedGetObject () const |
Gets referenced object which is cast to System::Object. Asserts that pointer is shared. Doesn't null-check. More... | |
Object * | WeakGetObject () const |
Gets referenced object which is cast to System::Object. Asserts that pointer is weak. Doesn't null-check. More... | |
Object * | SharedGetOwned () const |
Gets owned object which. Asserts that pointer is shared. Doesn't null-check. More... | |
Object * | SharedGetObjectOrNull () const |
Gets referenced object (if any) which is cast to System::Object or null. Asserts that pointer is shared. More... | |
Object * | SharedGetOwnedOrNull () const |
Gets owned object. Asserts that pointer is shared. More... | |
void | SharedSetPointer (Pointee_ *pointee, Object *object, Object *owned) |
Sets pointer value. Asserts that pointer is shared. More... | |
void | SharedSetPointer (Pointee_ *pointee, Object *object) |
Sets pointer value. Asserts that pointer is shared. More... | |
void | swap (Data &data) noexcept |
Swaps data of two Data instances, including modes and pointers. More... | |
void | swapPointers (Data &data) noexcept |
Swaps pointer data of two Data instances, excluding modes. More... | |
Internal data storage class which hides data members and enforces neccessary asserts around them.
|
inline |
Initializes Data structure. Doesn't set any members except for m_mode.
|
delete |
|
delete |
|
inline |
Gets pointed object (if set and not yet deleted) or nullptr.
|
inline |
Gets current pointer mode.
|
inline |
Gets pointed object (if any) or nullptr.
|
inline |
Checks if pointer actually holds a shared or weak reference to an object.
|
inline |
Checks if referenced object is set and not yet deleted.
|
delete |
|
delete |
|
inline |
Sets pointer mode. Doesn't do any reference count or pointer changes.
mode | New pointer mode. |
|
inline |
Sets pointer to null.
|
inline |
Gets referenced object which is cast to System::Object. Asserts that pointer is shared. Doesn't null-check.
|
inline |
Gets referenced object (if any) which is cast to System::Object or null. Asserts that pointer is shared.
|
inline |
Gets owned object which. Asserts that pointer is shared. Doesn't null-check.
|
inline |
Gets owned object. Asserts that pointer is shared.
|
inline |
Gets referenced object. Asserts that pointer is shared.
|
inline |
Sets pointer value. Asserts that pointer is shared.
pointee | Pointee object. |
object | Pointee object cast to System::Object. |
|
inline |
Sets pointer value. Asserts that pointer is shared.
pointee | Pointee object. |
owned | Owned object cast to System::Object. |
object | Pointee object cast to System::Object. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Gets referenced object reference counter. Asserts that pointer is weak. Doesn't null-check.
|
inline |
Gets referenced object (if any) reference counter or null. Asserts that pointer is weak.
|
inline |
Gets referenced object which is cast to System::Object. Asserts that pointer is weak. Doesn't null-check.
|
inline |
Gets referenced object. Asserts that pointer is weak.
|
inline |
Sets pointer value. Asserts that pointer is weak.
pointee | Pointee object. |
object | Pointee object as cast to Object type. |
counter | Reference counter of pointee object. |
System::Detail::SmartPtrCounter* System::SmartPtr< T >::Data::m_counter |
Reference counter structure linked to m_pointee.
Object* System::SmartPtr< T >::Data::m_owned |
Owned pointer.