summaryrefslogtreecommitdiff
path: root/odb/semantics/unit.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/semantics/unit.hxx')
-rw-r--r--odb/semantics/unit.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/odb/semantics/unit.hxx b/odb/semantics/unit.hxx
index 306d4c3..ac9f4f5 100644
--- a/odb/semantics/unit.hxx
+++ b/odb/semantics/unit.hxx
@@ -38,6 +38,22 @@ namespace semantics
tree_node_map_[key] = &value;
}
+ // Mapping from tree nodes to name hints.
+ //
+ public:
+ names*
+ find_hint (tree key) const
+ {
+ name_hint_map::const_iterator i (name_hint_map_.find (key));
+ return i != name_hint_map_.end () ? i->second : 0;
+ }
+
+ void
+ insert_hint (tree key, names& name)
+ {
+ name_hint_map_[key] = &name;
+ }
+
public:
template <class T>
T&
@@ -158,6 +174,9 @@ namespace semantics
typedef std::map<tree, node*> tree_node_map;
tree_node_map tree_node_map_;
+
+ typedef std::map<tree, names*> name_hint_map;
+ name_hint_map name_hint_map_;
};
}