AMSmartProperties::AMPropertyPool is a property pool for smart properties.
More...
#include <AMProperty.h>
|
| static AMPropertyPool & | defaultPool () |
| | Get default pool. Default pool is every time in state DESTROYED. Since it, every Smart properties removed from any pool is moved here. Smart property MUST have assigned any pool. More...
|
| |
|
|
static const int | TRACE_SIZE = 1024 |
| | Max. computation depth of smart properties.
|
| |
AMSmartProperties::AMPropertyPool is a property pool for smart properties.
Class AMSmartProperties::AMPropertyPool is data stucture which hold set of smart properties. Typically, is Smart properties are used for GUI, One window own one property Pool.
AMSmartProperties::AMPropertyPool also helps tracing of properties, that are involved in property loop. It limits computation depth to TRACE_SIZE-1 (1023) levels. Tracing works only on case that loop is really detected.
- Examples:
- AMProperty_1.cpp, AMProperty_2.cpp, and AMProperty_3.cpp.
◆ AMPropertyPool()
| AMSmartProperties::AMPropertyPool::AMPropertyPool |
( |
| ) |
|
Default construct creates an empty AMPropertyPool.
- Exceptions
-
| This | function will not throw an exception. |
◆ defaultPool()
| static AMPropertyPool& AMSmartProperties::AMPropertyPool::defaultPool |
( |
| ) |
|
|
static |
Get default pool. Default pool is every time in state DESTROYED. Since it, every Smart properties removed from any pool is moved here. Smart property MUST have assigned any pool.
- Returns
- Default pool (AMPropertyPool)
- Exceptions
-
| This | function will not throw an exception. |
◆ destroy()
| void AMSmartProperties::AMPropertyPool::destroy |
( |
| ) |
|
Destroys pool. State of pool moves for ever to state DESTROYED and Smart properties will do nothing.
- Exceptions
-
| This | function will not throw an exception. |
◆ dump()
| void AMSmartProperties::AMPropertyPool::dump |
( |
char * |
buffer = nullptr, |
|
|
int |
length = 0 |
|
) |
| |
Dumps all properties as string description into specified buffer.
- Parameters
-
| buffer | |
| length | buffer length |
- Exceptions
-
| This | function will not throw an exception. |
◆ getEnteringProperty()
| AMPropertyBase* AMSmartProperties::AMPropertyPool::getEnteringProperty |
( |
| ) |
|
Retrieve first property, that was actually computed (root). Valid only after exception.
- Returns
- pointer to that property.
◆ getLastCausedProperty()
| AMPropertyBase* AMSmartProperties::AMPropertyPool::getLastCausedProperty |
( |
| ) |
|
Retrieve last property, that was actually computed - property yhat causes and exception (leaf). Valid only after exception.
- Returns
- pointer to that property.
◆ getPoolState()
Returns state.
- Returns
- Pool state (Three lower bits-property bits are zero)
- Exceptions
-
| This | function will not throw an exception. |
◆ isDestroyed()
| bool AMSmartProperties::AMPropertyPool::isDestroyed |
( |
| ) |
|
|
inline |
Test if Pool is in Destroyed state. Trace is, when state signalised Destroyed flag.
- Returns
- bool is in Destroyed state.
- Exceptions
-
| This | function will not throw an exception. |
◆ isInProgress()
| bool AMSmartProperties::AMPropertyPool::isInProgress |
( |
| ) |
|
|
inline |
Test if Pool is in progress.
- Returns
- bool is in progress
- Exceptions
-
| This | function will not throw an exception. |
◆ reset()
| void AMSmartProperties::AMPropertyPool::reset |
( |
| ) |
|
Resets pool. Mode info on Smart properties.
- Exceptions
-
| This | function will not throw an exception. |
◆ runDeleted()
| void AMSmartProperties::AMPropertyPool::runDeleted |
( |
| ) |
|
Only leaves from computing and signalises Deleted.
- Exceptions
-
| This | function will not throw an exception. |
◆ runLoop()
| void AMSmartProperties::AMPropertyPool::runLoop |
( |
| ) |
|
Only leaves from computing and signalises Loop.
- Exceptions
-
| This | function will not throw an exception. |
◆ setModified()
| void AMSmartProperties::AMPropertyPool::setModified |
( |
| ) |
|
|
inline |
Set state to modified. This state is signalized from AMProperty and holds this state untl next reset.
- Exceptions
-
| This | function will not throw an exception. |
◆ trace()
| std::string AMSmartProperties::AMPropertyPool::trace |
( |
| ) |
|
Traces a property computation. This function is available after any exception, othervise return "".
- Returns
- std::string with property name (in case of use AMVariableNames) of adress on each line.
- Exceptions
-
| This | function will not throw an exception. |
The documentation for this class was generated from the following file: