abstract class BitField(T)

Defined in:

bitfield.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def inspect(io : IO) : Nil #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]

Macro Detail

macro add_field(name, type, size, read_only, write_only) #

Exists as a general way to add fields to the FIELDS list. Guarantees that the correct number of parameters are passed, at least.


[View source]
macro bool(name, read_only = false, write_only = false) #

[View source]
macro build_methods #

[View source]
macro def_to_s #

[View source]
macro enumeration(name, type, read_only = false, write_only = false) #

[View source]
macro get_val(src, size, start) #

[View source]
macro mask(size) #

[View source]
macro num(name, size, read_only = false, write_only = false) #

[View source]
macro set_val(dst, src, size, start) #

[View source]
macro shifted_mask(size, start) #

[View source]