|
Last change
on this file since 60 was
59,
checked in by meunier, 9 years ago
|
- Fixed memory leaks
- Fixed indentation in some files
|
|
File size:
2.0 KB
|
| Rev | Line | |
|---|
| [1] | 1 | /*------------------------------------------------------------\ |
|---|
| 2 | | | |
|---|
| 3 | | Tool : systemcass | |
|---|
| 4 | | | |
|---|
| 5 | | File : sc_object.h | |
|---|
| 6 | | | |
|---|
| 7 | | Author : Buchmann Richard | |
|---|
| 8 | | | |
|---|
| 9 | | Date : 09_07_2004 | |
|---|
| 10 | | | |
|---|
| 11 | \------------------------------------------------------------*/ |
|---|
| [52] | 12 | |
|---|
| [1] | 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 | |
|---|
| [52] | 26 | |
|---|
| 27 | class sc_object { |
|---|
| [59] | 28 | |
|---|
| [52] | 29 | /////////// |
|---|
| [59] | 30 | // Internal |
|---|
| [52] | 31 | // //////// |
|---|
| [59] | 32 | protected: |
|---|
| [52] | 33 | void init(); |
|---|
| 34 | void set_kind(const char *); |
|---|
| [1] | 35 | |
|---|
| [52] | 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 | |
|---|
| [1] | 54 | }; |
|---|
| 55 | |
|---|
| [52] | 56 | const std::vector<sc_object *> & sc_get_top_level_objects(); |
|---|
| 57 | const sc_object * sc_find_object(const char *); |
|---|
| [1] | 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 | |
|---|
| [52] | 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.