27template class ::IceInternal::Handle<::armarx::TermImpl>;
40 child->setParent(
this);
42 childs.push_back(child);
66 return datafieldValues;
89 parent->updateWithData();
97 TermImplSequence::iterator iterChilds = childs.begin();
99 while (iterChilds != childs.end())
103 (*iterChilds)->resetParent();
106 childs.erase(iterChilds);
107 iterChilds = childs.begin();
111 this->childs.clear();
117 this->parent = parent;
130 __asm__ __volatile__(
"lock ; decl %0; sete %1"
131 :
"=m"(*counter),
"=qm"(
c)
147 int numberChilds = int(childs.size());
149 assert(InterlockedExchangeAdd(&_ref, 0) > 0);
151 if (InterlockedDecrement(&_ref) == numberChilds && !_noDelete)
157#elif defined(ICE_HAS_GCC_BUILTINS)
158 int c = __sync_fetch_and_sub(&_ref, 1);
161 if ((
c == numberChilds + 1) && !_noDelete)
167#elif defined(ICE_HAS_ATOMIC_FUNCTIONS)
168 assert(IceUtilInternal::atomicExchangeAdd(&_ref, 0) > 0);
170 if (IceUtilInternal::atomicDecAndTestValue(&_ref, numberChilds) && !_noDelete)
175#elif ICE_INT_VERSION >= 30603
176 int c = _ref.fetch_sub(1);
179 if ((
c == numberChilds + 1) && !__hasFlag(NoDelete))
186 bool doDelete =
false;
189 if (--_ref == numberChilds)
191 doDelete = !_noDelete;
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
StringVariantBaseMap getDatafields(const Ice::Current &) const override
static int atomicDecAndTestValue(volatile int *counter, int value)
atomicDecAndTestValue - decrement and test @v: pointer of type AtomicCounter @value: value to test fo...
bool getValue(const Ice::Current &c=Ice::emptyCurrent) const override
retrieve current value of term.
~TermImpl() override
Destructor of TermImpl.
void addChild(const TermImplBasePtr &child, const Ice::Current &c=Ice::emptyCurrent) override
Add child to term.
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.
TermType getType(const Ice::Current &c=Ice::emptyCurrent) const override
Retrieve type of term.
TermImplSequence getChilds(const Ice::Current &c=Ice::emptyCurrent) override
retrieve childs of this term in the expression tree.
TermImplBasePtr getParent(const Ice::Current &c=Ice::emptyCurrent) override
retrieve parent of this term in the expression tree.
void __decRef() override
Overwritten version of reference counting from GCShared.
void setParent(const TermImplBasePtr &parent, const Ice::Current &c=Ice::emptyCurrent) override
Sets the parent for this term in the expression tree.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::map< std::string, VariantBasePtr > StringVariantBaseMap