From ff2760d063dccdbdd279f896ac3908473506f6d6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Apr 2010 09:06:46 +0200 Subject: Document th generation of default/fixed value accessors --- documentation/cxx/tree/manual/index.xhtml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'documentation/cxx/tree') 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: }; +

In addition, if a member has a default or fixed value, a static + accessor function is generated that returns this value. For + example:

+ +
+<complexType name="object">
+  <attribute name="data" type="string" default="test"/>
+</complexType>
+  
+ +

is mapped to:

+ +
+class object: xml_schema::type
+{
+public:
+  typedef xml_schema::string data_type;
+
+  const data_type&
+  data () const;
+
+  static const data_type&
+  data_default_value ();
+
+  ...
+
+};
+  
+

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 -- cgit v1.1