aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cs-dotnet/Doxyfile288
-rw-r--r--cs-dotnet/src/gatsexception.cs3
-rw-r--r--cs-dotnet/src/gatsobject.cs42
-rw-r--r--cs-dotnet/src/gatsstream.cs57
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#---------------------------------------------------------------------------
6DOXYFILE_ENCODING = UTF-8
7PROJECT_NAME = "My Project"
8PROJECT_NUMBER =
9PROJECT_BRIEF =
10PROJECT_LOGO =
11OUTPUT_DIRECTORY = api
12CREATE_SUBDIRS = NO
13OUTPUT_LANGUAGE = English
14BRIEF_MEMBER_DESC = YES
15REPEAT_BRIEF = YES
16ABBREVIATE_BRIEF =
17ALWAYS_DETAILED_SEC = NO
18INLINE_INHERITED_MEMB = NO
19FULL_PATH_NAMES = YES
20STRIP_FROM_PATH =
21STRIP_FROM_INC_PATH =
22SHORT_NAMES = NO
23JAVADOC_AUTOBRIEF = NO
24QT_AUTOBRIEF = NO
25MULTILINE_CPP_IS_BRIEF = NO
26INHERIT_DOCS = YES
27SEPARATE_MEMBER_PAGES = NO
28TAB_SIZE = 4
29ALIASES =
30TCL_SUBST =
31OPTIMIZE_OUTPUT_FOR_C = NO
32OPTIMIZE_OUTPUT_JAVA = NO
33OPTIMIZE_FOR_FORTRAN = NO
34OPTIMIZE_OUTPUT_VHDL = NO
35EXTENSION_MAPPING =
36MARKDOWN_SUPPORT = YES
37BUILTIN_STL_SUPPORT = NO
38CPP_CLI_SUPPORT = NO
39SIP_SUPPORT = NO
40IDL_PROPERTY_SUPPORT = YES
41DISTRIBUTE_GROUP_DOC = NO
42SUBGROUPING = YES
43INLINE_GROUPED_CLASSES = NO
44INLINE_SIMPLE_STRUCTS = NO
45TYPEDEF_HIDES_STRUCT = NO
46SYMBOL_CACHE_SIZE = 0
47LOOKUP_CACHE_SIZE = 0
48#---------------------------------------------------------------------------
49# Build related configuration options
50#---------------------------------------------------------------------------
51EXTRACT_ALL = YES
52EXTRACT_PRIVATE = NO
53EXTRACT_PACKAGE = NO
54EXTRACT_STATIC = NO
55EXTRACT_LOCAL_CLASSES = YES
56EXTRACT_LOCAL_METHODS = NO
57EXTRACT_ANON_NSPACES = NO
58HIDE_UNDOC_MEMBERS = NO
59HIDE_UNDOC_CLASSES = NO
60HIDE_FRIEND_COMPOUNDS = NO
61HIDE_IN_BODY_DOCS = NO
62INTERNAL_DOCS = NO
63CASE_SENSE_NAMES = YES
64HIDE_SCOPE_NAMES = NO
65SHOW_INCLUDE_FILES = YES
66FORCE_LOCAL_INCLUDES = NO
67INLINE_INFO = YES
68SORT_MEMBER_DOCS = YES
69SORT_BRIEF_DOCS = NO
70SORT_MEMBERS_CTORS_1ST = NO
71SORT_GROUP_NAMES = NO
72SORT_BY_SCOPE_NAME = NO
73STRICT_PROTO_MATCHING = NO
74GENERATE_TODOLIST = YES
75GENERATE_TESTLIST = YES
76GENERATE_BUGLIST = YES
77GENERATE_DEPRECATEDLIST= YES
78ENABLED_SECTIONS =
79MAX_INITIALIZER_LINES = 30
80SHOW_USED_FILES = YES
81SHOW_FILES = YES
82SHOW_NAMESPACES = YES
83FILE_VERSION_FILTER =
84LAYOUT_FILE =
85CITE_BIB_FILES =
86#---------------------------------------------------------------------------
87# configuration options related to warning and progress messages
88#---------------------------------------------------------------------------
89QUIET = NO
90WARNINGS = YES
91WARN_IF_UNDOCUMENTED = YES
92WARN_IF_DOC_ERROR = YES
93WARN_NO_PARAMDOC = NO
94WARN_FORMAT = "$file:$line: $text"
95WARN_LOGFILE =
96#---------------------------------------------------------------------------
97# configuration options related to the input files
98#---------------------------------------------------------------------------
99INPUT = src
100INPUT_ENCODING = UTF-8
101FILE_PATTERNS =
102RECURSIVE = NO
103EXCLUDE =
104EXCLUDE_SYMLINKS = NO
105EXCLUDE_PATTERNS =
106EXCLUDE_SYMBOLS =
107EXAMPLE_PATH =
108EXAMPLE_PATTERNS =
109EXAMPLE_RECURSIVE = NO
110IMAGE_PATH =
111INPUT_FILTER =
112FILTER_PATTERNS =
113FILTER_SOURCE_FILES = NO
114FILTER_SOURCE_PATTERNS =
115#---------------------------------------------------------------------------
116# configuration options related to source browsing
117#---------------------------------------------------------------------------
118SOURCE_BROWSER = NO
119INLINE_SOURCES = NO
120STRIP_CODE_COMMENTS = YES
121REFERENCED_BY_RELATION = NO
122REFERENCES_RELATION = NO
123REFERENCES_LINK_SOURCE = YES
124USE_HTAGS = NO
125VERBATIM_HEADERS = YES
126#---------------------------------------------------------------------------
127# configuration options related to the alphabetical class index
128#---------------------------------------------------------------------------
129ALPHABETICAL_INDEX = YES
130COLS_IN_ALPHA_INDEX = 5
131IGNORE_PREFIX =
132#---------------------------------------------------------------------------
133# configuration options related to the HTML output
134#---------------------------------------------------------------------------
135GENERATE_HTML = YES
136HTML_OUTPUT = html
137HTML_FILE_EXTENSION = .html
138HTML_HEADER =
139HTML_FOOTER =
140HTML_STYLESHEET =
141HTML_EXTRA_FILES =
142HTML_COLORSTYLE_HUE = 220
143HTML_COLORSTYLE_SAT = 100
144HTML_COLORSTYLE_GAMMA = 80
145HTML_TIMESTAMP = YES
146HTML_DYNAMIC_SECTIONS = NO
147HTML_INDEX_NUM_ENTRIES = 100
148GENERATE_DOCSET = NO
149DOCSET_FEEDNAME = "Doxygen generated docs"
150DOCSET_BUNDLE_ID = org.doxygen.Project
151DOCSET_PUBLISHER_ID = org.doxygen.Publisher
152DOCSET_PUBLISHER_NAME = Publisher
153GENERATE_HTMLHELP = NO
154CHM_FILE =
155HHC_LOCATION =
156GENERATE_CHI = NO
157CHM_INDEX_ENCODING =
158BINARY_TOC = NO
159TOC_EXPAND = NO
160GENERATE_QHP = NO
161QCH_FILE =
162QHP_NAMESPACE = org.doxygen.Project
163QHP_VIRTUAL_FOLDER = doc
164QHP_CUST_FILTER_NAME =
165QHP_CUST_FILTER_ATTRS =
166QHP_SECT_FILTER_ATTRS =
167QHG_LOCATION =
168GENERATE_ECLIPSEHELP = NO
169ECLIPSE_DOC_ID = org.doxygen.Project
170DISABLE_INDEX = NO
171GENERATE_TREEVIEW = NO
172ENUM_VALUES_PER_LINE = 4
173TREEVIEW_WIDTH = 250
174EXT_LINKS_IN_WINDOW = NO
175FORMULA_FONTSIZE = 10
176FORMULA_TRANSPARENT = YES
177USE_MATHJAX = NO
178MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
179MATHJAX_EXTENSIONS =
180SEARCHENGINE = YES
181SERVER_BASED_SEARCH = NO
182#---------------------------------------------------------------------------
183# configuration options related to the LaTeX output
184#---------------------------------------------------------------------------
185GENERATE_LATEX = YES
186LATEX_OUTPUT = latex
187LATEX_CMD_NAME = latex
188MAKEINDEX_CMD_NAME = makeindex
189COMPACT_LATEX = NO
190PAPER_TYPE = a4
191EXTRA_PACKAGES =
192LATEX_HEADER =
193LATEX_FOOTER =
194PDF_HYPERLINKS = YES
195USE_PDFLATEX = YES
196LATEX_BATCHMODE = NO
197LATEX_HIDE_INDICES = NO
198LATEX_SOURCE_CODE = NO
199LATEX_BIB_STYLE = plain
200#---------------------------------------------------------------------------
201# configuration options related to the RTF output
202#---------------------------------------------------------------------------
203GENERATE_RTF = NO
204RTF_OUTPUT = rtf
205COMPACT_RTF = NO
206RTF_HYPERLINKS = NO
207RTF_STYLESHEET_FILE =
208RTF_EXTENSIONS_FILE =
209#---------------------------------------------------------------------------
210# configuration options related to the man page output
211#---------------------------------------------------------------------------
212GENERATE_MAN = NO
213MAN_OUTPUT = man
214MAN_EXTENSION = .3
215MAN_LINKS = NO
216#---------------------------------------------------------------------------
217# configuration options related to the XML output
218#---------------------------------------------------------------------------
219GENERATE_XML = NO
220XML_OUTPUT = xml
221XML_SCHEMA =
222XML_DTD =
223XML_PROGRAMLISTING = YES
224#---------------------------------------------------------------------------
225# configuration options for the AutoGen Definitions output
226#---------------------------------------------------------------------------
227GENERATE_AUTOGEN_DEF = NO
228#---------------------------------------------------------------------------
229# configuration options related to the Perl module output
230#---------------------------------------------------------------------------
231GENERATE_PERLMOD = NO
232PERLMOD_LATEX = NO
233PERLMOD_PRETTY = YES
234PERLMOD_MAKEVAR_PREFIX =
235#---------------------------------------------------------------------------
236# Configuration options related to the preprocessor
237#---------------------------------------------------------------------------
238ENABLE_PREPROCESSING = YES
239MACRO_EXPANSION = NO
240EXPAND_ONLY_PREDEF = NO
241SEARCH_INCLUDES = YES
242INCLUDE_PATH =
243INCLUDE_FILE_PATTERNS =
244PREDEFINED =
245EXPAND_AS_DEFINED =
246SKIP_FUNCTION_MACROS = YES
247#---------------------------------------------------------------------------
248# Configuration::additions related to external references
249#---------------------------------------------------------------------------
250TAGFILES =
251GENERATE_TAGFILE =
252ALLEXTERNALS = NO
253EXTERNAL_GROUPS = YES
254PERL_PATH = /usr/bin/perl
255#---------------------------------------------------------------------------
256# Configuration options related to the dot tool
257#---------------------------------------------------------------------------
258CLASS_DIAGRAMS = YES
259MSCGEN_PATH =
260HIDE_UNDOC_RELATIONS = YES
261HAVE_DOT = YES
262DOT_NUM_THREADS = 0
263DOT_FONTNAME = Helvetica
264DOT_FONTSIZE = 10
265DOT_FONTPATH =
266CLASS_GRAPH = YES
267COLLABORATION_GRAPH = YES
268GROUP_GRAPHS = YES
269UML_LOOK = NO
270UML_LIMIT_NUM_FIELDS = 10
271TEMPLATE_RELATIONS = NO
272INCLUDE_GRAPH = YES
273INCLUDED_BY_GRAPH = YES
274CALL_GRAPH = NO
275CALLER_GRAPH = NO
276GRAPHICAL_HIERARCHY = YES
277DIRECTORY_GRAPH = YES
278DOT_IMAGE_FORMAT = png
279INTERACTIVE_SVG = NO
280DOT_PATH =
281DOTFILE_DIRS =
282MSCFILE_DIRS =
283DOT_GRAPH_MAX_NODES = 50
284MAX_DOT_GRAPH_DEPTH = 0
285DOT_TRANSPARENT = NO
286DOT_MULTI_TARGETS = NO
287GENERATE_LEGEND = YES
288DOT_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
10namespace Com.Xagasoft.Gats 10namespace 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
10namespace Com.Xagasoft.Gats 10namespace 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
12namespace Com.Xagasoft.Gats 12namespace 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();