class
Bindgen::Graph::Struct
Overview
A struct in Crystal (lib or not), or a plain struct in C++.
A structure can host both raw non-static variable fields (C-style) and other methods at once.
Defined in:
bindgen/graph/struct.crConstant Summary
-
COPY_BASE_CONSTRUCTOR_TAG =
"COPY_BASE_CONSTRUCTOR_TAG" -
Used to signal the
Generator::Cppto generate a constructor copying an instance of the base class, which isn't inherited by the above. -
INHERIT_CONSTRUCTORS_TAG =
"INHERIT_CONSTRUCTORS_TAG" -
Used to signal the
Generator::Cppto generate ausing BASE::BASE;.
Constructors
Instance Method Summary
-
#base_class : String | Nil
Name of the base-class, if any.
-
#base_class=(base_class : String | Nil)
Name of the base-class, if any.
-
#bit_fields : Array(Bindgen::Graph::Struct::BitField)
Bit-fields of a
lib struct, which get getter and setter methods. -
#field_defaults : Hash(String, String)
Default member initializers of
#fields, by name, as C++ expressions:nullptr. -
#fields : Hash(String, Call::Result)
Non-static fields in this structure.
-
#packed? : Bool
Are the fields packed without alignment, as in a
@[Packed]struct?
Instance methods inherited from class Bindgen::Graph::Container
by_name(name) : Node
by_name,
by_name?(name) : Node | Nil
by_name?,
nodes : Array(Bindgen::Graph::Node)
nodes,
platform_specific(platform : Platform | Platforms)
platform_specific,
platform_specific?(platform : Platform | Platforms)
platform_specific?
Instance methods inherited from class Bindgen::Graph::Node
constant? : Bool
constant?,
crystal_prefix : String
crystal_prefix,
diagnostics_path : String
diagnostics_path,
find_root : Node
find_root,
full_path : Array(Node)
full_path,
kind_name : String
kind_name,
name : String
name,
parent : Container | Nil
parent,
parent=(parent : Container | Nil)
parent=,
path_name : String
path_name,
set_tag(name : String, value : String = "")
set_tag,
tag(name : String)
tag,
tag?(name : String)
tag?,
tags : Hash(String, String)
tags,
unspecific_parent : Container | Nil
unspecific_parent
Constructor methods inherited from class Bindgen::Graph::Node
new(name : String, parent : Container | Nil = nil)
new
Constructor Detail
Instance Method Detail
Name of the base-class, if any. This is mainly useful for C++ to generate the jump-table.
Name of the base-class, if any. This is mainly useful for C++ to generate the jump-table.
Bit-fields of a lib struct, which get getter and setter methods.
Default member initializers of #fields, by name, as C++ expressions:
nullptr. Only Generator::Cpp writes them.