/home/martin/workspace/OpenStreetNav/src/xmlparse/way-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 WAY_PSKEL_HXX
00035 #define WAY_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 way_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 tag_pskel;
00066 class nd_pskel;
00067 class way_pskel: public ::xml_schema::complex_content
00068 {
00069   public:
00070   // Parser callbacks. Override them in your implementation.
00071   //
00072   // virtual void
00073   // pre ();
00074 
00075   virtual void
00076   tag (const std::pair<std::string, std::string>&);
00077 
00078   virtual void
00079   nd (int64_t);
00080 
00081   virtual void
00082   id (long long);
00083 
00084   virtual void
00085   uid (long long);
00086 
00087   virtual void
00088   user (const ::std::string&);
00089 
00090   virtual void
00091   timestamp (const ::xml_schema::date_time&);
00092 
00093   virtual void
00094   changeset (int);
00095 
00096   virtual void
00097   version (int);
00098 
00099   virtual void
00100   visible (bool);
00101 
00102   virtual osm::Way
00103   post_way () = 0;
00104 
00105   // Parser construction API.
00106   //
00107   void
00108   tag_parser (::tag_pskel&);
00109 
00110   void
00111   nd_parser (::nd_pskel&);
00112 
00113   void
00114   id_parser (::xml_schema::long_pskel&);
00115 
00116   void
00117   uid_parser (::xml_schema::long_pskel&);
00118 
00119   void
00120   user_parser (::xml_schema::string_pskel&);
00121 
00122   void
00123   timestamp_parser (::xml_schema::date_time_pskel&);
00124 
00125   void
00126   changeset_parser (::xml_schema::int_pskel&);
00127 
00128   void
00129   version_parser (::xml_schema::int_pskel&);
00130 
00131   void
00132   visible_parser (::xml_schema::boolean_pskel&);
00133 
00134   void
00135   parsers (::tag_pskel& /* tag */,
00136            ::nd_pskel& /* nd */,
00137            ::xml_schema::long_pskel& /* id */,
00138            ::xml_schema::long_pskel& /* uid */,
00139            ::xml_schema::string_pskel& /* user */,
00140            ::xml_schema::date_time_pskel& /* timestamp */,
00141            ::xml_schema::int_pskel& /* changeset */,
00142            ::xml_schema::int_pskel& /* version */,
00143            ::xml_schema::boolean_pskel& /* visible */);
00144 
00145   // Constructor.
00146   //
00147   way_pskel ();
00148 
00149   // Implementation.
00150   //
00151   protected:
00152   virtual bool
00153   _start_element_impl (const ::xml_schema::ro_string&,
00154                        const ::xml_schema::ro_string&,
00155                        const ::xml_schema::ro_string*);
00156 
00157   virtual bool
00158   _end_element_impl (const ::xml_schema::ro_string&,
00159                      const ::xml_schema::ro_string&);
00160 
00161   virtual bool
00162   _attribute_impl_phase_one (const ::xml_schema::ro_string&,
00163                              const ::xml_schema::ro_string&,
00164                              const ::xml_schema::ro_string&);
00165 
00166 
00167   protected:
00168   ::tag_pskel* tag_parser_;
00169   ::nd_pskel* nd_parser_;
00170   ::xml_schema::long_pskel* id_parser_;
00171   ::xml_schema::long_pskel* uid_parser_;
00172   ::xml_schema::string_pskel* user_parser_;
00173   ::xml_schema::date_time_pskel* timestamp_parser_;
00174   ::xml_schema::int_pskel* changeset_parser_;
00175   ::xml_schema::int_pskel* version_parser_;
00176   ::xml_schema::boolean_pskel* visible_parser_;
00177 
00178   protected:
00179   struct v_state_descr_
00180   {
00181     void (::way_pskel::*func) (
00182       unsigned long&,
00183       unsigned long&,
00184       const ::xml_schema::ro_string&,
00185       const ::xml_schema::ro_string&,
00186       const ::xml_schema::ro_string*,
00187       bool);
00188     unsigned long state;
00189     unsigned long count;
00190   };
00191 
00192   struct v_state_
00193   {
00194     v_state_descr_ data[2UL];
00195     unsigned long size;
00196   };
00197 
00198   v_state_ v_state_first_;
00199   ::xsd::cxx::parser::pod_stack v_state_stack_;
00200 
00201   virtual void
00202   _pre_e_validate ();
00203 
00204   virtual void
00205   _post_e_validate ();
00206 
00207   void
00208   choice_0 (unsigned long& state,
00209             unsigned long& count,
00210             const ::xml_schema::ro_string& ns,
00211             const ::xml_schema::ro_string& n,
00212             const ::xml_schema::ro_string* t,
00213             bool start);
00214 
00215   protected:
00216   struct v_state_attr_
00217   {
00218     bool id;
00219   };
00220 
00221   v_state_attr_ v_state_attr_first_;
00222   ::xsd::cxx::parser::pod_stack v_state_attr_stack_;
00223 
00224   virtual void
00225   _pre_a_validate ();
00226 
00227   virtual void
00228   _post_a_validate ();
00229 };
00230 
00231 #include <xsd/cxx/post.hxx>
00232 
00233 // Begin epilogue.
00234 //
00235 //
00236 // End epilogue.
00237 
00238 #endif // WAY_PSKEL_HXX
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines