Module: SGC::Memory::IBuffer Abstract
- Included in:
- Buffer
- Defined in:
- lib/memory/interface/ibuffer.rb
Overview
This module is abstract.
A memory buffer interface.
A buffer stores elements of the same C data type.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#[](index) ⇒ Object
The element at index of this buffer.
-
#[]=(index, value) ⇒ Object
Set the element at index of this buffer to value.
-
#element_size ⇒ Integer
The size of an element in this buffer in bytes.
-
#size ⇒ Integer
The number of elements in this buffer.
Instance Method Details
#[](index) ⇒ Object
Returns The element at index of this buffer.
34 |
# File 'lib/memory/interface/ibuffer.rb', line 34 def [](index); raise NotImplementedError; end |
#[]=(index, value) ⇒ Object
Set the element at index of this buffer to value.
40 |
# File 'lib/memory/interface/ibuffer.rb', line 40 def []=(index, value); raise NotImplementedError; end |
#element_size ⇒ Integer
Returns The size of an element in this buffer in bytes.
46 |
# File 'lib/memory/interface/ibuffer.rb', line 46 def element_size; raise NotImplementedError; end |
#size ⇒ Integer
Returns The number of elements in this buffer.
43 |
# File 'lib/memory/interface/ibuffer.rb', line 43 def size; raise NotImplementedError; end |