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


C++ DLList::remove方法代码示例

本文整理汇总了C++中DLList::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ DLList::remove方法的具体用法?C++ DLList::remove怎么用?C++ DLList::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DLList的用法示例。


在下文中一共展示了DLList::remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[])
{
    DLList<scalar> myList;

    for (int i = 0; i<10; i++)
    {
        myList.append(1.3*i);
    }

    myList.append(100.3);
    myList.append(500.3);

    Info<< nl << "And again using STL iterator: " << nl << endl;

    forAllIter(DLList<scalar>, myList, iter)
    {
        Info<< "element:" << *iter << endl;
    }


    Info<< nl << "And again using the same STL iterator: " << nl << endl;

    forAllIter(DLList<scalar>, myList, iter)
    {
        Info<< "Removing " << myList.remove(iter) << endl;
    }
开发者ID:000861,项目名称:OpenFOAM-2.1.x,代码行数:26,代码来源:Test-DLList.C

示例2: I_AddDeferredEvent

//
// I_AddDeferredEvent
//
// haleyjd 03/06/13: Some received input events need to be deferred until at
// least one tic has passed before they are posted to the event queue.
// "Trigger" style keys such as mousewheel up and down are the chief offenders.
// Rather than shoehorning a bunch of code for this into I_GetEvent, it is
// now handled here uniformly for all event types.
//
static void I_AddDeferredEvent(const event_t &ev, int tic)
{
   deferredevent_t *de;

   if(i_deferredfreelist.head)
   {
      de = *i_deferredfreelist.head;
      i_deferredfreelist.remove(de);
   }
   else
      de = estructalloc(deferredevent_t, 1);

   de->ev  = ev;
   de->tic = tic;
   i_deferredevents.insert(de);
}
开发者ID:ioan-chera,项目名称:eternity,代码行数:25,代码来源:i_input.cpp

示例3: I_PutDeferredEvent

//
// I_PutDeferredEvent
//
// Put a deferredevent_t back on the freelist.
//
static void I_PutDeferredEvent(deferredevent_t *de)
{
   i_deferredevents.remove(de);
   i_deferredfreelist.insert(de);
}
开发者ID:ioan-chera,项目名称:eternity,代码行数:10,代码来源:i_input.cpp

示例4:

//
// XIBaseEffect Destructor
//
XIBaseEffect::~XIBaseEffect()
{
   effects.remove(this);
}
开发者ID:Blastfrog,项目名称:eternity,代码行数:7,代码来源:i_xinput.cpp


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