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

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

#ifndef AHMTDBAsciiHPP
#define AHMTDBAsciiHPP

#pragma delphiheader begin
#pragma option push -w-
#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;
#pragma pack(push, 4)
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:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TAHMADFields(void) { }
	#pragma option pop
	
};

#pragma pack(pop)

#pragma pack(push, 4)
class PASCALIMPLEMENTATION TAHMDBAscii : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	Ahmstdclass::TAHMAboutSControlStr 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 Ahmstdclass::TAHMAboutSControlStr 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};
};

#pragma pack(pop)

#pragma pack(push, 4)
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
	
};

#pragma pack(pop)

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

}	/* namespace Ahmtdbascii */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Ahmtdbascii;
#endif
#pragma option pop	// -w-

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