source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp @ 43

Last change on this file since 43 was 43, checked in by rosiere, 17 years ago

Modif mineur : ajout d'info de débug

Release non stable

File size: 804 bytes
Line 
1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Component.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
13  Entity * Component::find_entity (string name)
14  {
15    log_printf(FUNC,Behavioural,"Component::find_entity", "Begin");
16
17    Entity * _return = NULL;
18
19    if (_entity->get_name() == name)
20      _return = _entity;
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            {
28              if ((*i)->get_name() == name)
29                {
30                  _return = *i;
31                  break;
32                }
33              ++i;
34            }
35        }
36
37    log_printf(FUNC,Behavioural,"Component::find_entity", "End");
38
39    return _return;
40  };
41
42}; // end namespace behavioural         
43}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.