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

Constant Summary

INHERIT_CONSTRUCTORS_TAG = "INHERIT_CONSTRUCTORS_TAG"

Used to signal the Generator::Cpp to generate a using BASE::BASE;.

Constructors

Instance Method Summary

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

def self.new(fields : Hash(String, Bindgen::Call::Result), name, parent, base_class : Nil | String = nil) #

[View source]

Instance Method Detail

def base_class : String | Nil #

Name of the base-class, if any. This is mainly useful for C++ to generate the jump-table.


[View source]
def base_class=(base_class : String | Nil) #

Name of the base-class, if any. This is mainly useful for C++ to generate the jump-table.


[View source]
def fields : Hash(String, Call::Result) #

Non-static fields in this structure.


[View source]