18 #ifndef _DECAF_INTERNAL_UTIL_BYTEARRAYADAPTER_H_ 19 #define _DECAF_INTERNAL_UTIL_BYTEARRAYADAPTER_H_ 216 return this->size / (int)
sizeof(
double);
224 return this->size / (int)
sizeof(
float);
232 return this->size / (int)
sizeof(
long long);
240 return this->size / (int)
sizeof(
int);
248 return this->size / (int)
sizeof(
short);
257 return this->array.bytes;
266 return this->array.chars;
275 return this->array.shorts;
284 return this->array.ints;
293 return this->array.longs;
302 return this->array.doubles;
311 return this->array.floats;
333 virtual void read(
unsigned char* buffer,
int size,
int offset,
int length)
const;
355 virtual void write(
unsigned char* buffer,
int size,
int offset,
int length);
372 virtual void resize(
int size);
377 virtual void clear();
390 unsigned char& operator[](
int index);
391 const unsigned char& operator[](
int index)
const;
404 virtual unsigned char get(
int index)
const;
417 virtual char getChar(
int index)
const;
433 virtual double getDouble(
int index)
const;
446 virtual double getDoubleAt(
int index)
const;
462 virtual float getFloat(
int index)
const;
475 virtual float getFloatAt(
int index)
const;
491 virtual long long getLong(
int index)
const;
504 virtual long long getLongAt(
int index)
const;
520 virtual int getInt(
int index)
const;
533 virtual int getIntAt(
int index)
const;
549 virtual short getShort(
int index)
const;
562 virtual short getShortAt(
int index)
const;
772 void initialize(
unsigned char* buffer,
int size,
bool own);
virtual int getLongCapacity() const
Gets the size of the underlying array as if it contains doubles.
Definition: ByteArrayAdapter.h:231
virtual float * getFloatArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:310
virtual char * getCharArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:265
virtual long long * getLongArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:292
virtual int getShortCapacity() const
Gets the size of the underlying array as if it contains shorts.
Definition: ByteArrayAdapter.h:247
virtual int getDoubleCapacity() const
Gets the size of the underlying array as if it contains doubles.
Definition: ByteArrayAdapter.h:215
virtual short * getShortArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:274
virtual int getFloatCapacity() const
Gets the size of the underlying array as if it contains doubles.
Definition: ByteArrayAdapter.h:223
This class adapts primitive type arrays to a base byte array so that the classes can inter-operate on...
Definition: ByteArrayAdapter.h:43
virtual int getCapacity() const
Gets the size of the underlying array.
Definition: ByteArrayAdapter.h:199
#define DECAF_API
Definition: Config.h:29
virtual double * getDoubleArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:301
virtual unsigned char * getByteArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:256
virtual int getCharCapacity() const
Gets the size of the underlying array as if it contains chars.
Definition: ByteArrayAdapter.h:207
virtual int * getIntArray()
Gets the pointer to the array we are wrapping.
Definition: ByteArrayAdapter.h:283
virtual int getIntCapacity() const
Gets the size of the underlying array as if it contains ints.
Definition: ByteArrayAdapter.h:239
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25