ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
Expression Struct Reference

Description:

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.

Note
With the documentation of type TSharedMonoVal, two naming schemes are suggested. Here, the second scheme is used because the method Compiler::Compile will always return this encapsulated object. Expressions are shared by definition.

Definition at line 246 of file expression.hpp.

#include <expression.hpp>

Inheritance diagram for Expression:
[legend]
Collaboration diagram for Expression:
[legend]

Public Method Index:

 Expression ()=default
 Constructs an empty instance, hence a cleared automatic pointer.
 
 Expression (std::nullptr_t) noexcept
 
- Public Method Index: inherited from TSharedMonoVal< ExpressionVal, HeapAllocator, void >
 TSharedMonoVal () noexcept
 Default Constructor. Leaves this object nulled.
 
 TSharedMonoVal (const TSharedMonoVal &other) noexcept
 
 TSharedMonoVal (HeapAllocator &allocator, size_t initialBufferSizeInKB, unsigned int bufferGrowthInPercent)
 
 TSharedMonoVal (size_t initialBufferSizeInKB, unsigned int bufferGrowthInPercent)
 
 TSharedMonoVal (std::nullptr_t) noexcept
 
 TSharedMonoVal (TSharedMonoVal &&other) noexcept
 
 ~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)
 
const ExpressionVal * Get () const noexcept
 
ExpressionVal * Get () noexcept
 
AllocatorTypeGetAllocator () noexcept
 
void & GetLock () const noexcept
 
bool IsNulled () const noexcept
 
 operator bool () const noexcept
 
bool operator!= (std::nullptr_t) const noexcept
 
const ExpressionVal & operator* () const noexcept
 
ExpressionVal & operator* () noexcept
 
const ExpressionVal * operator-> () const noexcept
 
ExpressionVal * operator-> () noexcept
 
TSharedMonoValoperator= (const TSharedMonoVal &other) noexcept
 
void operator= (std::nullptr_t)
 Assignment of nullptr. Same as SetNulled.
 
TSharedMonoValoperator= (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)
 
const ExpressionVal & Self () const noexcept
 
ExpressionVal & Self () noexcept
 
void SetNulled () noexcept
 
bool TryAcquire (const CallerInfo &ci) const noexcept
 
bool TryAcquireShared (const CallerInfo &ci) const noexcept
 
bool TryAcquireSharedTimed (const Ticks &pointInTime, const CallerInfo &ci) const noexcept
 
bool TryAcquireSharedTimed (const Ticks::Duration &waitDuration, const CallerInfo &ci) const noexcept
 
bool TryAcquireSharedTimed (const Ticks::Duration::TDuration &waitDuration, const CallerInfo &ci) const noexcept
 
bool TryAcquireSharedTimed (const Ticks::TTimePoint &pointInTime, const CallerInfo &ci) const noexcept
 
bool TryAcquireTimed (const Ticks &pointInTime, const CallerInfo &ci) const noexcept
 
bool TryAcquireTimed (const Ticks::Duration &waitDuration, const CallerInfo &ci) const noexcept
 
bool TryAcquireTimed (const Ticks::Duration::TDuration &waitDuration, const CallerInfo &ci) const noexcept
 
bool TryAcquireTimed (const Ticks::TTimePoint &pointInTime, const CallerInfo &ci) const noexcept
 
bool Unique () const noexcept
 
unsigned int UseCount () const noexcept
 

Protected Method Index:

 Expression (size_t initialBufferSizeInKB, unsigned int bufferGrowthInPercent)
 
template<typename... TArgs>
void Reset (TArgs &&... args)
 

Additional Inherited Members

- Public Type Index: inherited from 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 TSharedMonoVal< ExpressionVal, HeapAllocator, void >
static constexpr size_t SizeOfAllocation ()
 
- Protected Type Index: inherited from TSharedMonoVal< ExpressionVal, HeapAllocator, void >
using FieldMembers
 
- Protected Field Index: inherited from TSharedMonoVal< ExpressionVal, HeapAllocator, void >
FieldMembersmembers
 

Friends And Related Entity Details:

◆ Compiler

friend class Compiler
friend

The compiler builds this type which by design does not expose a constructor.

Definition at line 250 of file expression.hpp.

Constructor(s) / Destructor Details:

◆ Expression() [1/2]

Expression ( size_t initialBufferSizeInKB,
unsigned int bufferGrowthInPercent )
inlineprotected

Constructor. Calls the constructor of parent TSharedMonoVal and then invokes TSharedMonoVal::ConstructT passing the mono allocator that the parent creates this instance in.

Parameters
initialBufferSizeInKBThe initial size of memory buffers. Passed to the allocator given with parent class TSharedMonoVal.
bufferGrowthInPercentOptional growth factor in percent, applied to the buffer size with each next buffer allocation.

Definition at line 271 of file expression.hpp.

◆ Expression() [2/2]

Expression ( std::nullptr_t )
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 281 of file expression.hpp.

Method Details:

◆ Reset()

template<typename... TArgs>
void Reset ( TArgs &&... args)
protected

Forbid this method by making it protected.

Template Parameters
TArgsThe argument types used for re-constructing T.
Parameters
argsThe arguments to re-construct the instance of T.

The documentation for this struct was generated from the following file: