Similar to class Owner, but calls methods AcquireRecursive and ReleaseRecursive.
| TOwnable | The type to own. Requirements are to have methods AcquireRecursive and ReleaseRecursive available. |
| TOptional | If true, then checks is performed, whether the given owned is nulled and thus not acquired and released. If false such checks are omitted. |
Public Type Index: | |
| using | OwnablePointer = std::remove_reference_t<TOwnable>* |
| The pointer type of the owned object. | |
Public Method Index: | |
| OwnerRecursive (OwnablePointer ownable, const CallerInfo &ci) | |
| OwnerRecursive (TOwnable &ownable, const CallerInfo &ci) | |
| ~OwnerRecursive () | |
| Destructor. Invokes ReleaseRecursive() on member owned. | |
| void | Set (OwnablePointer ownable) |
Protected Field Index: | |
| CallerInfo | dbgCI |
| Caller information. Available only with debug-builds. | |
| OwnablePointer | owned |
| The resource to acquire and release. | |
| using alib::lang::OwnerRecursive< TOwnable, TOptional >::OwnablePointer = std::remove_reference_t<TOwnable>* |
|
protected |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the ownable after construction. This method is only available if the template parameter TOptional is true. It must not be called if an object was given with construction already, and it must not be called twice. If done, an assertion is raised.
| ownable | The ownable to acquire. |