本文整理汇总了C++中TLeafList::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ TLeafList::push_back方法的具体用法?C++ TLeafList::push_back怎么用?C++ TLeafList::push_back使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TLeafList
的用法示例。
在下文中一共展示了TLeafList::push_back方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetChildren
void Leaf::GetChildren(const std::string &name, TLeafList &baseList, bool /*recursive*/)
{
if (name.compare("..") == 0)
{
baseList.push_back(GetParent().lock());
}
if (name.compare(".") == 0)
{
baseList.push_back(static_pointer_cast<Leaf>(GetSelf().lock()));
}
}
示例2:
void
Node::GetChildren(const std::string& name, TLeafList& baseList, bool recursive)
{
Leaf::GetChildren(name, baseList, recursive);
for (TLeafList::iterator i = mChildren.begin(); i != mChildren.end(); ++i)
{
// check if we have found a match and add it
if ((*i)->GetName().compare(name) == 0)
{
baseList.push_back(*i);
}
if (recursive)
(*i)->GetChildren(name, baseList, recursive);
}
}
示例3: ParseCustomPredicates
void SparkMonitorLogFileServer::ParseCustomPredicates(sexp_t* sexp)
{
// ( (name param1 param2 ...) (name param1 param2 ...) ... )
if (sexp == 0)
{
return;
}
// get list of registered CustomMonitor objects
TLeafList customList;
ListChildrenSupportingClass<CustomMonitor>(customList);
customList.push_back(GetCore()->Get("/sys/server/simulation/SparkMonitorClient/SoccerMonitor"));
if (customList.empty())
{
return;
}
// parse predicates
PredicateList pList;
sexp = sexp->list;
while (sexp != 0)
{
if (sexp->ty == SEXP_LIST)
{
sexp_t* sPred = sexp->list;
ParseCustomPredicates(sPred,pList);
}
sexp = sexp->next;
}
// pass predicates to all registered CustomMonitor objects
for (
TLeafList::iterator iter = customList.begin();
iter != customList.end();
++iter
)
{
static_pointer_cast<CustomMonitor>((*iter))
->ParseCustomPredicates(pList);
}
}