// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AHMTDBAscii.pas' rev: 3.00

#ifndef AHMTDBAsciiHPP
#define AHMTDBAsciiHPP
#include <AHMStandardConst.hpp>
#include <AHMStdClass.hpp>
#include <DBCtrls.hpp>
#include <Db.hpp>
#include <Buttons.hpp>
#include <StdCtrls.hpp>
#include <Dialogs.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <SysUtils.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

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

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

class DELPHICLASS TAHMADField;
class DELPHICLASS TAHMDBAscii;
class DELPHICLASS TAHMADFields;
class PASCALIMPLEMENTATION TAHMADFields : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
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);
	void __fastcall Delete(int Index);
	__property TAHMADField* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	/* TCollection.Destroy */ __fastcall virtual ~TAHMADFields(void) { }
	
};

class PASCALIMPLEMENTATION TAHMDBAscii : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Ahmstdclass::TAHMAboutSControlStr FAboutStr;
	System::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
		);
	System::AnsiString __fastcall SetFixed(System::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 Ahmstdclass::TAHMAboutSControlStr About = {read=FAboutStr, write=FAboutStr};
	__property TAHMADFields* Fields = {read=FAHMADFields, write=SetAHMADFields};
	__property char Delimiter = {read=FDelimiter, write=FDelimiter, nodefault};
	__property System::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:
	System::AnsiString FHeader;
	TAHMDBAscii* fdbascii;
	Dbctrls::TFieldDataLink* FFieldDataLink;
	System::AnsiString FDataField;
	void __fastcall SetDataField(System::AnsiString Value);
	
protected:
	virtual System::AnsiString __fastcall GetDisplayName(void);
	
public:
	__fastcall virtual TAHMADField(Classes::TCollection* Collection);
	__property TAHMDBAscii* Owner = {read=fdbascii};
	
__published:
	__property System::AnsiString DataField = {read=FDataField, write=SetDataField, stored=true};
	__property System::AnsiString Header = {read=FHeader, write=FHeader};
public:
	/* TCollectionItem.Destroy */ __fastcall virtual ~TAHMADField(void) { }
	
};

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

}	/* namespace Ahmtdbascii */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmtdbascii;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// AHMTDBAscii
