class Novika::BlockPool

Overview

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.

Defined in:

novika/image.cr

Constant Summary

ENDIAN = ["big"]

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.

KLASS_NAME = [Novika::BlockPool]

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.

PARTS = [{type: "basic", name: pivot, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: cb, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do blocks.size end}, {type: "array", name: blocks, cls: FrozenBlock, onlyif: nil, verify: nil, length: -> do count end, value: nil}] of Nil

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.

REMAINING = [] of Nil

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll) #

Creates a block pool by exploring the given pivot block's hierarchy, forms, etc.

Note that the pivot block may or may not be the root block; the whole tree is explored anyway, be it "above", "below", "to the left", or "to the right" of the pivot block.


Class Method Detail

def self.bit_fields #

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


Macro Detail

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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


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

Holds the block pool: all blocks reachable from the #pivot block, and the pivot block itself.

A block can be reached by the way of hierarchy, and by the way of dictionary/tape content.

Consists of a list of frozen blocks (see FrozenBlock) and an id reference to the pivot block in that list.

Block pools can be assembled back into a hierarchy of blocks pivoted at #pivot using melt.


Instance Method Detail

def __format__ : IO::ByteFormat #

def blocks : Array(FrozenBlock) #

Lists the frozen blocks in this pool.


def blocks=(blocks : Array(FrozenBlock)) #

Lists the frozen blocks in this pool.


def cb : UInt64 #

Holds the capability block id. Even though during serialization, capability block is skipped (as serializing it would be of no particular use), its id is still stored so that client-side (nki-side), it can be replaced with the client capability block, hopefully with all necessary capabilities.


def cb=(cb : UInt64) #

Holds the capability block id. Even though during serialization, capability block is skipped (as serializing it would be of no particular use), its id is still stored so that client-side (nki-side), it can be replaced with the client capability block, hopefully with all necessary capabilities.


def count : UInt64 #

Holds the amount of blocks in this pool.


def count=(count : UInt64) #

Holds the amount of blocks in this pool.


def pivot : UInt64 #

Holds the pivot block id.


def pivot=(pivot : UInt64) #

Holds the pivot block id.


def to_block(caps : CapabilityCollection) #

Reconstructs (melts if necessary) the pivot block, its block hierarchy, its forms etc. Returns the resulting Block form.