class Bindgen::Parser::Class
- Bindgen::Parser::Class
- Reference
- Object
Overview
Describes a C++ class
or struct
.
Defined in:
bindgen/parser/class.crConstructors
- .new(__temp_113 : JSON::PullParser)
- .new(name : String, byteSize : Int32 = 0, hasDefaultConstructor : Bool = false, hasCopyConstructor : Bool = false, isClass : Bool = true, isAbstract : Bool = false, isDestructible : Bool = true, bases : Array(Bindgen::Parser::BaseClass) = [] of BaseClass, fields : Array(Bindgen::Parser::Field) = [] of Field, methods : Array(Bindgen::Parser::Method) = [] of Method)
Instance Method Summary
-
#abstract? : Bool
Is this class abstract?
-
#as_type(pointer = 1, reference = false, const = false) : Type
Returns a
Type
referencing this class. - #bases : Array(BaseClass)
- #bases=(_bases : Array(BaseClass))
-
#binding_name : String
The name of the class as part of binding methods.
-
#byte_size : Int32
Size of an instance of the class in memory.
- #byteSize : Int32
- #byteSize=(_byteSize : Int32)
-
#class? : Bool
Is this a
class
? Opposite of#struct?
. -
#destructible? : Bool
Is this class publicly destructible?
-
#destructor_method : Method
Constructs a method destroying an instance of this class.
-
#destructor_name : String
The full binding function name of the destructor.
-
#each_wrappable_method(&)
Yields each wrappable method without any further processing.
- #fields : Array(Field)
- #fields=(_fields : Array(Field))
-
#find_parent_method(method : Method) : Method | Nil
Assumes that method exists in a class inheriting from this class.
-
#has_copy_constructor? : Bool
Is the type copy-constructable?
-
#has_default_constructor? : Bool
Does the type have a default, argument-less constructor?
-
#has_virtual_methods?
Does this class have any virtual methods?
- #hasCopyConstructor : Bool
- #hasCopyConstructor=(_hasCopyConstructor : Bool)
- #hasDefaultConstructor : Bool
- #hasDefaultConstructor=(_hasDefaultConstructor : Bool)
- #isAbstract : Bool
- #isAbstract=(_isAbstract : Bool)
- #isClass : Bool
- #isClass=(_isClass : Bool)
- #isDestructible : Bool
- #isDestructible=(_isDestructible : Bool)
- #methods : Array(Method)
- #methods=(_methods : Array(Method))
- #name : String
- #name=(_name : String)
-
#struct?
Is this a
struct
? Opposite of#class?
. - #to_json(json : JSON::Builder)
-
#wrap_methods : Array(Method)
List of all wrappable-methods.
-
#wrappable_methods
Non-yielding version of
#each_wrappable_method
Constructor Detail
Instance Method Detail
Returns a Type
referencing this class.
Constructs a method destroying an instance of this class.
Yields each wrappable method without any further processing.
Note: This method hard-codes which methods to ignore. If you're wondering why a method doesn't even reach the graph in the first place, look in here.
Assumes that method exists in a class inheriting from this class. Tries to find a method in this class which is overriden by method.
List of all wrappable-methods. This includes all Method#variants
.
Methods which use Method#move_semantics?
on any type are explicitly
removed.
Note: This is a memoized getter. Thus it's cheap to call it multiple times.