Class ComplexPofValue
An abstract base class for complex POF types, such as collections, arrays, dictionaries and user types.
Implements
Inherited Members
Namespace: Tangosol.IO.Pof.Reflection
Assembly: Coherence.dll
Syntax
public abstract class ComplexPofValue : AbstractPofValue, IPofValue
Constructors
ComplexPofValue(IPofValue, Binary, IPofContext, int, int, int)
Construct a ComplexPofValue instance wrapping the supplied binary.
Declaration
public ComplexPofValue(IPofValue valueParent, Binary binValue, IPofContext ctx, int of, int nType, int ofChildren)
Parameters
Type | Name | Description |
---|---|---|
IPofValue | valueParent | Parent value within the POF stream. |
Binary | binValue | Binary representation of this value. |
IPofContext | ctx | POF context to use when reading or writing properties. |
int | of | Offset of this value from the beginning of POF stream. |
int | nType | POF type identifier for this value. |
int | ofChildren | Offset of the first child element within this value. |
Properties
IsUniformCollection
Return true
if this complex value is encoded as one of
uniform collection types.
Declaration
protected bool IsUniformCollection { get; }
Property Value
Type | Description |
---|---|
bool |
|
UniformElementType
Gets or sets element type if this is a uniform collection.
Declaration
protected int UniformElementType { get; set; }
Property Value
Type | Description |
---|---|
int | Type of elements if this is a uniform collection; T_UNKNOWN otherwise. |
Methods
ExtractChild(int, int)
Extract child IPofValue from this value.
Declaration
protected IPofValue ExtractChild(int of, int cb)
Parameters
Type | Name | Description |
---|---|---|
int | of | Offset of the child within this value. |
int | cb | Length of the child in bytes. |
Returns
Type | Description |
---|---|
IPofValue | The child value. |
FindChild(int)
Find the child value with the specified index.
Declaration
protected IPofValue FindChild(int nIndex)
Parameters
Type | Name | Description |
---|---|---|
int | nIndex | Index of the child value to find. |
Returns
Type | Description |
---|---|
IPofValue | The child value. |
FindChildInternal(int, int, int)
Find the child value with the specified index.
Declaration
protected abstract IPofValue FindChildInternal(int nIndex, int ofStart, int iStart)
Parameters
Type | Name | Description |
---|---|---|
int | nIndex | Index of the child value to find. |
int | ofStart | Offset within the parent buffer to start search from. |
int | iStart | Index of the child value to start search from. |
Returns
Type | Description |
---|---|
IPofValue | The child value. |
GetChild(int)
Locate a child IPofValue contained within this IPofValue.
Declaration
public override IPofValue GetChild(int nIndex)
Parameters
Type | Name | Description |
---|---|---|
int | nIndex | Index of the child value to get. |
Returns
Type | Description |
---|---|
IPofValue | The the child IPofValue. |
Overrides
Remarks
The returned IPofValue could represent a non-existent (null) value.
Exceptions
Type | Condition |
---|---|
PofNavigationException | If this value is a "terminal" or the child value cannot be located for any other reason. |
GetChildrenEnumerator()
Return an enumerator over all parsed child values.
Declaration
public IEnumerator GetChildrenEnumerator()
Returns
Type | Description |
---|---|
IEnumerator | A children enumerator. |
GetLastChildIndex(int)
Return index of the last parsed child with an index lower than the specified one.
Declaration
protected int GetLastChildIndex(int nIndex)
Parameters
Type | Name | Description |
---|---|---|
int | nIndex | Index to find the preceding child index for. |
Returns
Type | Description |
---|---|
int | Index of the last parsed child, or -1 if one does not exist. |
SkipChild(DataReader)
Skip a single child value.
Declaration
protected void SkipChild(DataReader reader)
Parameters
Type | Name | Description |
---|---|---|
DataReader | reader | Reader used to read child values. |