diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-16 09:06:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-04-16 09:06:46 +0200 |
commit | ff2760d063dccdbdd279f896ac3908473506f6d6 (patch) | |
tree | 1194f7591d5b04417a3f89323388909d9e09f17c /documentation | |
parent | b6e1860c85a2b880c4bd7c604f923120c93a7d49 (diff) |
Document th generation of default/fixed value accessors
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/cxx/tree/manual/index.xhtml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/documentation/cxx/tree/manual/index.xhtml b/documentation/cxx/tree/manual/index.xhtml index 695a72e..43762b4 100644 --- a/documentation/cxx/tree/manual/index.xhtml +++ b/documentation/cxx/tree/manual/index.xhtml @@ -2670,6 +2670,35 @@ public: }; </pre> + <p>In addition, if a member has a default or fixed value, a static + accessor function is generated that returns this value. For + example:</p> + +<pre class="xml"> +<complexType name="object"> + <attribute name="data" type="string" default="test"/> +</complexType> + </pre> + + <p>is mapped to:</p> + + <pre class="c++"> +class object: xml_schema::type +{ +public: + typedef xml_schema::string data_type; + + const data_type& + data () const; + + static const data_type& + data_default_value (); + + ... + +}; + </pre> + <p>Names and semantics of type definitions for the member as well as signatures of the accessor and modifier functions depend on the member's cardinality class and are described in the following |