// Borland C++ Builder // Copyright (c) 1995, 1999 by Borland International // All rights reserved // (DO NOT EDIT: machine generated header) 'DSSimulator.pas' rev: 5.00 #ifndef DSSimulatorHPP #define DSSimulatorHPP #pragma delphiheader begin #pragma option push -w- #pragma option push -Vx #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit //-- user supplied ----------------------------------------------------------- namespace Dssimulator { //-- type declarations ------------------------------------------------------- #pragma option push -b- enum TLanguage { Delphi, CBuilder }; #pragma option pop #pragma option push -b- enum symbolType { integerType, pintegerType, listType, plistType, addrIntegerType, addrListType, treeType, ptreeType, addrTreeType, arrayType, nonArrayType, nilType }; #pragma option pop struct _integer; typedef _integer *p_integer; struct _integer { int data; } ; struct _pinteger; typedef _pinteger *p_pinteger; struct _pinteger { AnsiString addrOfInteger; } ; struct _list; typedef _list *p_list; struct _list { int data; AnsiString next; } ; struct _plist; typedef _plist *p_plist; struct _plist { AnsiString addrOfList; } ; struct _tree; typedef _tree *p_tree; struct _tree { int data; AnsiString left; AnsiString right; } ; struct _ptree; typedef _ptree *p_ptree; struct _ptree { AnsiString addrOfTree; } ; struct _array; typedef _array *p_array; struct _array { int minIndex; int maxIndex; void *data; } ; struct symbolAttrib; typedef symbolAttrib *psymbolAttrib; struct symbolAttrib { AnsiString name; symbolType symType; Windows::TRect location; void *value; } ; struct symbolList; typedef symbolList *pSymbolList; struct symbolList { symbolAttrib symbol; symbolList *next; } ; class DELPHICLASS TDSSimulator; class PASCALIMPLEMENTATION TDSSimulator : public Controls::TCustomControl { typedef Controls::TCustomControl inherited; private: int FboxHeight; int FintBoxWidth; int FlistIntBoxWidth; int FlistPntBoxWidth; int FfontHeight; int FboxHorizSpace; int FboxVertSpace; Graphics::TColor FforegroundColor; Graphics::TColor FbackgroundColor; Comctrls::TRichEdit* FRichEdit; AnsiString FEvalString; AnsiString FExprString; TLanguage FLanguage; int curLineNum; AnsiString curLineText; int locx; int locy; int locnewy; symbolList *head; symbolList *curList; symbolList *lastList; BOOL first; int count; BOOL varInProcess; symbolList *selelm; int mdx; int mdy; BOOL moving; int mmx; int mmy; BOOL proceed; BOOL quit; BOOL stop; BOOL inEvaluation; BOOL errorInEvaluation; AnsiString errorString; void __fastcall SetbackgroundColor(Graphics::TColor AColor); void __fastcall SetforegroundColor(Graphics::TColor AColor); pSymbolList __fastcall findSymbol(AnsiString symbol); void __fastcall deleteSymbol(AnsiString symb); void __fastcall deleteAllSymbolList(void); void * __fastcall DelphiLValue(AnsiString expr, symbolType &exprType); void * __fastcall CBLValue(AnsiString expr, symbolType &exprType); void * __fastcall DelphiRValue(AnsiString expr, symbolType &exprType); void * __fastcall CBRValue(AnsiString expr, symbolType &exprType); void __fastcall processDelphiVar(AnsiString command); void __fastcall processCBVar(AnsiString command); void __fastcall processDelphiNew(AnsiString command); void __fastcall processCBNew(AnsiString command); void __fastcall processDispose(AnsiString command); void __fastcall processDelete(AnsiString command); void __fastcall processDelphiSubstitution(AnsiString command); void __fastcall processCBSubstitution(AnsiString command); void __fastcall processDelphiFor(AnsiString command, int &numLines); void __fastcall processCBFor(AnsiString command, int &numLines); void __fastcall processDelphiCommand(AnsiString command, int &numLines); void __fastcall processCBCommand(AnsiString command, int &numLines); void __fastcall waitUntilProceedTrue(void); void __fastcall emphasizeLine(int lineNum); void __fastcall processDelphiWhile(AnsiString command, int &numLines); void __fastcall processCBWhile(AnsiString command, int &numLines); BOOL __fastcall evaluateLogExpr(AnsiString logicalExpr); void __fastcall processDelphiIf(AnsiString command, int &numLines); void __fastcall processCBIf(AnsiString command, int &numLines); void __fastcall processCBOneIncrease(AnsiString command); void __fastcall processCBOneDecrease(AnsiString command); AnsiString __fastcall getLine(int lineNum); int __fastcall getLineCount(void); void __fastcall processCBtypedef(AnsiString command, int &numLines); void __fastcall systemAbort(void); protected: virtual void __fastcall Paint(void); DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y); DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y); DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y); public: __fastcall virtual TDSSimulator(Classes::TComponent* AOwner); __fastcall virtual ~TDSSimulator(void); void __fastcall Start(void); void __fastcall Next(void); void __fastcall Evaluate(void); void __fastcall Close(void); void __fastcall Restart(void); void __fastcall DelphiCode(void); void __fastcall CBuilderCode(void); __published: __property int BoxHeight = {read=FboxHeight, write=FboxHeight, default=20}; __property int IntBoxWidth = {read=FintBoxWidth, write=FintBoxWidth, default=30}; __property int ListIntBoxWidth = {read=FlistIntBoxWidth, write=FlistIntBoxWidth, default=30}; __property int ListPntBoxWidth = {read=FlistPntBoxWidth, write=FlistPntBoxWidth, default=20}; __property int FontHeight = {read=FfontHeight, write=FfontHeight, default=12}; __property int BoxHorizSpace = {read=FboxHorizSpace, write=FboxHorizSpace, default=10}; __property int BoxVertSpace = {read=FboxVertSpace, write=FboxVertSpace, default=30}; __property Graphics::TColor ForegroundColor = {read=FforegroundColor, write=SetforegroundColor, default=0 }; __property Graphics::TColor BackgroundColor = {read=FbackgroundColor, write=SetbackgroundColor, default=16777215 }; __property Comctrls::TRichEdit* RichEdit = {read=FRichEdit, write=FRichEdit}; __property AnsiString EvalString = {read=FEvalString, write=FEvalString}; __property AnsiString ExprString = {read=FExprString, write=FExprString}; __property BOOL ProcProceed = {read=proceed, write=proceed, nodefault}; __property Align ; __property TLanguage Language = {read=FLanguage, write=FLanguage, default=0}; public: #pragma option push -w-inl /* TWinControl.CreateParented */ inline __fastcall TDSSimulator(HWND ParentWindow) : Controls::TCustomControl( ParentWindow) { } #pragma option pop }; //-- var, const, procedure --------------------------------------------------- extern PACKAGE void __fastcall Register(void); } /* namespace Dssimulator */ #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Dssimulator; #endif #pragma option pop // -w- #pragma option pop // -Vx #pragma delphiheader end. //-- end unit ---------------------------------------------------------------- #endif // DSSimulator