class

OpenGLBindingGenerator::Crystal::GenericEnumValue(T)

Inherits OpenGLBindingGenerator::Crystal::EnumValue < OpenGLBindingGenerator::Crystalize < Reference < Object

A single named value in an enumeration of a generic type.

Constructors

new(name : String, value : T, comment : String | Nil = nil)

Creates the named value.

Source

Instance methods

cast(type : NativeType)
Source
cast(type : DerivedType)
Source
cast(type : Type)
Source
size

Size of the value in bytes.

Source
to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

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

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
type

Creates a Crystal representation of the type needed to hold this value.

Source
value

Value of the enum.

Source