diff options
Diffstat (limited to '')
-rw-r--r-- | cs-dotnet/Doxyfile | 288 | ||||
-rw-r--r-- | cs-dotnet/src/gatsexception.cs | 3 | ||||
-rw-r--r-- | cs-dotnet/src/gatsobject.cs | 42 | ||||
-rw-r--r-- | cs-dotnet/src/gatsstream.cs | 57 |
4 files changed, 390 insertions, 0 deletions
diff --git a/cs-dotnet/Doxyfile b/cs-dotnet/Doxyfile new file mode 100644 index 0000000..5e21a94 --- /dev/null +++ b/cs-dotnet/Doxyfile | |||
@@ -0,0 +1,288 @@ | |||
1 | # Doxyfile 1.8.1 | ||
2 | |||
3 | #--------------------------------------------------------------------------- | ||
4 | # Project related configuration options | ||
5 | #--------------------------------------------------------------------------- | ||
6 | DOXYFILE_ENCODING = UTF-8 | ||
7 | PROJECT_NAME = "My Project" | ||
8 | PROJECT_NUMBER = | ||
9 | PROJECT_BRIEF = | ||
10 | PROJECT_LOGO = | ||
11 | OUTPUT_DIRECTORY = api | ||
12 | CREATE_SUBDIRS = NO | ||
13 | OUTPUT_LANGUAGE = English | ||
14 | BRIEF_MEMBER_DESC = YES | ||
15 | REPEAT_BRIEF = YES | ||
16 | ABBREVIATE_BRIEF = | ||
17 | ALWAYS_DETAILED_SEC = NO | ||
18 | INLINE_INHERITED_MEMB = NO | ||
19 | FULL_PATH_NAMES = YES | ||
20 | STRIP_FROM_PATH = | ||
21 | STRIP_FROM_INC_PATH = | ||
22 | SHORT_NAMES = NO | ||
23 | JAVADOC_AUTOBRIEF = NO | ||
24 | QT_AUTOBRIEF = NO | ||
25 | MULTILINE_CPP_IS_BRIEF = NO | ||
26 | INHERIT_DOCS = YES | ||
27 | SEPARATE_MEMBER_PAGES = NO | ||
28 | TAB_SIZE = 4 | ||
29 | ALIASES = | ||
30 | TCL_SUBST = | ||
31 | OPTIMIZE_OUTPUT_FOR_C = NO | ||
32 | OPTIMIZE_OUTPUT_JAVA = NO | ||
33 | OPTIMIZE_FOR_FORTRAN = NO | ||
34 | OPTIMIZE_OUTPUT_VHDL = NO | ||
35 | EXTENSION_MAPPING = | ||
36 | MARKDOWN_SUPPORT = YES | ||
37 | BUILTIN_STL_SUPPORT = NO | ||
38 | CPP_CLI_SUPPORT = NO | ||
39 | SIP_SUPPORT = NO | ||
40 | IDL_PROPERTY_SUPPORT = YES | ||
41 | DISTRIBUTE_GROUP_DOC = NO | ||
42 | SUBGROUPING = YES | ||
43 | INLINE_GROUPED_CLASSES = NO | ||
44 | INLINE_SIMPLE_STRUCTS = NO | ||
45 | TYPEDEF_HIDES_STRUCT = NO | ||
46 | SYMBOL_CACHE_SIZE = 0 | ||
47 | LOOKUP_CACHE_SIZE = 0 | ||
48 | #--------------------------------------------------------------------------- | ||
49 | # Build related configuration options | ||
50 | #--------------------------------------------------------------------------- | ||
51 | EXTRACT_ALL = YES | ||
52 | EXTRACT_PRIVATE = NO | ||
53 | EXTRACT_PACKAGE = NO | ||
54 | EXTRACT_STATIC = NO | ||
55 | EXTRACT_LOCAL_CLASSES = YES | ||
56 | EXTRACT_LOCAL_METHODS = NO | ||
57 | EXTRACT_ANON_NSPACES = NO | ||
58 | HIDE_UNDOC_MEMBERS = NO | ||
59 | HIDE_UNDOC_CLASSES = NO | ||
60 | HIDE_FRIEND_COMPOUNDS = NO | ||
61 | HIDE_IN_BODY_DOCS = NO | ||
62 | INTERNAL_DOCS = NO | ||
63 | CASE_SENSE_NAMES = YES | ||
64 | HIDE_SCOPE_NAMES = NO | ||
65 | SHOW_INCLUDE_FILES = YES | ||
66 | FORCE_LOCAL_INCLUDES = NO | ||
67 | INLINE_INFO = YES | ||
68 | SORT_MEMBER_DOCS = YES | ||
69 | SORT_BRIEF_DOCS = NO | ||
70 | SORT_MEMBERS_CTORS_1ST = NO | ||
71 | SORT_GROUP_NAMES = NO | ||
72 | SORT_BY_SCOPE_NAME = NO | ||
73 | STRICT_PROTO_MATCHING = NO | ||
74 | GENERATE_TODOLIST = YES | ||
75 | GENERATE_TESTLIST = YES | ||
76 | GENERATE_BUGLIST = YES | ||
77 | GENERATE_DEPRECATEDLIST= YES | ||
78 | ENABLED_SECTIONS = | ||
79 | MAX_INITIALIZER_LINES = 30 | ||
80 | SHOW_USED_FILES = YES | ||
81 | SHOW_FILES = YES | ||
82 | SHOW_NAMESPACES = YES | ||
83 | FILE_VERSION_FILTER = | ||
84 | LAYOUT_FILE = | ||
85 | CITE_BIB_FILES = | ||
86 | #--------------------------------------------------------------------------- | ||
87 | # configuration options related to warning and progress messages | ||
88 | #--------------------------------------------------------------------------- | ||
89 | QUIET = NO | ||
90 | WARNINGS = YES | ||
91 | WARN_IF_UNDOCUMENTED = YES | ||
92 | WARN_IF_DOC_ERROR = YES | ||
93 | WARN_NO_PARAMDOC = NO | ||
94 | WARN_FORMAT = "$file:$line: $text" | ||
95 | WARN_LOGFILE = | ||
96 | #--------------------------------------------------------------------------- | ||
97 | # configuration options related to the input files | ||
98 | #--------------------------------------------------------------------------- | ||
99 | INPUT = src | ||
100 | INPUT_ENCODING = UTF-8 | ||
101 | FILE_PATTERNS = | ||
102 | RECURSIVE = NO | ||
103 | EXCLUDE = | ||
104 | EXCLUDE_SYMLINKS = NO | ||
105 | EXCLUDE_PATTERNS = | ||
106 | EXCLUDE_SYMBOLS = | ||
107 | EXAMPLE_PATH = | ||
108 | EXAMPLE_PATTERNS = | ||
109 | EXAMPLE_RECURSIVE = NO | ||
110 | IMAGE_PATH = | ||
111 | INPUT_FILTER = | ||
112 | FILTER_PATTERNS = | ||
113 | FILTER_SOURCE_FILES = NO | ||
114 | FILTER_SOURCE_PATTERNS = | ||
115 | #--------------------------------------------------------------------------- | ||
116 | # configuration options related to source browsing | ||
117 | #--------------------------------------------------------------------------- | ||
118 | SOURCE_BROWSER = NO | ||
119 | INLINE_SOURCES = NO | ||
120 | STRIP_CODE_COMMENTS = YES | ||
121 | REFERENCED_BY_RELATION = NO | ||
122 | REFERENCES_RELATION = NO | ||
123 | REFERENCES_LINK_SOURCE = YES | ||
124 | USE_HTAGS = NO | ||
125 | VERBATIM_HEADERS = YES | ||
126 | #--------------------------------------------------------------------------- | ||
127 | # configuration options related to the alphabetical class index | ||
128 | #--------------------------------------------------------------------------- | ||
129 | ALPHABETICAL_INDEX = YES | ||
130 | COLS_IN_ALPHA_INDEX = 5 | ||
131 | IGNORE_PREFIX = | ||
132 | #--------------------------------------------------------------------------- | ||
133 | # configuration options related to the HTML output | ||
134 | #--------------------------------------------------------------------------- | ||
135 | GENERATE_HTML = YES | ||
136 | HTML_OUTPUT = html | ||
137 | HTML_FILE_EXTENSION = .html | ||
138 | HTML_HEADER = | ||
139 | HTML_FOOTER = | ||
140 | HTML_STYLESHEET = | ||
141 | HTML_EXTRA_FILES = | ||
142 | HTML_COLORSTYLE_HUE = 220 | ||
143 | HTML_COLORSTYLE_SAT = 100 | ||
144 | HTML_COLORSTYLE_GAMMA = 80 | ||
145 | HTML_TIMESTAMP = YES | ||
146 | HTML_DYNAMIC_SECTIONS = NO | ||
147 | HTML_INDEX_NUM_ENTRIES = 100 | ||
148 | GENERATE_DOCSET = NO | ||
149 | DOCSET_FEEDNAME = "Doxygen generated docs" | ||
150 | DOCSET_BUNDLE_ID = org.doxygen.Project | ||
151 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher | ||
152 | DOCSET_PUBLISHER_NAME = Publisher | ||
153 | GENERATE_HTMLHELP = NO | ||
154 | CHM_FILE = | ||
155 | HHC_LOCATION = | ||
156 | GENERATE_CHI = NO | ||
157 | CHM_INDEX_ENCODING = | ||
158 | BINARY_TOC = NO | ||
159 | TOC_EXPAND = NO | ||
160 | GENERATE_QHP = NO | ||
161 | QCH_FILE = | ||
162 | QHP_NAMESPACE = org.doxygen.Project | ||
163 | QHP_VIRTUAL_FOLDER = doc | ||
164 | QHP_CUST_FILTER_NAME = | ||
165 | QHP_CUST_FILTER_ATTRS = | ||
166 | QHP_SECT_FILTER_ATTRS = | ||
167 | QHG_LOCATION = | ||
168 | GENERATE_ECLIPSEHELP = NO | ||
169 | ECLIPSE_DOC_ID = org.doxygen.Project | ||
170 | DISABLE_INDEX = NO | ||
171 | GENERATE_TREEVIEW = NO | ||
172 | ENUM_VALUES_PER_LINE = 4 | ||
173 | TREEVIEW_WIDTH = 250 | ||
174 | EXT_LINKS_IN_WINDOW = NO | ||
175 | FORMULA_FONTSIZE = 10 | ||
176 | FORMULA_TRANSPARENT = YES | ||
177 | USE_MATHJAX = NO | ||
178 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest | ||
179 | MATHJAX_EXTENSIONS = | ||
180 | SEARCHENGINE = YES | ||
181 | SERVER_BASED_SEARCH = NO | ||
182 | #--------------------------------------------------------------------------- | ||
183 | # configuration options related to the LaTeX output | ||
184 | #--------------------------------------------------------------------------- | ||
185 | GENERATE_LATEX = YES | ||
186 | LATEX_OUTPUT = latex | ||
187 | LATEX_CMD_NAME = latex | ||
188 | MAKEINDEX_CMD_NAME = makeindex | ||
189 | COMPACT_LATEX = NO | ||
190 | PAPER_TYPE = a4 | ||
191 | EXTRA_PACKAGES = | ||
192 | LATEX_HEADER = | ||
193 | LATEX_FOOTER = | ||
194 | PDF_HYPERLINKS = YES | ||
195 | USE_PDFLATEX = YES | ||
196 | LATEX_BATCHMODE = NO | ||
197 | LATEX_HIDE_INDICES = NO | ||
198 | LATEX_SOURCE_CODE = NO | ||
199 | LATEX_BIB_STYLE = plain | ||
200 | #--------------------------------------------------------------------------- | ||
201 | # configuration options related to the RTF output | ||
202 | #--------------------------------------------------------------------------- | ||
203 | GENERATE_RTF = NO | ||
204 | RTF_OUTPUT = rtf | ||
205 | COMPACT_RTF = NO | ||
206 | RTF_HYPERLINKS = NO | ||
207 | RTF_STYLESHEET_FILE = | ||
208 | RTF_EXTENSIONS_FILE = | ||
209 | #--------------------------------------------------------------------------- | ||
210 | # configuration options related to the man page output | ||
211 | #--------------------------------------------------------------------------- | ||
212 | GENERATE_MAN = NO | ||
213 | MAN_OUTPUT = man | ||
214 | MAN_EXTENSION = .3 | ||
215 | MAN_LINKS = NO | ||
216 | #--------------------------------------------------------------------------- | ||
217 | # configuration options related to the XML output | ||
218 | #--------------------------------------------------------------------------- | ||
219 | GENERATE_XML = NO | ||
220 | XML_OUTPUT = xml | ||
221 | XML_SCHEMA = | ||
222 | XML_DTD = | ||
223 | XML_PROGRAMLISTING = YES | ||
224 | #--------------------------------------------------------------------------- | ||
225 | # configuration options for the AutoGen Definitions output | ||
226 | #--------------------------------------------------------------------------- | ||
227 | GENERATE_AUTOGEN_DEF = NO | ||
228 | #--------------------------------------------------------------------------- | ||
229 | # configuration options related to the Perl module output | ||
230 | #--------------------------------------------------------------------------- | ||
231 | GENERATE_PERLMOD = NO | ||
232 | PERLMOD_LATEX = NO | ||
233 | PERLMOD_PRETTY = YES | ||
234 | PERLMOD_MAKEVAR_PREFIX = | ||
235 | #--------------------------------------------------------------------------- | ||
236 | # Configuration options related to the preprocessor | ||
237 | #--------------------------------------------------------------------------- | ||
238 | ENABLE_PREPROCESSING = YES | ||
239 | MACRO_EXPANSION = NO | ||
240 | EXPAND_ONLY_PREDEF = NO | ||
241 | SEARCH_INCLUDES = YES | ||
242 | INCLUDE_PATH = | ||
243 | INCLUDE_FILE_PATTERNS = | ||
244 | PREDEFINED = | ||
245 | EXPAND_AS_DEFINED = | ||
246 | SKIP_FUNCTION_MACROS = YES | ||
247 | #--------------------------------------------------------------------------- | ||
248 | # Configuration::additions related to external references | ||
249 | #--------------------------------------------------------------------------- | ||
250 | TAGFILES = | ||
251 | GENERATE_TAGFILE = | ||
252 | ALLEXTERNALS = NO | ||
253 | EXTERNAL_GROUPS = YES | ||
254 | PERL_PATH = /usr/bin/perl | ||
255 | #--------------------------------------------------------------------------- | ||
256 | # Configuration options related to the dot tool | ||
257 | #--------------------------------------------------------------------------- | ||
258 | CLASS_DIAGRAMS = YES | ||
259 | MSCGEN_PATH = | ||
260 | HIDE_UNDOC_RELATIONS = YES | ||
261 | HAVE_DOT = YES | ||
262 | DOT_NUM_THREADS = 0 | ||
263 | DOT_FONTNAME = Helvetica | ||
264 | DOT_FONTSIZE = 10 | ||
265 | DOT_FONTPATH = | ||
266 | CLASS_GRAPH = YES | ||
267 | COLLABORATION_GRAPH = YES | ||
268 | GROUP_GRAPHS = YES | ||
269 | UML_LOOK = NO | ||
270 | UML_LIMIT_NUM_FIELDS = 10 | ||
271 | TEMPLATE_RELATIONS = NO | ||
272 | INCLUDE_GRAPH = YES | ||
273 | INCLUDED_BY_GRAPH = YES | ||
274 | CALL_GRAPH = NO | ||
275 | CALLER_GRAPH = NO | ||
276 | GRAPHICAL_HIERARCHY = YES | ||
277 | DIRECTORY_GRAPH = YES | ||
278 | DOT_IMAGE_FORMAT = png | ||
279 | INTERACTIVE_SVG = NO | ||
280 | DOT_PATH = | ||
281 | DOTFILE_DIRS = | ||
282 | MSCFILE_DIRS = | ||
283 | DOT_GRAPH_MAX_NODES = 50 | ||
284 | MAX_DOT_GRAPH_DEPTH = 0 | ||
285 | DOT_TRANSPARENT = NO | ||
286 | DOT_MULTI_TARGETS = NO | ||
287 | GENERATE_LEGEND = YES | ||
288 | DOT_CLEANUP = YES | ||
diff --git a/cs-dotnet/src/gatsexception.cs b/cs-dotnet/src/gatsexception.cs index 442a4ff..1d01e07 100644 --- a/cs-dotnet/src/gatsexception.cs +++ b/cs-dotnet/src/gatsexception.cs | |||
@@ -9,6 +9,9 @@ using System; | |||
9 | 9 | ||
10 | namespace Com.Xagasoft.Gats | 10 | namespace Com.Xagasoft.Gats |
11 | { | 11 | { |
12 | /// <summary> | ||
13 | /// Exception used to report parsing or encoding errors in GATS. | ||
14 | /// </summary> | ||
12 | public class GatsException : Exception | 15 | public class GatsException : Exception |
13 | { | 16 | { |
14 | public enum Type | 17 | public enum Type |
diff --git a/cs-dotnet/src/gatsobject.cs b/cs-dotnet/src/gatsobject.cs index 7c92cff..57da747 100644 --- a/cs-dotnet/src/gatsobject.cs +++ b/cs-dotnet/src/gatsobject.cs | |||
@@ -9,11 +9,53 @@ using System.IO; | |||
9 | 9 | ||
10 | namespace Com.Xagasoft.Gats | 10 | namespace Com.Xagasoft.Gats |
11 | { | 11 | { |
12 | /// <summary> | ||
13 | /// The base class of all GATS Data Type classes. | ||
14 | /// </summary> | ||
15 | /// <remarks> | ||
16 | /// This provides the standard Read and Write methods that are used to do | ||
17 | /// all type serialization, as well as a handy static Read function that | ||
18 | /// can be used | ||
19 | /// to read in any type. These methods should not be used in normal | ||
20 | /// programming, instead use the GatsStream class to read and write | ||
21 | /// complete GATS packets. | ||
22 | /// </remarks> | ||
12 | public abstract class GatsObject | 23 | public abstract class GatsObject |
13 | { | 24 | { |
25 | /// <summary> | ||
26 | /// Read a single object from the provided stream. | ||
27 | /// </summary> | ||
28 | /// <remarks> | ||
29 | /// This method does not read the leading type character. The static | ||
30 | /// Read method in GatsObject does this, and passes the type into the | ||
31 | /// Read method as a parameter in case it's needed by a specific type, | ||
32 | /// such as GatsBoolean. | ||
33 | /// </remarks> | ||
34 | /// <param name="s">The Stream derived class to read from.</param> | ||
35 | /// <param name="type">The already read type specifier.</param> | ||
14 | public abstract void Read( Stream s, char type ); | 36 | public abstract void Read( Stream s, char type ); |
37 | |||
38 | /// <summary> | ||
39 | /// Write a single object to the provided stream. | ||
40 | /// </summary> | ||
41 | /// <remarks> | ||
42 | /// Unlike the Read method, this does actually write the leading type | ||
43 | /// specifier. | ||
44 | /// </remarks> | ||
45 | /// <param name="s">The Stream derived class to write to.</param> | ||
15 | public abstract void Write( Stream s ); | 46 | public abstract void Write( Stream s ); |
16 | 47 | ||
48 | /// <summary> | ||
49 | /// Reads a GatsObject from the provided stream and returns it. | ||
50 | /// </summary> | ||
51 | /// <remarks> | ||
52 | /// This method reads the initial type specifier byte, constructs the | ||
53 | /// proper object, calls the Read method on that object, and returns | ||
54 | /// the result. | ||
55 | /// </remarks> | ||
56 | /// <returns> | ||
57 | /// The constructed object, or null if an end type was found. | ||
58 | /// </returns> | ||
17 | public static GatsObject Read( Stream s ) | 59 | public static GatsObject Read( Stream s ) |
18 | { | 60 | { |
19 | int b = s.ReadByte(); | 61 | int b = s.ReadByte(); |
diff --git a/cs-dotnet/src/gatsstream.cs b/cs-dotnet/src/gatsstream.cs index e1bba91..742f0b4 100644 --- a/cs-dotnet/src/gatsstream.cs +++ b/cs-dotnet/src/gatsstream.cs | |||
@@ -11,6 +11,23 @@ using System; | |||
11 | 11 | ||
12 | namespace Com.Xagasoft.Gats | 12 | namespace Com.Xagasoft.Gats |
13 | { | 13 | { |
14 | /// <summary> | ||
15 | /// Main I/O interface. Use this to read and write GATS. | ||
16 | /// </summary> | ||
17 | /// <remarks> | ||
18 | /// GatsStream is not a traditional Stream class, it only can read and | ||
19 | /// write complete GATS packets. A GATS packet consists of a version, | ||
20 | /// size, and a single encoded GATS object (which can be a container). | ||
21 | /// | ||
22 | /// This one class handles both reading and writing. Writing is fairly | ||
23 | /// straight forward, but for volatile streams like network sockets you'll | ||
24 | /// probably want to wrap your stream with a buffer before handing it to | ||
25 | /// GatsStream. | ||
26 | /// | ||
27 | /// Reading handles it's own buffering, and will remember what has been | ||
28 | /// read between calls if it cannot get enough data at once to complete | ||
29 | /// a single packet. See the ReadObject docs for more details. | ||
30 | /// </remarks> | ||
14 | public class GatsStream | 31 | public class GatsStream |
15 | { | 32 | { |
16 | private Stream s; | 33 | private Stream s; |
@@ -20,12 +37,37 @@ namespace Com.Xagasoft.Gats | |||
20 | private BinaryWriter bw = null; | 37 | private BinaryWriter bw = null; |
21 | private BinaryReader br = null; | 38 | private BinaryReader br = null; |
22 | 39 | ||
40 | /// <summary> | ||
41 | /// Construct a new GatsStream around a given Stream class. | ||
42 | /// </summary> | ||
43 | /// <remarks> | ||
44 | /// The provided Stream does not need to be opened for both reading and | ||
45 | /// writing, you can construct a GatsStream around a read only or | ||
46 | /// write only stream. | ||
47 | /// </remarks> | ||
48 | /// <param name="s">Stream to operate on.</param> | ||
23 | public GatsStream( Stream s ) | 49 | public GatsStream( Stream s ) |
24 | { | 50 | { |
25 | this.s = s; | 51 | this.s = s; |
26 | this.ReadBuf = new MemoryStream(); | 52 | this.ReadBuf = new MemoryStream(); |
27 | } | 53 | } |
28 | 54 | ||
55 | /// <summary> | ||
56 | /// Read a GATS packet and return the contained GatsObject. | ||
57 | /// </summary> | ||
58 | /// <remarks> | ||
59 | /// This reads a complete packet into an internal buffer, parses the | ||
60 | /// gats object within it, and returns it. This method will read as | ||
61 | /// much data as it needs from the stream, but no more. Not a single | ||
62 | /// extra byte will be read. | ||
63 | /// | ||
64 | /// In the event that an end of stream is encountered, or a partial | ||
65 | /// packet has been read but no more data can be read at the moment, | ||
66 | /// this method will maintain it's buffer but return null to the caller. | ||
67 | /// </remarks> | ||
68 | /// <returns> | ||
69 | /// The read object, or null if no object could be read yet. | ||
70 | /// </returns> | ||
29 | public GatsObject ReadObject() | 71 | public GatsObject ReadObject() |
30 | { | 72 | { |
31 | if( size == -1 ) | 73 | if( size == -1 ) |
@@ -70,6 +112,21 @@ namespace Com.Xagasoft.Gats | |||
70 | return null; | 112 | return null; |
71 | } | 113 | } |
72 | 114 | ||
115 | /// <summary> | ||
116 | /// Write a GatsObject to the stream in a proper GATS packet. | ||
117 | /// </summary> | ||
118 | /// <remarks> | ||
119 | /// The object passed in is first written to an internal buffer, and | ||
120 | /// then to the output in several write operations. This means that | ||
121 | /// for many applications you will want to buffer the output. In the | ||
122 | /// case of writing to files, it could be faster to buffer the output. | ||
123 | /// In the case of writing to a socket buffering could prevent sending | ||
124 | /// many small packets. | ||
125 | /// | ||
126 | /// No flushing is done by this method, it is left to the caller to | ||
127 | /// determine the proper time to flush their streams. | ||
128 | /// </remarks> | ||
129 | /// <param name="obj">The object to be written.</param> | ||
73 | public void WriteObject( GatsObject obj ) | 130 | public void WriteObject( GatsObject obj ) |
74 | { | 131 | { |
75 | MemoryStream ms = new MemoryStream(); | 132 | MemoryStream ms = new MemoryStream(); |