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

// (DO NOT EDIT: machine generated header) 'SMIXML.pas' rev: 23.00 (Win32)

#ifndef SmixmlHPP
#define SmixmlHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.Variants.hpp>	// Pascal unit

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

namespace Smixml
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TSMXMLItemKind : unsigned char { ikProperty, ikAttribute, ikComment, ikCDATA };
#pragma option pop

class DELPHICLASS TSMXMLItem;
class DELPHICLASS TSMXMLItems;
class PASCALIMPLEMENTATION TSMXMLItem : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	TSMXMLItemKind FKind;
	System::UnicodeString FTagName;
	System::Variant FValue;
	System::UnicodeString FAttributes;
	int FLevel;
	TSMXMLItems* FItems;
	TSMXMLItem* FParentItem;
	
public:
	__fastcall virtual TSMXMLItem(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TSMXMLItem(void);
	TSMXMLItem* __fastcall GetChild(const System::UnicodeString XMLTag, bool ExpandAllLevels);
	System::UnicodeString __fastcall GetTagXMLValue(void);
	System::UnicodeString __fastcall GetTagValue(void);
	void __fastcall ProcessAttributes(void);
	__property TSMXMLItem* ParentItem = {read=FParentItem};
	__property int Level = {read=FLevel, nodefault};
	__property System::UnicodeString Attributes = {read=FAttributes};
	
__published:
	__property TSMXMLItemKind Kind = {read=FKind, write=FKind, nodefault};
	__property System::UnicodeString TagName = {read=FTagName, write=FTagName};
	__property System::Variant Value = {read=FValue, write=FValue};
	__property TSMXMLItems* Items = {read=FItems, write=FItems};
};


#pragma pack(push,4)
class PASCALIMPLEMENTATION TSMXMLItems : public System::Classes::TList
{
	typedef System::Classes::TList inherited;
	
public:
	__fastcall virtual ~TSMXMLItems(void);
	TSMXMLItem* __fastcall AddItem(TSMXMLItem* ParentItem);
	virtual void __fastcall Clear(void);
public:
	/* TObject.Create */ inline __fastcall TSMXMLItems(void) : System::Classes::TList() { }
	
};

#pragma pack(pop)

typedef void __fastcall (__closure *TSMIXMLOnTagEvent)(System::TObject* Sender, TSMXMLItem* ParentNode, System::WideString ATagName, System::WideString ATagValue, System::WideString ATagAttributes, bool &Accept);

typedef void __fastcall (__closure *TSMIXMLOnAfterTagEvent)(System::TObject* Sender, TSMXMLItem* &Node, bool &Cancel);

class DELPHICLASS TSMXMLEngine;
class PASCALIMPLEMENTATION TSMXMLEngine : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	TSMXMLItem* FRootItem;
	TSMIXMLOnTagEvent FOnTag;
	TSMIXMLOnAfterTagEvent FOnAfterTag;
	
protected:
	void __fastcall ParseXMLFromString(const System::UnicodeString Value, int intLength);
	
public:
	__fastcall virtual TSMXMLEngine(System::Classes::TComponent* AOwner);
	__fastcall virtual ~TSMXMLEngine(void);
	void __fastcall LoadFromStream(int AStreamSize, System::Classes::TStream* AStream);
	void __fastcall LoadFromFile(const System::UnicodeString AFileName);
	TSMXMLItem* __fastcall GetItemByTag(TSMXMLItem* ARoot, const System::UnicodeString XMLTag);
	__classmethod System::UnicodeString __fastcall GetFirstTagName(System::UnicodeString &AXMLPath);
	__classmethod System::UnicodeString __fastcall GetLastTagName(System::UnicodeString &AXMLPath);
	
__published:
	__property TSMXMLItem* RootItem = {read=FRootItem, write=FRootItem};
	__property TSMIXMLOnTagEvent OnTag = {read=FOnTag, write=FOnTag};
	__property TSMIXMLOnAfterTagEvent OnAfterTag = {read=FOnAfterTag, write=FOnAfterTag};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE bool __fastcall SameStrings(bool CaseSensitive, const System::UnicodeString s1, const System::UnicodeString s2);

}	/* namespace Smixml */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_SMIXML)
using namespace Smixml;
#endif
#pragma pack(pop)
#pragma option pop

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