// CodeGear C++Builder
// Copyright (c) 1995, 2014 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'xpgParseOPC.pas' rev: 28.00 (Windows)

#ifndef XpgparseopcHPP
#define XpgparseopcHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Contnrs.hpp>	// Pascal unit
#include <System.IniFiles.hpp>	// Pascal unit
#include <xpgPUtils.hpp>	// Pascal unit
#include <xpgPLists.hpp>	// Pascal unit
#include <xpgPXMLUtils.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <xpgPXML.hpp>	// Pascal unit

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

namespace Xpgparseopc
{
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TST_TargetMode : unsigned short { sttmExternal, sttmInternal };

typedef System::StaticArray<System::UnicodeString, 2> Xpgparseopc__1;

class DELPHICLASS TXPGDocBase;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXPGDocBase : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	Xpgputils::TXpgPErrors* FErrors;
	
public:
	__property Xpgputils::TXpgPErrors* Errors = {read=FErrors};
public:
	/* TObject.Create */ inline __fastcall TXPGDocBase(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TXPGDocBase(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TXPGBase;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXPGBase : public System::TObject
{
	typedef System::TObject inherited;
	
protected:
	TXPGDocBase* FOwner;
	int FElementCount;
	int FAttributeCount;
	Xpgpxmlutils::TXpgAssigneds FAssigneds;
	virtual int __fastcall CheckAssigned(void);
	bool __fastcall Assigned(void);
	virtual TXPGBase* __fastcall HandleElement(Xpgpxml::TXpgReadXML* AReader);
	virtual void __fastcall AssignAttributes(Xpgpxmlutils::TXpgXMLAttributeList* AAttributes);
	virtual void __fastcall AfterTag(void);
	__classmethod void __fastcall AddEnums();
	__classmethod int __fastcall StrToEnum(System::UnicodeString AValue);
	__classmethod int __fastcall StrToEnumDef(System::UnicodeString AValue, int ADefault);
	__classmethod bool __fastcall TryStrToEnum(System::UnicodeString AValue, System::UnicodeString AText, System::UnicodeString *AEnumNames, const int AEnumNames_High, System::PInteger APtrInt);
	
public:
	bool __fastcall Available(void);
	__property int ElementCount = {read=FElementCount, write=FElementCount, nodefault};
	__property int AttributeCount = {read=FAttributeCount, write=FAttributeCount, nodefault};
	__property Xpgpxmlutils::TXpgAssigneds Assigneds = {read=FAssigneds, write=FAssigneds, nodefault};
public:
	/* TObject.Create */ inline __fastcall TXPGBase(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TXPGBase(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TXPGBaseObjectList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXPGBaseObjectList : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
protected:
	TXPGDocBase* FOwner;
	bool FAssigned;
	TXPGBase* __fastcall GetItems(int Index);
	
public:
	__fastcall TXPGBaseObjectList(TXPGDocBase* AOwner);
	__property TXPGBase* Items[int Index] = {read=GetItems};
public:
	/* TList.Destroy */ inline __fastcall virtual ~TXPGBaseObjectList(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TXPGReader;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXPGReader : public Xpgpxml::TXpgReadXML
{
	typedef Xpgpxml::TXpgReadXML inherited;
	
protected:
	TXPGBase* FCurrent;
	System::Contnrs::TObjectStack* FStack;
	Xpgputils::TXpgPErrors* FErrors;
	
public:
	__fastcall TXPGReader(Xpgputils::TXpgPErrors* AErrors, TXPGBase* ARoot);
	__fastcall virtual ~TXPGReader(void);
	virtual void __fastcall BeginTag(void);
	virtual void __fastcall EndTag(void);
};

#pragma pack(pop)

class DELPHICLASS TCT_Relationship;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TCT_Relationship : public TXPGBase
{
	typedef TXPGBase inherited;
	
protected:
	TST_TargetMode FTargetMode;
	System::UnicodeString FTarget;
	System::UnicodeString FType;
	System::UnicodeString FId;
	System::UnicodeString FContent;
	virtual int __fastcall CheckAssigned(void);
	virtual TXPGBase* __fastcall HandleElement(Xpgpxml::TXpgReadXML* AReader);
	void __fastcall Write(Xpgpxml::TXpgWriteXML* AWriter);
	void __fastcall WriteAttributes(Xpgpxml::TXpgWriteXML* AWriter);
	virtual void __fastcall AssignAttributes(Xpgpxmlutils::TXpgXMLAttributeList* AAttributes);
	
public:
	__fastcall TCT_Relationship(TXPGDocBase* AOwner);
	__fastcall virtual ~TCT_Relationship(void);
	void __fastcall Clear(void);
	__property TST_TargetMode TargetMode = {read=FTargetMode, write=FTargetMode, nodefault};
	__property System::UnicodeString Target = {read=FTarget, write=FTarget};
	__property System::UnicodeString Type_ = {read=FType, write=FType};
	__property System::UnicodeString Id = {read=FId, write=FId};
	__property System::UnicodeString Content = {read=FContent, write=FContent};
};

#pragma pack(pop)

class DELPHICLASS TCT_RelationshipXpgList;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TCT_RelationshipXpgList : public TXPGBaseObjectList
{
	typedef TXPGBaseObjectList inherited;
	
public:
	TCT_Relationship* operator[](int Index) { return Items[Index]; }
	
protected:
	HIDESBASE TCT_Relationship* __fastcall GetItems(int Index);
	
public:
	HIDESBASE TCT_Relationship* __fastcall Add(void);
	int __fastcall CheckAssigned(void);
	void __fastcall Write(Xpgpxml::TXpgWriteXML* AWriter, System::UnicodeString AName);
	__property TCT_Relationship* Items[int Index] = {read=GetItems/*, default*/};
public:
	/* TXPGBaseObjectList.Create */ inline __fastcall TCT_RelationshipXpgList(TXPGDocBase* AOwner) : TXPGBaseObjectList(AOwner) { }
	
public:
	/* TList.Destroy */ inline __fastcall virtual ~TCT_RelationshipXpgList(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TCT_Relationships;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TCT_Relationships : public TXPGBase
{
	typedef TXPGBase inherited;
	
protected:
	TCT_RelationshipXpgList* FRelationshipXpgList;
	virtual int __fastcall CheckAssigned(void);
	virtual TXPGBase* __fastcall HandleElement(Xpgpxml::TXpgReadXML* AReader);
	void __fastcall Write(Xpgpxml::TXpgWriteXML* AWriter);
	
public:
	__fastcall TCT_Relationships(TXPGDocBase* AOwner);
	__fastcall virtual ~TCT_Relationships(void);
	void __fastcall Clear(void);
	__property TCT_RelationshipXpgList* RelationshipXpgList = {read=FRelationshipXpgList};
};

#pragma pack(pop)

class DELPHICLASS T__ROOT__;
#pragma pack(push,4)
class PASCALIMPLEMENTATION T__ROOT__ : public TXPGBase
{
	typedef TXPGBase inherited;
	
protected:
	Xpgplists::TStringXpgList* FRootAttributes;
	TCT_Relationships* FRelationships;
	TCT_Relationship* FRelationship;
	virtual int __fastcall CheckAssigned(void);
	virtual TXPGBase* __fastcall HandleElement(Xpgpxml::TXpgReadXML* AReader);
	void __fastcall Write(Xpgpxml::TXpgWriteXML* AWriter);
	
public:
	__fastcall T__ROOT__(TXPGDocBase* AOwner);
	__fastcall virtual ~T__ROOT__(void);
	void __fastcall Clear(void);
	__property Xpgplists::TStringXpgList* RootAttributes = {read=FRootAttributes};
	__property TCT_Relationships* Relationships = {read=FRelationships};
	__property TCT_Relationship* Relationship = {read=FRelationship};
};

#pragma pack(pop)

class DELPHICLASS TXPGDocOPC;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXPGDocOPC : public TXPGDocBase
{
	typedef TXPGDocBase inherited;
	
protected:
	T__ROOT__* FRoot;
	TXPGReader* FReader;
	Xpgpxml::TXpgWriteXML* FWriter;
	TCT_Relationships* __fastcall GetRelationships(void);
	TCT_Relationship* __fastcall GetRelationship(void);
	
public:
	__fastcall TXPGDocOPC(void);
	__fastcall virtual ~TXPGDocOPC(void);
	void __fastcall LoadFromFile(System::UnicodeString AFilename);
	void __fastcall LoadFromStream(System::Classes::TStream* AStream);
	void __fastcall SaveToFile(System::UnicodeString AFilename);
	void __fastcall SaveToStream(System::Classes::TStream* AStream);
	__property T__ROOT__* Root = {read=FRoot};
	__property TCT_Relationships* Relationships = {read=GetRelationships};
	__property TCT_Relationship* Relationship = {read=GetRelationship};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE Xpgparseopc__1 StrTST_TargetMode;
}	/* namespace Xpgparseopc */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XPGPARSEOPC)
using namespace Xpgparseopc;
#endif
#pragma pack(pop)
#pragma option pop

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