Last change
on this file since 36 was
31,
checked in by rosiere, 17 years ago
|
Class Position qui encapsule la génération des fichiers de positions
|
File size:
642 bytes
|
Line | |
---|
1 | #ifdef POSITION |
---|
2 | /* |
---|
3 | * $Id$ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/include/Position.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | |
---|
14 | Entity * Position::find_entity (string name) |
---|
15 | { |
---|
16 | |
---|
17 | if (_entity->_name == name) |
---|
18 | return _entity; |
---|
19 | else |
---|
20 | if (_list_component->empty()== false) |
---|
21 | { |
---|
22 | list<Entity *>::iterator i = _list_component->begin(); |
---|
23 | |
---|
24 | while (i != _list_component->end()) |
---|
25 | { |
---|
26 | if ((*i)->_name == name) |
---|
27 | { |
---|
28 | return *i; |
---|
29 | break; |
---|
30 | } |
---|
31 | ++i; |
---|
32 | } |
---|
33 | } |
---|
34 | |
---|
35 | return NULL; |
---|
36 | }; |
---|
37 | |
---|
38 | }; // end namespace behavioural |
---|
39 | }; // end namespace morpheo |
---|
40 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.