source: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.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: 1.4 KB
RevLine 
[42]1/*
2 * $Id$
3 *
4 * [ Description ]
5 *
6 */
7
8#include "Behavioural/include/Interfaces.h"
9
10namespace morpheo              {
11namespace behavioural          {
12
[43]13#undef  FUNCTION
14#define FUNCTION "Interfaces::find_signal"
[75]15  Signal * Interfaces::find_signal (std::string name)
[42]16  {
[43]17    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
18
19    Signal * _return = NULL;
[42]20    if (_list_interface->empty()== false)
21      {
[75]22        std::list<Interface_fifo*>::iterator i = _list_interface->begin();
[42]23
24        while (i != _list_interface->end())
25          {
26            Signal * signal = (*i)->find_signal(name);
27
28            // Warning : Name of signal is uniq
29            if (signal != NULL)
[43]30              {
31                _return = signal;
32                break;
33              }
[42]34
35            ++i;
36          }
37      }
38     
[43]39    log_printf(FUNC,Behavioural,FUNCTION,"End");
40    return _return;
[42]41  };
42
[43]43#undef  FUNCTION
44#define FUNCTION "Interfaces::find_signal"
[42]45  bool Interfaces::find_signal (Signal * signal)
46  {
[43]47    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
48
49    bool _return = false;
50
[42]51    if (_list_interface->empty()== false)
52      {
[75]53        std::list<Interface_fifo*>::iterator i = _list_interface->begin();
[42]54
55        while (i != _list_interface->end())
56          {
57            if ((*i)->find_signal(signal) == true)
[43]58              {
59                _return = true;
60                break;
61              }
[42]62
63            ++i;
64          }
65      }
[43]66 
67    log_printf(FUNC,Behavioural,FUNCTION,"End");   
68    return _return;
[42]69  };
70
71}; // end namespace behavioural         
72}; // end namespace morpheo             
Note: See TracBrowser for help on using the repository browser.