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/parser | |
parent | 9553149aa6b6561c49981adf2848607a43765054 (diff) |
Finish {min,max}{Exclusive,Inclusive} facets support
New test: hybrid/facets.
Diffstat (limited to 'xsde/cxx/parser')
-rw-r--r-- | xsde/cxx/parser/elements.cxx | 21 | ||||
-rw-r--r-- | xsde/cxx/parser/name-processor.cxx | 1 | ||||
-rw-r--r-- | xsde/cxx/parser/parser-inline.cxx | 34 |
3 files changed, 44 insertions, 12 deletions
diff --git a/xsde/cxx/parser/elements.cxx b/xsde/cxx/parser/elements.cxx index 25e2032..b5d0d57 100644 --- a/xsde/cxx/parser/elements.cxx +++ b/xsde/cxx/parser/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_parser (xml_parser_), @@ -223,10 +224,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/parser/name-processor.cxx b/xsde/cxx/parser/name-processor.cxx index 42b2863..ccbfa66 100644 --- a/xsde/cxx/parser/name-processor.cxx +++ b/xsde/cxx/parser/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/parser/parser-inline.cxx b/xsde/cxx/parser/parser-inline.cxx index d20a3e7..5ebf014 100644 --- a/xsde/cxx/parser/parser-inline.cxx +++ b/xsde/cxx/parser/parser-inline.cxx @@ -67,11 +67,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) { @@ -80,19 +94,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);"; } } } |