summaryrefslogtreecommitdiff
path: root/src/intersim/module.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/intersim/module.hpp')
-rw-r--r--src/intersim/module.hpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/intersim/module.hpp b/src/intersim/module.hpp
new file mode 100644
index 0000000..5acf0a2
--- /dev/null
+++ b/src/intersim/module.hpp
@@ -0,0 +1,33 @@
+#ifndef _MODULE_HPP_
+#define _MODULE_HPP_
+
+#include "booksim.hpp"
+
+#include <string>
+#include <vector>
+
+class Module {
+protected:
+ string _name;
+ string _fullname;
+
+ vector<Module *> _children;
+
+ void _AddChild( Module *child );
+
+public:
+ Module( );
+ Module( Module *parent, const string& name );
+ virtual ~Module( ) {}
+
+ void SetName( Module *parent, const string& name );
+
+ void DisplayHierarchy( int level = 0 ) const;
+
+ void Error( const string& msg ) const;
+ void Debug( const string& msg ) const;
+
+ virtual void Display( ) const;
+};
+
+#endif