// file : xsd/cxx/parser/validating/xml-schema-pimpl.hxx // copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #ifndef XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX #define XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX #include #include // XSD_AUTO_PTR #include namespace xsd { namespace cxx { namespace parser { namespace validating { // any_type // template struct any_type_pimpl: virtual any_type_pskel { virtual void post_any_type (); }; // any_simple_type // template struct any_simple_type_pimpl: virtual any_simple_type_pskel { virtual void post_any_simple_type (); }; // boolean // template struct boolean_pimpl: virtual boolean_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual bool post_boolean (); protected: std::basic_string str_; bool value_; }; // 8-bit // template struct byte_pimpl: virtual byte_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual signed char post_byte (); protected: std::basic_string str_; signed char value_; }; template struct unsigned_byte_pimpl: virtual unsigned_byte_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned char post_unsigned_byte (); protected: std::basic_string str_; unsigned char value_; }; // 16-bit // template struct short_pimpl: virtual short_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual short post_short (); protected: std::basic_string str_; short value_; }; template struct unsigned_short_pimpl: virtual unsigned_short_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned short post_unsigned_short (); protected: std::basic_string str_; unsigned short value_; }; // 32-bit // template struct int_pimpl: virtual int_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual int post_int (); protected: std::basic_string str_; int value_; }; template struct unsigned_int_pimpl: virtual unsigned_int_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned int post_unsigned_int (); protected: std::basic_string str_; unsigned int value_; }; // 64-bit // template struct long_pimpl: virtual long_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual long long post_long (); protected: std::basic_string str_; long long value_; }; template struct unsigned_long_pimpl: virtual unsigned_long_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned long long post_unsigned_long (); protected: std::basic_string str_; unsigned long long value_; }; // Arbitrary-length integers. // template struct integer_pimpl: virtual integer_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual long long post_integer (); protected: std::basic_string str_; long long value_; }; template struct negative_integer_pimpl: virtual negative_integer_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual long long post_negative_integer (); protected: std::basic_string str_; long long value_; }; template struct non_positive_integer_pimpl: virtual non_positive_integer_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual long long post_non_positive_integer (); protected: std::basic_string str_; long long value_; }; template struct positive_integer_pimpl: virtual positive_integer_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned long long post_positive_integer (); protected: std::basic_string str_; unsigned long long value_; }; template struct non_negative_integer_pimpl: virtual non_negative_integer_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual unsigned long long post_non_negative_integer (); protected: std::basic_string str_; unsigned long long value_; }; // Floats. // template struct float_pimpl: virtual float_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual float post_float (); protected: std::basic_string str_; float value_; }; template struct double_pimpl: virtual double_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual double post_double (); protected: std::basic_string str_; double value_; }; template struct decimal_pimpl: virtual decimal_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual double post_decimal (); protected: std::basic_string str_; double value_; }; // Strings. // template struct string_pimpl: virtual string_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual std::basic_string post_string (); protected: std::basic_string str_; }; template struct normalized_string_pimpl: virtual normalized_string_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual std::basic_string post_normalized_string (); protected: std::basic_string str_; }; template struct token_pimpl: virtual token_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual std::basic_string post_token (); protected: std::basic_string str_; }; template struct name_pimpl: virtual name_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_name (); protected: std::basic_string str_; }; template struct nmtoken_pimpl: virtual nmtoken_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_nmtoken (); protected: std::basic_string str_; }; template struct nmtokens_pimpl: virtual nmtokens_pskel { virtual void _pre (); virtual void _xsd_parse_item (const ro_string&); virtual void _post (); virtual string_sequence post_nmtokens (); protected: string_sequence seq_; nmtoken_pimpl parser_; }; template struct ncname_pimpl: virtual ncname_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_ncname (); protected: std::basic_string str_; }; template struct id_pimpl: virtual id_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_id (); protected: std::basic_string str_; }; template struct idref_pimpl: virtual idref_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_idref (); protected: std::basic_string str_; }; template struct idrefs_pimpl: virtual idrefs_pskel { virtual void _pre (); virtual void _xsd_parse_item (const ro_string&); virtual void _post (); virtual string_sequence post_idrefs (); protected: string_sequence seq_; idref_pimpl parser_; }; // language // template struct language_pimpl: virtual language_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual std::basic_string post_language (); protected: std::basic_string str_; }; // anyURI // template struct uri_pimpl: virtual uri_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual std::basic_string post_uri (); protected: std::basic_string str_; }; // QName // template struct qname_pimpl: virtual qname_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual qname post_qname (); protected: std::basic_string str_; std::basic_string name_; std::basic_string prefix_; }; // base64Binary // template struct base64_binary_pimpl: virtual base64_binary_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual XSD_AUTO_PTR post_base64_binary (); protected: std::basic_string str_; XSD_AUTO_PTR buf_; }; // hexBinary // template struct hex_binary_pimpl: virtual hex_binary_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual XSD_AUTO_PTR post_hex_binary (); protected: std::basic_string str_; XSD_AUTO_PTR buf_; }; // gday // template struct gday_pimpl: virtual gday_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual gday post_gday (); protected: std::basic_string str_; unsigned short day_; bool z_; short zh_, zm_; }; // gmonth // template struct gmonth_pimpl: virtual gmonth_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual gmonth post_gmonth (); protected: std::basic_string str_; unsigned short month_; bool z_; short zh_, zm_; }; // gyear // template struct gyear_pimpl: virtual gyear_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual gyear post_gyear (); protected: std::basic_string str_; int year_; bool z_; short zh_, zm_; }; // gmonth_day // template struct gmonth_day_pimpl: virtual gmonth_day_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual gmonth_day post_gmonth_day (); protected: std::basic_string str_; unsigned short month_; unsigned short day_; bool z_; short zh_, zm_; }; // gyear_month // template struct gyear_month_pimpl: virtual gyear_month_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual gyear_month post_gyear_month (); protected: std::basic_string str_; int year_; unsigned short month_; bool z_; short zh_, zm_; }; // date // template struct date_pimpl: virtual date_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual date post_date (); protected: std::basic_string str_; int year_; unsigned short month_; unsigned short day_; bool z_; short zh_, zm_; }; // time // template struct time_pimpl: virtual time_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual time post_time (); protected: std::basic_string str_; unsigned short hours_; unsigned short minutes_; double seconds_; bool z_; short zh_, zm_; }; // date_time // template struct date_time_pimpl: virtual date_time_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual date_time post_date_time (); protected: std::basic_string str_; int year_; unsigned short month_; unsigned short day_; unsigned short hours_; unsigned short minutes_; double seconds_; bool z_; short zh_, zm_; }; // duration // template struct duration_pimpl: virtual duration_pskel { virtual void _pre (); virtual void _characters (const ro_string&); virtual void _post (); virtual duration post_duration (); protected: std::basic_string str_; bool negative_; unsigned int years_; unsigned int months_; unsigned int days_; unsigned int hours_; unsigned int minutes_; double seconds_; }; // Literals. // namespace bits { template const C* boolean (); template const C* byte (); template const C* unsigned_byte (); template const C* short_ (); template const C* unsigned_short (); template const C* int_ (); template const C* unsigned_int (); template const C* long_ (); template const C* unsigned_long (); template const C* integer (); template const C* negative_integer (); template const C* non_positive_integer (); template const C* non_negative_integer (); template const C* positive_integer (); template const C* float_ (); template const C* double_ (); template const C* decimal (); template const C* name (); template const C* nmtoken (); template const C* nmtokens (); template const C* ncname (); template const C* id (); template const C* idref (); template const C* idrefs (); template const C* language (); template const C* qname (); template const C* base64_binary (); template const C* hex_binary (); template const C* gday (); template const C* gmonth (); template const C* gyear (); template const C* gmonth_day (); template const C* gyear_month (); template const C* date (); template const C* time (); template const C* date_time (); template const C* duration (); // float literals: INF -INF NaN // template const C* positive_inf (); template const C* negative_inf (); template const C* nan (); // boolean literals // template const C* true_ (); template const C* false_ (); template const C* one (); template const C* zero (); } } } } } #include #endif // XSD_CXX_PARSER_VALIDATING_XML_SCHEMA_PIMPL_HXX #include