Rev | Line | |
---|
[365] | 1 | /*! |
---|
| 2 | @file MetaObjectList.cc |
---|
| 3 | @brief Implementation of the MetaObjectList class. |
---|
| 4 | */ |
---|
| 5 | |
---|
[246] | 6 | #include "MetaObjectList.h" |
---|
| 7 | |
---|
| 8 | namespace orxonox |
---|
| 9 | { |
---|
[365] | 10 | /** |
---|
| 11 | @brief Constructor: Sets first_ to zero. |
---|
| 12 | */ |
---|
[246] | 13 | MetaObjectList::MetaObjectList() |
---|
| 14 | { |
---|
| 15 | this->first_ = 0; |
---|
| 16 | } |
---|
| 17 | |
---|
[365] | 18 | /** |
---|
| 19 | @brief Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList. |
---|
| 20 | */ |
---|
[246] | 21 | MetaObjectList::~MetaObjectList() |
---|
| 22 | { |
---|
| 23 | BaseMetaObjectListElement* temp; |
---|
| 24 | while (this->first_) |
---|
| 25 | { |
---|
| 26 | temp = this->first_->next_; |
---|
| 27 | delete this->first_; |
---|
| 28 | this->first_ = temp; |
---|
| 29 | } |
---|
| 30 | } |
---|
| 31 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.