source: latest/src/sc_object.h @ 1

Last change on this file since 1 was 1, checked in by buchmann, 17 years ago

Initial import from CVS repository

File size: 2.4 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#ifndef __SC_OBJECT_H__
13#define __SC_OBJECT_H__
14
15#include <iostream>
16#include <vector>
17
18// ----------------------------------------------------------------------------
19//  CLASS : sc_object
20//
21// ----------------------------------------------------------------------------
22
23namespace sc_core {
24
25class sc_object
26{
27        ///////////
28        // Internal
29        protected: void             init ();
30        protected: void             set_kind (const char *);
31        ///////////             
32public:
33  static const char* const kind_string;
34  // LRM
35  const char *name     () const;
36  const char *basename () const;
37  void        rename   (const char*) const;
38
39        friend std::ostream& operator << (std::ostream& , const sc_object&);
40  /*
41  void print () const;
42  virtual void print (std::ostream & os) const;
43  void dump () const;
44  virtual void dump (std::ostream & os) const;
45  virtual void trace (sc_trace_file *) const;
46  */
47  /*virtual*/ const char *kind () const;
48  /*
49  sc_simcontext *simcontext () const;
50  bool add_attribute (sc_attr_base &);
51  sc_attr_base *get_attribute (const sc_string &);
52  const sc_attr_base *get_attribute (const sc_string &) const;
53  sc_attr_base *remove_attribute (const sc_string &);
54  void remove_all_attributes ();
55  int num_attributes () const;
56    sc_attr_cltn & attr_cltn ();
57  const sc_attr_cltn & attr_cltn () const;
58  */
59  /* virtual */ const std::vector<sc_object*>& get_child_objects() const;
60  sc_object*               get_parent_object       () const;
61protected:
62    sc_object ();
63    sc_object (const char *);
64    /*virtual */~ sc_object ();
65               
66};
67
68const std::vector<sc_object*>& sc_get_top_level_objects();
69const sc_object*               sc_find_object          (const char*);
70
71} // end of sc_core namespace
72
73using sc_core::sc_get_top_level_objects;
74using sc_core::sc_find_object;
75
76#endif
77
Note: See TracBrowser for help on using the repository browser.