// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Pfibarray.pas' rev: 10.00

#ifndef PfibarrayHPP
#define PfibarrayHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Ibase.hpp>	// Pascal unit
#include <Ib_intf.hpp>	// Pascal unit
#include <Ib_externals.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Fib.hpp>	// Pascal unit
#include <Fibdatabase.hpp>	// Pascal unit
#include <Stdfuncs.hpp>	// Pascal unit
#include <Variants.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Pfibarray
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TpFIBArray;
class PASCALIMPLEMENTATION TpFIBArray : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	Ib_intf::_di_IIBClientLibrary FClientLibrary;
	Ibase::TXSQLVAR *FXSQLVAR;
	Db::TFieldType FArrayType;
	AnsiString FTableName;
	AnsiString FFieldName;
	Ibase::TISC_ARRAY_DESC vISC_ARRAY_DESC;
	int __fastcall GetDimensionCount(void);
	Ibase::TISC_ARRAY_BOUND __fastcall GetDimension(int Index);
	int __fastcall GetSliceSize(const Ibase::TISC_ARRAY_DESC &aISC_ARRAY_DESC);
	int __fastcall GetArraySize(void);
	void __fastcall VariantToBuffer(const Variant &Value, char * &ToBuffer);
	void __fastcall PutArrayBuf(char * &Buffer, char * &ToBuffer, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	Variant __fastcall GetElementBuf(char * Buffer, const Ibase::TISC_ARRAY_DESC &aISC_ARRAY_DESC, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	void __fastcall PutElementBuf(const Variant &Value, char * &ToBuffer, const Ibase::TISC_ARRAY_DESC &aISC_ARRAY_DESC, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	bool __fastcall GetFieldData(Db::TField* Field, char * &ToBuffer);
	Byte __fastcall GetScale(void);
	
public:
	__fastcall TpFIBArray(Ib_intf::_di_IIBClientLibrary ClientLibrary, Ibase::PXSQLVAR aFXSQLVAR, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle, const AnsiString ATableName, const AnsiString AFieldName)/* overload */;
	__fastcall virtual ~TpFIBArray(void);
	Variant __fastcall GetArrayValues(char * bufData, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	void __fastcall SetArrayValue(const Variant &Value, char * &ToBuffer, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	Variant __fastcall GetFieldArrayValues(Db::TField* Field, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	void __fastcall SetFieldArrayValue(const Variant &Value, Db::TField* Field, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	Variant __fastcall GetElementFromField(Db::TField* Field, int * Indexes, const int Indexes_Size, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	void __fastcall PutElementToField(Db::TField* Field, const Variant &Value, int * Indexes, const int Indexes_Size, Ibase::PISC_DB_HANDLE DBHandle, Ibase::PISC_TR_HANDLE TRHandle);
	__property Db::TFieldType ArrayType = {read=FArrayType, nodefault};
	__property AnsiString TableName = {read=FTableName};
	__property AnsiString FieldName = {read=FFieldName};
	__property int DimensionCount = {read=GetDimensionCount, nodefault};
	__property Ibase::TISC_ARRAY_BOUND Dimension[int Index] = {read=GetDimension};
	__property int ArraySize = {read=GetArraySize, nodefault};
	__property Byte Scale = {read=GetScale, nodefault};
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Pfibarray */
using namespace Pfibarray;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Pfibarray
