Buffer

From GiderosMobile
Revision as of 11:10, 3 February 2020 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ <languages /> <!-- GIDEROSOBJ:Buffer --> '''<translate>Supported platforms</translate>:''' File:Platform android.pngFile:Platform ios.pngFile:Platform mac....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2020.2
Inherits from: Object

Description

The Buffer class acts as FIFO buffer with Gideros internal file system integration. At lua side, Buffers are created with a name, and data can be added or from them. Once created, buffer data can also be accessed by internal gideros functions that normally use files, such as textures or sounds. To do that pass |B|buffer.ext as the file name, where buffer.ext is that name of the buffer.

Methods

Buffer.new creates a new Buffer object
Buffer:append adds data at the end of the buffer
Buffer:prepend adds data at the beginning of the buffer
Buffer:trim remove data from the start or the end of the buffer
Buffer:set sets data in the buffer
Buffer:get gets data from the buffer
Buffer:size gets the buffer size
Buffer:seek sets the position of the next file access
Buffer:tell gets the position of the next file access

Events

Constants