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