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/parser-inline.cxx | |
parent | 9553149aa6b6561c49981adf2848607a43765054 (diff) |
Finish {min,max}{Exclusive,Inclusive} facets support
New test: hybrid/facets.
Diffstat (limited to 'xsde/cxx/parser/parser-inline.cxx')
-rw-r--r-- | xsde/cxx/parser/parser-inline.cxx | 34 |
1 files changed, 26 insertions, 8 deletions
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);"; } } } |