Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef NODE_PSKEL_HXX
00035 #define NODE_PSKEL_HXX
00036
00037
00038
00039
00040
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
00051
00052 class node_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 node_pskel: public ::xml_schema::complex_content
00067 {
00068 public:
00069
00070
00071
00072
00073
00074 virtual void
00075 tag (const std::pair<std::string, std::string>&);
00076
00077 virtual void
00078 id (long long);
00079
00080 virtual void
00081 uid (long long);
00082
00083 virtual void
00084 user (const ::std::string&);
00085
00086 virtual void
00087 timestamp (const ::xml_schema::date_time&);
00088
00089 virtual void
00090 changeset (int);
00091
00092 virtual void
00093 version (int);
00094
00095 virtual void
00096 visible (bool);
00097
00098 virtual void
00099 lat (double);
00100
00101 virtual void
00102 lon (double);
00103
00104 virtual void
00105 action (const ::std::string&);
00106
00107 virtual osm::Node
00108 post_node () = 0;
00109
00110
00111
00112 void
00113 tag_parser (::tag_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 lat_parser (::xml_schema::decimal_pskel&);
00138
00139 void
00140 lon_parser (::xml_schema::decimal_pskel&);
00141
00142 void
00143 action_parser (::xml_schema::string_pskel&);
00144
00145 void
00146 parsers (::tag_pskel& ,
00147 ::xml_schema::long_pskel& ,
00148 ::xml_schema::long_pskel& ,
00149 ::xml_schema::string_pskel& ,
00150 ::xml_schema::date_time_pskel& ,
00151 ::xml_schema::int_pskel& ,
00152 ::xml_schema::int_pskel& ,
00153 ::xml_schema::boolean_pskel& ,
00154 ::xml_schema::decimal_pskel& ,
00155 ::xml_schema::decimal_pskel& ,
00156 ::xml_schema::string_pskel& );
00157
00158
00159
00160 node_pskel ();
00161
00162
00163
00164 protected:
00165 virtual bool
00166 _start_element_impl (const ::xml_schema::ro_string&,
00167 const ::xml_schema::ro_string&,
00168 const ::xml_schema::ro_string*);
00169
00170 virtual bool
00171 _end_element_impl (const ::xml_schema::ro_string&,
00172 const ::xml_schema::ro_string&);
00173
00174 virtual bool
00175 _attribute_impl_phase_one (const ::xml_schema::ro_string&,
00176 const ::xml_schema::ro_string&,
00177 const ::xml_schema::ro_string&);
00178
00179
00180 protected:
00181 ::tag_pskel* tag_parser_;
00182 ::xml_schema::long_pskel* id_parser_;
00183 ::xml_schema::long_pskel* uid_parser_;
00184 ::xml_schema::string_pskel* user_parser_;
00185 ::xml_schema::date_time_pskel* timestamp_parser_;
00186 ::xml_schema::int_pskel* changeset_parser_;
00187 ::xml_schema::int_pskel* version_parser_;
00188 ::xml_schema::boolean_pskel* visible_parser_;
00189 ::xml_schema::decimal_pskel* lat_parser_;
00190 ::xml_schema::decimal_pskel* lon_parser_;
00191 ::xml_schema::string_pskel* action_parser_;
00192
00193 protected:
00194 struct v_state_descr_
00195 {
00196 void (::node_pskel::*func) (
00197 unsigned long&,
00198 unsigned long&,
00199 const ::xml_schema::ro_string&,
00200 const ::xml_schema::ro_string&,
00201 const ::xml_schema::ro_string*,
00202 bool);
00203 unsigned long state;
00204 unsigned long count;
00205 };
00206
00207 struct v_state_
00208 {
00209 v_state_descr_ data[2UL];
00210 unsigned long size;
00211 };
00212
00213 v_state_ v_state_first_;
00214 ::xsd::cxx::parser::pod_stack v_state_stack_;
00215
00216 virtual void
00217 _pre_e_validate ();
00218
00219 virtual void
00220 _post_e_validate ();
00221
00222 void
00223 sequence_0 (unsigned long& state,
00224 unsigned long& count,
00225 const ::xml_schema::ro_string& ns,
00226 const ::xml_schema::ro_string& n,
00227 const ::xml_schema::ro_string* t,
00228 bool start);
00229
00230 protected:
00231 struct v_state_attr_
00232 {
00233 bool id;
00234 bool lat;
00235 bool lon;
00236 };
00237
00238 v_state_attr_ v_state_attr_first_;
00239 ::xsd::cxx::parser::pod_stack v_state_attr_stack_;
00240
00241 virtual void
00242 _pre_a_validate ();
00243
00244 virtual void
00245 _post_a_validate ();
00246 };
00247
00248 #include <xsd/cxx/post.hxx>
00249
00250
00251
00252
00253
00254
00255 #endif // NODE_PSKEL_HXX