libnative-utilities/include/array/GrowableBooleanArray.hpp
2024-08-15 18:40:30 +08:00

52 lines
1.0 KiB
C++

#ifndef GROWABLEBOOLEANARRAY_HPP
#define GROWABLEBOOLEANARRAY_HPP
#include "include/array/GrowableArray.hpp"
class GrowableBooleanArray{
public:
GrowableBooleanArray(unsigned int initSize=minmum_capacity);
int* getArrayData();
unsigned int capacity();
const unsigned int& length=arrlen;
const unsigned int& element_size=elementSize;
void put(const int e);
void set(unsigned index, const int e);
void copyFrom(const int* data, unsigned int count);
void copyFrom(const int* data, unsigned int index, unsigned int count);
void copyFrom(const int* data, unsigned int index, unsigned int bufferOffset, unsigned int count);
int get(unsigned int index);
void remove(unsigned int index);
void gc();
void clear();
~GrowableBooleanArray();
private:
GrowableArray* array;
unsigned int arrlen;
unsigned int elementSize;
static const unsigned int minmum_capacity;
};
#endif // GROWABLEBOOLEANARRAY_HPP