diff src/load-path.h @ 9010:f914834836e7

Partial implementation of derived classes using the old form with "@" files.
author rtshort@smoketree.phaselocked.com
date Tue, 24 Mar 2009 11:29:53 -0400
parents d865363208d6
children 95445f9f5976
line wrap: on
line diff
--- a/src/load-path.h
+++ b/src/load-path.h
@@ -37,7 +37,8 @@
 {
 protected:
 
-  load_path (void) : dir_info_list (), fcn_map (), method_map () { }
+  load_path (void)
+    : dir_info_list (), fcn_map (), method_map (), parent_map () { }
 
 public:
 
@@ -228,6 +229,13 @@
     return instance_ok () ? instance->do_system_path () : std::string ();
   }
 
+  static void add_to_parent_map (const std::string& classname,
+				 const std::list<std::string>& parent_list)
+  {
+    if (instance_ok ())
+      instance->do_add_to_parent_map (classname, parent_list);
+  }
+
 private:
 
   static const int M_FILE = 1;
@@ -386,6 +394,12 @@
 
   typedef method_map_type::const_iterator const_method_map_iterator;
   typedef method_map_type::iterator method_map_iterator;
+ 
+  // <CLASS_NAME, PARENT_LIST>>
+  typedef std::map<std::string, std::list<std::string> > parent_map_type;
+
+  typedef parent_map_type::const_iterator const_parent_map_iterator;
+  typedef parent_map_type::iterator parent_map_iterator;
 
   mutable dir_info_list_type dir_info_list;
 
@@ -395,6 +409,8 @@
 
   mutable method_map_type method_map;
 
+  mutable parent_map_type parent_map;
+
   static load_path *instance;
 
   static hook_fcn_ptr add_hook;
@@ -493,6 +509,9 @@
 
   std::string do_get_command_line_path (void) const { return command_line_path; }
 
+  void do_add_to_parent_map (const std::string& classname,
+			     const std::list<std::string>& parent_list) const;
+
   void add_to_fcn_map (const dir_info& di, bool at_end) const;
 
   void add_to_private_fcn_map (const dir_info& di) const;