Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 4, 2007, 11:48:28 PM (16 years ago)
Author:
landauf
Message:

copied changed files from objecthierarchy-branch

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
    16#include "IdentifierList.h"
    27#include "Identifier.h"
     
    712    // ###     IdentifierList      ###
    813    // ###############################
     14    /**
     15        @brief Constructor: Sets first_ to zero.
     16    */
    917    IdentifierList::IdentifierList()
    1018    {
     
    1220    }
    1321
     22    /**
     23        @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS.
     24    */
    1425    IdentifierList::~IdentifierList()
    1526    {
     
    2334    }
    2435
     36    /**
     37        @brief Adds an Identifier to the list.
     38        @param identifier The Identifier to add
     39    */
    2540    void IdentifierList::add(const Identifier* identifier)
    2641    {
     
    3045    }
    3146
     47    /**
     48        @brief Removes an Identifier from the list.
     49        @param identifier The Identifier to remove
     50    */
    3251    void IdentifierList::remove(const Identifier* identifier)
    3352    {
     
    3554            return;
    3655
     56        // Check if we have to delete the first element
    3757        if (this->first_->identifier_ == identifier)
    3858        {
     
    4464        }
    4565
     66        // Iterate through the list
    4667        IdentifierListElement* temp = this->first_;
    4768        while (temp->next_)
     
    6081    }
    6182
     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    */
    6288    bool IdentifierList::isInList(const Identifier* identifier) const
    6389    {
     
    74100    }
    75101
     102    /**
     103        @returns a string, containing the names of all Identifiers in the list.
     104    */
    76105    std::string IdentifierList::toString() const
    77106    {
     
    94123    // ###  IdentifierListElement  ###
    95124    // ###############################
     125    /**
     126        @brief Constructor: Creates the list-element with a given identifier.
     127        @param identifier The Identifier to store
     128    */
    96129    IdentifierListElement::IdentifierListElement(const Identifier* identifier)
    97130    {
     
    99132        this->next_ = 0;
    100133    }
    101 
    102     IdentifierListElement::~IdentifierListElement()
    103     {
    104     }
    105134}
Note: See TracChangeset for help on using the changeset viewer.