struct Bindgen::Graph::Struct::BitField

Overview

A bit-field of a lib struct or lib union. It is stored in the integer member storage of type storage_type, which is unit_bits wide, at the bit shift counted from its least significant bit. A signed bit-field has the signed counterpart of the storage type as signed_type.

The getter_fun and setter_fun are the lib functions accessing it through C++. Without them, the methods shift and mask storage instead.

Defined in:

bindgen/graph/struct.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, type_name : String, storage : String, storage_type : String, unit_bits : Int64, shift : Int64, width : Int32, signed_type : String | Nil, bool : Bool, const : Bool, doc : String | Nil, getter_fun : String | Nil = nil, setter_fun : String | Nil = nil) #

[View source]

Instance Method Detail

def bool : Bool #

def clone #

[View source]
def const : Bool #

def copy_with(name _name = @name, type_name _type_name = @type_name, storage _storage = @storage, storage_type _storage_type = @storage_type, unit_bits _unit_bits = @unit_bits, shift _shift = @shift, width _width = @width, signed_type _signed_type = @signed_type, bool _bool = @bool, const _const = @const, doc _doc = @doc, getter_fun _getter_fun = @getter_fun, setter_fun _setter_fun = @setter_fun) #

[View source]
def doc : String | Nil #

def getter_fun : String | Nil #

def name : String #

def setter_fun : String | Nil #

def shift : Int64 #

def signed_type : String | Nil #

def storage : String #

def storage_type : String #

def type_name : String #

def unit_bits : Int64 #

def width : Int32 #