summaryrefslogtreecommitdiff
path: root/documentation/cxx/tree/manual/index.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/cxx/tree/manual/index.xhtml')
-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