diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-12 11:26:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-12 11:26:08 +0200 |
commit | 51231f66aee0bbbd14d361d9e8e0009e99d57974 (patch) | |
tree | 00bf887154f994e6156108c4e79b747007af8efa /xsde/cxx/serializer | |
parent | 9553149aa6b6561c49981adf2848607a43765054 (diff) |
Finish {min,max}{Exclusive,Inclusive} facets support
New test: hybrid/facets.
Diffstat (limited to 'xsde/cxx/serializer')
-rw-r--r-- | xsde/cxx/serializer/elements.cxx | 21 | ||||
-rw-r--r-- | xsde/cxx/serializer/name-processor.cxx | 1 | ||||
-rw-r--r-- | xsde/cxx/serializer/serializer-inline.cxx | 34 |
3 files changed, 44 insertions, 12 deletions
diff --git a/xsde/cxx/serializer/elements.cxx b/xsde/cxx/serializer/elements.cxx index e598f8f..eb03361 100644 --- a/xsde/cxx/serializer/elements.cxx +++ b/xsde/cxx/serializer/elements.cxx @@ -33,6 +33,7 @@ namespace CXX ops.value<CLI::include_regex_trace> (), ops.value<CLI::generate_inline> (), ops.value<CLI::custom_allocator> (), + !ops.value<CLI::no_long_long> (), ops.value<CLI::reserved_name> ()), options (ops), xml_serializer (xml_serializer_), @@ -240,10 +241,22 @@ namespace CXX } } - if (ub.is_a<SemanticGraph::Fundamental::Short> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedByte> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedShort> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedInt> ()) + if (ub.is_a<SemanticGraph::Fundamental::Byte> () || + ub.is_a<SemanticGraph::Fundamental::Short> () || + ub.is_a<SemanticGraph::Fundamental::Int> () || + ub.is_a<SemanticGraph::Fundamental::Long> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedByte> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedShort> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedInt> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedLong> () || + ub.is_a<SemanticGraph::Fundamental::Integer> () || + ub.is_a<SemanticGraph::Fundamental::NonPositiveInteger> () || + ub.is_a<SemanticGraph::Fundamental::NonNegativeInteger> () || + ub.is_a<SemanticGraph::Fundamental::PositiveInteger> () || + ub.is_a<SemanticGraph::Fundamental::NegativeInteger> () || + ub.is_a<SemanticGraph::Fundamental::Float> () || + ub.is_a<SemanticGraph::Fundamental::Double> () || + ub.is_a<SemanticGraph::Fundamental::Decimal> ()) { if (validation) { diff --git a/xsde/cxx/serializer/name-processor.cxx b/xsde/cxx/serializer/name-processor.cxx index f7f63a2..e64d149 100644 --- a/xsde/cxx/serializer/name-processor.cxx +++ b/xsde/cxx/serializer/name-processor.cxx @@ -46,6 +46,7 @@ namespace CXX ops.value<CLI::include_regex_trace> (), ops.value<CLI::generate_inline> (), ops.value<CLI::custom_allocator> (), + !ops.value<CLI::no_long_long> (), ops.value<CLI::reserved_name> ()), skel_suffix_ (ops.value<CLI::skel_type_suffix> ()), impl_suffix_ (ops.value<CLI::impl_type_suffix> ()), diff --git a/xsde/cxx/serializer/serializer-inline.cxx b/xsde/cxx/serializer/serializer-inline.cxx index 4bebc9c..998f0f1 100644 --- a/xsde/cxx/serializer/serializer-inline.cxx +++ b/xsde/cxx/serializer/serializer-inline.cxx @@ -52,11 +52,25 @@ namespace CXX } } - if (ub.is_a<SemanticGraph::Fundamental::Short> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedByte> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedShort> () || - ub.is_a<SemanticGraph::Fundamental::UnsignedInt> ()) + if (ub.is_a<SemanticGraph::Fundamental::Byte> () || + ub.is_a<SemanticGraph::Fundamental::Short> () || + ub.is_a<SemanticGraph::Fundamental::Int> () || + ub.is_a<SemanticGraph::Fundamental::Long> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedByte> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedShort> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedInt> () || + ub.is_a<SemanticGraph::Fundamental::UnsignedLong> () || + ub.is_a<SemanticGraph::Fundamental::Integer> () || + ub.is_a<SemanticGraph::Fundamental::NonPositiveInteger> () || + ub.is_a<SemanticGraph::Fundamental::NonNegativeInteger> () || + ub.is_a<SemanticGraph::Fundamental::PositiveInteger> () || + ub.is_a<SemanticGraph::Fundamental::NegativeInteger> () || + ub.is_a<SemanticGraph::Fundamental::Float> () || + ub.is_a<SemanticGraph::Fundamental::Double> () || + ub.is_a<SemanticGraph::Fundamental::Decimal> ()) { + LiteralValue lv (ctx, false); + for (Restricts::FacetIterator i (r.facet_begin ()); i != r.facet_end (); ++i) { @@ -65,19 +79,23 @@ namespace CXX if (i->first == L"minInclusive") { - os << "this->_min_facet (" << i->second << ", true);"; + os << "this->_min_facet (" << lv.dispatch (ub, i->second) << + ", true);"; } else if (i->first == L"minExclusive") { - os << "this->_min_facet (" << i->second << ", false);"; + os << "this->_min_facet (" << lv.dispatch (ub, i->second) << + ", false);"; } else if (i->first == L"maxInclusive") { - os << "this->_max_facet (" << i->second << ", true);"; + os << "this->_max_facet (" << lv.dispatch (ub, i->second) << + ", true);"; } else if (i->first == L"maxExclusive") { - os << "this->_max_facet (" << i->second << ", false);"; + os << "this->_max_facet (" << lv.dispatch (ub, i->second) << + ", false);"; } } } |