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