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

📄 rm_jvinterpreter.hpp

📁 这是一个功能强大
💻 HPP
📖 第 1 页 / 共 4 页
字号:
	void __fastcall InterpretIdentifier(void);
	void __fastcall InterpretBegin(void);
	void __fastcall InterpretIf(void);
	void __fastcall InterpretWhile(void);
	void __fastcall InterpretRepeat(void);
	void __fastcall InterpretFor(void);
	void __fastcall InterpretCase(void);
	void __fastcall InterpretTry(void);
	void __fastcall InterpretRaise(void);
	_di_IJvInterpreterDataType __fastcall ParseDataType();
	TSimpleEvent __fastcall NewEvent(const AnsiString UnitName, const AnsiString FunctionName, const AnsiString EventType, System::TObject* Instance, const AnsiString APropName);
	TJvInterpreterEvent* __fastcall FindEvent(const AnsiString UnitName, System::TObject* Instance, const AnsiString PropName);
	void __fastcall InternalSetValue(const AnsiString Identifier);
	virtual bool __fastcall GetValue(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* &Args);
	virtual bool __fastcall SetValue(const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* &Args);
	__property TJvInterpreterVarList* LocalVars = {read=GetLocalVars};
	__property Classes::TList* EventList = {read=FEventList};
	
public:
	__fastcall virtual TJvInterpreterFunction(Classes::TComponent* AOwner);
	__fastcall virtual ~TJvInterpreterFunction(void);
	DYNAMIC void __fastcall Run(void);
	__property AnsiString CurUnitName = {read=FCurUnitName};
	__property System::TObject* CurInstance = {read=FCurInstance};
	__property int FunStackCount = {read=GetFunStackCount, nodefault};
	__property void * DebugPointerToFunStack = {read=GetDebugPointerToFunStack};
	__property TJvInterpreterVarList* DebugPointerToGlobalVars = {read=GetDebugPointerToGlobalVars};
};


#pragma option push -b-
enum TUnitSection { usUnknown, usInterface, usImplementation, usInitialization, usFinalization };
#pragma option pop

class DELPHICLASS TJvInterpreterUnit;
class PASCALIMPLEMENTATION TJvInterpreterUnit : public TJvInterpreterFunction 
{
	typedef TJvInterpreterFunction inherited;
	
private:
	bool FClearUnits;
	Classes::TList* FEventHandlerList;
	TJvInterpreterGetUnitSource FOnGetUnitSource;
	TUnitSection FUnitSection;
	
protected:
	DYNAMIC void __fastcall Init(void);
	void __fastcall ReadFunctionHeader(TJvInterpreterFunctionDesc* FunctionDesc);
	void __fastcall InterpretUses(AnsiString &UsesList);
	void __fastcall ReadUnit(const AnsiString UnitName);
	void __fastcall InterpretFunction(void);
	void __fastcall InterpretUnit(void);
	void __fastcall InterpretType(void);
	void __fastcall InterpretClass(const AnsiString Identifier);
	virtual bool __fastcall GetValue(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* &Args);
	virtual bool __fastcall SetValue(const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* &Args);
	DYNAMIC bool __fastcall GetUnitSource(const AnsiString UnitName, AnsiString &Source);
	void __fastcall ExecFunction(TJvInterpreterFunctionDesc* Fun);
	DYNAMIC void __fastcall SourceChanged(void);
	void __fastcall InterpretRecord(const AnsiString Identifier);
	__property Classes::TList* EventHandlerList = {read=FEventHandlerList};
	
public:
	__fastcall virtual TJvInterpreterUnit(Classes::TComponent* AOwner);
	__fastcall virtual ~TJvInterpreterUnit(void);
	DYNAMIC void __fastcall Run(void);
	void __fastcall DeclareExternalFunction(const AnsiString Declaration);
	void __fastcall Compile(void);
	virtual Variant __fastcall CallFunction(const AnsiString FunctionName, TJvInterpreterArgs* Args, Variant * Params, const int Params_Size);
	virtual Variant __fastcall CallFunctionEx(System::TObject* Instance, const AnsiString UnitName, const AnsiString FunctionName, TJvInterpreterArgs* Args, Variant * Params, const int Params_Size);
	bool __fastcall FunctionExists(const AnsiString UnitName, const AnsiString FunctionName);
	__property TJvInterpreterGetUnitSource OnGetUnitSource = {read=FOnGetUnitSource, write=FOnGetUnitSource};
	__property TUnitSection UnitSection = {read=FUnitSection, nodefault};
};


class DELPHICLASS TJvInterpreterProgram;
class PASCALIMPLEMENTATION TJvInterpreterProgram : public TJvInterpreterUnit 
{
	typedef TJvInterpreterUnit inherited;
	
private:
	Classes::TStringList* FPas;
	Classes::TNotifyEvent FOnStatement;
	Classes::TStrings* __fastcall GetPas(void);
	void __fastcall SetPas(Classes::TStrings* Value);
	
protected:
	virtual void __fastcall DoOnStatement(void);
	
public:
	__fastcall virtual TJvInterpreterProgram(Classes::TComponent* AOwner);
	__fastcall virtual ~TJvInterpreterProgram(void);
	DYNAMIC void __fastcall Run(void);
	
__published:
	__property Classes::TStrings* Pas = {read=GetPas, write=SetPas};
	__property OnGetValue ;
	__property OnSetValue ;
	__property OnGetUnitSource ;
	__property Classes::TNotifyEvent OnStatement = {read=FOnStatement, write=FOnStatement};
};


class DELPHICLASS TJvSimpleVariantType;
class PASCALIMPLEMENTATION TJvSimpleVariantType : public Variants::TCustomVariantType 
{
	typedef Variants::TCustomVariantType inherited;
	
public:
	virtual void __fastcall Clear(TVarData &V);
	virtual void __fastcall Copy(TVarData &Dest, const TVarData &Source, const bool Indirect);
	virtual void __fastcall CastTo(TVarData &Dest, const TVarData &Source, const Word AVarType);
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvSimpleVariantType(void)/* overload */ : Variants::TCustomVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvSimpleVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvRecordVariantType;
class PASCALIMPLEMENTATION TJvRecordVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvRecordVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvRecordVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvObjectVariantType;
class PASCALIMPLEMENTATION TJvObjectVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvObjectVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvObjectVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvClassVariantType;
class PASCALIMPLEMENTATION TJvClassVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvClassVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvClassVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvPointerVariantType;
class PASCALIMPLEMENTATION TJvPointerVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvPointerVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvPointerVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvSetVariantType;
class PASCALIMPLEMENTATION TJvSetVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvSetVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvSetVariantType(void) { }
	#pragma option pop
	
};


class DELPHICLASS TJvArrayVariantType;
class PASCALIMPLEMENTATION TJvArrayVariantType : public TJvSimpleVariantType 
{
	typedef TJvSimpleVariantType inherited;
	
public:
	#pragma option push -w-inl
	/* TCustomVariantType.Create */ inline __fastcall TJvArrayVariantType(void)/* overload */ : TJvSimpleVariantType() { }
	#pragma option pop
	#pragma option push -w-inl
	/* TCustomVariantType.Destroy */ inline __fastcall virtual ~TJvArrayVariantType(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint cJvInterpreterMaxArgs = 0x20;
static const Shortint cJvInterpreterMaxRecFields = 0x20;
static const Byte cJvInterpreterStackMax = 0xc7;
static const Shortint JvInterpreter_MAX_ARRAY_DIMENSION = 0xa;
static const Shortint prArgsNoCheck = -1;
static const unsigned noInstance = 0x0;
extern PACKAGE TJvInterpreterRecField RFDNull;
static const Word varByConst = 0x8000;
static const Shortint ieOk = 0x0;
static const Shortint ieUnknown = 0x1;
static const Shortint ieInternal = 0x2;
static const Shortint ieUserBreak = 0x3;
static const Shortint ieRaise = 0x4;
static const Shortint ieErrorPos = 0x5;
static const Shortint ieExternal = 0x6;
static const Shortint ieAccessDenied = 0x7;
static const Shortint ieExpressionStackOverflow = 0x8;
static const Shortint ieRegisterBase = 0x1e;
static const Shortint ieRecordNotDefined = 0x1f;
static const Shortint ieRuntimeBase = 0x32;
static const Shortint ieStackOverFlow = 0x34;
static const Shortint ieTypeMistmatch = 0x35;
static const Shortint ieIntegerOverflow = 0x36;
static const Shortint ieMainUndefined = 0x37;
static const Shortint ieUnitNotFound = 0x38;
static const Shortint ieEventNotRegistered = 0x39;
static const Shortint ieDfmNotFound = 0x3a;
static const Shortint ieSyntaxBase = 0x64;
static const Shortint ieBadRemark = 0x65;
static const Shortint ieIdentifierExpected = 0x66;
static const Shortint ieExpected = 0x67;
static const Shortint ieUnknownIdentifier = 0x68;
static const Shortint ieBooleanRequired = 0x69;
static const Shortint ieClassRequired = 0x6a;
static const Shortint ieNotAllowedBeforeElse = 0x6b;
static const Shortint ieIntegerRequired = 0x6c;
static const Shortint ieROCRequired = 0x6d;
static const Shortint ieMissingOperator = 0x6e;
static const Shortint ieIdentifierRedeclared = 0x6f;
static const Byte ieArrayBase = 0xaa;
static const Byte ieArrayIndexOutOfBounds = 0xab;
static const Byte ieArrayTooManyParams = 0xac;
static const Byte ieArrayNotEnoughParams = 0xad;
static const Byte ieArrayBadDimension = 0xae;
static const Byte ieArrayBadRange = 0xaf;
static const Byte ieArrayRequired = 0xb0;
static const Byte ieFunctionBase = 0xb4;
static const Byte ieTooManyParams = 0xb5;
static const Byte ieNotEnoughParams = 0xb6;
static const Byte ieIncompatibleTypes = 0xb7;
static const Byte ieDllErrorLoadLibrary = 0xb8;
static const Byte ieDllInvalidArgument = 0xb9;
static const Byte ieDllInvalidResult = 0xba;
static const Byte ieDllFunctionNotFound = 0xbb;
static const Byte ieDirectInvalidArgument = 0xbc;
static const Byte ieDirectInvalidResult = 0xbd;
static const Byte ieDirectInvalidConvention = 0xbe;
static const Byte ieOleAuto = 0xc9;
static const Word ieUserBase = 0x300;
static const Word irExpression = 0x12d;
static const Word irIdentifier = 0x12e;
static const Word irDeclaration = 0x12f;
static const Word irEndOfFile = 0x130;
static const Word irClass = 0x131;
static const Word irIntegerConstant = 0x132;
static const Word irIntegerValue = 0x133;
static const Word irStringConstant = 0x134;
static const Word irStatement = 0x135;
extern PACKAGE TJvInterpreterAdapter* __fastcall GlobalJvInterpreterAdapter(void);
extern PACKAGE Word __fastcall varRecord(void);
extern PACKAGE Word __fastcall varObject(void);
extern PACKAGE Word __fastcall varClass(void);
extern PACKAGE Word __fastcall varPointer(void);
extern PACKAGE Word __fastcall varSet(void);
extern PACKAGE Word __fastcall varArray(void);
extern PACKAGE void __fastcall JvInterpreterError(const int AErrCode, const int AErrPos);
extern PACKAGE void __fastcall JvInterpreterErrorN(const int AErrCode, const int AErrPos, const AnsiString AErrName);
extern PACKAGE void __fastcall JvInterpreterErrorN2(const int AErrCode, const int AErrPos, const AnsiString AErrName1, const AnsiString AErrName2);
extern PACKAGE System::TObject* __fastcall V2O(const Variant &V);
extern PACKAGE Variant __fastcall O2V(System::TObject* O);
extern PACKAGE TMetaClass* __fastcall V2C(const Variant &V);
extern PACKAGE Variant __fastcall C2V(TMetaClass* C);
extern PACKAGE void * __fastcall V2P(const Variant &V);
extern PACKAGE Variant __fastcall P2V(void * P);
extern PACKAGE Variant __fastcall R2V(const AnsiString ARecordType, void * ARec);
extern PACKAGE void * __fastcall V2R(const Variant &V);
extern PACKAGE void * __fastcall P2R(const void * P);
extern PACKAGE Variant __fastcall S2V(const int I);
extern PACKAGE int __fastcall V2S(const Variant &V);
extern PACKAGE TJvInterpreterRecField __fastcall RFD(const AnsiString Identifier, int Offset, Word Typ);
extern PACKAGE void __fastcall NotImplemented(const AnsiString Msg);
extern PACKAGE Word __fastcall TypeName2VarTyp(const AnsiString TypeName);
extern PACKAGE void __fastcall ClearList(Classes::TList* List);
extern PACKAGE bool __fastcall Cmp(const AnsiString S1, const AnsiString S2);
extern PACKAGE void __fastcall JvInterpreterArraySetLength(const Variant &AArray, int ASize);
extern PACKAGE int __fastcall JvInterpreterArrayLength(const Variant &AArray);
extern PACKAGE int __fastcall JvInterpreterArrayLow(const Variant &AArray);
extern PACKAGE int __fastcall JvInterpreterArrayHigh(const Variant &AArray);
extern PACKAGE void __fastcall JvInterpreterArrayElementDelete(const Variant &AArray, int AElement);
extern PACKAGE void __fastcall JvInterpreterArrayElementInsert(const Variant &AArray, int AElement, const Variant &Value);
extern PACKAGE void __fastcall V2OA(const Variant &V, System::TVarRec * OA, Variant * OAValues, int &Size);
extern PACKAGE Variant __fastcall JvInterpreterVarAsType(const Variant &V, const int VarType);
extern PACKAGE void __fastcall JvInterpreterVarAssignment(Variant &Dest, const Variant &Source);
extern PACKAGE void __fastcall JvInterpreterVarCopy(Variant &Dest, const Variant &Source);
extern PACKAGE void __fastcall JvInterpreterVarFree(Variant &V);

}	/* namespace Rm_jvinterpreter */
using namespace Rm_jvinterpreter;
#pragma pack(pop)
#pragma option pop

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

⌨️ 快捷键说明

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