diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-10 09:19:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-10 09:19:33 +0200 |
commit | ab5a37ec04dbf27899f6303fa22a5c145442fb92 (patch) | |
tree | a1bca6c8184e6b47abdf13ce5044990d7f11cc3d /cutl/compiler/context.cxx | |
parent | 6a0e066b275e0823c5ad745965d182f022512793 (diff) |
Add support for querying type_info of context entries
Diffstat (limited to 'cutl/compiler/context.cxx')
-rw-r--r-- | cutl/compiler/context.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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 (); + } } } |