// file : xsd/cxx/tree/parsing/element-map.txx // copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_TREE_PARSING_ELEMENT_MAP_TXX #define XSD_CXX_TREE_PARSING_ELEMENT_MAP_TXX #include #include namespace xsd { namespace cxx { namespace tree { template XSD_AUTO_PTR > element_map:: parse (const xercesc::DOMElement& e, flags f) { const qualified_name n (xml::dom::name (e)); typename map::const_iterator i (map_->find (n)); if (i != map_->end () && i->second.parser_ != 0) return (i->second.parser_) (e, f); else throw no_element_info (n.name (), n.namespace_ ()); } template XSD_AUTO_PTR > parser_impl (const xercesc::DOMElement& e, flags f) { return XSD_AUTO_PTR > (new T (e, f)); } } } } #endif // XSD_CXX_TREE_PARSING_ELEMENT_MAP_TXX