aboutsummaryrefslogtreecommitdiff
path: root/libxsde/xsde/cxx/serializer
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-10-12 11:26:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-10-12 11:26:08 +0200
commit51231f66aee0bbbd14d361d9e8e0009e99d57974 (patch)
tree00bf887154f994e6156108c4e79b747007af8efa /libxsde/xsde/cxx/serializer
parent9553149aa6b6561c49981adf2848607a43765054 (diff)
Finish {min,max}{Exclusive,Inclusive} facets support
New test: hybrid/facets.
Diffstat (limited to 'libxsde/xsde/cxx/serializer')
-rw-r--r--libxsde/xsde/cxx/serializer/validating/byte.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/decimal.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/double.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/float.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/int.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/integer.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/long-long.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/long.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/negative-integer.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/non-negative-integer.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/non-positive-integer.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/positive-integer.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/unsigned-long-long.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/unsigned-long.cxx18
-rw-r--r--libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.hxx393
-rw-r--r--libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.ixx457
16 files changed, 1063 insertions, 39 deletions
diff --git a/libxsde/xsde/cxx/serializer/validating/byte.cxx b/libxsde/xsde/cxx/serializer/validating/byte.cxx
index 2b672b5..d3884d3 100644
--- a/libxsde/xsde/cxx/serializer/validating/byte.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/byte.cxx
@@ -24,6 +24,24 @@ namespace xsde
void byte_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-128") + 1 characters to hold all
// representations of signed byte.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/decimal.cxx b/libxsde/xsde/cxx/serializer/validating/decimal.cxx
index f7fddae..70c645b 100644
--- a/libxsde/xsde/cxx/serializer/validating/decimal.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/decimal.cxx
@@ -24,6 +24,24 @@ namespace xsde
void decimal_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// Assume double values cannot be longer than 127 characters.
//
char str[128];
diff --git a/libxsde/xsde/cxx/serializer/validating/double.cxx b/libxsde/xsde/cxx/serializer/validating/double.cxx
index 7ec2ae6..0d1ab54 100644
--- a/libxsde/xsde/cxx/serializer/validating/double.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/double.cxx
@@ -24,6 +24,24 @@ namespace xsde
void double_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// Assume double values cannot be longer than 127 characters.
//
char str[128];
diff --git a/libxsde/xsde/cxx/serializer/validating/float.cxx b/libxsde/xsde/cxx/serializer/validating/float.cxx
index f224a25..f31b248 100644
--- a/libxsde/xsde/cxx/serializer/validating/float.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/float.cxx
@@ -24,6 +24,24 @@ namespace xsde
void float_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// Assume float values cannot be longer than 127 characters.
//
char str[128];
diff --git a/libxsde/xsde/cxx/serializer/validating/int.cxx b/libxsde/xsde/cxx/serializer/validating/int.cxx
index a97b926..4ae17b3 100644
--- a/libxsde/xsde/cxx/serializer/validating/int.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/int.cxx
@@ -24,6 +24,24 @@ namespace xsde
void int_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-2147483649") + 1 characters to hold all
// representations of int.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/integer.cxx b/libxsde/xsde/cxx/serializer/validating/integer.cxx
index ebcba69..5e26dbd 100644
--- a/libxsde/xsde/cxx/serializer/validating/integer.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/integer.cxx
@@ -24,6 +24,24 @@ namespace xsde
void integer_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-9223372036854775808") + 1 characters to
// hold all representations of (possibly 64-bit) long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/long-long.cxx b/libxsde/xsde/cxx/serializer/validating/long-long.cxx
index 8464ac3..25cbf53 100644
--- a/libxsde/xsde/cxx/serializer/validating/long-long.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/long-long.cxx
@@ -24,6 +24,24 @@ namespace xsde
void long_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-9223372036854775808") + 1 characters to
// hold all representations of long long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/long.cxx b/libxsde/xsde/cxx/serializer/validating/long.cxx
index 19c7ee4..43a8733 100644
--- a/libxsde/xsde/cxx/serializer/validating/long.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/long.cxx
@@ -24,6 +24,24 @@ namespace xsde
void long_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-9223372036854775808") + 1 characters to
// hold all representations of (possibly 64-bit) long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/negative-integer.cxx b/libxsde/xsde/cxx/serializer/validating/negative-integer.cxx
index adc9ead..bdbc948 100644
--- a/libxsde/xsde/cxx/serializer/validating/negative-integer.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/negative-integer.cxx
@@ -30,6 +30,24 @@ namespace xsde
return;
}
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-9223372036854775808") + 1 characters to
// hold all representations of (possibly 64-bit) long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/non-negative-integer.cxx b/libxsde/xsde/cxx/serializer/validating/non-negative-integer.cxx
index 53e46ea..8bf7fe7 100644
--- a/libxsde/xsde/cxx/serializer/validating/non-negative-integer.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/non-negative-integer.cxx
@@ -24,6 +24,24 @@ namespace xsde
void non_negative_integer_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("18446744073709551615") + 1 characters to
// hold all representations of (possibly 64-bit) unsigned long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/non-positive-integer.cxx b/libxsde/xsde/cxx/serializer/validating/non-positive-integer.cxx
index f0d8d55..46c7bcd 100644
--- a/libxsde/xsde/cxx/serializer/validating/non-positive-integer.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/non-positive-integer.cxx
@@ -30,6 +30,24 @@ namespace xsde
return;
}
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("-9223372036854775808") + 1 characters to
// hold all representations of (possibly 64-bit) long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/positive-integer.cxx b/libxsde/xsde/cxx/serializer/validating/positive-integer.cxx
index d35ab15..e7ec2ff 100644
--- a/libxsde/xsde/cxx/serializer/validating/positive-integer.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/positive-integer.cxx
@@ -30,6 +30,24 @@ namespace xsde
return;
}
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("18446744073709551615") + 1 characters to
// hold all representations of (possibly 64-bit) unsigned long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/unsigned-long-long.cxx b/libxsde/xsde/cxx/serializer/validating/unsigned-long-long.cxx
index f417e11..b48e205 100644
--- a/libxsde/xsde/cxx/serializer/validating/unsigned-long-long.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/unsigned-long-long.cxx
@@ -24,6 +24,24 @@ namespace xsde
void unsigned_long_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("18446744073709551615") + 1 characters to
// hold all representations of unsigned long long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/unsigned-long.cxx b/libxsde/xsde/cxx/serializer/validating/unsigned-long.cxx
index 903efa1..52dc5c8 100644
--- a/libxsde/xsde/cxx/serializer/validating/unsigned-long.cxx
+++ b/libxsde/xsde/cxx/serializer/validating/unsigned-long.cxx
@@ -24,6 +24,24 @@ namespace xsde
void unsigned_long_simpl::
_serialize_content ()
{
+ // Check facets.
+ //
+ const facets& f = _facets ();
+
+ if (f.min_set_ &&
+ (value_ < f.min_ || (!f.min_inc_ && value_ == f.min_)))
+ {
+ _schema_error (schema_error::value_less_than_min);
+ return;
+ }
+
+ if (f.max_set_ &&
+ (value_ > f.max_ || (!f.max_inc_ && value_ == f.max_)))
+ {
+ _schema_error (schema_error::value_greater_than_max);
+ return;
+ }
+
// We only need strlen("18446744073709551615") + 1 characters to
// hold all representations of (possibly 64-bit) unsigned long.
//
diff --git a/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.hxx b/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.hxx
index b93012d..c8e7466 100644
--- a/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.hxx
+++ b/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.hxx
@@ -130,14 +130,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ byte_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- byte_sskel ();
byte_sskel (byte_sskel* impl, void*);
protected:
byte_sskel* byte_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (signed char, bool inclusive);
+
+ void
+ _min_facet (signed char, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ signed char min_;
+ signed char max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct unsigned_byte_sskel: simple_content
@@ -152,7 +178,6 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
-
unsigned_byte_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
@@ -306,14 +331,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ int_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- int_sskel ();
int_sskel (int_sskel* impl, void*);
protected:
int_sskel* int_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (int, bool inclusive);
+
+ void
+ _min_facet (int, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ int min_;
+ int max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct unsigned_int_sskel: simple_content
@@ -381,14 +432,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ long_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- long_sskel ();
long_sskel (long_sskel* impl, void*);
protected:
long_sskel* long_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (long long, bool inclusive);
+
+ void
+ _min_facet (long long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ long long min_;
+ long long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct unsigned_long_sskel: simple_content
@@ -403,14 +480,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ unsigned_long_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- unsigned_long_sskel ();
unsigned_long_sskel (unsigned_long_sskel* impl, void*);
protected:
unsigned_long_sskel* unsigned_long_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (unsigned long long, bool inclusive);
+
+ void
+ _min_facet (unsigned long long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ unsigned long long min_;
+ unsigned long long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
#else
struct long_sskel: simple_content
@@ -425,14 +528,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ long_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- long_sskel ();
long_sskel (long_sskel* impl, void*);
protected:
long_sskel* long_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (long, bool inclusive);
+
+ void
+ _min_facet (long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ long min_;
+ long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct unsigned_long_sskel: simple_content
@@ -447,14 +576,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ unsigned_long_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- unsigned_long_sskel ();
unsigned_long_sskel (unsigned_long_sskel* impl, void*);
protected:
unsigned_long_sskel* unsigned_long_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (unsigned long, bool inclusive);
+
+ void
+ _min_facet (unsigned long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ unsigned long min_;
+ unsigned long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
#endif
@@ -473,14 +628,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ integer_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- integer_sskel ();
integer_sskel (integer_sskel* impl, void*);
protected:
integer_sskel* integer_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (long, bool inclusive);
+
+ void
+ _min_facet (long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ long min_;
+ long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct negative_integer_sskel: simple_content
@@ -495,14 +676,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ negative_integer_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- negative_integer_sskel ();
negative_integer_sskel (negative_integer_sskel* impl, void*);
protected:
negative_integer_sskel* negative_integer_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (long, bool inclusive);
+
+ void
+ _min_facet (long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ long min_;
+ long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct non_positive_integer_sskel: simple_content
@@ -517,14 +724,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ non_positive_integer_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- non_positive_integer_sskel ();
non_positive_integer_sskel (non_positive_integer_sskel* impl, void*);
protected:
non_positive_integer_sskel* non_positive_integer_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (long, bool inclusive);
+
+ void
+ _min_facet (long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ long min_;
+ long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct positive_integer_sskel: simple_content
@@ -539,14 +772,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ positive_integer_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- positive_integer_sskel ();
positive_integer_sskel (positive_integer_sskel* impl, void*);
protected:
positive_integer_sskel* positive_integer_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (unsigned long, bool inclusive);
+
+ void
+ _min_facet (unsigned long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ unsigned long min_;
+ unsigned long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct non_negative_integer_sskel: simple_content
@@ -561,14 +820,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ non_negative_integer_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- non_negative_integer_sskel ();
non_negative_integer_sskel (non_negative_integer_sskel* impl, void*);
protected:
non_negative_integer_sskel* non_negative_integer_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (unsigned long, bool inclusive);
+
+ void
+ _min_facet (unsigned long, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ unsigned long min_;
+ unsigned long max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
// Floats.
@@ -586,14 +871,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ float_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- float_sskel ();
float_sskel (float_sskel* impl, void*);
protected:
float_sskel* float_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (float, bool inclusive);
+
+ void
+ _min_facet (float, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ float min_;
+ float max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct double_sskel: simple_content
@@ -608,14 +919,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ double_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- double_sskel ();
double_sskel (double_sskel* impl, void*);
protected:
double_sskel* double_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (double, bool inclusive);
+
+ void
+ _min_facet (double, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ double min_;
+ double max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
struct decimal_sskel: simple_content
@@ -630,14 +967,40 @@ namespace xsde
virtual const char*
_dynamic_type () const;
#endif
+ decimal_sskel ();
#ifdef XSDE_REUSE_STYLE_TIEIN
- decimal_sskel ();
decimal_sskel (decimal_sskel* impl, void*);
protected:
decimal_sskel* decimal_impl_;
#endif
+ // Facets.
+ //
+ public:
+ void
+ _max_facet (double, bool inclusive);
+
+ void
+ _min_facet (double, bool inclusive);
+
+ protected:
+ struct facets
+ {
+ double min_;
+ double max_;
+
+ unsigned int min_set_ : 1;
+ unsigned int min_inc_ : 1;
+ unsigned int max_set_ : 1;
+ unsigned int max_inc_ : 1;
+ };
+
+ const facets&
+ _facets () const;
+
+ private:
+ facets facets_;
};
//
diff --git a/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.ixx b/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.ixx
index 35ce5d9..f7b0351 100644
--- a/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.ixx
+++ b/libxsde/xsde/cxx/serializer/validating/xml-schema-sskel.ixx
@@ -61,19 +61,51 @@ namespace xsde
// byte_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline byte_sskel::
byte_sskel ()
- : byte_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ byte_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline byte_sskel::
byte_sskel (byte_sskel* impl, void*)
: simple_content (impl, 0), byte_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
+ }
+#endif
+ inline void byte_sskel::
+ _max_facet (signed char v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
}
+
+ inline void byte_sskel::
+ _min_facet (signed char v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const byte_sskel::facets& byte_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const byte_sskel&> (*parent_).facets_;
+ else
#endif
+ return facets_;
+ }
// unsigned_byte_sskel
//
@@ -224,19 +256,51 @@ namespace xsde
// int_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline int_sskel::
int_sskel ()
- : int_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ int_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline int_sskel::
int_sskel (int_sskel* impl, void*)
: simple_content (impl, 0), int_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void int_sskel::
+ _max_facet (int v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void int_sskel::
+ _min_facet (int v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const int_sskel::facets& int_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const int_sskel&> (*parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// unsigned_int_sskel
//
@@ -289,163 +353,508 @@ namespace xsde
// long_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline long_sskel::
long_sskel ()
- : long_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ long_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline long_sskel::
long_sskel (long_sskel* impl, void*)
: simple_content (impl, 0), long_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void long_sskel::
+#ifdef XSDE_LONGLONG
+ _max_facet (long long v, bool inc)
+#else
+ _max_facet (long v, bool inc)
+#endif
+
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void long_sskel::
+#ifdef XSDE_LONGLONG
+ _min_facet (long long v, bool inc)
+#else
+ _min_facet (long v, bool inc)
+#endif
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const long_sskel::facets& long_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const long_sskel&> (*parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
+
// unsigned_long_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline unsigned_long_sskel::
unsigned_long_sskel ()
- : unsigned_long_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ unsigned_long_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline unsigned_long_sskel::
unsigned_long_sskel (unsigned_long_sskel* impl, void*)
: simple_content (impl, 0), unsigned_long_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
+ }
+#endif
+
+ inline void unsigned_long_sskel::
+#ifdef XSDE_LONGLONG
+ _max_facet (unsigned long long v, bool inc)
+#else
+ _max_facet (unsigned long v, bool inc)
+#endif
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void unsigned_long_sskel::
+#ifdef XSDE_LONGLONG
+ _min_facet (unsigned long long v, bool inc)
+#else
+ _min_facet (unsigned long v, bool inc)
+#endif
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
}
+
+ inline const unsigned_long_sskel::facets& unsigned_long_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const unsigned_long_sskel&> (*parent_).facets_;
+ else
#endif
+ return facets_;
+ }
// integer_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline integer_sskel::
integer_sskel ()
- : integer_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ integer_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline integer_sskel::
integer_sskel (integer_sskel* impl, void*)
: simple_content (impl, 0), integer_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void integer_sskel::
+ _max_facet (long v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void integer_sskel::
+ _min_facet (long v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const integer_sskel::facets& integer_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const integer_sskel&> (*parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// negative_integer_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline negative_integer_sskel::
negative_integer_sskel ()
- : negative_integer_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ negative_integer_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline negative_integer_sskel::
negative_integer_sskel (negative_integer_sskel* impl, void*)
: simple_content (impl, 0), negative_integer_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void negative_integer_sskel::
+ _max_facet (long v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void negative_integer_sskel::
+ _min_facet (long v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const negative_integer_sskel::facets& negative_integer_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const negative_integer_sskel&> (
+ *parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// non_positive_integer_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline non_positive_integer_sskel::
non_positive_integer_sskel ()
- : non_positive_integer_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ non_positive_integer_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline non_positive_integer_sskel::
non_positive_integer_sskel (non_positive_integer_sskel* impl, void*)
: simple_content (impl, 0), non_positive_integer_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
+ }
+#endif
+ inline void non_positive_integer_sskel::
+ _max_facet (long v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void non_positive_integer_sskel::
+ _min_facet (long v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
}
+
+ inline const non_positive_integer_sskel::facets&
+ non_positive_integer_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const non_positive_integer_sskel&> (
+ *parent_).facets_;
+ else
#endif
+ return facets_;
+ }
// positive_integer_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline positive_integer_sskel::
positive_integer_sskel ()
- : positive_integer_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ positive_integer_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline positive_integer_sskel::
positive_integer_sskel (positive_integer_sskel* impl, void*)
: simple_content (impl, 0), positive_integer_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void positive_integer_sskel::
+ _max_facet (unsigned long v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void positive_integer_sskel::
+ _min_facet (unsigned long v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const positive_integer_sskel::facets& positive_integer_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const positive_integer_sskel&> (
+ *parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// non_negative_integer_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline non_negative_integer_sskel::
non_negative_integer_sskel ()
- : non_negative_integer_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ non_negative_integer_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline non_negative_integer_sskel::
non_negative_integer_sskel (non_negative_integer_sskel* impl, void*)
: simple_content (impl, 0), non_negative_integer_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void non_negative_integer_sskel::
+ _max_facet (unsigned long v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void non_negative_integer_sskel::
+ _min_facet (unsigned long v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const non_negative_integer_sskel::facets&
+ non_negative_integer_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const non_negative_integer_sskel&> (
+ *parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// float_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline float_sskel::
float_sskel ()
- : float_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ float_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline float_sskel::
float_sskel (float_sskel* impl, void*)
: simple_content (impl, 0), float_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void float_sskel::
+ _max_facet (float v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void float_sskel::
+ _min_facet (float v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const float_sskel::facets& float_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const float_sskel&> (*parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// double_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline double_sskel::
double_sskel ()
- : double_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ double_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline double_sskel::
double_sskel (double_sskel* impl, void*)
: simple_content (impl, 0), double_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
+ }
+#endif
+ inline void double_sskel::
+ _max_facet (double v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void double_sskel::
+ _min_facet (double v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
}
+
+ inline const double_sskel::facets& double_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const double_sskel&> (*parent_).facets_;
+ else
#endif
+ return facets_;
+ }
// decimal_sskel
//
-#ifdef XSDE_REUSE_STYLE_TIEIN
inline decimal_sskel::
decimal_sskel ()
- : decimal_impl_ (0)
{
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ decimal_impl_ = 0;
+#endif
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
+#ifdef XSDE_REUSE_STYLE_TIEIN
inline decimal_sskel::
decimal_sskel (decimal_sskel* impl, void*)
: simple_content (impl, 0), decimal_impl_ (impl)
{
+ facets_.min_set_ = 0;
+ facets_.max_set_ = 0;
}
#endif
+ inline void decimal_sskel::
+ _max_facet (double v, bool inc)
+ {
+ facets_.max_ = v;
+ facets_.max_set_ = 1;
+ facets_.max_inc_ = inc;
+ }
+
+ inline void decimal_sskel::
+ _min_facet (double v, bool inc)
+ {
+ facets_.min_ = v;
+ facets_.min_set_ = 1;
+ facets_.min_inc_ = inc;
+ }
+
+ inline const decimal_sskel::facets& decimal_sskel::
+ _facets () const
+ {
+#ifdef XSDE_REUSE_STYLE_TIEIN
+ if (parent_ != 0)
+ return static_cast<const decimal_sskel&> (*parent_).facets_;
+ else
+#endif
+ return facets_;
+ }
// string_facets
//