Class: RLTK::CG::BasicIntType Abstract

Inherits:
NumberType show all
Includes:
AbstractClass
Defined in:
lib/rltk/cg/type.rb

Overview

This class is abstract.

All types that represent integers of a given width inherit from this class.

Direct Known Subclasses

IntType, SimpleIntType

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods included from AbstractClass

included

Methods inherited from NumberType

value_class, #value_class

Methods inherited from Type

#allignment, #context, from_ptr, #hash, #initialize, #kind, #size

Methods included from BindingClass

#==

Constructor Details

This class inherits a constructor from RLTK::CG::Type

Instance Method Details

#widthInteger

Returns Number of bits used to represent an integer type.

Returns:

  • (Integer)

    Number of bits used to represent an integer type.



132
133
134
# File 'lib/rltk/cg/type.rb', line 132

def width
	@width ||= Bindings.get_int_type_width(@ptr)
end