18#ifndef _DECAF_NIO_DOUBLEBUFFER_H_
19#define _DECAF_NIO_DOUBLEBUFFER_H_
182 virtual double get(
int index )
const = 0;
This interface imposes a total ordering on the objects of each class that implements it.
Definition Comparable.h:33
virtual int capacity() const
Definition Buffer.h:145
virtual double * array()=0
Returns the double array that backs this buffer (optional operation).
virtual bool operator<(const DoubleBuffer &value) const
virtual DoubleBuffer * asReadOnlyBuffer() const =0
Creates a new, read-only double buffer that shares this buffer's content.
static DoubleBuffer * wrap(std::vector< double > &buffer)
Wraps the passed STL double Vector in a DoubleBuffer.
virtual DoubleBuffer & put(double value)=0
Writes the given doubles into this buffer at the current position, and then increments the position.
virtual bool operator==(const DoubleBuffer &value) const
virtual DoubleBuffer & put(int index, double value)=0
Writes the given doubles into this buffer at the given index.
virtual bool equals(const DoubleBuffer &value) const
DoubleBuffer & get(std::vector< double > buffer)
Relative bulk get method.
DoubleBuffer & put(DoubleBuffer &src)
This method transfers the doubles remaining in the given source buffer into this buffer.
virtual bool hasArray() const =0
Tells whether or not this buffer is backed by an accessible double array.
static DoubleBuffer * wrap(double *array, int size, int offset, int length)
Wraps the passed buffer with a new DoubleBuffer.
DoubleBuffer(int capacity)
Creates a DoubleBuffer object that has its backing array allocated internally and is then owned and d...
virtual int arrayOffset()=0
Returns the offset within this buffer's backing array of the first element of the buffer (optional op...
DoubleBuffer & put(std::vector< double > &buffer)
This method transfers the entire content of the given source doubles array into this buffer.
virtual ~DoubleBuffer()
Definition DoubleBuffer.h:70
static DoubleBuffer * allocate(int capacity)
Allocates a new DoubleBuffer.
virtual DoubleBuffer * slice() const =0
Creates a new DoubleBuffer whose content is a shared subsequence of this buffer's content.
virtual DoubleBuffer & compact()=0
Compacts this buffer.
virtual double get()=0
Relative get method.
DoubleBuffer & get(double *buffer, int size, int offset, int length)
Relative bulk get method.
virtual DoubleBuffer * duplicate()=0
Creates a new double buffer that shares this buffer's content.
virtual int compareTo(const DoubleBuffer &value) const
DoubleBuffer & put(const double *buffer, int size, int offset, int length)
This method transfers doubles into this buffer from the given source array.
virtual double get(int index) const =0
Absolute get method.
virtual std::string toString() const
#define DECAF_API
Definition Config.h:29
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25