18#ifndef _DECAF_INTERNAL_NIO_DOUBLEARRAYBUFFER_H_
19#define _DECAF_INTERNAL_NIO_DOUBLEARRAYBUFFER_H_
35 using decaf::internal::util::ByteArrayAdapter;
106 int offset,
int length,
bool readOnly =
false);
155 virtual double get(
int index)
const;
168 return this->readOnly;
195 this->readOnly = value;
virtual DoubleBuffer * slice() const
Creates a new DoubleBuffer whose content is a shared subsequence of this buffer's content....
DoubleArrayBuffer(const decaf::lang::Pointer< ByteArrayAdapter > &array, int offset, int length, bool readOnly=false)
Creates a byte buffer that wraps the passed ByteArrayAdapter and start at the given offset.
virtual void setReadOnly(bool value)
Sets this DoubleArrayBuffer as Read-Only or not Read-Only.
Definition DoubleArrayBuffer.h:194
virtual DoubleBuffer * duplicate()
Creates a new double buffer that shares this buffer's content.The content of the new buffer will be t...
virtual DoubleBuffer & put(int index, double value)
Writes the given doubles into this buffer at the given index.a reference to this buffer
virtual double * array()
Returns the double array that backs this buffer (optional operation).Modifications to this buffer's c...
virtual DoubleBuffer * asReadOnlyBuffer() const
Creates a new, read-only double buffer that shares this buffer's content.The content of the new buffe...
virtual double get()
Relative get method.Reads the value at this buffer's current position, and then increments the positi...
virtual ~DoubleArrayBuffer()
virtual int arrayOffset()
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
DoubleArrayBuffer(double *array, int size, int offset, int length, bool readOnly=false)
Creates a DoubleArrayBuffer object that wraps the given array.
virtual bool isReadOnly() const
Tells whether or not this buffer is read-only.true if, and only if, this buffer is read-only.
Definition DoubleArrayBuffer.h:167
virtual DoubleBuffer & put(double value)
Writes the given doubles into this buffer at the current position, and then increments the position....
virtual DoubleBuffer & compact()
Compacts this buffer.The bytes between the buffer's current position and its limit,...
DoubleArrayBuffer(const DoubleArrayBuffer &other)
Create a DoubleArrayBuffer that mirrors this one, meaning it shares a reference to this buffers ByteA...
virtual bool hasArray() const
Tells whether or not this buffer is backed by an accessible double array.If this method returns true ...
Definition DoubleArrayBuffer.h:160
virtual double get(int index) const
Absolute get method.Reads the value at the given index.the double that is located at the given index.
DoubleArrayBuffer(int size, bool readOnly=false)
Creates a DoubleArrayBuffer object that has its backing array allocated internally and is then owned ...
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
This class defines four categories of operations upon double buffers:
Definition DoubleBuffer.h:53
DoubleBuffer(int capacity)
Creates a DoubleBuffer object that has its backing array allocated internally and is then owned and d...
#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