/***************************************************************************
                            qt_QBitArray.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QBitArray.h"
}

#include <qbitarray.h>

class QBitArrayBridge : public QBitArray
{
public:
	QBitArrayBridge() : QBitArray() {}
	QBitArrayBridge(uint size) : QBitArray(size) {}
	QBitArrayBridge(const QBitArray& a) : QBitArray(a) {}
	array_data * protected_newData() {
		return (array_data *) QBitArray::newData();
	}
	void protected_deleteData(array_data* d) {
		QBitArray::deleteData(d);
		return;
	}
};

qt_QBitArray * qt_new_QBitArray(){
	return (qt_QBitArray *) new QBitArrayBridge();
}
qt_QBitArray * qt_new_QBitArray1(unsigned int size){
	return (qt_QBitArray *) new QBitArrayBridge((uint)size);
}
qt_QBitArray * qt_new_QBitArray2(qt_QBitArray* a){
	return (qt_QBitArray *) new QBitArrayBridge((QBitArray&)* (QBitArray*)a);
}
unsigned int qt_QBitArray_size( qt_QBitArray* instPointer){
	return (unsigned int) ((QBitArrayBridge*)instPointer)->size();
}
int qt_QBitArray_resize( qt_QBitArray* instPointer,unsigned int size){
	return (int) ((QBitArrayBridge*)instPointer)->resize((uint)size);
}
int qt_QBitArray_fill( qt_QBitArray* instPointer,int v, int size){
	return (int) ((QBitArrayBridge*)instPointer)->fill((bool)v, (int)size);
}
void qt_QBitArray_detach( qt_QBitArray* instPointer){
	((QBitArrayBridge*)instPointer)->detach();
	return;
}
qt_QBitArray* qt_QBitArray_copy( qt_QBitArray* instPointer){
	return (qt_QBitArray*)new QBitArray(((QBitArrayBridge*)instPointer)->copy());
}
int qt_QBitArray_testBit( qt_QBitArray* instPointer,unsigned int index){
	return (int) ((QBitArrayBridge*)instPointer)->testBit((uint)index);
}
void qt_QBitArray_setBit( qt_QBitArray* instPointer,unsigned int index){
	((QBitArrayBridge*)instPointer)->setBit((uint)index);
	return;
}
void qt_QBitArray_setBit1( qt_QBitArray* instPointer,unsigned int index, int value){
	((QBitArrayBridge*)instPointer)->setBit((uint)index, (bool)value);
	return;
}
void qt_QBitArray_clearBit( qt_QBitArray* instPointer,unsigned int index){
	((QBitArrayBridge*)instPointer)->clearBit((uint)index);
	return;
}
int qt_QBitArray_toggleBit( qt_QBitArray* instPointer,unsigned int index){
	return (int) ((QBitArrayBridge*)instPointer)->toggleBit((uint)index);
}
int qt_QBitArray_at( qt_QBitArray* instPointer,unsigned int index){
	return (int) ((QBitArrayBridge*)instPointer)->at((uint)index);
}
void* qt_QBitArray_newData( qt_QBitArray* instPointer){
	return (void*) ((QBitArrayBridge*)instPointer)->protected_newData();
}
//void qt_QBitArray_deleteData( qt_QBitArray* instPointer,void* d){
//	((QBitArrayBridge*)instPointer)->protected_deleteData((array_data*)d);
//	return;
//}
