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

// (DO NOT EDIT: machine generated header) 'QImport3ScriptEngine.pas' rev: 34.00 (Windows)

#ifndef Qimport3scriptengineHPP
#define Qimport3scriptengineHPP

#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>
#include <SysInit.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <System.Variants.hpp>
#include <System.StrUtils.hpp>
#include <Data.DB.hpp>
#include <QImport3StrTypes.hpp>
#include <QImport3Common.hpp>

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

namespace Qimport3scriptengine
{
//-- forward type declarations -----------------------------------------------
struct TScriptErrorMsg;
class DELPHICLASS TQImport3ScriptEngine;
//-- type declarations -------------------------------------------------------
#pragma pack(push,1)
struct DECLSPEC_DRECORD TScriptErrorMsg
{
public:
	int Line;
	int Column;
	int ErrorCode;
	System::WideString ErrorDescription;
	System::WideString SourceText;
};
#pragma pack(pop)


class PASCALIMPLEMENTATION TQImport3ScriptEngine : public System::Classes::TComponent
{
	typedef System::Classes::TComponent inherited;
	
private:
	System::WideString FScript;
	System::Variant FInputValue;
	System::WideString FInputValueFlag;
	System::Variant FResultValue;
	TScriptErrorMsg FLastError;
	Data::Db::TFieldType FInputType;
	System::UnicodeString __fastcall GetInputValueAsString();
	void __fastcall SetInputValueAsString(const System::UnicodeString Value);
	int __fastcall GetInputValueAsInteger();
	void __fastcall SetInputValueAsInteger(const int Value);
	System::WideString __fastcall GetInputValueAsWideString();
	void __fastcall SetInputValueAsWideString(const System::WideString Value);
	System::WideString __fastcall DoubleQuote(const System::WideString Value, const System::WideChar QuoteChar);
	
protected:
	virtual System::WideString __fastcall GetInputValueForScript();
	__property System::UnicodeString InputValueAsString = {read=GetInputValueAsString, write=SetInputValueAsString};
	__property System::WideString InputValueAsWideString = {read=GetInputValueAsWideString, write=SetInputValueAsWideString};
	__property int InputValueAsInteger = {read=GetInputValueAsInteger, write=SetInputValueAsInteger, nodefault};
	System::WideString __fastcall QuoteStringValue(const System::WideString Value, const System::WideChar QuoteChar)/* overload */;
	virtual System::Variant __fastcall RunScript(const System::WideString ScriptText) = 0 ;
	virtual TScriptErrorMsg __fastcall GetError() = 0 ;
	virtual System::WideString __fastcall QuoteStringValue(const System::WideString Value) = 0 /* overload */;
	
public:
	__fastcall virtual TQImport3ScriptEngine(System::Classes::TComponent* AOwner);
	__property System::Variant ResultValue = {read=FResultValue};
	__property TScriptErrorMsg LastError = {read=FLastError};
	__property Data::Db::TFieldType InputType = {read=FInputType, write=FInputType, nodefault};
	bool __fastcall Execute();
	
__published:
	__property System::WideString Script = {read=FScript, write=FScript};
	__property System::Variant InputValue = {read=FInputValue, write=FInputValue};
	__property System::WideString InputValueFlag = {read=FInputValueFlag, write=FInputValueFlag};
public:
	/* TComponent.Destroy */ inline __fastcall virtual ~TQImport3ScriptEngine() { }
	
};


//-- var, const, procedure ---------------------------------------------------
}	/* namespace Qimport3scriptengine */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_QIMPORT3SCRIPTENGINE)
using namespace Qimport3scriptengine;
#endif
#pragma pack(pop)
#pragma option pop

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