Arch Sub-System: Coder - CoderContext

01 This class helps implementing version compatibility.
02

[C++] class CoderContext
[C#] sealed class CoderContext: IDisposable

03

Public Methods

TypeNameDescription
Constructor() Starts a coder context.
[C++] Destructor() Finishes a coder context.
void[C#] Dispose() Finishes a coder context.
void[C#] Close() Finishes a coder context.
uint32GetVersion() Returns the version of the context.
04 [C#] Although the explicit Close() method is provided, it is more convenient and secure to use the using variant, which automatically finishes the context when disposing:
using (CoderContext ctx = new CoderContext(coder, 1))
{
  if (ctx.GetVersion() >= 1)
  {
    // ...
  }
}
05 Binary description:
VTypeDataReq
-Int16mVersion
-Int32dataSize
-*(any data being coded during the context)
06 When encoding, the actual dataSize is known only after encoding all the data.
A 16bit value can not be used as it is expected for some data to be bigger than 64 kilobytes.
Therefore, the serialized dataSize is stored as a 32bit value.
07 Reference: net::semys
Implementation: Semys Architecture
See Also: Arch Coder Sub-System

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.