Index: sources/src/module_hierarchy.cc
===================================================================
--- sources/src/module_hierarchy.cc	(revision 27)
+++ sources/src/module_hierarchy.cc	(revision 52)
@@ -1,13 +1,13 @@
 /*------------------------------------------------------------\
-|                                                             |
-| Tool    :                  systemcass                       |
-|                                                             |
-| File    :                 module_hierarchy.cc               |
-|                                                             |
-| Author  :                 Buchmann Richard                  |
-|                                                             |
-| Date    :                   15_12_2005                      |
-|                                                             |
-\------------------------------------------------------------*/
+  |                                                             |
+  | Tool    :                  systemcass                       |
+  |                                                             |
+  | File    :                 module_hierarchy.cc               |
+  |                                                             |
+  | Author  :                 Buchmann Richard                  |
+  |                                                             |
+  | Date    :                   15_12_2005                      |
+  |                                                             |
+  \------------------------------------------------------------*/
 
 /* 
@@ -34,13 +34,16 @@
  */
 
-#include "module_hierarchy.h"
-#include "sc_module.h"
 #include <cassert>
 #include <map>
+#include <cstdlib>
+#include <cstring>
+
+#include "sc_module.h"
+#include "module_hierarchy.h"
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
-#include <cstdlib>
-#include <cstring>
+
 
 using namespace std;
@@ -48,76 +51,71 @@
 namespace sc_core {
 
-typedef vector<sc_object*> sc_object_list_t;
-typedef map<const sc_object*,sc_object_list_t> sc_object2sc_object_list_t;
-typedef map<const sc_object*,sc_object *>      sc_object2sc_object_t;
+typedef vector<sc_object *> sc_object_list_t;
+typedef map<const sc_object *, sc_object_list_t> sc_object2sc_object_list_t;
+typedef map<const sc_object*, sc_object *> sc_object2sc_object_t;
 
-sc_object_list_t            top_level_objects;
-sc_object2sc_object_list_t  object2childs;
-sc_object2sc_object_t       object2parent;
+sc_object_list_t top_level_objects;
+sc_object2sc_object_list_t object2childs;
+sc_object2sc_object_t object2parent;
 
-void
-set_parent (sc_module &mod, sc_module *parent)
-{
-  object2parent[&mod] = parent; 
-  sc_object_list_t &obj_list = (parent == NULL)?top_level_objects:object2childs[parent];
-  obj_list.push_back (&mod);
+
+void set_parent (sc_module &mod, sc_module * parent) {
+    object2parent[&mod] = parent; 
+    sc_object_list_t &obj_list = (parent == NULL) ? top_level_objects : object2childs[parent];
+    obj_list.push_back (&mod);
 }
 
-void
-add_child (sc_object &obj)
-{
-  sc_object_list_t *obj_list;
-  if (modules_stack.empty ())
-  {
-    obj_list = &top_level_objects;
-  } else {
-    const sc_module *parent    = modules_stack.top ();
-    if (parent == NULL)
-      return; //obj_list = &top_level_objects;
+
+void add_child (sc_object &obj) {
+    sc_object_list_t * obj_list;
+    if (modules_stack.empty ()) {
+        obj_list = &top_level_objects;
+    }
     else {
-      assert(parent != &obj);
-      const sc_object *pobj      = (const sc_module *) parent;
-      obj_list = &(object2childs[pobj]);
+        const sc_module * parent = modules_stack.top ();
+        if (parent == NULL) {
+            return; //obj_list = &top_level_objects;
+        }
+        else {
+            assert(parent != &obj);
+            const sc_object * pobj = (const sc_module *) parent;
+            obj_list = &(object2childs[pobj]);
+        }
     }
-  }
-  obj_list->push_back (&obj);
+    obj_list->push_back (&obj);
 }
 
-const std::vector<sc_object*>& 
-sc_get_top_level_objects()
-{
-  return top_level_objects;
+
+const std::vector<sc_object *>& sc_get_top_level_objects() {
+    return top_level_objects;
 }
 
-const sc_object*
-sc_find_object (const char* name)
-{
-  sc_object2sc_object_list_t::iterator i = object2childs.begin ();
-  while (i != object2childs.end ())
-  {
-    const sc_object *obj = i->first;
-    const char      *n   = obj->name ();
-    if (strcmp (name, n) == 0)
-      return obj;
-    ++i;
-  }
-  return NULL;
-}
- 
-const std::vector<sc_object*>& 
-get_child_objects (const sc_object &obj)
-{
-  sc_object_list_t &l = object2childs[&obj];
-  /* 
-   * If the object is not in the objects list,
-   * get_child_objects returns an empty list.
-   */
-  return l;    
+
+const sc_object * sc_find_object(const char * name) {
+    sc_object2sc_object_list_t::iterator i = object2childs.begin ();
+    while (i != object2childs.end()) {
+        const sc_object * obj = i->first;
+        const char * n = obj->name ();
+        if (strcmp (name, n) == 0) {
+            return obj;
+        }
+        ++i;
+    }
+    return NULL;
 }
 
-sc_object*
-get_parent_object (const sc_object &obj)
-{
-  return object2parent[&obj];
+
+const std::vector<sc_object *>& get_child_objects(const sc_object &obj) {
+    sc_object_list_t &l = object2childs[&obj];
+    /* 
+     * If the object is not in the objects list,
+     * get_child_objects returns an empty list.
+     */
+    return l;    
+}
+
+
+sc_object * get_parent_object(const sc_object &obj) {
+    return object2parent[&obj];
 }
 
@@ -125,2 +123,13 @@
 
 
+/*
+# Local Variables:
+# tab-width: 4;
+# c-basic-offset: 4;
+# c-file-offsets:((innamespace . 0)(inline-open . 0));
+# indent-tabs-mode: nil;
+# End:
+#
+# vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
+*/
+
