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