// ------------------------------------------------------------------------------------
// irr::core::array<video::SParticle*> wrappers
// NOTES:
// did not wrap the const version of getLast()
// ------------------------------------------------------------------------------------

extern "C" array<SParticle*>* IrrCore_Array_SParticle_ptr_new()
{
	return new array<SParticle*>();
}

extern "C" array<SParticle*>* IrrCore_Array_SParticle_ptr_newWithSize(u32 start_count)
{
	return new array<SParticle*>(start_count);
}

extern "C" array<SParticle*>* IrrCore_Array_SParticle_ptr_newFromOther(array<SParticle*>* other)
{
	return new array<SParticle*>(*other);
}

extern "C" void IrrCore_Array_SParticle_ptr_del(array<SParticle*>* arr)
{
	if (arr)
		delete arr;
		
	arr=0;
}

extern "C" u32 IrrCore_Array_SParticle_ptr_allocated_size(array<SParticle*>* arr)
{
	if (arr)
		return arr->allocated_size();
	else
		return 0;
}

extern "C" void IrrCore_Array_SParticle_ptr_clear(array<SParticle*>* arr)
{
	if (arr)
		arr->clear();
}

extern "C" const SParticle* IrrCore_Array_SParticle_ptr_const_pointer(array<SParticle*>* arr)
{
	if (arr)
		arr->const_pointer();
}

extern "C" SParticle* IrrCore_Array_SParticle_ptr_pointer(array<SParticle*>* arr)
{
	if (arr)
		arr->pointer();
}

extern "C" bool IrrCore_Array_SParticle_ptr_empty(array<SParticle*>* arr)
{
	if (arr)
		return arr->empty();
	else
		return true;
}

extern "C" void IrrCore_Array_SParticle_ptr_eraseWithCount(array<SParticle*>* arr,u32 idx,s32 count)
{
	if (arr)
		arr->erase(idx,count);
}

extern "C" void IrrCore_Array_SParticle_ptr_erase(array<SParticle*>* arr,u32 idx)
{
	if (arr)
		arr->erase(idx);
}

// do not delete this pointer
extern "C" SParticle* IrrCore_Array_SParticle_ptr_getLast(array<SParticle*>* arr)
{
	if (arr)
		return arr->getLast();
	else
		return 0;
}

// do not delete this pointer
extern "C" SParticle* IrrCore_Array_SParticle_ptr_elementAt(array<SParticle*>* arr,u32 idx)
{
	if (arr)
		return (*arr)[idx];
	else
		return 0;
}

extern "C" void IrrCore_Array_SParticle_ptr_insert(array<SParticle*>* arr,SParticle* element,u32 idx=0)
{
	if (arr)
		arr->insert(element,idx);
}

extern "C" void IrrCore_Array_SParticle_ptr_Eq(array<SParticle*>* arr,array<SParticle*>* other)
{
	if (arr)
		*arr=*other;
}

extern "C" void IrrCore_Array_SParticle_ptr_push_back(array<SParticle*>* arr,SParticle* element)
{
	if (arr)
		arr->push_back(element);
}

extern "C" void IrrCore_Array_SParticle_ptr_push_front(array<SParticle*>* arr,SParticle* element)
{
	if (arr)
		arr->push_front(element);
}

extern "C" void IrrCore_Array_SParticle_ptr_reallocate(array<SParticle*>* arr,u32 new_size)
{
	if (arr)
		arr->reallocate(new_size);
}

extern "C" void IrrCore_Array_SParticle_ptr_set_free_when_destroyed(array<SParticle*>* arr,bool f)
{
	if (arr)
		arr->set_free_when_destroyed(f);
}

extern "C" void IrrCore_Array_SParticle_ptr_set_pointer(array<SParticle*>* arr,SParticle* newPointer[],u32 size)
{
	if (arr)
		arr->set_pointer(newPointer,size);
}

extern "C" void IrrCore_Array_SParticle_ptr_set_sorted(array<SParticle*>* arr,bool bVal)
{
	if (arr)
		arr->set_sorted(bVal);
}

extern "C" void IrrCore_Array_SParticle_ptr_set_used(array<SParticle*>* arr,bool bVal)
{
	if (arr)
		arr->set_used(bVal);
}

extern "C" u32 IrrCore_Array_SParticle_ptr_size(array<SParticle*>* arr)
{
	if (arr)
		return arr->size();
	else
		return 0;
}


