⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm_jvinterpreter.hpp

📁 这是一个功能强大
💻 HPP
📖 第 1 页 / 共 4 页
字号:
// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Rm_jvinterpreter.pas' rev: 11.00

#ifndef Rm_jvinterpreterHPP
#define Rm_jvinterpreterHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Variants.hpp>	// Pascal unit
#include <Rm_jvinterpreterparser.hpp>	// Pascal unit
#include <Rm_jvcomponentbase.hpp>	// Pascal unit
#include <Rm_jvvcl5utils.hpp>	// Pascal unit

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

namespace Rm_jvinterpreter
{
//-- type declarations -------------------------------------------------------
typedef Variant TValueArray[33];

typedef TValueArray *PValueArray;

typedef Word TTypeArray[33];

typedef TTypeArray *PTypeArray;

typedef AnsiString TNameArray[33];

typedef TNameArray *PNameArray;

class DELPHICLASS TJvInterpreterArgs;
typedef void __fastcall (__closure *TJvInterpreterGetValue)(System::TObject* Sender, AnsiString Identifier, Variant &Value, TJvInterpreterArgs* Args, bool &Done);

typedef void __fastcall (__closure *TJvInterpreterSetValue)(System::TObject* Sender, AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* Args, bool &Done);

typedef void __fastcall (__closure *TJvInterpreterGetUnitSource)(AnsiString UnitName, AnsiString &Source, bool &Done);

typedef void __fastcall (*TJvInterpreterAdapterGetValue)(Variant &Value, TJvInterpreterArgs* Args);

typedef void __fastcall (*TJvInterpreterAdapterSetValue)(const Variant &Value, TJvInterpreterArgs* Args);

typedef void __fastcall (*TJvInterpreterAdapterNewRecord)(void * &Value);

typedef void __fastcall (*TJvInterpreterAdapterDisposeRecord)(const void * Value);

typedef void __fastcall (*TJvInterpreterAdapterCopyRecord)(void * &Dest, const void * Source);

typedef System::TVarRec TOpenArray[33];

typedef TOpenArray *POpenArray;

__interface IJvInterpreterDataType;
typedef System::DelphiInterface<IJvInterpreterDataType> _di_IJvInterpreterDataType;
__interface  INTERFACE_UUID("{8C5E4071-65AB-11D7-B235-00A0D2043DC7}") IJvInterpreterDataType  : public IInterface 
{
	
public:
	virtual void __fastcall Init(Variant &V) = 0 ;
	virtual Word __fastcall GetTyp(void) = 0 ;
};

struct TJvInterpreterRecField
{
	
public:
	AnsiString Identifier;
	int Offset;
	Word Typ;
	_di_IJvInterpreterDataType DataType;
} ;

class PASCALIMPLEMENTATION TJvInterpreterArgs : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FVarNames[33];
	bool FHasVars;
	TValueArray *FOAV;
	
public:
	AnsiString Identifier;
	int Count;
	Word Types[33];
	Variant Values[33];
	AnsiString Names[33];
	bool HasResult;
	bool Assignment;
	System::TObject* Obj;
	Word ObjTyp;
	Variant ObjRefHolder;
	bool Indexed;
	bool ReturnIndexed;
	TOpenArray *OA;
	int OAS;
	__fastcall virtual ~TJvInterpreterArgs(void);
	void __fastcall Clear(void);
	void __fastcall OpenArray(const int Index);
	void __fastcall Delete(const int Index);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TJvInterpreterArgs(void) : System::TObject() { }
	#pragma option pop
	
};


class DELPHICLASS TJvInterpreterFunctionDesc;
class PASCALIMPLEMENTATION TJvInterpreterFunctionDesc : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FUnitName;
	AnsiString FIdentifier;
	AnsiString FClassIdentifier;
	int FParamCount;
	Word FParamTypes[33];
	AnsiString FParamTypeNames[33];
	AnsiString FParamNames[33];
	Word FResTyp;
	AnsiString FResTypName;
	_di_IJvInterpreterDataType FResDataType;
	int FPosBeg;
	int FPosEnd;
	AnsiString __fastcall GetParamName(int Index);
	Word __fastcall GetParamType(int Index);
	AnsiString __fastcall GetParamTypeNames(int Index);
	AnsiString __fastcall GetDefine();
	
public:
	__property AnsiString UnitName = {read=FUnitName};
	__property AnsiString Identifier = {read=FIdentifier};
	__property AnsiString ClassIdentifier = {read=FClassIdentifier};
	__property AnsiString Define = {read=GetDefine};
	__property int ParamCount = {read=FParamCount, nodefault};
	__property Word ParamTypes[int Index] = {read=GetParamType};
	__property AnsiString ParamNames[int Index] = {read=GetParamName};
	__property AnsiString ParamTypeNames[int Index] = {read=GetParamTypeNames};
	__property Word ResTyp = {read=FResTyp, nodefault};
	__property AnsiString ResTypName = {read=FResTypName};
	__property _di_IJvInterpreterDataType ResDataType = {read=FResDataType};
	__property int PosBeg = {read=FPosBeg, nodefault};
	__property int PosEnd = {read=FPosEnd, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TJvInterpreterFunctionDesc(void) : System::TObject() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TJvInterpreterFunctionDesc(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TSimpleEvent)(void);

class DELPHICLASS TJvInterpreterEvent;
class DELPHICLASS TJvInterpreterExpression;
typedef short TStackPtr;

class DELPHICLASS TJvInterpreterAdapter;
class DELPHICLASS TJvInterpreterIdentifierList;
class DELPHICLASS TJvInterpreterIdentifier;
class PASCALIMPLEMENTATION TJvInterpreterIdentifierList : public Classes::TList 
{
	typedef Classes::TList inherited;
	
private:
	Classes::TDuplicates FDuplicates;
	
public:
	HIDESBASE TJvInterpreterIdentifier* __fastcall IndexOf(const AnsiString UnitName, const AnsiString Identifier);
	bool __fastcall Find(const AnsiString Identifier, int &Index, const AnsiString ClassName = "");
	HIDESBASE virtual void __fastcall Sort(Classes::TListSortCompare Compare = 0x0);
	__property Classes::TDuplicates Duplicates = {read=FDuplicates, write=FDuplicates, nodefault};
public:
	#pragma option push -w-inl
	/* TList.Destroy */ inline __fastcall virtual ~TJvInterpreterIdentifierList(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TJvInterpreterIdentifierList(void) : Classes::TList() { }
	#pragma option pop
	
};


class DELPHICLASS TJvInterpreterVarList;
class DELPHICLASS TJvInterpreterVar;
class PASCALIMPLEMENTATION TJvInterpreterVarList : public Classes::TList 
{
	typedef Classes::TList inherited;
	
public:
	__fastcall virtual ~TJvInterpreterVarList(void);
	virtual void __fastcall Clear(void);
	void __fastcall AddVar(const AnsiString UnitName, const AnsiString Identifier, const AnsiString Typ, Word VTyp, const Variant &Value, _di_IJvInterpreterDataType DataType);
	TJvInterpreterVar* __fastcall FindVar(const AnsiString UnitName, const AnsiString Identifier);
	void __fastcall DeleteVar(const AnsiString UnitName, const AnsiString Identifier);
	bool __fastcall GetValue(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* Args);
	bool __fastcall SetValue(const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* Args);
	HIDESBASE void __fastcall Assign(TJvInterpreterVarList* source);
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TJvInterpreterVarList(void) : Classes::TList() { }
	#pragma option pop
	
};


#pragma option push -b-
enum rm_JvInterpreter__9 { ccFastCall, ccStdCall, ccCDecl, ccDynamic, ccVirtual, ccClass };
#pragma option pop

typedef Set<rm_JvInterpreter__9, ccFastCall, ccClass>  TCallConvention;

typedef TMetaClass* TJvInterpreterEventClass;

class PASCALIMPLEMENTATION TJvInterpreterAdapter : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	TJvInterpreterExpression* FOwner;
	TJvInterpreterIdentifierList* FSrcUnitList;
	TJvInterpreterIdentifierList* FExtUnitList;
	TJvInterpreterIdentifierList* FGetList;
	TJvInterpreterIdentifierList* FSetList;
	TJvInterpreterIdentifierList* FIGetList;
	TJvInterpreterIdentifierList* FISetList;
	TJvInterpreterIdentifierList* FIDGetList;
	TJvInterpreterIdentifierList* FIDSetList;
	TJvInterpreterIdentifierList* FIntfGetList;
	TJvInterpreterIdentifierList* FDirectGetList;
	TJvInterpreterIdentifierList* FClassList;
	TJvInterpreterIdentifierList* FConstList;
	TJvInterpreterIdentifierList* FFunctionList;
	TJvInterpreterIdentifierList* FRecordList;
	TJvInterpreterIdentifierList* FRecordGetList;
	TJvInterpreterIdentifierList* FRecordSetList;
	TJvInterpreterIdentifierList* FOnGetList;
	TJvInterpreterIdentifierList* FOnSetList;
	TJvInterpreterIdentifierList* FSrcFunctionList;
	TJvInterpreterIdentifierList* FExtFunctionList;
	TJvInterpreterIdentifierList* FEventHandlerList;
	TJvInterpreterIdentifierList* FEventList;
	TJvInterpreterVarList* FSrcVarList;
	TJvInterpreterIdentifierList* FSrcClassList;
	bool FDisableExternalFunctions;
	bool FSorted;
	void __fastcall CheckArgs(TJvInterpreterArgs* &Args, int ParamCount, Word * ParamTypes);
	System::TObject* __fastcall GetRec(const AnsiString RecordType);
	bool __stdcall DispatchCall(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* Args, bool Get);
	bool __fastcall GetValueRTTI(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* Args);
	bool __fastcall SetValueRTTI(const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* Args);
	
protected:
	virtual void __fastcall CheckAction(TJvInterpreterExpression* Expression, TJvInterpreterArgs* Args, void * Data);
	virtual bool __fastcall GetValue(TJvInterpreterExpression* Expression, const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* Args);
	virtual bool __fastcall SetValue(TJvInterpreterExpression* Expression, const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* Args);
	virtual bool __fastcall GetElement(TJvInterpreterExpression* Expression, const Variant &Variable, Variant &Value, TJvInterpreterArgs* &Args);
	virtual bool __fastcall SetElement(TJvInterpreterExpression* Expression, Variant &Variable, const Variant &Value, TJvInterpreterArgs* &Args);
	virtual bool __fastcall NewRecord(const AnsiString RecordType, Variant &Value);
	virtual TJvInterpreterFunctionDesc* __fastcall FindFunDesc(const AnsiString UnitName, const AnsiString Identifier, const AnsiString ClassIdentifier = "");
	virtual void __fastcall CurUnitChanged(const AnsiString NewUnitName, AnsiString &Source);
	virtual bool __fastcall UnitExists(const AnsiString Identifier);
	virtual bool __fastcall IsEvent(System::TObject* Obj, const AnsiString Identifier);
	virtual TSimpleEvent __fastcall NewEvent(const AnsiString UnitName, const AnsiString FunctionName, const AnsiString EventType, TJvInterpreterExpression* AOwner, System::TObject* AObject, const AnsiString APropName);
	DYNAMIC void __fastcall ClearSource(void);
	DYNAMIC void __fastcall ClearNonSource(void);
	DYNAMIC void __fastcall Sort(void);
	virtual void __fastcall AddSrcClass(TJvInterpreterIdentifier* JvInterpreterSrcClass);
	virtual TJvInterpreterIdentifier* __fastcall GetSrcClass(const AnsiString Identifier);
	
public:
	__fastcall TJvInterpreterAdapter(TJvInterpreterExpression* AOwner);
	__fastcall virtual ~TJvInterpreterAdapter(void);
	virtual bool __fastcall SetRecord(Variant &Value);
	DYNAMIC void __fastcall Clear(void);
	DYNAMIC void __fastcall Assign(TJvInterpreterAdapter* Source);
	DYNAMIC void __fastcall AddSrcUnit(const AnsiString Identifier, const AnsiString Source, const AnsiString UsesList);
	DYNAMIC void __fastcall AddSrcUnitEx(const AnsiString Identifier, const AnsiString Source, const AnsiString UsesList, void * Data);
	DYNAMIC void __fastcall AddExtUnit(const AnsiString Identifier);
	DYNAMIC void __fastcall AddExtUnitEx(const AnsiString Identifier, void * Data);
	DYNAMIC void __fastcall AddClass(const AnsiString UnitName, TMetaClass* AClassType, const AnsiString Identifier);
	DYNAMIC void __fastcall AddClassEx(const AnsiString UnitName, TMetaClass* AClassType, const AnsiString Identifier, void * Data);
	void __fastcall AddIntfGet(const GUID &IID, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	void __fastcall AddIntfGetEx(const GUID &IID, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddGet(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddGetEx(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddSet(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size);
	DYNAMIC void __fastcall AddSetEx(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, void * Data);
	DYNAMIC void __fastcall AddIGet(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddIGetEx(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddISet(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size);
	DYNAMIC void __fastcall AddISetEx(TMetaClass* AClassType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, void * Data);
	DYNAMIC void __fastcall AddIDGet(TMetaClass* AClassType, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddIDGetEx(TMetaClass* AClassType, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddIDSet(TMetaClass* AClassType, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size);
	DYNAMIC void __fastcall AddIDSetEx(TMetaClass* AClassType, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, void * Data);
	DYNAMIC void __fastcall AddFunction(const AnsiString UnitName, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddFunctionEx(const AnsiString UnitName, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddDGet(TMetaClass* AClassType, const AnsiString Identifier, void * GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, TCallConvention CallConvention);
	DYNAMIC void __fastcall AddDGetEx(TMetaClass* AClassType, const AnsiString Identifier, void * GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, TCallConvention CallConvention, void * Data);
	DYNAMIC void __fastcall AddRec(const AnsiString UnitName, const AnsiString Identifier, int RecordSize, TJvInterpreterRecField * Fields, const int Fields_Size, TJvInterpreterAdapterNewRecord CreateFunc, TJvInterpreterAdapterDisposeRecord DestroyFunc, TJvInterpreterAdapterCopyRecord CopyFunc);
	DYNAMIC void __fastcall AddRecEx(const AnsiString UnitName, const AnsiString Identifier, int RecordSize, TJvInterpreterRecField * Fields, const int Fields_Size, TJvInterpreterAdapterNewRecord CreateFunc, TJvInterpreterAdapterDisposeRecord DestroyFunc, TJvInterpreterAdapterCopyRecord CopyFunc, void * Data);
	DYNAMIC void __fastcall AddRecGet(const AnsiString UnitName, const AnsiString RecordType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddRecGetEx(const AnsiString UnitName, const AnsiString RecordType, const AnsiString Identifier, TJvInterpreterAdapterGetValue GetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp, void * Data);
	DYNAMIC void __fastcall AddRecSet(const AnsiString UnitName, const AnsiString RecordType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size);
	DYNAMIC void __fastcall AddRecSetEx(const AnsiString UnitName, const AnsiString RecordType, const AnsiString Identifier, TJvInterpreterAdapterSetValue SetFunc, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, void * Data);
	DYNAMIC void __fastcall AddConst(const AnsiString UnitName, const AnsiString Identifier, const Variant &Value);
	DYNAMIC void __fastcall AddConstEx(const AnsiString AUnitName, const AnsiString AIdentifier, const Variant &AValue, void * AData);
	DYNAMIC void __fastcall AddExtFun(const AnsiString UnitName, const AnsiString Identifier, unsigned DllInstance, const AnsiString DllName, const AnsiString FunctionName, int FunctionIndex, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, Word ResTyp);
	DYNAMIC void __fastcall AddExtFunEx(const AnsiString AUnitName, const AnsiString AIdentifier, unsigned ADllInstance, const AnsiString ADllName, const AnsiString AFunctionName, int AFunIndex, int AParamCount, Word * AParamTypes, const int AParamTypes_Size, Word AResTyp, void * AData);
	DYNAMIC void __fastcall AddSrcFun(const AnsiString UnitName, const AnsiString Identifier, AnsiString ClassIdentifier, int PosBeg, int PosEnd, int ParamCount, Word * ParamTypes, const int ParamTypes_Size, AnsiString * ParamTypeNames, const int ParamTypeNames_Size, AnsiString * ParamNames, const int ParamNames_Size, Word ResTyp, const AnsiString AResTypName, _di_IJvInterpreterDataType AResDataType, void * Data);
	DYNAMIC void __fastcall AddSrcFunEx(const AnsiString AUnitName, const AnsiString AIdentifier, AnsiString AClassIdentifier, int APosBeg, int APosEnd, int AParamCount, Word * AParamTypes, const int AParamTypes_Size, AnsiString * AParamTypeNames, const int AParamTypeNames_Size, AnsiString * AParamNames, const int AParamNames_Size, Word AResTyp, const AnsiString AResTypName, _di_IJvInterpreterDataType AResDataType, void * AData);
	DYNAMIC void __fastcall AddHandler(const AnsiString UnitName, const AnsiString Identifier, TMetaClass* EventClass, void * Code);
	DYNAMIC void __fastcall AddHandlerEx(const AnsiString AUnitName, const AnsiString AIdentifier, TMetaClass* AEventClass, void * ACode, void * AData);
	DYNAMIC void __fastcall AddEvent(const AnsiString UnitName, TMetaClass* AClassType, const AnsiString Identifier);
	DYNAMIC void __fastcall AddEventEx(const AnsiString AUnitName, TMetaClass* AClassType, const AnsiString AIdentifier, void * AData);
	DYNAMIC void __fastcall AddSrcVar(const AnsiString UnitName, const AnsiString Identifier, const AnsiString Typ, Word VTyp, const Variant &Value, _di_IJvInterpreterDataType DataType);
	DYNAMIC void __fastcall AddOnGet(TJvInterpreterGetValue Method);
	DYNAMIC void __fastcall AddOnSet(TJvInterpreterSetValue Method);
	__property bool DisableExternalFunctions = {read=FDisableExternalFunctions, write=FDisableExternalFunctions, nodefault};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -