Last change
on this file since 63 was
59,
checked in by meunier, 8 years ago
|
- Fixed memory leaks
- Fixed indentation in some files
|
File size:
2.0 KB
|
Line | |
---|
1 | /*------------------------------------------------------------\ |
---|
2 | | | |
---|
3 | | Tool : systemcass | |
---|
4 | | | |
---|
5 | | File : sc_object.h | |
---|
6 | | | |
---|
7 | | Author : Buchmann Richard | |
---|
8 | | | |
---|
9 | | Date : 09_07_2004 | |
---|
10 | | | |
---|
11 | \------------------------------------------------------------*/ |
---|
12 | |
---|
13 | #ifndef __SC_OBJECT_H__ |
---|
14 | #define __SC_OBJECT_H__ |
---|
15 | |
---|
16 | #include <iostream> |
---|
17 | #include <vector> |
---|
18 | |
---|
19 | // ---------------------------------------------------------------------------- |
---|
20 | // CLASS : sc_object |
---|
21 | // |
---|
22 | // ---------------------------------------------------------------------------- |
---|
23 | |
---|
24 | namespace sc_core { |
---|
25 | |
---|
26 | |
---|
27 | class sc_object { |
---|
28 | |
---|
29 | /////////// |
---|
30 | // Internal |
---|
31 | // //////// |
---|
32 | protected: |
---|
33 | void init(); |
---|
34 | void set_kind(const char *); |
---|
35 | |
---|
36 | |
---|
37 | public: |
---|
38 | static const char * const kind_string; |
---|
39 | // LRM |
---|
40 | const char * name() const; |
---|
41 | const char * basename() const; |
---|
42 | void rename(const char*) const; |
---|
43 | |
---|
44 | friend std::ostream & operator << (std::ostream &, const sc_object &); |
---|
45 | /* virtual */ const char * kind() const; |
---|
46 | /* virtual */ const std::vector<sc_object *> & get_child_objects() const; |
---|
47 | sc_object * get_parent_object() const; |
---|
48 | |
---|
49 | protected: |
---|
50 | sc_object(); |
---|
51 | sc_object(const char *); |
---|
52 | /*virtual */~sc_object(); |
---|
53 | |
---|
54 | }; |
---|
55 | |
---|
56 | const std::vector<sc_object *> & sc_get_top_level_objects(); |
---|
57 | const sc_object * sc_find_object(const char *); |
---|
58 | |
---|
59 | } // end of sc_core namespace |
---|
60 | |
---|
61 | using sc_core::sc_get_top_level_objects; |
---|
62 | using sc_core::sc_find_object; |
---|
63 | |
---|
64 | #endif |
---|
65 | |
---|
66 | /* |
---|
67 | # Local Variables: |
---|
68 | # tab-width: 4; |
---|
69 | # c-basic-offset: 4; |
---|
70 | # c-file-offsets:((innamespace . 0)(inline-open . 0)); |
---|
71 | # indent-tabs-mode: nil; |
---|
72 | # End: |
---|
73 | # |
---|
74 | # vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4 |
---|
75 | */ |
---|
76 | |
---|
Note: See
TracBrowser
for help on using the repository browser.