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

Last change on this file since 75 was 75, checked in by rosiere, 16 years ago

Update all component (except front_end) to :

  • new statistics model
  • no namespace std
File size: 867 bytes
RevLine 
[31]1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
[42]8#include "Behavioural/include/Component.h"
[31]9
10namespace morpheo              {
11namespace behavioural          {
12
[75]13  Entity * Component::find_entity (std::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        {
[75]24          std::list<Tcomponent_t *>::iterator i = _list_component->begin();
[31]25         
26          while (i != _list_component->end())
27            {
[57]28              Entity * entity = (*i)->_entity;
29
30              if (entity->get_name() == name)
[31]31                {
[57]32                  _return = entity;
[31]33                  break;
34                }
35              ++i;
36            }
37        }
38
[43]39    log_printf(FUNC,Behavioural,"Component::find_entity", "End");
40
41    return _return;
[31]42  };
43
44}; // end namespace behavioural         
45}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.