TermImpl is the superclass for all implementations of terms in the expression tree, such as LiteralImpl, Operation and ConditionRoot.
More...
#include <ArmarXCore/observers/condition/TermImpl.h>
|
| void | addChild (const TermImplBasePtr &child, const Ice::Current &c=Ice::emptyCurrent) override |
| | Add child to term.
|
| |
| TermImplSequence | getChilds (const Ice::Current &c=Ice::emptyCurrent) override |
| | retrieve childs of this term in the expression tree.
|
| |
| StringVariantBaseMap | getDatafields (const Ice::Current &) const override |
| |
| TermImplBasePtr | getParent (const Ice::Current &c=Ice::emptyCurrent) override |
| | retrieve parent of this term in the expression tree.
|
| |
| TermType | getType (const Ice::Current &c=Ice::emptyCurrent) const override |
| | Retrieve type of term.
|
| |
| bool | getValue (const Ice::Current &c=Ice::emptyCurrent) const override |
| | retrieve current value of term.
|
| |
| virtual void | output (std::ostream &out) const =0 |
| | output to stream.
|
| |
| void | removeChildren () |
| |
| void | update (const Ice::Current &c=Ice::emptyCurrent) override |
| | Updates the parent in the expression tree.
|
| |
| void | updateWithData (const Ice::Current &c=Ice::emptyCurrent) override |
| |
| | ~TermImpl () override |
| | Destructor of TermImpl.
|
| |
|
| void | __decRef () override |
| | Overwritten version of reference counting from GCShared.
|
| |
| void | __incRef () override |
| | Overwritten version of reference counting from GCShared.
|
| |
| void | resetParent (const Ice::Current &c=Ice::emptyCurrent) override |
| | Reset the parent of this term.
|
| |
| void | setParent (const TermImplBasePtr &parent, const Ice::Current &c=Ice::emptyCurrent) override |
| | Sets the parent for this term in the expression tree.
|
| |
|
| static int | atomicDecAndTestValue (volatile int *counter, int value) |
| | atomicDecAndTestValue - decrement and test @v: pointer of type AtomicCounter @value: value to test for
|
| |
|
| std::ostream & | operator<< (std::ostream &stream, const TermImpl *rhs) |
| | Streaming operator for this class.
|
| |
| std::ostream & | operator<< (std::ostream &stream, const TermImplPtr &rhs) |
| | Streaming operator for this class.
|
| |
TermImpl is the superclass for all implementations of terms in the expression tree, such as LiteralImpl, Operation and ConditionRoot.
The TermImpl is the backend to the API frontend Term. It inherits from Ice::Object in order to allow serialization via Ice and provides all methods to build an expression tree.
Each term has a boolean value. Values are updated from the childs in the expression tree by calling update(). Further, the update method calls the parents state update(). Thus, expression trees consisting of TermImpl are updated from bottom to top.
◆ ~TermImpl()
◆ __decRef()
Overwritten version of reference counting from GCShared.
Resolves cyclic dependencies in the tree without makin use of the garbage collector.
- See also
- Shared::__decRef()
-
GCShared::__decRef()
◆ __incRef()
Overwritten version of reference counting from GCShared.
Reference counter increment without garbage collection. Uses Shared::__incRef instead of GCShared::__incRef()
- See also
- Shared::__incRef()
-
GCShared::__incRef()
◆ addChild()
| void addChild |
( |
const TermImplBasePtr & | child, |
|
|
const Ice::Current & | c = Ice::emptyCurrent ) |
|
override |
Add child to term.
This is used to generate an expression tree.
- Parameters
-
| child | shared pointer to child |
◆ atomicDecAndTestValue()
| int atomicDecAndTestValue |
( |
volatile int * | counter, |
|
|
int | value ) |
|
inlinestaticprotected |
atomicDecAndTestValue - decrement and test @v: pointer of type AtomicCounter @value: value to test for
Atomically decrements @v by 1 and returns true if the result is value, or false for all other cases. Note that the guaranteed useful range of an AtomicCounter is only 24 bits.
Inlined because this operation is performance critical.
◆ getChilds()
| TermImplSequence getChilds |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
|
|
override |
retrieve childs of this term in the expression tree.
- Returns
- list of child terms
◆ getDatafields()
◆ getParent()
| TermImplBasePtr getParent |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
|
|
override |
retrieve parent of this term in the expression tree.
For the root node this is NULL.
- Returns
- shared pointer to parent
◆ getType()
| TermType getType |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
const |
|
override |
Retrieve type of term.
- Returns
- type of the term
◆ getValue()
| bool getValue |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
const |
|
override |
retrieve current value of term.
Does not evaluate the child nodes.
- Returns
- current value of the term
◆ output()
| virtual void output |
( |
std::ostream & | out | ) |
const |
|
pure virtual |
◆ removeChildren()
◆ resetParent()
| void resetParent |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
|
|
overrideprotected |
Reset the parent of this term.
◆ setParent()
| void setParent |
( |
const TermImplBasePtr & | parent, |
|
|
const Ice::Current & | c = Ice::emptyCurrent ) |
|
overrideprotected |
Sets the parent for this term in the expression tree.
- Parameters
-
◆ update()
| void update |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
|
|
override |
Updates the parent in the expression tree.
call update after each change to this->value.
◆ updateWithData()
| void updateWithData |
( |
const Ice::Current & | c = Ice::emptyCurrent | ) |
|
|
override |
◆ operator<< [1/2]
| std::ostream & operator<< |
( |
std::ostream & | stream, |
|
|
const TermImpl * | rhs ) |
|
friend |
Streaming operator for this class.
- Parameters
-
| stream | stream to output |
| rhs | right handside |
◆ operator<< [2/2]
| std::ostream & operator<< |
( |
std::ostream & | stream, |
|
|
const TermImplPtr & | rhs ) |
|
friend |
Streaming operator for this class.
- Parameters
-
| stream | stream to output |
| rhs | right handside |
The documentation for this class was generated from the following files: