当前位置: 首页>>代码示例>>C++>>正文


C++ TLeafList::push_back方法代码示例

本文整理汇总了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()));
    }
}
开发者ID:MadMaxPavlo,项目名称:SimSpark-SPL,代码行数:12,代码来源:leaf.cpp

示例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);
    }
}
开发者ID:MadMaxPavlo,项目名称:SimSpark-SPL,代码行数:17,代码来源:node.cpp

示例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);
        }
}
开发者ID:MadMaxPavlo,项目名称:SimSpark-SPL,代码行数:44,代码来源:sparkmonitorlogfileserver.cpp


注:本文中的TLeafList::push_back方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。