diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-04-02 12:22:38 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-04-02 12:22:38 +0200 |
commit | 8336dd4c16d4885989a6d8f0c83a4b401f5cb63b (patch) | |
tree | 26ca613e7f3a3fe9fb75bf5bb3b65503661e0ebf /xsde/cxx/hybrid/elements.hxx | |
parent | e4c22d3686da0e973e21eae0561c1169c0eeff36 (diff) |
Add support for attributes with default and fixed values.
tests/cxx/hybrid/default: new test
tests/cxx/hybrid/binary: update to test default and fixed values
Diffstat (limited to 'xsde/cxx/hybrid/elements.hxx')
-rw-r--r-- | xsde/cxx/hybrid/elements.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/xsde/cxx/hybrid/elements.hxx b/xsde/cxx/hybrid/elements.hxx index 8452976..9faeb8d 100644 --- a/xsde/cxx/hybrid/elements.hxx +++ b/xsde/cxx/hybrid/elements.hxx @@ -161,6 +161,18 @@ namespace CXX } static String const& + edefault (SemanticGraph::Attribute& a) + { + return a.context ().get<String> ("default"); + } + + static String const& + edefault_value (SemanticGraph::Attribute& a) + { + return a.context ().get<String> ("default-value"); + } + + static String const& epresent_member (SemanticGraph::Particle& p) { return p.context ().get<String> ("present-member"); @@ -922,6 +934,7 @@ namespace CXX ret, arg, var, + var_value, seq }; @@ -1368,6 +1381,11 @@ namespace CXX break; } + case var_value: + { + os << fq; + break; + } case seq: { os << (fixed_length (t) ? fix_seq : var_seq) << "< " << @@ -1437,6 +1455,7 @@ namespace CXX break; } case var: + case var_value: { if (stl) os << "::std::string"; |