aboutsummaryrefslogtreecommitdiff
path: root/cs-dotnet/src/gatsobject.cs
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-17 09:25:32 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-17 09:25:32 +0000
commita1e240e759ad5de914495c370e3bda12a3988b3a (patch)
tree13381ffd8b0d08576bd3a633ecc0a76675bf19b3 /cs-dotnet/src/gatsobject.cs
parent47dda29badd2112fbe256e5b0cb84d5b2fa590f1 (diff)
downloadlibgats-a1e240e759ad5de914495c370e3bda12a3988b3a.tar.gz
libgats-a1e240e759ad5de914495c370e3bda12a3988b3a.tar.bz2
libgats-a1e240e759ad5de914495c370e3bda12a3988b3a.tar.xz
libgats-a1e240e759ad5de914495c370e3bda12a3988b3a.zip
Adding C# style XML documentation. It turns out Doxygen handles that properly
too. Wow, Doxygen, it really does it all :-P
Diffstat (limited to 'cs-dotnet/src/gatsobject.cs')
-rw-r--r--cs-dotnet/src/gatsobject.cs42
1 files changed, 42 insertions, 0 deletions
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();