Last change
on this file since 52 was
43,
checked in by rosiere, 17 years ago
|
Modif mineur : ajout d'info de débug
Release non stable
|
File size:
804 bytes
|
Rev | Line | |
---|
[31] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
[42] | 8 | #include "Behavioural/include/Component.h" |
---|
[31] | 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | |
---|
[42] | 13 | Entity * Component::find_entity (string name) |
---|
[31] | 14 | { |
---|
[43] | 15 | log_printf(FUNC,Behavioural,"Component::find_entity", "Begin"); |
---|
[31] | 16 | |
---|
[43] | 17 | Entity * _return = NULL; |
---|
| 18 | |
---|
[42] | 19 | if (_entity->get_name() == name) |
---|
[43] | 20 | _return = _entity; |
---|
[31] | 21 | else |
---|
| 22 | if (_list_component->empty()== false) |
---|
| 23 | { |
---|
| 24 | list<Entity *>::iterator i = _list_component->begin(); |
---|
| 25 | |
---|
| 26 | while (i != _list_component->end()) |
---|
| 27 | { |
---|
[42] | 28 | if ((*i)->get_name() == name) |
---|
[31] | 29 | { |
---|
[43] | 30 | _return = *i; |
---|
[31] | 31 | break; |
---|
| 32 | } |
---|
| 33 | ++i; |
---|
| 34 | } |
---|
| 35 | } |
---|
| 36 | |
---|
[43] | 37 | log_printf(FUNC,Behavioural,"Component::find_entity", "End"); |
---|
| 38 | |
---|
| 39 | return _return; |
---|
[31] | 40 | }; |
---|
| 41 | |
---|
| 42 | }; // end namespace behavioural |
---|
| 43 | }; // end namespace morpheo |
---|
Note: See
TracBrowser
for help on using the repository browser.