class Novika::TypedSnapshot

Overview

A snapshot with a type, basis for (de)serializing value forms to/from binary data.

Defined in:

novika/image.cr

Constant Summary

ENDIAN = ["big"]

A snapshot with a type, basis for (de)serializing value forms to/from binary data.

KLASS_NAME = [Novika::TypedSnapshot]

A snapshot with a type, basis for (de)serializing value forms to/from binary data.

PARTS = [{type: "enum", name: type, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: SnapshotType}, {type: "basic", name: snapshot, cls: Snapshot, onlyif: nil, verify: nil, value: nil}] of Nil

A snapshot with a type, basis for (de)serializing value forms to/from binary data.

REMAINING = [] of Nil

A snapshot with a type, basis for (de)serializing value forms to/from binary data.

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(type : Novika::SnapshotType, snapshot : Novika::Snapshot) #

def self.new(form : Block) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Boolean) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Color) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Decimal) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Quote) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Word) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : QuotedWord) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Builtin) #

Creates the corresponding TypedSnapshot for form.


def self.new(form : Byteslice) #

Creates the corresponding TypedSnapshot for form.


Creates the corresponding TypedSnapshot for form.


def self.new(form) #

Raises: no overload for form.


Class Method Detail

def self.bit_fields #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


def self.from_io(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian) #

Macro Detail

macro novika_block_ref_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_boolean_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_builtin_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_byteslice_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_color_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_large_decimal_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_quote_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_quoted_word_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_small_decimal_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_typed_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


macro novika_word_snapshot(name, onlyif = nil, verify = nil, value = nil) #

A snapshot with a type, basis for (de)serializing value forms to/from binary data.


Instance Method Detail

def __format__ : IO::ByteFormat #

def snapshot : Snapshot #

Holds the Snapshot object.


def snapshot=(snapshot : Snapshot) #

Holds the Snapshot object.


def to_form(assembler) #

def type : SnapshotType #

Holds the type of the #snapshot.


def type=(type : SnapshotType) #

Holds the type of the #snapshot.