Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/objecthierarchy/src/orxonox/core/IdentifierList.h @ 451

Last change on this file since 451 was 365, checked in by landauf, 17 years ago

added comments

File size: 1.2 KB
RevLine 
[197]1#ifndef _IdentifierList_H__
[365]2/*!
3    @file IdentifierList.h
4    @brief Definition of the IdentifierList class
5
6    The IdentifierList is a single-linked list, containing Identifiers.
7    The IdentifierList is used to store parents and childs of each Identifier.
8*/
9
[197]10#define _IdentifierList_H__
11
12#include <string>
13
14namespace orxonox
15{
[365]16    class Identifier; // Forward declaration
[197]17
[365]18    //! The list-element of the IdentifierList
[197]19    class IdentifierListElement
20    {
21        public:
[239]22            IdentifierListElement(const Identifier* identifier);
[197]23
[365]24            const Identifier* identifier_;      //!< The identifier
25            IdentifierListElement* next_;       //!< The next element in the list
[197]26    };
27
[365]28    //! The IdentifierList contains Identifiers
[197]29    class IdentifierList
30    {
31        public:
32            IdentifierList();
33            ~IdentifierList();
[239]34            void add(const Identifier* identifier);
35            void remove(const Identifier* identifier);
[241]36            bool isInList(const Identifier* identifier) const;
[240]37            std::string toString() const;
[197]38
[365]39            IdentifierListElement* first_;      //!< The first element in the list
[197]40    };
41}
42
43#endif
Note: See TracBrowser for help on using the repository browser.