Class Codec<TObj, TEnc>
An encoder/decoder for values.
Inheritance
Codec<TObj, TEnc>
Inherited Members
Namespace: Flame.Ir
Assembly: Flame.Ir.dll
Syntax
public abstract class Codec<TObj, TEnc>
Type Parameters
| Name | Description |
|---|---|
| TObj | |
| TEnc |
Methods
| Edit this page 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. |