Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7130 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Feb 13, 2006, 2:59:17 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: removed some std::list

Location:
trunk/src/lib
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl_gui/glgui_box.cc

    r6287 r7130  
    1818#include "glgui_box.h"
    1919
    20 #include "list.h"
    21 
    2220using namespace std;
    2321
     
    3836GLGuiBox::~GLGuiBox()
    3937{
    40   delete this->children;
    4138}
    4239
     
    4744{
    4845  this->setClassID(CL_GLGUI_BOX, "GLGuiBox");
    49   this->children = new tList<GLGuiWidget>;
    5046}
    5147
     
    5551    return;
    5652
    57   this->children->add(widget);
     53  this->children.push_back(widget);
    5854}
    5955
     
    6359  if (widget == NULL)
    6460  {
    65     delete this->children;
    66     this->children = new tList<GLGuiWidget>;
     61    this->children.clear();
    6762  }
    6863  else
    6964  {
    70     this->children->remove(widget);
     65    this->children.remove(widget);
    7166  }
    7267}
     
    7469void GLGuiBox::showAll()
    7570{
    76   tIterator<GLGuiWidget>* itC = this->children->getIterator();
    77   GLGuiWidget* enumC = itC->firstElement();
    78   while (enumC != NULL)
     71  std::list<GLGuiWidget*>::iterator itC = this->children.begin();
     72  while (itC != this->children.end())
    7973  {
    80     if (enumC->isA(CL_GLGUI_CONTAINER))
    81       static_cast<GLGuiContainer*>(enumC)->showAll();
     74    if ((*itC)->isA(CL_GLGUI_CONTAINER))
     75      static_cast<GLGuiContainer*>(*itC)->showAll();
    8276    else
    83       enumC->show();
    84     enumC = itC->nextElement();
     77      (*itC)->show();
     78    itC++;
    8579  }
    86   delete itC;
    8780
    8881  this->show();
     
    9285void GLGuiBox::hideAll()
    9386{
    94   tIterator<GLGuiWidget>* itC = this->children->getIterator();
    95   GLGuiWidget* enumC = itC->firstElement();
    96   while (enumC != NULL)
     87  std::list<GLGuiWidget*>::iterator itC = this->children.begin();
     88  while (itC != this->children.end())
    9789  {
    98     if (enumC->isA(CL_GLGUI_CONTAINER))
    99       static_cast<GLGuiContainer*>(enumC)->showAll();
     90    if ((*itC)->isA(CL_GLGUI_CONTAINER))
     91      static_cast<GLGuiContainer*>(*itC)->hideAll();
    10092    else
    101       enumC->hide();
    102     enumC = itC->nextElement();
     93      (*itC)->hide();
     94    itC++;
    10395  }
    104   delete itC;
    10596
    10697  this->hide();
  • trunk/src/lib/gui/gl_gui/glgui_box.h

    r6287 r7130  
    1111
    1212// FORWARD DECLARATION
    13 template<class T> class tList;
    1413
    1514typedef enum
     
    4140 private:
    4241   GLGuiBoxType             type;
    43    tList<GLGuiWidget>*      children;
    44 
     42   std::list<GLGuiWidget*>  children;
    4543};
    4644
  • trunk/src/lib/particles/engine/particle_engine.cc

    r6619 r7130  
    2020#include "class_list.h"
    2121
    22 #include "list.h"
    2322#include "debug.h"
    2423#include "stdlibincl.h"
  • trunk/src/lib/particles/engine/particle_engine.h

    r6619 r7130  
    1111#include "particle_system.h"
    1212#include "particle_emitter.h"
     13#include <list>
    1314
    1415#include "parser/tinyxml/tinyxml.h"
    1516
    1617// FORWARD DECLARATION
    17 template<class T> class tList;
    1818
    1919//! A ParticleConnection enables us to emitt from any emitter into any other particleSystem
     
    6464  static ParticleEngine* singletonRef;        //!< The reference to the engine.
    6565
    66   tList<ParticleSystem>* systemList;          //!< A list of Systems handled by the ParticleEngine.
    67   tList<ParticleEmitter>* emitterList;        //!< A list of Emitters handled by the ParticleEngine.
     66  std::list<ParticleSystem> systemList;          //!< A list of Systems handled by the ParticleEngine.
     67  std::list<ParticleEmitter> emitterList;        //!< A list of Emitters handled by the ParticleEngine.
    6868
    6969  tList<ParticleConnection>* connectionList;  //!< A list of Connections between Systems and Emitters.
  • trunk/src/lib/physics/physics_engine.cc

    r5982 r7130  
    1919
    2020#include "class_list.h"
    21 #include "list.h"
    2221#include "parser/tinyxml/tinyxml.h"
    2322#include "factory.h"
  • trunk/src/lib/physics/physics_interface.cc

    r5257 r7130  
    2626#include "p_node.h"
    2727
    28 #include "list.h"
    2928#include "string.h"
    3029#include "stdincl.h"
Note: See TracChangeset for help on using the changeset viewer.