struct Novika::StructLayoutForm
- Novika::StructLayoutForm
- Struct
- Value
- Object
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.crConstructors
-
.new(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)
Initializes a struct layout form.
-
.new(layout : Novika::FFI::StructLayout, comment : Nil | String)
Initializes a struct layout form from the given layout.
Class Method Summary
Instance Method Summary
- #==(other : self)
- #desc(io)
-
#layout(outerset = nil)
Returns the underlying layout.
-
#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. -
#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. - #to_s(io)
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
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
).
Initializes a struct layout form from the given layout. The layout must contain at least one field.
Class Method Detail
Instance Method Detail
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.
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.