aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-04-16 09:06:46 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-04-16 09:06:46 +0200
commitff2760d063dccdbdd279f896ac3908473506f6d6 (patch)
tree1194f7591d5b04417a3f89323388909d9e09f17c
parentb6e1860c85a2b880c4bd7c604f923120c93a7d49 (diff)
Document th generation of default/fixed value accessors
-rw-r--r--documentation/cxx/tree/manual/index.xhtml29
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">
+&lt;complexType name="object">
+ &lt;attribute name="data" type="string" default="test"/>
+&lt;/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&amp;
+ data () const;
+
+ static const data_type&amp;
+ 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