Implements TSharedMonoVal with type ExpressionVal. Therefore, the relevant documentation is found with class ExpressionVal, which can be accessed through this type using operator->().
The result of combining both is an automatic pointer to a ExpressionVal that is "self-contained" in the first buffer of a MonoAllocator together with the allocator itself. The expression is deleted and all associated memory is freed when the last copy of the pointer goes out of scope.
Definition at line 232 of file expression.inl.
Public Method Index: | |
| Expression ()=default | |
| Constructs an empty instance, hence a cleared automatic pointer. | |
| Expression (std::nullptr_t) noexcept | |
| Public Method Index: inherited from alib::monomem::TSharedMonoVal< ExpressionVal, HeapAllocator, void > | |
| TSharedMonoVal (HeapAllocator &allocator, size_t initialBufferSizeInKB, unsigned bufferGrowthInPercent) | |
| ~TSharedMonoVal () | |
| void | Acquire (const CallerInfo &ci) const noexcept |
| void | AcquireRecursive (const CallerInfo &ci) const noexcept |
| void | AcquireShared (const CallerInfo &ci) const noexcept |
| void | ConstructT (TArgs &&... args) |
| ExpressionVal * | Get () noexcept |
| AllocatorType & | GetAllocator () noexcept |
| void & | GetLock () const noexcept |
| bool | IsNulled () const noexcept |
| operator bool () const noexcept | |
| bool | operator!= (std::nullptr_t) const noexcept |
| ExpressionVal & | operator* () noexcept |
| ExpressionVal * | operator-> () noexcept |
| TSharedMonoVal & | operator= (const TSharedMonoVal &other) noexcept |
| bool | operator== (std::nullptr_t) const noexcept |
| void | Release (const CallerInfo &ci) const noexcept |
| void | ReleaseRecursive (const CallerInfo &ci) const noexcept |
| void | ReleaseShared (const CallerInfo &ci) const noexcept |
| void | Reset (TArgs &&... args) |
| ExpressionVal & | Self () noexcept |
| void | SetNulled () noexcept |
| bool | TryAcquire (const CallerInfo &ci) const noexcept |
| bool | TryAcquireShared (const CallerInfo &ci) const noexcept |
| bool | TryAcquireSharedTimed (const Ticks::Duration &waitDuration, const CallerInfo &ci) const noexcept |
| bool | TryAcquireTimed (const Ticks::Duration &waitDuration, const CallerInfo &ci) const noexcept |
| bool | Unique () const noexcept |
| unsigned | UseCount () const noexcept |
Protected Method Index: | |
| Expression (size_t initialBufferSizeInKB, unsigned bufferGrowthInPercent) | |
| template<typename... TArgs> | |
| void | Reset (TArgs &&... args) |
Additional Inherited Members | |
| Public Type Index: inherited from alib::monomem::TSharedMonoVal< ExpressionVal, HeapAllocator, void > | |
| using | AllocatorType |
Exposes the monotonic allocator used. Equals to TMonoAllocator<TAllocator>. | |
| using | LockType |
| Exposes the lock type specified with template parameter TLock. | |
| using | StoredType |
| Exposes the stored type specified with template parameter T. | |
| Public Static Method Index: inherited from alib::monomem::TSharedMonoVal< ExpressionVal, HeapAllocator, void > | |
| static constexpr size_t | SizeOfAllocation () |
| Protected Type Index: inherited from alib::monomem::TSharedMonoVal< ExpressionVal, HeapAllocator, void > | |
| using | FieldMembers |
| Protected Field Index: inherited from alib::monomem::TSharedMonoVal< ExpressionVal, HeapAllocator, void > | |
| FieldMembers * | members |
|
inlineprotected |
Constructor. Calls the constructor of parent TSharedMonoVal and then invokes void ConstructT(TArgs&& ...) passing the mono allocator that the parent creates this instance in.
| initialBufferSizeInKB | The initial size of memory buffers. Passed to the allocator given with parent class TSharedMonoVal. |
| bufferGrowthInPercent | Optional growth factor in percent, applied to the buffer size with each next buffer allocation. |
Definition at line 259 of file expression.inl.
|
inlinenoexcept |
Constructs an empty instance from std::nullptr. This constructor is necessary to allow assignment of nullptr to values of this type, which clears the automatic pointer.
Definition at line 269 of file expression.inl.
|
protected |
Forbid this method by making it protected.
| TArgs | The argument types used for re-constructing T. |
| args | The arguments to re-construct the instance of T. |