girwriter: Don't use constructor tag with structs
[vala-lang.git] / doc / vala / structs.xml
blob378cdea314605603109844090530bc0c982bfe21
1 <?xml version="1.0"?>
2 <section id="structs">
3         <h>Structs</h>
4         <p>A struct is a data type that can contain fields, constants, and methods.</p>
5         <section id="declaration">
6                 <h>Struct declarations</h>
7                 <p>The simplest struct declaration looks like this:</p>
8                 <blockcode>
9 struct StructName {
10         &lt;struct-member&gt;
11 }</blockcode>
12                 <p>You may optionally specify an accessibility modifier. Structs support <code>public</code> and <code>private</code> accessibility and default to private if you don't specify one. Public structs may be accessed from outside the library or application they are defined in.</p>
13                 <blockcode>
14 public struct StructName {
15         &lt;struct-member&gt;
16 }</blockcode>
17                 <p>You may optionally prefix the struct name with a namespace name. This places the struct in the specified namespace without the need for a separate namespace declaration.</p>
18                 <blockcode>
19 struct NamespaceName.StructName {
20         &lt;struct-member&gt;
21 }</blockcode>
22         </section>
23         <section id="fields">
24                 <h>Fields</h>
25                 <p>Documentation</p>
26         </section>
27         <section id="methods">
28                 <h>Methods</h>
29                 <p>Documentation</p>
30         </section>
31         <section id="properties">
32                 <h>Properties</h>
33                 <p>Documentation</p>
34         </section>
35 </section>