struct Novika::StructLayoutForm

Overview

A thin form wrapper around FFI::StructLayout. Lazily parses a struct layout definition and keeps the corresponding FFI::StructLayout in sync.

Included Modules

Defined in:

novika/forms/foreign.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Novika::Form

a(type : T.class) : T forall T a, desc(io : IO)
desc : String
desc
, die(details : String) die, effect(io)
effect
effect
, on_open(engine : Engine) : self on_open, on_parent_open(engine : Engine) : self on_parent_open, onto(block : Block) : self onto, sel(a, b) sel, to_quote : Quote to_quote

Instance methods inherited from module Novika::Schedulable

schedule(engine : Engine, stack : Block) schedule, schedule!(engine : Engine, stack : Block) schedule!

Constructor Detail

def self.new(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String) #

Initializes a struct layout form. Names array names must be created uniquely for this form, because it will be used as this struct layout form's identity during deep recursion checks etc.

this block is going to be used for lookup of user-defined struct layouts (e.g. &foobar).


def self.new(layout : Novika::FFI::StructLayout, comment : Nil | String) #

Initializes a struct layout form from the given layout. The layout must contain at least one field.


Class Method Detail

def self.typedesc #

Instance Method Detail

def ==(other : self) #

def desc(io) #

def layout(outerset = nil) #

Returns the underlying layout.


def object_id(*args, **options) #

Since StructLayoutForm is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.


def object_id(*args, **options, &) #

Since StructLayoutForm is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.


def to_s(io) #