class Bindgen::Graph::Class
Overview
A class in Crystal, or a C++ struct. We use a struct in C++ due to
it defaulting to public visibility.
Defined in:
bindgen/graph/class.crConstant Summary
-
FORCE_UNWRAP_VARIABLE_TAG =
"FORCE_UNWRAP_VARIABLE_TAG" -
When this tag is set,
Processor::CrystalWrapperwill emit the@unwrapinstance variable and the#to_unsafemethod. This overrides its default behaviour of deducing if these are required.
Constructors
Instance Method Summary
-
#abstract=(abstract __arg0 : Bool)
Is this class abstract?
-
#abstract? : Bool
Is this class abstract?
-
#base_class : String | Nil
Name of the base-class, if any.
-
#base_class=(base_class : String | Nil)
Name of the base-class, if any.
-
#cpp_sub_class : String | Nil
If this class is to be shadow sub-classed in C++, the full name of the structure.
-
#cpp_sub_class=(cpp_sub_class : String | Nil)
If this class is to be shadow sub-classed in C++, the full name of the structure.
-
#instance_variables : Hash(String, Bindgen::Call::Result)
Crystal instance vars in this class.
-
#mangled_name
The mangled name of this class, used to build structures with a class name component.
-
#origin : Parser::Class
The origin class
-
#structure : Struct | Nil
If the structure of this class is copied, the
Structnode. -
#structure=(structure : Struct | Nil)
If the structure of this class is copied, the
Structnode. -
#wrap_class : Class | Nil
If this is set, the class is assumed to be
abstract. -
#wrap_class=(wrap_class : Class | Nil)
If this is set, the class is assumed to be
abstract. -
#wrapped_class : Class | Nil
Opposite direction of
#wrap_class: From theImplclass back to itsabstractparent. -
#wrapped_class=(wrapped_class : Class | Nil)
Opposite direction of
#wrap_class: From theImplclass back to itsabstractparent.
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. Used by both Crystal and C++, and may point at types outside the graph.
Name of the base-class, if any. Used by both Crystal and C++, and may point at types outside the graph.
If this class is to be shadow sub-classed in C++, the full name of the
structure. Processors make the assumption that if this is set, the
class will be sub-classed, and may generate code different to what they
would've done without. This affects Crystal #initialize methods, and
the CONSTRUCT C++ wrappers.
If this class is to be shadow sub-classed in C++, the full name of the
structure. Processors make the assumption that if this is set, the
class will be sub-classed, and may generate code different to what they
would've done without. This affects Crystal #initialize methods, and
the CONSTRUCT C++ wrappers.
Crystal instance vars in this class. Will be ignored by the C++ code paths.
The mangled name of this class, used to build structures with a class name component.
If the structure of this class is copied, the Struct node.
If the structure of this class is copied, the Struct node.
If this is set, the class is assumed to be abstract. This property
then contains the implementation class node.
If this is set, the class is assumed to be abstract. This property
then contains the implementation class node.
Opposite direction of #wrap_class: From the Impl class back to its
abstract parent.
Opposite direction of #wrap_class: From the Impl class back to its
abstract parent.