# Buffer

class Buffer < Object

Abstract buffer.

When reading and writing objects, defers to the read() and write() member functions, declared in Object.

### Member Functions

Name Description
get Get this.
getObject Get this as an object.
getArray Get this as an array.
getLength If this is an array get its length.
getBoolean Get this as a Boolean.
getInteger Get this as an integer.
getReal Get this as a real.
getString Get this as a string.
getObject Get this as an object.
getBooleanVector Get this as a vector of Booleans.
getIntegerVector Get this as a vector of integers.
getRealVector Get this as a vector of reals.
getBooleanMatrix Get this as a matrix of Booleans.
getIntegerMatrix Get this as a matrix of integers.
getRealMatrix Get this as a matrix of reals.
getChild Get a child.
getObject Get a child as an object.
getArray Get a child as an array.
getLength Get the length of an array.
getBoolean Get a child as a Boolean.
getInteger Get a child as an integer.
getReal Get a child as a real.
getString Get a child as a string.
getObject Get a child as an object.
getBooleanVector Get a child as a vector of Booleans.
getIntegerVector Get a child as a vector of integers.
getRealVector Get a child as a vector of reals.
getBooleanMatrix Get a child as a matrix of Booleans.
getIntegerMatrix Get a child as a matrix of integers.
getRealMatrix Get a child as a matrix of reals.
get Get this as a Boolean.
get Get this as an integer.
get Get this as a real.
get Get this as a string.
get Get this as an object.
get Get this as a vector of Booleans.
get Get this as a vector of integers.
get Get this as a vector of reals.
get Get this as a matrix of Booleans.
get Get this as a matrix of integers.
get Get this as a matrix of reals.
get Get a Boolean.
get Get an integer.
get Get a real.
get Get a string.
get Get an object.
get Get a vector of Booleans.
get Get a vector of integers.
get Get a vector of reals.
get Get a matrix of Booleans.
get Get a matrix of integers.
get Get a matrix of reals.
set Set this (to nil).
setObject Set this as an object.
setArray Set this as an array.
setNil Set this as nil.
setBoolean Set this as a Boolean.
setInteger Set this as an integer.
setReal Set this as a real.
setString Set this as a string.
setObject Set this as an object.
setBooleanVector Set this as a vector of Booleans.
setIntegerVector Set this as a vector of integers.
setRealVector Set this as a vector of reals.
setBooleanMatrix Set this as matrix of Booleans.
setIntegerMatrix Set this as a matrix of integers.
setRealMatrix Set this as a matrix of reals.
setChild Set child (to nil).
setObject Set child as an object.
setArray Set child as an array.
setNil Set child as nil.
setBoolean Set child as a Boolean.
setInteger Set child as an integer.
setReal Set child as a real.
setString Set child as a string.
setObject Set child as an object.
setBooleanVector Set child as a vector of Booleans.
setIntegerVector Set child as a vector of integers.
setRealVector Set child as a vector of reals.
setBooleanMatrix Set child as a matrix of Booleans.
setIntegerMatrix Set child as a matrix of integers.
setRealMatrix Set child as a matrix of reals.
set Set this as a Boolean.
set Set this as an integer.
set Set this as a real.
set Set this as a string.
set Write as an object.
set Set this as a vector of Booleans.
set Set this as a vector of integers.
set Set this as a vector of reals.
set Set this as matrix of Booleans.
set Set this as a matrix of integers.
set Set this as a matrix of reals.
set Set a Boolean.
set Set an integer.
set Set a real.
set Set a string.
set Set an object.
set Set a vector of Booleans.
set Set a vector of integers.
set Set a vector of reals.
set Set a matrix of Booleans.
set Set a matrix of integers.
set Set a matrix of reals.
push Push a new element onto the end of an array.

### Member Fibers

Name Description
walk Iterate through the elements of an array.
walk Iterate through the elements of an array.

### Member Function Details

#### get

function get() -> Buffer

Get this.

function get(value:Boolean?) -> Boolean?

Get this as a Boolean.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is of a compatible type.

function get(value:Integer?) -> Integer?

Get this as an integer.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is of a compatible type.

function get(value:Real?) -> Real?

Get this as a real.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is of a compatible type.

function get(value:String?) -> String?

Get this as a string.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is of a compatible type.

function get(value:Object) -> Object?

Get this as an object.

• value: The object.

Return: The object.

function get(value:Boolean[_]?) -> Boolean[_]?

Get this as a vector of Booleans.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(value:Integer[_]?) -> Integer[_]?

Get this as a vector of integers.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(value:Real[_]?) -> Real[_]?

Get this as a vector of reals.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(value:Boolean[_,_]?) -> Boolean[_,_]?

Get this as a matrix of Booleans.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function get(value:Integer[_,_]?) -> Integer[_,_]?

Get this as a matrix of integers.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function get(value:Real[_,_]?) -> Real[_,_]?

Get this as a matrix of reals.

• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function get(name:String, value:Boolean?) -> Boolean?

Get a Boolean.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if the given entry exists and is of a compatible type.

function get(name:String, value:Integer?) -> Integer?

Get an integer.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if the given entry exists and is of a compatible type.

function get(name:String, value:Real?) -> Real?

Get a real.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if the given entry exists and is of a compatible type.

function get(name:String, value:String?) -> String?

Get a string.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if the given entry exists and is of a compatible type.

function get(name:String, value:Object) -> Object?

Get an object.

• name: Name of the child.
• value: The object.

Return: The object.

function get(name:String, value:Boolean[_]?) -> Boolean[_]?

Get a vector of Booleans.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(name:String, value:Integer[_]?) -> Integer[_]?

Get a vector of integers.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(name:String, value:Real[_]?) -> Real[_]?

Get a vector of reals.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array with all elements of a compatible type.

function get(name:String, value:Boolean[_,_]?) -> Boolean[_,_]?

Get a matrix of Booleans.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function get(name:String, value:Integer[_,_]?) -> Integer[_,_]?

Get a matrix of integers.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function get(name:String, value:Real[_,_]?) -> Real[_,_]?

Get a matrix of reals.

• name: Name of the child.
• value: Unused, but necessary for overload resolution.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

#### getArray

function getArray() -> Buffer?

Get this as an array.

function getArray(name:String) -> Buffer?

Get a child as an array.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

#### getBoolean

function getBoolean() -> Boolean?

Get this as a Boolean.

Return: An optional with a value if this is of a compatible type.

function getBoolean(name:String) -> Boolean?

Get a child as a Boolean.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

#### getBooleanMatrix

function getBooleanMatrix() -> Boolean[_,_]?

Get this as a matrix of Booleans.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function getBooleanMatrix(name:String) -> Boolean[_,_]?

Get a child as a matrix of Booleans.

• name: Name of the child.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

#### getBooleanVector

function getBooleanVector() -> Boolean[_]?

Get this as a vector of Booleans.

Return: An optional with a value if this is an array with all elements of a compatible type.

function getBooleanVector(name:String) -> Boolean[_]?

Get a child as a vector of Booleans.

• name: Name of the child.

Return: An optional with a value if this is an array with all elements of a compatible type.

#### getChild

function getChild(name:String) -> Buffer?

Get a child.

#### getInteger

function getInteger() -> Integer?

Get this as an integer.

Return: An optional with a value if this is of a compatible type.

function getInteger(name:String) -> Integer?

Get a child as an integer.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

#### getIntegerMatrix

function getIntegerMatrix() -> Integer[_,_]?

Get this as a matrix of integers.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function getIntegerMatrix(name:String) -> Integer[_,_]?

Get a child as a matrix of integers.

• name: Name of the child.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

#### getIntegerVector

function getIntegerVector() -> Integer[_]?

Get this as a vector of integers.

Return: An optional with a value if this is an array with all elements of a compatible type.

function getIntegerVector(name:String) -> Integer[_]?

Get a child as a vector of integers.

• name: Name of the child.

Return: An optional with a value if this is an array with all elements of a compatible type.

#### getLength

function getLength() -> Integer?

If this is an array get its length.

Return: An optional with a value giving the length if this is an array.

function getLength(name:String) -> Integer?

Get the length of an array.

• name: Name of the child.

Return: An optional with a value giving the length if the given entry is an array.

#### getObject

function getObject() -> Buffer?

Get this as an object.

function getObject(value:Object) -> Object?

Get this as an object.

• value: The object into which to read.

Return: The object.

function getObject(name:String) -> Buffer?

Get a child as an object.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

function getObject(name:String, value:Object) -> Object?

Get a child as an object.

• name: Name of the child.
• value: The object into which to read.

Return: An optional with a value if the given entry exists.

#### getReal

function getReal() -> Real?

Get this as a real.

Return: An optional with a value if this is of a compatible type.

function getReal(name:String) -> Real?

Get a child as a real.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

#### getRealMatrix

function getRealMatrix() -> Real[_,_]?

Get this as a matrix of reals.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

function getRealMatrix(name:String) -> Real[_,_]?

Get a child as a matrix of reals.

• name: Name of the child.

Return: An optional with a value if this is an array where all elements are themselves arrays of the same length and compatible type.

#### getRealVector

function getRealVector() -> Real[_]?

Get this as a vector of reals.

Return: An optional with a value if this is an array with all elements of a compatible type.

function getRealVector(name:String) -> Real[_]?

Get a child as a vector of reals.

• name: Name of the child.

Return: An optional with a value if this is an array with all elements of a compatible type.

#### getString

function getString() -> String?

Get this as a string.

Return: An optional with a value if this is of a compatible type.

function getString(name:String) -> String?

Get a child as a string.

• name: Name of the child.

Return: An optional with a value if the given entry exists and is of a compatible type.

#### push

function push() -> Buffer

Push a new element onto the end of an array.

Returns: a buffer for modifying the new element.

#### set

function set() -> Buffer

Set this (to nil).

function set(value:Boolean?)

Set this as a Boolean.

• value: Value.

function set(value:Integer?)

Set this as an integer.

• value: Value.

function set(value:Real?)

Set this as a real.

• value: Value.

function set(value:String?)

Set this as a string.

• value: Value.

function set(value:Object?)

Write as an object.

• o: The object.

function set(value:Boolean[_]?)

Set this as a vector of Booleans.

• value: Value.

function set(value:Integer[_]?)

Set this as a vector of integers.

• value: Value.

function set(value:Real[_]?)

Set this as a vector of reals.

• value: Value.

function set(value:Boolean[_,_]?)

Set this as matrix of Booleans.

• value: Value.

function set(value:Integer[_,_]?)

Set this as a matrix of integers.

• value: Value.

function set(value:Real[_,_]?)

Set this as a matrix of reals.

• value: Value.

function set(name:String, value:Boolean?)

Set a Boolean.

• name: Name of the child.
• value: Value.

function set(name:String, value:Integer?)

Set an integer.

• name: Name of the child.
• value: Value.

function set(name:String, value:Real?)

Set a real.

• name: Name of the child.
• value: Value.

function set(name:String, value:String?)

Set a string.

• name: Name of the child.
• value: Value.

function set(name:String, value:Object?)

Set an object.

• name: Name of the child.
• value: Value.

function set(name:String, value:Boolean[_]?)

Set a vector of Booleans.

• name: Name of the child.
• value: Value.

function set(name:String, value:Integer[_]?)

Set a vector of integers.

• name: Name of the child.
• value: Value.

function set(name:String, value:Real[_]?)

Set a vector of reals.

• name: Name of the child.
• value: Value.

function set(name:String, value:Boolean[_,_]?)

Set a matrix of Booleans.

• name: Name of the child.
• value: Value.

function set(name:String, value:Integer[_,_]?)

Set a matrix of integers.

• name: Name of the child.
• value: Value.

function set(name:String, value:Real[_,_]?)

Set a matrix of reals.

• name: Name of the child.
• value: Value.

#### setArray

function setArray()

Set this as an array.

function setArray(name:String)

Set child as an array.

• name: Name of the child.

#### setBoolean

function setBoolean(value:Boolean?)

Set this as a Boolean.

• value: Value.

function setBoolean(name:String, value:Boolean?)

Set child as a Boolean.

• name: Name of the child.
• value: Value.

#### setBooleanMatrix

function setBooleanMatrix(value:Boolean[_,_]?)

Set this as matrix of Booleans.

• value: Value.

function setBooleanMatrix(name:String, value:Boolean[_,_]?)

Set child as a matrix of Booleans.

• name: Name of the child.
• value: Value.

#### setBooleanVector

function setBooleanVector(value:Boolean[_]?)

Set this as a vector of Booleans.

• value: Value.

function setBooleanVector(name:String, value:Boolean[_]?)

Set child as a vector of Booleans.

• name: Name of the child.
• value: Value.

#### setChild

function setChild(name:String) -> Buffer

Set child (to nil).

#### setInteger

function setInteger(value:Integer?)

Set this as an integer.

• value: Value.

function setInteger(name:String, value:Integer?)

Set child as an integer.

• name: Name of the child.
• value: Value.

#### setIntegerMatrix

function setIntegerMatrix(value:Integer[_,_]?)

Set this as a matrix of integers.

• value: Value.

function setIntegerMatrix(name:String, value:Integer[_,_]?)

Set child as a matrix of integers.

• name: Name of the child.
• value: Value.

#### setIntegerVector

function setIntegerVector(value:Integer[_]?)

Set this as a vector of integers.

• value: Value.

function setIntegerVector(name:String, value:Integer[_]?)

Set child as a vector of integers.

• name: Name of the child.
• value: Value.

#### setNil

function setNil()

Set this as nil.

function setNil(name:String)

Set child as nil.

• name: Name of the child.

#### setObject

function setObject()

Set this as an object.

function setObject(value:Object?)

Set this as an object.

• value: Value.

function setObject(name:String)

Set child as an object.

• name: Name of the child.

function setObject(name:String, value:Object?)

Set child as an object.

• name: Name of the child.
• value: Value.

#### setReal

function setReal(value:Real?)

Set this as a real.

• value: Value.

function setReal(name:String, value:Real?)

Set child as a real.

• name: Name of the child.
• value: Value.

#### setRealMatrix

function setRealMatrix(value:Real[_,_]?)

Set this as a matrix of reals.

• value: Value.

function setRealMatrix(name:String, value:Real[_,_]?)

Set child as a matrix of reals.

• name: Name of the child.
• value: Value.

#### setRealVector

function setRealVector(value:Real[_]?)

Set this as a vector of reals.

• value: Value.

function setRealVector(name:String, value:Real[_]?)

Set child as a vector of reals.

• name: Name of the child.
• value: Value.

#### setString

function setString(value:String?)

Set this as a string.

• value: Value.

function setString(name:String, value:String?)

Set child as a string.

• name: Name of the child.
• value: Value.

### Member Fiber Details

#### walk

fiber walk() -> Buffer

Iterate through the elements of an array.

Yields: buffers for each element in turn.

fiber walk(name:String) -> Buffer

Iterate through the elements of an array.

Yields: buffers for each element in turn.