Module Databoard

This module is undocumented. This is a list of its definitions.

ArrayType :: Datatype -> Datatype
BooleanType :: Datatype
ByteType :: Datatype
DatatypeComponent :: String -> Datatype -> DatatypeComponent
DoubleType :: Datatype
FloatType :: Datatype
IntegerType :: Datatype
LongType :: Datatype
MapType :: Datatype -> Datatype -> Datatype
OptionalType :: Datatype -> Datatype
RecordType :: Vector DatatypeComponent -> Datatype
StringType :: Datatype
UnionType :: Vector DatatypeComponent -> Datatype
VariantType :: Datatype
adapt :: Serializable a => Serializable b => a -> b

Adapt value from one serializable type to another

adapt_ :: a -> Binding a -> Binding b -> b

Adapt between types using explicitly provided binding objects: adapt_ value from to

compareObjects :: Serializable a => a -> a -> Integer

Compare two serializable objects

Result is -1, 0 or 1 depending the partial ordering of the objects.

compileReference :: [ChildReference] -> ChildReference

Combine a list of child data object references into a single path reference

componentReference :: ChildReference

Get a reference to a component child data object

  • Component of an array/optional data type/binding
  • Contained value of an optional/variant/union object
createVariant :: Datatype -> Dynamic -> Variant

Create a variant of a given data type from an object in the default binding (unchecked, use with extreme caution)

createVariant_ :: Binding Dynamic -> Dynamic -> Variant

Create a variant using an explicitly provided binding value (unchecked cast)

datatypeBinding :: Datatype -> Binding Dynamic

Get a default binding for a given data type

datatypeCompnentCount :: Datatype -> Integer

Get the number of type components in an data type

datatypeComponentType :: Datatype -> ChildReference -> Datatype

Get a component type of a composite data type

deserialize :: Serializable a => Vector Byte -> a

Deserializes a value from a byte array using default serializer.

getComponentBinding :: Binding a -> ChildReference -> Binding b

Get a component binding

getSerializableComponent :: Serializable a => Serializable b => a -> ChildReference -> b

Get a child data component of a composite serializable value

indexReference :: Integer -> ChildReference

Get a reference to a child data object using an index (zero-based)

  • Element index of an array object
  • Field index of a record or union type
  • 0:
    • Key component of a map type/binding
    • Component of any single-component type/binding (optional, array)
    • Contained value/type of any single-element object (optional, union, variant)
  • 1:
    • Value component of a map type/binding
isBindingInstance :: Binding Dynamic -> Dynamic -> Boolean

Check whether a dynamic object is an instance of a given binding

keyReference :: Variant -> ChildReference

Get a reference to a MapType child data object using a given key value

  • Contained value of a map object for a given key value
labelReference :: String -> ChildReference

Get a reference to a child data object using a label

  • A component name of a record or union data type/binding
  • A string representation of the index of a record or union data type/binding component
  • "v": The component type of an array/optional data type/binding
  • "0"/"key": The key component of a map data type/binding
  • "1"/"value": The value component of a map data type/binding
nameReference :: String -> ChildReference

Get a reference to a child data object using a field name

  • A component name of a record or union data type/binding
  • "key": The key component of a map data type/binding
  • "value": The value component of a map data type/binding
parseValueDefinition :: Serializable a => String -> a

Create a serializable object from a textual representation

rawVariantValue :: Variant -> a

Get raw value contained by a variant (unchecked cast)

serializableDefaultValue :: Serializable a => a

The default value of a serializable type

serializableRandomValue :: Serializable a => <Random> a

Create a random value of a serializable type

serialize :: Serializable a => a -> Vector Byte

Serializes a value to a byte array using default serializer.

showSerializable :: Serializable a => a -> String

Get a textual representation of a serializable value

translateDatatype :: String -> Datatype

Get a data type from a string representation

variant :: Serializable a => a -> Variant

Create a variant from a serializable value

variantComponent :: Variant -> ChildReference -> Variant

Get a component of compound data value in a variant

variantDatatype :: Variant -> Datatype

Get the data type of a variant object

variantElement :: Serializable a => Variant -> Integer -> a

Get an element of a compound variant value using an index reference

variantOf :: a -> Variant

Create a variant from a raw object (based on Java class)

variantValue :: Serializable a => Variant -> a

Get the value of a variant in a serializable type

variantValue_ :: Variant -> Binding a -> a

Get value from a variant using a given binding

variant_ :: Binding a -> a -> Variant

Create a variant with explicitly provided binding and value