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).


[View source]
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.


[View source]

Class Method Detail

def self.typedesc #

[View source]

Instance Method Detail

def ==(other : self) #

[View source]
def desc(io) #

[View source]
def layout(outerset = nil) #

Returns the underlying layout.


[View source]
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.


[View source]
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.


[View source]
def to_s(io) #

[View source]