Changeset 384 for code/branches/FICN/src/orxonox/core/IdentifierList.cc
- Timestamp:
- Dec 4, 2007, 11:48:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/IdentifierList.cc
r258 r384 1 /*! 2 @file IdentifierList.cc 3 @brief Implementation of the IdentifierList class. 4 */ 5 1 6 #include "IdentifierList.h" 2 7 #include "Identifier.h" … … 7 12 // ### IdentifierList ### 8 13 // ############################### 14 /** 15 @brief Constructor: Sets first_ to zero. 16 */ 9 17 IdentifierList::IdentifierList() 10 18 { … … 12 20 } 13 21 22 /** 23 @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS. 24 */ 14 25 IdentifierList::~IdentifierList() 15 26 { … … 23 34 } 24 35 36 /** 37 @brief Adds an Identifier to the list. 38 @param identifier The Identifier to add 39 */ 25 40 void IdentifierList::add(const Identifier* identifier) 26 41 { … … 30 45 } 31 46 47 /** 48 @brief Removes an Identifier from the list. 49 @param identifier The Identifier to remove 50 */ 32 51 void IdentifierList::remove(const Identifier* identifier) 33 52 { … … 35 54 return; 36 55 56 // Check if we have to delete the first element 37 57 if (this->first_->identifier_ == identifier) 38 58 { … … 44 64 } 45 65 66 // Iterate through the list 46 67 IdentifierListElement* temp = this->first_; 47 68 while (temp->next_) … … 60 81 } 61 82 83 /** 84 @brief Checks if a given Identifier is in the list and returns true if yes. 85 @param identifier The Identifier to check 86 @return True if the Identifier is in the list 87 */ 62 88 bool IdentifierList::isInList(const Identifier* identifier) const 63 89 { … … 74 100 } 75 101 102 /** 103 @returns a string, containing the names of all Identifiers in the list. 104 */ 76 105 std::string IdentifierList::toString() const 77 106 { … … 94 123 // ### IdentifierListElement ### 95 124 // ############################### 125 /** 126 @brief Constructor: Creates the list-element with a given identifier. 127 @param identifier The Identifier to store 128 */ 96 129 IdentifierListElement::IdentifierListElement(const Identifier* identifier) 97 130 { … … 99 132 this->next_ = 0; 100 133 } 101 102 IdentifierListElement::~IdentifierListElement()103 {104 }105 134 }
Note: See TracChangeset
for help on using the changeset viewer.