/home/martin/workspace/OpenStreetNav/src/xmlparse/osm-pskel.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2005-2010 Code Synthesis Tools CC
00002 //
00003 // This program was generated by CodeSynthesis XSD, an XML Schema to
00004 // C++ data binding compiler.
00005 //
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License version 2 as
00008 // published by the Free Software Foundation.
00009 //
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00018 //
00019 // In addition, as a special exception, Code Synthesis Tools CC gives
00020 // permission to link this program with the Xerces-C++ library (or with
00021 // modified versions of Xerces-C++ that use the same license as Xerces-C++),
00022 // and distribute linked combinations including the two. You must obey
00023 // the GNU General Public License version 2 in all respects for all of
00024 // the code used other than Xerces-C++. If you modify this copy of the
00025 // program, you may extend this exception to your version of the program,
00026 // but you are not obligated to do so. If you do not wish to do so, delete
00027 // this exception statement from your version.
00028 //
00029 // Furthermore, Code Synthesis Tools CC makes a special exception for
00030 // the Free/Libre and Open Source Software (FLOSS) which is described
00031 // in the accompanying FLOSSE file.
00032 //
00033 
00034 #ifndef OSM_PSKEL_HXX
00035 #define OSM_PSKEL_HXX
00036 
00037 // Begin prologue.
00038 //
00039 //
00040 // End prologue.
00041 
00042 #include <xsd/cxx/config.hxx>
00043 
00044 #if (XSD_INT_VERSION != 3030000L)
00045 #error XSD runtime version mismatch
00046 #endif
00047 
00048 #include <xsd/cxx/pre.hxx>
00049 
00050 // Forward declarations
00051 //
00052 class osm_pskel;
00053 
00054 #ifndef XSD_USE_CHAR
00055 #define XSD_USE_CHAR
00056 #endif
00057 
00058 #ifndef XSD_CXX_PARSER_USE_CHAR
00059 #define XSD_CXX_PARSER_USE_CHAR
00060 #endif
00061 
00062 #include "xml_schema-pskel.hxx"
00063 #include "../elements/osmelements.h"
00064 
00065 class bound_pskel;
00066 class node_pskel;
00067 class way_pskel;
00068 class relation_pskel;
00069 class osm_pskel: public ::xml_schema::complex_content
00070 {
00071   public:
00072   // Parser callbacks. Override them in your implementation.
00073   //
00074   // virtual void
00075   // pre ();
00076 
00077   virtual void
00078   bound ();
00079 
00080   virtual void
00081   node (const osm::Node&);
00082 
00083   virtual void
00084   way (const osm::Way&);
00085 
00086   virtual void
00087   relation (const osm::Relation&);
00088 
00089   virtual void
00090   version (const ::std::string&);
00091 
00092   virtual void
00093   generator (const ::std::string&);
00094 
00095   virtual void
00096   post_osm ();
00097 
00098   // Parser construction API.
00099   //
00100   void
00101   bound_parser (::bound_pskel&);
00102 
00103   void
00104   node_parser (::node_pskel&);
00105 
00106   void
00107   way_parser (::way_pskel&);
00108 
00109   void
00110   relation_parser (::relation_pskel&);
00111 
00112   void
00113   version_parser (::xml_schema::string_pskel&);
00114 
00115   void
00116   generator_parser (::xml_schema::string_pskel&);
00117 
00118   void
00119   parsers (::bound_pskel& /* bound */,
00120            ::node_pskel& /* node */,
00121            ::way_pskel& /* way */,
00122            ::relation_pskel& /* relation */,
00123            ::xml_schema::string_pskel& /* version */,
00124            ::xml_schema::string_pskel& /* generator */);
00125 
00126   // Constructor.
00127   //
00128   osm_pskel ();
00129 
00130   // Implementation.
00131   //
00132   protected:
00133   virtual bool
00134   _start_element_impl (const ::xml_schema::ro_string&,
00135                        const ::xml_schema::ro_string&,
00136                        const ::xml_schema::ro_string*);
00137 
00138   virtual bool
00139   _end_element_impl (const ::xml_schema::ro_string&,
00140                      const ::xml_schema::ro_string&);
00141 
00142   virtual bool
00143   _attribute_impl_phase_one (const ::xml_schema::ro_string&,
00144                              const ::xml_schema::ro_string&,
00145                              const ::xml_schema::ro_string&);
00146 
00147 
00148   protected:
00149   ::bound_pskel* bound_parser_;
00150   ::node_pskel* node_parser_;
00151   ::way_pskel* way_parser_;
00152   ::relation_pskel* relation_parser_;
00153   ::xml_schema::string_pskel* version_parser_;
00154   ::xml_schema::string_pskel* generator_parser_;
00155 
00156   protected:
00157   struct v_state_descr_
00158   {
00159     void (::osm_pskel::*func) (
00160       unsigned long&,
00161       unsigned long&,
00162       const ::xml_schema::ro_string&,
00163       const ::xml_schema::ro_string&,
00164       const ::xml_schema::ro_string*,
00165       bool);
00166     unsigned long state;
00167     unsigned long count;
00168   };
00169 
00170   struct v_state_
00171   {
00172     v_state_descr_ data[3UL];
00173     unsigned long size;
00174   };
00175 
00176   v_state_ v_state_first_;
00177   ::xsd::cxx::parser::pod_stack v_state_stack_;
00178 
00179   virtual void
00180   _pre_e_validate ();
00181 
00182   virtual void
00183   _post_e_validate ();
00184 
00185   void
00186   sequence_0 (unsigned long& state,
00187               unsigned long& count,
00188               const ::xml_schema::ro_string& ns,
00189               const ::xml_schema::ro_string& n,
00190               const ::xml_schema::ro_string* t,
00191               bool start);
00192 
00193   void
00194   choice_0 (unsigned long& state,
00195             unsigned long& count,
00196             const ::xml_schema::ro_string& ns,
00197             const ::xml_schema::ro_string& n,
00198             const ::xml_schema::ro_string* t,
00199             bool start);
00200 
00201   protected:
00202   struct v_state_attr_
00203   {
00204     bool version;
00205   };
00206 
00207   v_state_attr_ v_state_attr_first_;
00208   ::xsd::cxx::parser::pod_stack v_state_attr_stack_;
00209 
00210   virtual void
00211   _pre_a_validate ();
00212 
00213   virtual void
00214   _post_a_validate ();
00215 };
00216 
00217 #include <xsd/cxx/post.hxx>
00218 
00219 // Begin epilogue.
00220 //
00221 //
00222 // End epilogue.
00223 
00224 #endif // OSM_PSKEL_HXX
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines