// file : xsd/cxx/tree/serialization/element-map.txx // copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_TREE_SERIALIZATION_ELEMENT_MAP_TXX #define XSD_CXX_TREE_SERIALIZATION_ELEMENT_MAP_TXX #include namespace xsd { namespace cxx { namespace tree { template void element_map:: serialize (xercesc::DOMElement& e, const element_type& x) { const qualified_name n (x._name (), x._namespace ()); typename map::const_iterator i (map_->find (n)); if (i != map_->end () && i->second.serializer_ != 0) return (i->second.serializer_) (e, x); else throw no_element_info (n.name (), n.namespace_ ()); } template void serializer_impl (xercesc::DOMElement& e, const element_type& x) { e << static_cast (x); } } } } #endif // XSD_CXX_TREE_SERIALIZATION_ELEMENT_MAP_TXX