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

// (DO NOT EDIT: machine generated header) 'ahmtdbascii.pas' rev: 6.00

#ifndef ahmtdbasciiHPP
#define ahmtdbasciiHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <ahmstandardconst.hpp>	// Pascal unit
#include <ahmstdclass.hpp>	// Pascal unit
#include <DBCtrls.hpp>	// Pascal unit
#include <DB.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Ahmtdbascii
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TAHMImportExportEvent)(System::TObject* Sender, AnsiString RecordText);

class DELPHICLASS TAHMADField;
class DELPHICLASS TAHMDBAscii;
class DELPHICLASS TAHMADFields;
class PASCALIMPLEMENTATION TAHMADFields : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	TAHMADField* operator[](int Index) { return Items[Index]; }
	
private:
	TAHMDBAscii* FAHMDBAscii;
	HIDESBASE TAHMADField* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TAHMADField* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TAHMADFields(TAHMDBAscii* AHMDBAscii);
	HIDESBASE TAHMADField* __fastcall Add(void);
	HIDESBASE void __fastcall Delete(int Index);
	__property TAHMADField* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TAHMADFields(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TAHMDBAscii : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	AnsiString FAboutStr;
	AnsiString FFilename;
	bool FFixedWidth;
	Dbctrls::TFieldDataLink* FFieldDataLink;
	char FDelimiter;
	bool FPrintHeader;
	TAHMADFields* FAHMADFields;
	Classes::TNotifyEvent FOnExportDone;
	TAHMImportExportEvent FOnImportSuccess;
	TAHMImportExportEvent FImportBeforePost;
	TAHMImportExportEvent FOnImportException;
	TAHMImportExportEvent FExportBeforeWrite;
	TAHMImportExportEvent FImportBeforeInsert;
	void __fastcall SetAHMADFields(TAHMADFields* Value);
	Db::TDataSource* __fastcall GetDataSource(void);
	void __fastcall SetDataSource(Db::TDataSource* Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	AnsiString __fastcall SetFixed(AnsiString xOriginalString, int xLength);
	
public:
	__property Dbctrls::TFieldDataLink* DataLink = {read=FFieldDataLink};
	__fastcall virtual TAHMDBAscii(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMDBAscii(void);
	bool __fastcall InsertAllFields(void);
	void __fastcall DoExport(void);
	void __fastcall DoImport(void);
	virtual void __fastcall Loaded(void);
	
__published:
	__property AnsiString About = {read=FAboutStr, write=FAboutStr};
	__property TAHMADFields* Fields = {read=FAHMADFields, write=SetAHMADFields};
	__property char Delimiter = {read=FDelimiter, write=FDelimiter, nodefault};
	__property AnsiString Filename = {read=FFilename, write=FFilename};
	__property bool FixedWidth = {read=FFixedWidth, write=FFixedWidth, default=0};
	__property Db::TDataSource* DataSource = {read=GetDataSource, write=SetDataSource};
	__property bool PrintHeader = {read=FPrintHeader, write=FPrintHeader, default=0};
	__property TAHMImportExportEvent ImportBeforePost = {read=FImportBeforePost, write=FImportBeforePost};
	__property TAHMImportExportEvent ImportBeforeInsert = {read=FImportBeforeInsert, write=FImportBeforeInsert};
	__property TAHMImportExportEvent OnImportException = {read=FOnImportException, write=FOnImportException};
	__property TAHMImportExportEvent OnImportSuccess = {read=FOnImportSuccess, write=FOnImportSuccess};
	__property TAHMImportExportEvent ExportBeforeWrite = {read=FExportBeforeWrite, write=FExportBeforeWrite};
	__property Classes::TNotifyEvent OnExportDone = {read=FOnExportDone, write=FOnExportDone};
};


class PASCALIMPLEMENTATION TAHMADField : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	AnsiString FHeader;
	TAHMDBAscii* fdbascii;
	Dbctrls::TFieldDataLink* FFieldDataLink;
	AnsiString FDataField;
	void __fastcall SetDataField(AnsiString Value);
	
protected:
	virtual AnsiString __fastcall GetDisplayName();
	
public:
	__fastcall virtual TAHMADField(Classes::TCollection* Collection);
	__property TAHMDBAscii* Owner = {read=fdbascii};
	
__published:
	__property AnsiString DataField = {read=FDataField, write=SetDataField, stored=true};
	__property AnsiString Header = {read=FHeader, write=FHeader};
public:
	#pragma option push -w-inl
	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TAHMADField(void) { }
	#pragma option pop
	
};


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

}	/* namespace Ahmtdbascii */
using namespace Ahmtdbascii;
#pragma option pop	// -w-
#pragma option pop	// -Vx

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