namespace com.azkoss.excellite
{
using System;
///
///Formula token for holding array.
///
internal class ArrayFormulaToken : FormulaToken
{
// Methods
///
///Initializes a new instance of the class.
///
///The FormulaTokenCode code.
public ArrayFormulaToken(FormulaTokenCode code) : base(code, 8, FormulaTokenType.Operand)
{
}
///
///Convert formula token to array of byte representation.
///
///formula token' array of byte representation
public override byte[] ConvertToBytes()
{
byte[] buffer1 = base.ConvertToBytes();
buffer1[1] = 0;
return buffer1;
}
///
///Initialize formula token by reading input data from array of bytes
///
///input data, array of bytes
///start position for array of bytes to read from
public override void Read(byte[] rpnBytes, int startIndex)
{
this.columnsAmount = rpnBytes[startIndex];
this.rowsAmount = BitConverter.ToUInt16(rpnBytes, startIndex + 1);
}
///
///Convert formula token to string representation.
///
///formula token string representation
public override string ToString()
{
return string.Empty;
}
// Properties
public byte ColumnsAmount
{
get
{
return this.columnsAmount;
}
}
public ushort RowsAmount
{
get
{
return this.rowsAmount;
}
}
// Fields
private byte columnsAmount;
private ushort rowsAmount;
}
}