📄 rm_jvinterpreter.hpp
字号:
__property TJvInterpreterIdentifierList* SrcUnitList = {read=FSrcUnitList};
__property TJvInterpreterIdentifierList* ExtUnitList = {read=FExtUnitList};
__property TJvInterpreterIdentifierList* GetList = {read=FGetList};
__property TJvInterpreterIdentifierList* SetList = {read=FSetList};
__property TJvInterpreterIdentifierList* IGetList = {read=FIGetList};
__property TJvInterpreterIdentifierList* ISetList = {read=FISetList};
__property TJvInterpreterIdentifierList* IDGetList = {read=FIDGetList};
__property TJvInterpreterIdentifierList* IDSetList = {read=FIDSetList};
__property TJvInterpreterIdentifierList* IntfGetList = {read=FIntfGetList};
__property TJvInterpreterIdentifierList* DirectGetList = {read=FDirectGetList};
__property TJvInterpreterIdentifierList* ClassList = {read=FClassList};
__property TJvInterpreterIdentifierList* ConstList = {read=FConstList};
__property TJvInterpreterIdentifierList* FunctionList = {read=FFunctionList};
__property TJvInterpreterIdentifierList* RecordList = {read=FRecordList};
__property TJvInterpreterIdentifierList* RecordGetList = {read=FRecordGetList};
__property TJvInterpreterIdentifierList* RecordSetList = {read=FRecordSetList};
__property TJvInterpreterIdentifierList* OnGetList = {read=FOnGetList};
__property TJvInterpreterIdentifierList* OnSetList = {read=FOnSetList};
__property TJvInterpreterIdentifierList* SrcFunctionList = {read=FSrcFunctionList};
__property TJvInterpreterIdentifierList* ExtFunctionList = {read=FExtFunctionList};
__property TJvInterpreterIdentifierList* EventHandlerList = {read=FEventHandlerList};
__property TJvInterpreterIdentifierList* EventList = {read=FEventList};
__property TJvInterpreterVarList* SrcVarList = {read=FSrcVarList};
__property TJvInterpreterIdentifierList* SrcClassList = {read=FSrcClassList};
};
class DELPHICLASS EJvInterpreterError;
class PASCALIMPLEMENTATION EJvInterpreterError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
private:
bool FExceptionPos;
int FErrCode;
int FErrPos;
AnsiString FErrName1;
AnsiString FErrName2;
AnsiString FErrUnitName;
int FErrLine;
AnsiString FErrMessage;
public:
__fastcall EJvInterpreterError(const int AErrCode, const int AErrPos, const AnsiString AErrName1, const AnsiString AErrName2);
void __fastcall Assign(Sysutils::Exception* E);
void __fastcall Clear(void);
__property int ErrCode = {read=FErrCode, nodefault};
__property int ErrPos = {read=FErrPos, nodefault};
__property AnsiString ErrName1 = {read=FErrName1};
__property AnsiString ErrName2 = {read=FErrName2};
__property AnsiString ErrUnitName = {read=FErrUnitName};
__property int ErrLine = {read=FErrLine, nodefault};
__property AnsiString ErrMessage = {read=FErrMessage};
public:
#pragma option push -w-inl
/* Exception.CreateFmt */ inline __fastcall EJvInterpreterError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateRes */ inline __fastcall EJvInterpreterError(int Ident)/* overload */ : Sysutils::Exception(Ident) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResFmt */ inline __fastcall EJvInterpreterError(int Ident, System::TVarRec const * Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateHelp */ inline __fastcall EJvInterpreterError(const AnsiString Msg, int AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateFmtHelp */ inline __fastcall EJvInterpreterError(const AnsiString Msg, System::TVarRec const * Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResHelp */ inline __fastcall EJvInterpreterError(int Ident, int AHelpContext)/* overload */ : Sysutils::Exception(Ident, AHelpContext) { }
#pragma option pop
#pragma option push -w-inl
/* Exception.CreateResFmtHelp */ inline __fastcall EJvInterpreterError(System::PResStringRec ResStringRec, System::TVarRec const * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(ResStringRec, Args, Args_Size, AHelpContext) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~EJvInterpreterError(void) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TJvInterpreterExpression : public Rm_jvcomponentbase::TJvComponent
{
typedef Rm_jvcomponentbase::TJvComponent inherited;
private:
Rm_jvinterpreterparser::TJvInterpreterParser* FParser;
Variant FVResult;
Variant FExpStack[200];
TStackPtr FExpStackPtr;
Variant FToken;
bool FBacked;
Rm_jvinterpreterparser::TTokenKind FTTyp;
AnsiString FTokenStr;
Rm_jvinterpreterparser::TTokenKind FPrevTTyp;
bool FAllowAssignment;
TJvInterpreterArgs* FArgs;
TJvInterpreterArgs* FCurrArgs;
Classes::TStream* FPStream;
bool FParsed;
TJvInterpreterAdapter* FAdapter;
TJvInterpreterAdapter* FSharedAdapter;
bool FCompiled;
int FBaseErrLine;
TJvInterpreterGetValue FOnGetValue;
TJvInterpreterSetValue FOnSetValue;
EJvInterpreterError* FLastError;
bool FDisableExternalFunctions;
AnsiString __fastcall GetSource();
void __fastcall SetSource(const AnsiString Value);
void __fastcall SetCurPos(int Value);
int __fastcall GetCurPos(void);
AnsiString __fastcall GetTokenStr();
void __fastcall ReadArgs(void);
void __fastcall InternalGetValue(void * Obj, Word ObjTyp, Variant &Result);
virtual Variant __fastcall CallFunction(const AnsiString FunctionName, TJvInterpreterArgs* Args, Variant * Params, const int Params_Size) = 0 ;
virtual Variant __fastcall CallFunctionEx(System::TObject* Instance, const AnsiString UnitName, const AnsiString FunctionName, TJvInterpreterArgs* Args, Variant * Params, const int Params_Size) = 0 ;
void __fastcall SetDisableExternalFunctions(const bool Value);
protected:
void __fastcall UpdateExceptionPos(Sysutils::Exception* E, const AnsiString UnitName);
DYNAMIC void __fastcall Init(void);
void __fastcall ErrorExpected(const AnsiString Exp);
void __fastcall ErrorNotImplemented(const AnsiString Msg);
int __fastcall PosBeg(void);
int __fastcall PosEnd(void);
void __fastcall Back(void);
void __fastcall SafeBack(void);
DYNAMIC TJvInterpreterAdapter* __fastcall CreateAdapter(void);
void __fastcall ParseToken(void);
void __fastcall ReadToken(void);
void __fastcall WriteToken(void);
void __fastcall Parse(void);
Variant __fastcall Expression1();
Variant __fastcall Expression2(const Word ExpType);
Variant __fastcall SetExpression1();
void __fastcall NextToken(void);
virtual bool __fastcall GetValue(const AnsiString Identifier, Variant &Value, TJvInterpreterArgs* &Args);
virtual bool __fastcall SetValue(const AnsiString Identifier, const Variant &Value, TJvInterpreterArgs* &Args);
virtual bool __fastcall GetElement(const Variant &Variable, Variant &Value, TJvInterpreterArgs* &Args);
virtual bool __fastcall SetElement(Variant &Variable, const Variant &Value, TJvInterpreterArgs* &Args);
DYNAMIC void __fastcall SourceChanged(void);
void __fastcall SetAdapter(TJvInterpreterAdapter* Adapter);
__property Variant Token = {read=FToken};
__property Rm_jvinterpreterparser::TTokenKind TTyp = {read=FTTyp, nodefault};
__property Rm_jvinterpreterparser::TTokenKind PrevTTyp = {read=FPrevTTyp, nodefault};
__property AnsiString TokenStr = {read=GetTokenStr};
__property int CurPos = {read=GetCurPos, write=SetCurPos, nodefault};
__property bool Compiled = {read=FCompiled, nodefault};
public:
__fastcall virtual TJvInterpreterExpression(Classes::TComponent* AOwner);
__fastcall virtual ~TJvInterpreterExpression(void);
DYNAMIC void __fastcall Run(void);
__property AnsiString Source = {read=GetSource, write=SetSource};
__property Variant VResult = {read=FVResult};
__property TJvInterpreterGetValue OnGetValue = {read=FOnGetValue, write=FOnGetValue};
__property TJvInterpreterSetValue OnSetValue = {read=FOnSetValue, write=FOnSetValue};
__property TJvInterpreterAdapter* Adapter = {read=FAdapter};
__property TJvInterpreterAdapter* SharedAdapter = {read=FSharedAdapter};
__property int BaseErrLine = {read=FBaseErrLine, write=FBaseErrLine, nodefault};
__property EJvInterpreterError* LastError = {read=FLastError};
__property bool DisableExternalFunctions = {read=FDisableExternalFunctions, write=SetDisableExternalFunctions, nodefault};
};
class PASCALIMPLEMENTATION TJvInterpreterEvent : public System::TObject
{
typedef System::TObject inherited;
private:
TJvInterpreterExpression* FOwner;
System::TObject* FInstance;
AnsiString FUnitName;
AnsiString FFunctionName;
AnsiString FPropName;
TJvInterpreterArgs* FArgs;
TJvInterpreterArgs* __fastcall GetArgs(void);
protected:
__fastcall virtual TJvInterpreterEvent(TJvInterpreterExpression* AOwner, System::TObject* AInstance, const AnsiString AUnitName, const AnsiString AFunctionName, const AnsiString APropName);
Variant __fastcall CallFunction(TJvInterpreterArgs* Args, Variant * Params, const int Params_Size);
__property TJvInterpreterArgs* Args = {read=GetArgs};
__property TJvInterpreterExpression* Owner = {read=FOwner};
__property System::TObject* Instance = {read=FInstance};
__property AnsiString UnitName = {read=FUnitName};
__property AnsiString FunctionName = {read=FFunctionName};
__property AnsiString PropName = {read=FPropName};
public:
__fastcall virtual ~TJvInterpreterEvent(void);
};
class PASCALIMPLEMENTATION TJvInterpreterVar : public System::TObject
{
typedef System::TObject inherited;
public:
AnsiString UnitName;
AnsiString Identifier;
AnsiString Typ;
Word VTyp;
Variant Value;
__fastcall virtual ~TJvInterpreterVar(void);
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterVar(void) : System::TObject() { }
#pragma option pop
};
class PASCALIMPLEMENTATION TJvInterpreterIdentifier : public System::TObject
{
typedef System::TObject inherited;
public:
AnsiString UnitName;
AnsiString Identifier;
void *Data;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterIdentifier(void) : System::TObject() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TJvInterpreterIdentifier(void) { }
#pragma option pop
};
class DELPHICLASS TJvInterpreterMethodList;
class PASCALIMPLEMENTATION TJvInterpreterMethodList : public TJvInterpreterIdentifierList
{
typedef TJvInterpreterIdentifierList inherited;
public:
virtual void __fastcall Sort(Classes::TListSortCompare Compare = 0x0);
public:
#pragma option push -w-inl
/* TList.Destroy */ inline __fastcall virtual ~TJvInterpreterMethodList(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterMethodList(void) : TJvInterpreterIdentifierList() { }
#pragma option pop
};
typedef Shortint TParamCount;
class DELPHICLASS TJvInterpreterSrcUnit;
class PASCALIMPLEMENTATION TJvInterpreterSrcUnit : public TJvInterpreterIdentifier
{
typedef TJvInterpreterIdentifier inherited;
private:
AnsiString FSource;
AnsiString FUsesList[33];
public:
__property AnsiString Source = {read=FSource};
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterSrcUnit(void) : TJvInterpreterIdentifier() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TJvInterpreterSrcUnit(void) { }
#pragma option pop
};
class DELPHICLASS TJvInterpreterMethod;
class PASCALIMPLEMENTATION TJvInterpreterMethod : public TJvInterpreterIdentifier
{
typedef TJvInterpreterIdentifier inherited;
protected:
TMetaClass* FClassType;
TParamCount ParamCount;
Word ParamTypes[33];
Word ResTyp;
void *Func;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterMethod(void) : TJvInterpreterIdentifier() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TJvInterpreterMethod(void) { }
#pragma option pop
};
class DELPHICLASS TJvInterpreterIntfMethod;
class PASCALIMPLEMENTATION TJvInterpreterIntfMethod : public TJvInterpreterIdentifier
{
typedef TJvInterpreterIdentifier inherited;
protected:
#pragma pack(push,1)
GUID IID;
#pragma pack(pop)
TParamCount ParamCount;
Word ParamTypes[33];
Word ResTyp;
void *Func;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterIntfMethod(void) : TJvInterpreterIdentifier() { }
#pragma option pop
#pragma option push -w-inl
/* TObject.Destroy */ inline __fastcall virtual ~TJvInterpreterIntfMethod(void) { }
#pragma option pop
};
class DELPHICLASS TJvInterpreterDMethod;
class PASCALIMPLEMENTATION TJvInterpreterDMethod : public TJvInterpreterMethod
{
typedef TJvInterpreterMethod inherited;
protected:
Word ResTyp;
TCallConvention CallConvention;
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TJvInterpreterDMethod(void) : TJvInterpreterMethod() { }
#pragma option pop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -