Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2707 in orxonox.OLD for orxonox/branches/buerli/src/list.h


Ignore:
Timestamp:
Nov 3, 2004, 12:29:03 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/buerli: merged back from trunk, with new configure makefile and so forth.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/buerli/src/list.h

    r2077 r2707  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific:
     12   main-programmer: Christian Meyer
     13
     14   ADDONS/FIXES:
     15 
     16   Patrick Boenzli     :          Implemented getSize() function
     17*/
     18
     19
    120/*!
    221  \file list.h
     
    2140  List<T>* prev;
    2241  bool bReference;
     42  int size;
    2343 
    2444 public:
     
    3555  void set_prev (List<T>* ptr);
    3656  int remove (T* obj, FINDMODE mode);
     57  int getSize();
    3758};
    3859
     
    5273  prev = p;
    5374  bReference = bRef;
     75  if(obj != NULL)
     76    ++size;
    5477}
    5578
     
    127150      break;
    128151  }
     152  ++size;
    129153  return 0;
    130154}
     
    224248    }
    225249  }
     250  --size;
    226251  return 0;
    227252}
     
    262287
    263288
     289/**
     290  \brief Returns the current size of the List
     291  \return Size of List
     292*/
     293template<class T>
     294int List<T>::getSize()
     295{
     296  return this->size;
     297}
    264298
    265299#endif
Note: See TracChangeset for help on using the changeset viewer.