Last change
on this file since 542 was
384,
checked in by landauf, 17 years ago
|
copied changed files from objecthierarchy-branch
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef _IdentifierList_H__ |
---|
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 | |
---|
10 | #define _IdentifierList_H__ |
---|
11 | |
---|
12 | #include <string> |
---|
13 | |
---|
14 | namespace orxonox |
---|
15 | { |
---|
16 | class Identifier; // Forward declaration |
---|
17 | |
---|
18 | //! The list-element of the IdentifierList |
---|
19 | class IdentifierListElement |
---|
20 | { |
---|
21 | public: |
---|
22 | IdentifierListElement(const Identifier* identifier); |
---|
23 | |
---|
24 | const Identifier* identifier_; //!< The identifier |
---|
25 | IdentifierListElement* next_; //!< The next element in the list |
---|
26 | }; |
---|
27 | |
---|
28 | //! The IdentifierList contains Identifiers |
---|
29 | class IdentifierList |
---|
30 | { |
---|
31 | public: |
---|
32 | IdentifierList(); |
---|
33 | ~IdentifierList(); |
---|
34 | void add(const Identifier* identifier); |
---|
35 | void remove(const Identifier* identifier); |
---|
36 | bool isInList(const Identifier* identifier) const; |
---|
37 | std::string toString() const; |
---|
38 | |
---|
39 | IdentifierListElement* first_; //!< The first element in the list |
---|
40 | }; |
---|
41 | } |
---|
42 | |
---|
43 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.