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

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

#ifndef AHMTFileHolderHPP
#define AHMTFileHolderHPP
#include <AHMSystemClass.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 Ahmtfileholder
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TAHMStoredFile;
class DELPHICLASS TAHMFileHolder;
class DELPHICLASS TAHMStoredFiles;
class PASCALIMPLEMENTATION TAHMStoredFiles : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
private:
	TAHMFileHolder* FAHMFileHolder;
	TAHMStoredFile* __fastcall GetAHMStoredFile(int Index);
	void __fastcall SetAHMStoredFile(int Index, TAHMStoredFile* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TAHMStoredFiles(TAHMFileHolder* AOwner);
	HIDESBASE TAHMStoredFile* __fastcall Add(void);
	bool __fastcall Delete(int Index);
	__property TAHMFileHolder* Owner = {read=FAHMFileHolder};
	__property TAHMStoredFile* Items[int Index] = {read=GetAHMStoredFile, write=SetAHMStoredFile/*, default
		*/};
public:
	/* TCollection.Destroy */ __fastcall virtual ~TAHMStoredFiles(void) { }
	
};

class PASCALIMPLEMENTATION TAHMFileHolder : public Ahmsystemclass::TAHMSystemsComponent 
{
	typedef Ahmsystemclass::TAHMSystemsComponent inherited;
	
private:
	TAHMStoredFiles* FAHMStoredFiles;
	void __fastcall SetAHMStoredFiles(TAHMStoredFiles* Value);
	
public:
	__fastcall virtual TAHMFileHolder(Classes::TComponent* AOwner);
	__fastcall virtual ~TAHMFileHolder(void);
	System::AnsiString __fastcall SaveToTempFile(int Index);
	void __fastcall SaveToFile(int Index, System::AnsiString Filename);
	
__published:
	__property TAHMStoredFiles* Files = {read=FAHMStoredFiles, write=SetAHMStoredFiles};
};

class PASCALIMPLEMENTATION TAHMStoredFile : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	Classes::TMemoryStream* FFileData;
	System::TDateTime FFileDate;
	System::AnsiString FFileName;
	System::AnsiString FFilePath;
	int FFileSize;
	TAHMFileHolder* FAHMFileHolder;
	void __fastcall ReadData(Classes::TStream* Stream);
	void __fastcall WriteData(Classes::TStream* Stream);
	bool __fastcall Empty(void);
	void __fastcall SetFileDate(const System::TDateTime Value);
	void __fastcall SetFileName(const System::AnsiString Value);
	void __fastcall SetFilePath(const System::AnsiString Value);
	void __fastcall SetFileSize(const int Value);
	
protected:
	virtual System::AnsiString __fastcall GetDisplayName(void);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	
public:
	void __fastcall Clear(void);
	void __fastcall LoadFromFile(System::AnsiString FileName);
	void __fastcall SaveToFile(System::AnsiString FileName);
	void __fastcall LoadFromStream(Classes::TStream* Stream);
	void __fastcall SaveToStream(Classes::TStream* Stream);
	System::AnsiString __fastcall SaveToTempFile(void);
	__fastcall virtual TAHMStoredFile(Classes::TCollection* Collection);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property TAHMFileHolder* Owner = {read=FAHMFileHolder};
	__property System::AnsiString DisplayName = {read=GetDisplayName};
	__fastcall virtual ~TAHMStoredFile(void);
	
__published:
	__property System::TDateTime FileDate = {read=FFileDate, write=SetFileDate};
	__property System::AnsiString NameOfFile = {read=FFileName, write=SetFileName};
	__property System::AnsiString FilePath = {read=FFilePath, write=SetFilePath};
	__property int FileSize = {read=FFileSize, write=SetFileSize, nodefault};
};

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

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