Back to Aurora Vision Library website

You are here: Start » Function Reference » All Functions » Binary Data » ReadBoolFromBuffer

ReadBoolFromBuffer


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Header: STD.h
Namespace: avl
Module: FoundationLite

Reads boolean value in specified binary format from byte buffer.

Syntax

void avl::ReadBoolFromBuffer
(
	const avl::ByteBuffer& inBuffer,
	int inOffset,
	avl::IntegerBinaryFormat::Type inFormat,
	bool& outValue,
	int& outOffset
)

Parameters

Name Type Range Default Description
Input value inBuffer const ByteBuffer& Source data
Input value inOffset int 0 - 0 Read start position
Input value inFormat IntegerBinaryFormat::Type Signed_32Bit_LittleEndian Binary serialization format of integer data
Output value outValue bool& Read value
Output value outOffset int& Resulting position behind read data

Description

This filter is intended for reading (deserializing) a boolean value out of a raw binary data in a ByteBuffer.

Data is read starting at the position provided by the inOffset input (in bytes). This position is than advanced by the size of read data and returned on the outOffset output. This output can be connected to the inOffset input of other byte buffer reading filter when reading consecutive fields of data structures. When data read spans beyond the end of the input buffer an IOError is raised.

A boolean value is actually stored as an integer data with contractual numeric value representing True and False. This filter is reading an integer numeric value similarly to the ReadIntegerFromBuffer filter and returns False on the outValue output when this value is equal to zero, and respectively True when this value is different than zero.

Errors

List of possible exceptions:

Error type Description
DomainError Not supported integer binary format.
IoError Empty byte buffer at input of ReadBoolFromBuffer.
IoError Reading beyond the end of the byte buffer.
Source data range specified by the inOffset input and the size of integer binary format spans beyond the end of the byte buffer.

See Also

  • WriteBoolToBuffer – Converts boolean value into specified integer binary representation and writes it to a byte buffer.