/// <summary> /// Read in the right part of the expression. It may turn out to be yet another expression which /// will be sequentially, and recursively, read from the file. /// </summary> protected void readRValue() { ApeCore.ReadValue<Int64>(_file); // Ignore these bytes. if (ValueFlags == 0x00 || ValueFlags == 0x04 || ValueFlags == 0x05) { RValue = new ApeExpression(_file); } else if (ValueFlags == 0x08 || ValueFlags == 0x0c || ValueFlags == 0x0d) { RValue = ApeCore.ReadValue<float>(_file); } else if (ValueFlags == 0x0a || ValueFlags == 0x0e || ValueFlags == 0x0f) { RValue = ApeCore.ReadString(_file); if (RValue as string == "") { throw new ApeBinaryDataException("Unexpected RValue"); } } else if (ValueFlags == 0x30 || ValueFlags == 0x31 || ValueFlags == 0x32 || ValueFlags == 0x33) { RValue = ApeCore.ReadQuotedString(_file); } else { throw new ApeBinaryDataException("The value flag " + BitConverter.ToString(new byte[] { ValueFlags }) + " is invalid."); } }
/// <summary> /// Read in the left part of the expression. It may turn out to be yet another expression which /// will be sequentially, and recursively, read from the file. /// </summary> protected void readLValue() { ApeCore.ReadValue<Int64>(_file); // Dump this. Ignored. if (ValueFlags == 0x00 || ValueFlags == 0x08 || ValueFlags == 0x0a) { LValue = new ApeExpression(_file); } else if (ValueFlags == 0x04 || ValueFlags == 0x0c || ValueFlags == 0x0e) { LValue = ApeCore.ReadValue<float>(_file); } else if (ValueFlags == 0x05 || ValueFlags == 0x0d || ValueFlags == 0x0f || ValueFlags == 0x31) { LValue = ApeCore.ReadString(_file); if (LValue as string == "") { throw new ApeBinaryDataException("Unexpected LValue"); } } else if (ValueFlags == 0x30 || ValueFlags == 0x32 || ValueFlags == 0x33) { LValue = ApeCore.ReadQuotedString(_file); } else { throw new ApeBinaryDataException("The value flag " + BitConverter.ToString(new byte[] { ValueFlags }) + " is invalid."); } }