/home/martin/workspace/OpenStreetNav/src/xmlparse/member-pimpl.cxx
Go to the documentation of this file.
00001 // Not copyrighted - public domain.
00002 //
00003 // This sample parser implementation was generated by CodeSynthesis XSD,
00004 // an XML Schema to C++ data binding compiler. You may use it in your
00005 // programs without any restrictions.
00006 //
00007 
00008 #include "member-pimpl.hxx"
00009 
00010 // member_pimpl
00011 //
00012 
00013 void member_pimpl::
00014 pre ()
00015 {
00016 }
00017 
00018 void member_pimpl::
00019 type (const osm::ObjectType& type)
00020 {
00021     tp=type;
00022 }
00023 
00024 void member_pimpl::
00025 ref (long long ref)
00026 {
00027     id=ref;
00028 }
00029 
00030 void member_pimpl::
00031 role (const ::std::string& role)
00032 {
00033     rl=role;
00034 }
00035 
00036 std::pair<std::string, std::shared_ptr<osm::Element> > member_pimpl::
00037 post_member ()
00038 {
00039     std::shared_ptr<osm::Element> ptr;
00040     switch(tp)
00041     {
00042     case osm::ObjectType::Node:
00043         ptr = std::shared_ptr<osm::Element>(new osm::Node(id));
00044         break;
00045     case osm::ObjectType::Way:
00046         ptr = std::shared_ptr<osm::Element>(new osm::Way(id));
00047         break;
00048     case osm::ObjectType::Relation:
00049         ptr = std::shared_ptr<osm::Element>(new osm::Relation(id));
00050         break;
00051     }
00052     return std::pair<std::string, std::shared_ptr<osm::Element> >(rl, ptr);
00053 }
00054 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines