18#ifndef _DECAF_INTERNAL_NIO_FLOATARRAYBUFFER_H_
19#define _DECAF_INTERNAL_NIO_FLOATARRAYBUFFER_H_
35 using decaf::internal::util::ByteArrayAdapter;
106 bool readOnly =
false);
155 virtual float get(
int index)
const;
168 return this->readOnly;
195 this->readOnly = value;
FloatArrayBuffer(float *array, int size, int offset, int length, bool readOnly=false)
Creates a FloatArrayBuffer object that wraps the given array.
virtual FloatBuffer * asReadOnlyBuffer() const
Creates a new, read-only float buffer that shares this buffer's content.The content of the new buffer...
virtual FloatBuffer & put(float value)
Writes the given floats into this buffer at the current position, and then increments the position....
virtual float * array()
Returns the float array that backs this buffer (optional operation).Modifications to this buffer's co...
virtual int arrayOffset()
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
virtual FloatBuffer & put(int index, float value)
Writes the given floats into this buffer at the given index.a reference to this buffer.
virtual FloatBuffer * slice() const
Creates a new FloatBuffer whose content is a shared subsequence of this buffer's content....
virtual FloatBuffer & compact()
Compacts this buffer.The bytes between the buffer's current position and its limit,...
virtual void setReadOnly(bool value)
Sets this FloatArrayBuffer as Read-Only.
Definition FloatArrayBuffer.h:194
virtual bool hasArray() const
Tells whether or not this buffer is backed by an accessible float array.If this method returns true t...
Definition FloatArrayBuffer.h:160
virtual FloatBuffer * duplicate()
Creates a new float buffer that shares this buffer's content.The content of the new buffer will be th...
virtual ~FloatArrayBuffer()
FloatArrayBuffer(int size, bool readOnly=false)
Creates a FloatArrayBuffer object that has its backing array allocated internally and is then owned a...
FloatArrayBuffer(const decaf::lang::Pointer< ByteArrayAdapter > &array, int offset, int capacity, bool readOnly=false)
Creates a byte buffer that wraps the passed ByteArrayAdapter and start at the given offset.
virtual float get()
Relative get method.Reads the value at this buffer's current position, and then increments the positi...
virtual float get(int index) const
Absolute get method.Reads the value at the given index.the float that is located at the given index
FloatArrayBuffer(const FloatArrayBuffer &other)
Create a FloatArrayBuffer that mirrors this one, meaning it shares a reference to this buffers ByteAr...
virtual bool isReadOnly() const
Tells whether or not this buffer is read-only.true if, and only if, this buffer is read-only.
Definition FloatArrayBuffer.h:167
Decaf's implementation of a Smart Pointer that is a template on a Type and is Thread Safe if the defa...
Definition Pointer.h:53
virtual int capacity() const
Definition Buffer.h:145
This class defines four categories of operations upon float buffers:
Definition FloatBuffer.h:51
FloatBuffer(int capacity)
Creates a FloatBuffer object that has its backing array allocated internally and is then owned and de...
#define DECAF_API
Definition Config.h:29
Definition BufferFactory.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25