|
|
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>
Inheritance diagram for TermImpl:Public Member Functions | |
| 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. | |
Protected Member Functions | |
| 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 Protected Member Functions | |
| static int | atomicDecAndTestValue (volatile int *counter, int value) |
| atomicDecAndTestValue - decrement and test @v: pointer of type AtomicCounter @value: value to test for | |
Friends | |
| 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.
Definition at line 53 of file TermImpl.h.
|
override |
Destructor of TermImpl.
Assures handling of cyclic IceInternal::Handle dependencies
Definition at line 31 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprotected |
Overwritten version of reference counting from GCShared.
Resolves cyclic dependencies in the tree without makin use of the garbage collector.
Definition at line 144 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprotected |
Overwritten version of reference counting from GCShared.
Reference counter increment without garbage collection. Uses Shared::__incRef instead of GCShared::__incRef()
Definition at line 138 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Add child to term.
This is used to generate an expression tree.
| child | shared pointer to child |
Definition at line 38 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
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.
Definition at line 127 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
retrieve childs of this term in the expression tree.
Definition at line 46 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 64 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
retrieve parent of this term in the expression tree.
For the root node this is NULL.
Definition at line 52 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Retrieve type of term.
Definition at line 70 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
retrieve current value of term.
Does not evaluate the child nodes.
Definition at line 58 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
pure virtual |
output to stream.
pure virtual.
| stream |
Implemented in ConditionRoot, LiteralImpl, OperationAnd, OperationNot, and OperationOr.
Here is the caller graph for this function:| void removeChildren | ( | ) |
Definition at line 94 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprotected |
Reset the parent of this term.
Definition at line 121 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprotected |
Sets the parent for this term in the expression tree.
| shared | pointer to parent |
Definition at line 115 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Updates the parent in the expression tree.
call update after each change to this->value.
Definition at line 76 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 85 of file TermImpl.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Streaming operator for this class.
| stream | stream to output |
| rhs | right handside |
Definition at line 133 of file TermImpl.h.
|
friend |
Streaming operator for this class.
| stream | stream to output |
| rhs | right handside |
Definition at line 119 of file TermImpl.h.