The raw beginnings of XML serialization of Monodoc XML.
[mono.git] / mcs / doctools / src / Core / AbstractDoc.cs
1 // AbstractDoc.cs\r
2 // John Barnette (jbarn@httcb.net)\r
3 // \r
4 // Copyright (c) 2002 John Barnette\r
5 //\r
6 // This file is part of Monodoc, a multilingual API documentation tool.\r
7 //\r
8 // Monodoc is free software; you can redistribute it and/or modify\r
9 // it under the terms of the GNU General Public License as published by\r
10 // the Free Software Foundation; either version 2 of the License, or\r
11 // (at your option) any later version.\r
12 // \r
13 // Monodoc is distributed in the hope that it will be useful,\r
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16 // GNU General Public License for more details.\r
17 // \r
18 // You should have received a copy of the GNU General Public License\r
19 // along with Monodoc; if not, write to the Free Software\r
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
21 \r
22 using System;\r
23 using System.Collections.Specialized;\r
24 using System.Xml.Serialization;\r
25 \r
26 namespace Mono.Doc.Core\r
27 {\r
28         public abstract class AbstractDoc\r
29         {\r
30                 protected string           name;\r
31                 protected string           summary;\r
32                 protected string           remarks;\r
33                 protected string           language;\r
34                 protected StringCollection seeAlso;\r
35 \r
36                 public AbstractDoc(string name)\r
37                 {\r
38                         this.name     = name;\r
39                         this.summary  = string.Empty;\r
40                         this.remarks  = string.Empty;\r
41                         this.language = string.Empty;\r
42                         this.seeAlso  = new StringCollection();\r
43                 }\r
44 \r
45                 public AbstractDoc() : this(string.Empty)\r
46                 {\r
47                 }\r
48 \r
49                 [XmlElement(ElementName = "summary")]\r
50                 public string Summary\r
51                 {\r
52                         get { return this.summary;  }\r
53                         set { this.summary = value; }\r
54                 }\r
55 \r
56                 [XmlElement(ElementName = "remarks")]\r
57                 public string Remarks\r
58                 {\r
59                         get { return this.remarks;  }\r
60                         set { this.remarks = value; }\r
61                 }\r
62 \r
63                 [XmlAttribute(AttributeName = "name")]\r
64                 public string Name\r
65                 {\r
66                         get { return this.name;  }\r
67                         set { this.name = value; }\r
68                 }\r
69 \r
70                 // TODO: correct xml serialization\r
71                 public StringCollection SeeAlso\r
72                 {\r
73                         get { return this.seeAlso; }\r
74                 }\r
75         }\r
76 }\r