Last change
on this file since 2065 was
2036,
checked in by patrick, 20 years ago
|
orxonxo/trunk/src: extended framework: class inheritance, right including (had som bugs), framework not finished yet
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2036] | 1 | |
---|
| 2 | |
---|
| 3 | /* |
---|
| 4 | orxonox - the future of 3D-vertical-scrollers |
---|
| 5 | |
---|
| 6 | Copyright (C) 2004 orx |
---|
| 7 | |
---|
| 8 | This program is free software; you can redistribute it and/or modify |
---|
| 9 | it under the terms of the GNU General Public License as published by |
---|
| 10 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 11 | any later version. |
---|
| 12 | |
---|
| 13 | ### File Specific: |
---|
| 14 | main-programmer: Patrick Boenzli |
---|
| 15 | co-programmer: |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | #include "world_entity.h" |
---|
| 19 | #include "stdincl.h" |
---|
| 20 | |
---|
| 21 | #include "list.h" |
---|
| 22 | |
---|
| 23 | using namespace std; |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | List::List () |
---|
| 28 | { |
---|
| 29 | lastElement = null; |
---|
| 30 | listSize = 0; |
---|
| 31 | } |
---|
| 32 | |
---|
| 33 | List::~List () |
---|
| 34 | {} |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | void List::addElement(WorldEntity* we) |
---|
| 38 | { |
---|
| 39 | listElement* newElement = new listElement; |
---|
| 40 | newElement->we = we; |
---|
| 41 | newElement->next = lastElement; |
---|
| 42 | newElement->prev = null; |
---|
| 43 | lastElement = newElement; |
---|
| 44 | listSize++; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | void List::removeElement(WorldEntity* we) |
---|
| 49 | { |
---|
| 50 | listElement* element = lastElement; |
---|
| 51 | while(element->we != we) |
---|
| 52 | { |
---|
| 53 | element = element->next; |
---|
| 54 | } |
---|
| 55 | element->prev->next = element->next; |
---|
| 56 | element->next->prev = element->prev; |
---|
| 57 | delete element->we; |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | WorldEntity* List::getElement(int number) |
---|
| 62 | {} |
---|
| 63 | |
---|
| 64 | int List::getNrOfElement(WorldEntity* we) |
---|
| 65 | {} |
---|
| 66 | |
---|
| 67 | void List::defragment() |
---|
| 68 | {} |
---|
| 69 | |
---|
| 70 | void List::flushList() |
---|
| 71 | {} |
---|
| 72 | |
---|
| 73 | void List::killList() |
---|
| 74 | {} |
---|
Note: See
TracBrowser
for help on using the repository browser.