Exemplo n.º 1
0
BulletMLNode* BulletMLNode::getChild(Name name) {
	ChildIterator ite;
	for (ite = childBegin(); ite != childEnd(); ite++) {
		if ((*ite)->getName() == name) return *ite;
	}
	return 0;
}
Exemplo n.º 2
0
bool BulletMLNode::findNode(Name name) const {
	if (getName() == name) return true;
	ConstChildIterator ite;
	for (ite = childBegin(); ite != childEnd(); ite++) {
		if ((*ite)->findNode(name)) return true;
	}
	return false;
}
void
BulletMLNode::getAllChildrenVec (Name name,
                                 std::vector < BulletMLNode * >&outvec)
{
   ChildIterator ite;
   for (ite = childBegin (); ite != childEnd (); ite++) {
      if ((*ite)->getName () == name)
         outvec.push_back (*ite);
   }
}
Exemplo n.º 4
0
void BulletMLNode::dump() {
#if 0
	std::cout << "<" << name2string[name_];
/*
	AttributeMap::const_iterator ite;
	for (ite = attributes_.begin(); ite != attributes_.end(); ite++) {
	std::cout << " " << ite->first << "=" << ite->second;
	}
*/
	std::cout << ">" << std::endl;
/*
	if (val_ != "") std::cout << val_ << std::endl;
*/
	std::for_each(childBegin(), childEnd(), std::mem_fun(&BulletMLNode::dump));

	std::cout << "</" << name2string[name_] << ">" << std::endl;
#endif
}