Class: RLTK::CG::ArrayType

Inherits:
SimpleAggregateType show all
Defined in:
lib/rltk/cg/type.rb

Overview

A Type describing an array that holds objects of a single given type.

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods inherited from SimpleAggregateType

#element_type, #initialize

Methods included from AbstractClass

included

Methods inherited from Type

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

Methods included from BindingClass

#==

Constructor Details

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

Instance Method Details

#sizeInteger Also known as: length

Returns Number of elements in this array type.

Returns:

  • (Integer)

    Number of elements in this array type.



261
262
263
# File 'lib/rltk/cg/type.rb', line 261

def size
	@length ||= Bindings.get_array_length(@ptr)
end