|
#include <ArmarXCore/observers/condition/TermImpl.h>
Public Member Functions | |
void | addChild (const TermImplBasePtr &child, const Ice::Current &c=Ice::emptyCurrent) override |
Add child to term. More... | |
TermImplSequence | getChilds (const Ice::Current &c=Ice::emptyCurrent) override |
retrieve childs of this term in the expression tree. More... | |
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. More... | |
TermType | getType (const Ice::Current &c=Ice::emptyCurrent) const override |
Retrieve type of term. More... | |
bool | getValue (const Ice::Current &c=Ice::emptyCurrent) const override |
retrieve current value of term. More... | |
virtual void | output (std::ostream &out) const =0 |
output to stream. More... | |
void | removeChildren () |
void | update (const Ice::Current &c=Ice::emptyCurrent) override |
Updates the parent in the expression tree. More... | |
void | updateWithData (const Ice::Current &c=Ice::emptyCurrent) override |
~TermImpl () override | |
Destructor of TermImpl. More... | |
Protected Member Functions | |
void | __decRef () override |
Overwritten version of reference counting from GCShared. More... | |
void | __incRef () override |
Overwritten version of reference counting from GCShared. More... | |
void | resetParent (const Ice::Current &c=Ice::emptyCurrent) override |
Reset the parent of this term. More... | |
void | setParent (const TermImplBasePtr &parent, const Ice::Current &c=Ice::emptyCurrent) override |
Sets the parent for this term in the expression tree. More... | |
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 More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const TermImpl *rhs) |
Streaming operator for this class. More... | |
std::ostream & | operator<< (std::ostream &stream, const TermImplPtr &rhs) |
Streaming operator for this class. More... | |
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.
|
overrideprotected |
Overwritten version of reference counting from GCShared.
Resolves cyclic dependencies in the tree without makin use of the garbage collector.
Definition at line 130 of file TermImpl.cpp.
|
overrideprotected |
Overwritten version of reference counting from GCShared.
Reference counter increment without garbage collection. Uses Shared::__incRef instead of GCShared::__incRef()
Definition at line 125 of file TermImpl.cpp.
|
override |
Add child to term.
This is used to generate an expression tree.
child | shared pointer to child |
Definition at line 37 of file TermImpl.cpp.
|
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 115 of file TermImpl.cpp.
|
override |
retrieve childs of this term in the expression tree.
Definition at line 44 of file TermImpl.cpp.
|
override |
Definition at line 59 of file TermImpl.cpp.
|
override |
retrieve parent of this term in the expression tree.
For the root node this is NULL.
Definition at line 49 of file TermImpl.cpp.
|
override |
|
override |
retrieve current value of term.
Does not evaluate the child nodes.
Definition at line 54 of file TermImpl.cpp.
|
pure virtual |
output to stream.
pure virtual.
stream |
Implemented in OperationNot, OperationOr, LiteralImpl, OperationAnd, and ConditionRoot.
void removeChildren | ( | ) |
Definition at line 85 of file TermImpl.cpp.
|
overrideprotected |
Reset the parent of this term.
Definition at line 110 of file TermImpl.cpp.
|
overrideprotected |
Sets the parent for this term in the expression tree.
shared | pointer to parent |
Definition at line 105 of file TermImpl.cpp.
|
override |
Updates the parent in the expression tree.
call update after each change to this->value.
Definition at line 69 of file TermImpl.cpp.
|
override |
|
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.