// file : xsd/cxx/parser/map.txx // author : Boris Kolpackov // copyright : Copyright (c) 2005-2008 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file namespace xsd { namespace cxx { namespace parser { // parser_map // template parser_map:: ~parser_map () { } // parser_map_impl // template parser_map_impl:: ~parser_map_impl () { delete map_; } template void parser_map_impl:: insert (const C* type, parser_base& parser) { if (map_ == 0) map_ = new map; (*map_)[type] = &parser; } template parser_base* parser_map_impl:: find (const ro_string& type) { if (map_ == 0) return 0; typename map::const_iterator i (map_->find (type)); return i != map_->end () ? i->second : 0; } } } }