From ab5a37ec04dbf27899f6303fa22a5c145442fb92 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 10 Mar 2011 09:19:33 +0200 Subject: Add support for querying type_info of context entries --- cutl/compiler/context.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cutl/compiler/context.cxx') diff --git a/cutl/compiler/context.cxx b/cutl/compiler/context.cxx index 7961388..9623588 100644 --- a/cutl/compiler/context.cxx +++ b/cutl/compiler/context.cxx @@ -19,5 +19,16 @@ namespace cutl map_.erase (i); } + + std::type_info const& context:: + type_info (std::string const& key) const + { + map::const_iterator i (map_.find (key)); + + if (i == map_.end ()) + throw no_entry (); + + return i->second.type_info (); + } } } -- cgit v1.1