class

Bindgen::Processor::CopyStructs

Inherits Bindgen::TypeHelper < Bindgen::Processor::Base < Bindgen::Graph::Visitor < Reference < Object

Copies all classes into lib structs which have their copy_structure set to true in the type database.

Has to be run before the CrystalBinding processor.

Constants

BIT_FIELD_STORAGE = {"Bool" => {"UInt8", "uint8_t"}, "Int8" => {"UInt8", "uint8_t"}, "UInt8" => {"UInt8", "uint8_t"}, "Int16" => {"UInt16", "uint16_t"}, "UInt16" => {"UInt16", "uint16_t"}, "Int32" => {"UInt32", "uint32_t"}, "UInt32" => {"UInt32", "uint32_t"}, "Int64" => {"UInt64", "uint64_t"}, "UInt64" => {"UInt64", "uint64_t"}, "LibC::Long" => {"LibC::ULong", "unsigned long int"}, "LibC::ULong" => {"LibC::ULong", "unsigned long int"}, "LibC::LongLong" => {"LibC::ULongLong", "unsigned long long int"}, "LibC::ULongLong" => {"LibC::ULongLong", "unsigned long long int"}, "LibC::SizeT" => {"LibC::SizeT", "size_t"}, "LibC::SSizeT" => {"LibC::SizeT", "size_t"}}

The storage of bit-fields in a lib struct, by the binding type of the bit-field: The unsigned Crystal type, and its C++ type.

Log = ::Log.for(self)

Copies all classes into lib structs which have their copy_structure set to true in the type database.

Has to be run before the CrystalBinding processor.

SIGNED_BIT_FIELDS = {"Int8", "Int16", "Int32", "Int64", "LibC::Long", "LibC::LongLong", "LibC::SSizeT"}

Binding types of signed bit-fields.

SIGNED_STORAGE = {"UInt8" => "Int8", "UInt16" => "Int16", "UInt32" => "Int32", "UInt64" => "Int64", "LibC::ULong" => "LibC::Long", "LibC::ULongLong" => "LibC::LongLong", "LibC::SizeT" => "LibC::SSizeT"}

The signed counterpart of each storage type, to extend the sign of signed bit-fields.

Instance methods

process(graph : Graph::Node, doc : Parser::Document)
Source