Document property syntax, based on patch by Phil Housley
authorJürg Billeter <j@bitron.ch>
Tue, 3 Jun 2008 19:35:40 +0000 (19:35 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 3 Jun 2008 19:35:40 +0000 (19:35 +0000)
2008-06-03  Jürg Billeter  <j@bitron.ch>

* doc/vala/classes.xml:

Document property syntax, based on patch by Phil Housley

svn path=/trunk/; revision=1553

ChangeLog
doc/vala/classes.xml

index 91befdb..1524729 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-06-03  Jürg Billeter  <j@bitron.ch>
 
+       * doc/vala/classes.xml:
+
+       Document property syntax, based on patch by Phil Housley
+
+2008-06-03  Jürg Billeter  <j@bitron.ch>
+
        * doc/vala/enums.xml:
 
        Document enum syntax, based on patch by Phil Housley
index 85feab5..a57ebe8 100644 (file)
@@ -16,7 +16,7 @@ class ClassName : BaseClassName {
 }</blockcode>
                <div role="note">
                        <h>GObject Note</h>
-                       <p>It's recommended that you derive all your classes directly or indirectly from GLib.Object, unless you have a strong reason not to. Some class features are not supported for classes not deriving from GLib.Object. If your class does not derive from GLib.Object, it will map to a struct in C code.</p>
+                       <p>It's recommended that you derive all your classes directly or indirectly from GLib.Object, unless you have a strong reason not to. Some class features are not supported for classes not deriving from GLib.Object.</p>
                </div>
                <p>Classes cannot have multiple base classes, however they may implement multiple interfaces:</p>
                <blockcode>
@@ -54,7 +54,25 @@ class NamespaceName.ClassName {
        </section>
        <section id="properties">
                <h>Properties</h>
-               <p>Documentation</p>
+               <blockquote>
+property-declaration:
+       [ access-modifier ] [ member-modifiers ] type identifier <l>{</l> accessor-declarations [ default-value ] <l>}</l> <l>;</l>
+
+accessor-declarations:
+       get-accessor [ set-accessor ]
+       set-accessor [ get-accessor ]
+
+get-accessor:
+       [ access-modifier ] <l>get</l> <l>;</l>
+       [ access-modifier ] <l>get</l> <l>{</l> statement-list <l>}</l>
+
+set-accessor:
+       [ access-modifier ] <l>set</l> [ <l>construct</l> ] <l>;</l>
+       [ access-modifier ] <l>set</l> [ <l>construct</l> ] <l>{</l> statement-list <l>}</l>
+
+default-value:
+       <l>default =</l> expression <l>;</l>
+               </blockquote>
        </section>
        <section id="signals">
                <h>Signals</h>