Class Codec<TObj, TEnc>
An encoder/decoder for values.
Inheritance
System.Object
Codec<TObj, TEnc>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public abstract class Codec<TObj, TEnc>
Type Parameters
| Name | Description |
|---|---|
| TObj | |
| TEnc |
Methods
| Improve this Doc View SourceDecode(TEnc, DecoderState)
Decodes a particular piece of data.
Declaration
public abstract TObj Decode(TEnc data, DecoderState state)
Parameters
| Type | Name | Description |
|---|---|---|
| TEnc | data | Encoded data to decode. |
| DecoderState | state | The decoder's state. |
Returns
| Type | Description |
|---|---|
| TObj | A decoded object. |
Encode(TObj, EncoderState)
Encodes a value.
Declaration
public abstract TEnc Encode(TObj value, EncoderState state)
Parameters
| Type | Name | Description |
|---|---|---|
| TObj | value | The value to encode. |
| EncoderState | state | The state of the encoder. |
Returns
| Type | Description |
|---|---|
| TEnc | The encoded value. |