Last change
on this file since 60 was
52,
checked in by meunier, 12 years ago
|
Code formatting in all source files.
|
File size:
1.4 KB
|
Line | |
---|
1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : sc_localvar.h | |
---|
6 | | | |
---|
7 | | Author : Buchmann Richard | |
---|
8 | | | |
---|
9 | | Date : 21_04_2005 | |
---|
10 | | | |
---|
11 | \------------------------------------------------------------*/ |
---|
12 | |
---|
13 | #ifndef SC_LOCALVAR_H |
---|
14 | #define SC_LOCALVAR_H |
---|
15 | |
---|
16 | #include "sc_fwd.h" |
---|
17 | #include "sc_signal.h" |
---|
18 | |
---|
19 | namespace sc_core { |
---|
20 | |
---|
21 | template <typename T> |
---|
22 | class sc_localvar : public sc_signal_base { |
---|
23 | |
---|
24 | public: |
---|
25 | sc_localvar (const T & object) { |
---|
26 | init (object); |
---|
27 | } |
---|
28 | |
---|
29 | private: |
---|
30 | void init (const T & object) { |
---|
31 | set_pointer ((tab_t *) &object); |
---|
32 | set_kind ("sc_localvar"); |
---|
33 | sc_interface::init (sizeof(object)); |
---|
34 | bind (*((sc_signal_base *) this)); |
---|
35 | } |
---|
36 | |
---|
37 | }; |
---|
38 | |
---|
39 | } // end of sc_core namespace |
---|
40 | |
---|
41 | #endif |
---|
42 | |
---|
43 | /* |
---|
44 | # Local Variables: |
---|
45 | # tab-width: 4; |
---|
46 | # c-basic-offset: 4; |
---|
47 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
48 | # indent-tabs-mode: nil; |
---|
49 | # End: |
---|
50 | # |
---|
51 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
52 | */ |
---|
53 | |
---|
Note: See
TracBrowser
for help on using the repository browser.