32 #ifndef STUB_LIBIFSTUBS_H
33 #define STUB_LIBIFSTUBS_H
78 std::map< std::string, std::map< std::string, Event * > > table;
79 std::vector< std::string > traceData;
116 void trace(
csr x) {
if(tracing) traceData.push_back(x); }
122 std::vector< std::string > &
getTrace() {
return traceData; }
142 AnEvent(
void (T::*f)(), T *x ) : obj(x), fn(f) {}
178 virtual void getError(
int &,
int &, std::string & );
368 bool isCommandSymbol;
378 virtual void draw(
Scene *,
double x,
double y,
double scale ) {}
393 std::vector< Symbol::SymbolClient * > clients;
440 void uc137a();
void uc137b();
441 void uc138a();
void uc138b();
void uc138c();
442 void uc140a();
void uc140b();
void uc140c();
443 void uc141a();
void uc141b();
void uc141c();
457 virtual void load(
csr filename );
458 virtual void save(
csr filename );
477 virtual void setFile(
int state,
csr filename );
606 void uc138() { state =
"uc138"; }
607 void uc140() { state =
"uc140"; }
608 void uc141() { state =
"uc141"; }
633 virtual void run(
csr funcName );
634 virtual void pause();
730 void uc150a();
void uc150b();
void uc150c();
745 virtual void setFile(
int state,
csr filename );
virtual void run()
start running the script
Definition: libifstubs.cpp:736
An API for the vici runtime gui.
Definition: vici.h:1444
virtual void selection(Symbol::Symbol *)
notification of new current symbol
Definition: libifstubs.cpp:271
A parser for EBNF.
Definition: vici.h:243
A stub version of the ViciAdmin module interface.
Definition: libifstubs.h:239
Severity
Severity levels for log messages.
Definition: vx.h:48
virtual Cron::Cron * makeCron(Window *)
create an instance of the Cron class
Definition: libifstubs.cpp:599
An abstract factory for making an instance of Command.
Definition: vici.h:1181
virtual void dataReady(NodeId)
this gets called when data is available on a display
Definition: libifstubs.cpp:460
An abstract factory for making an instance of Vici.
Definition: vici.h:1469
virtual void openFile(const VICI::Path &)
Set the file to execute.
Definition: libifstubs.h:738
virtual void show()
display the command entry window
Definition: libifstubs.cpp:256
A stub version of the Search module.
Definition: libifstubs.h:286
virtual void setBreak(NodeId, bool)
call this to mark a node as a break point
Definition: libifstubs.cpp:709
A factory for creating stub instances of Canvas objects.
Definition: libifstubs.h:496
A factory for creating SyntaxStub objects.
Definition: libifstubs.h:225
Send events to registered objects.
Definition: libifstubs.h:74
virtual void show()
make the search window visible
Definition: libifstubs.cpp:218
Install a script into the user's desktop.
Definition: vici.h:1336
A factory for creating stub instances of Interpreter objects.
Definition: libifstubs.h:647
An abstract factory for making an instance of Interpreter.
Definition: vici.h:678
virtual void setCursor(ThreadId, NodeId)
this gets called as the shell steps through the script
Definition: libifstubs.cpp:987
virtual VICI::Window * getMainWindow()
Get a pointer to the main window.
Definition: libifstubs.h:682
The interface that must be implemented by clients of the interpreter.
Definition: vici.h:501
virtual void done()
this gets called when the script completes
Definition: libifstubs.cpp:1005
SymbolStub(bool command)
Constructor.
Definition: libifstubs.h:374
virtual Symbol::SymbolMgr * makeSymbolMgr(Window *)
create an instance of the SymbolMgr class
Definition: libifstubs.cpp:295
virtual bool validate(csr s)
confirm that an EBNF is valid
Definition: libifstubs.cpp:88
A stub version of the Secure module.
Definition: libifstubs.h:511
A factory for creating instances of the EBNF_Stub.
Definition: libifstubs.h:187
virtual void setNodeId(NodeId)
Set the node id for the object.
Definition: libifstubs.h:380
SyntaxStub(Window *w, EBNF::EBNF *e)
Costructor.
Definition: libifstubs.cpp:124
A wrapper class for windows.
Definition: vici.h:190
virtual Ed::ViciEditor * makeViciEditor()
create an instance of the ViciEditor class
Definition: libifstubs.cpp:902
virtual void breakReached(ThreadId, NodeId)
this gets called when a break point is reached
Definition: libifstubs.cpp:456
InterpreterStub(Sec::Secure *s)
Constructor.
Definition: libifstubs.cpp:658
A factory for creating stub instances of Cron objects.
Definition: libifstubs.h:556
Define an Abstract base type for Dispatcher events.
Definition: libifstubs.h:52
virtual int result()
get the exit code
Definition: libifstubs.cpp:755
virtual void setNode(NodeId)
set the identity of the current node
Definition: libifstubs.cpp:223
virtual void setCommand(NodeId nid, const ArgList &args)
set the initial value of the command
Definition: libifstubs.cpp:261
virtual Interp::Interpreter * getInterpreter()
Get a reference to the interpreter object.
Definition: libifstubs.h:737
virtual void setPosn(ThreadId, NodeId)
call this to set the point where execution resumes
Definition: libifstubs.cpp:714
virtual void searchAction(NodeId)
notification that the user wants the search tab
Definition: libifstubs.cpp:855
virtual void textAttr(Symbol::TextAttributes &)
unused by this library
Definition: libifstubs.cpp:278
virtual void attachCommand(const ArgList &)
Associate the symbol with a command.
Definition: libifstubs.h:379
A factory for creating stub instances of Installer objects.
Definition: libifstubs.h:586
int NodeId
Type for identifying a node of the flowchart.
Definition: vici.h:83
virtual void reportError(Severity, csr)
This gets called if an error is detected.
Definition: libifstubs.cpp:463
virtual void loadSnapshot(csr filename)
restore a snapshot file
Definition: libifstubs.cpp:724
virtual void optionsAndParameters(NodeId, const ArgList &)
this gets called when the user presses OK
Definition: libifstubs.cpp:882
InstallerStub(Window *w)
Constructor.
Definition: libifstubs.cpp:631
virtual void addClient(Interp::InterpreterClient *sc)
add a client for notifications
Definition: libifstubs.h:615
Provide security for the scripts.
Definition: vici.h:1215
virtual void cmndError(csr)
this gets called if there is an error
Definition: libifstubs.cpp:896
void enableTracing(bool x)
Enable tracing.
Definition: libifstubs.h:110
virtual VICI::Symbol::Style getStyle()
get the style for the symbol
Definition: libifstubs.h:381
virtual Cmnd::Command * makeCommand(Window *, Cmnd::CommandClient *, Canvas::Canvas *)
create an instance of the Command class
Definition: libifstubs.cpp:238
virtual void textAttr(VICI::Symbol::TextAttributes &)
notification of new text attributes
Definition: libifstubs.cpp:425
virtual void execute()
Execute the saved function pointer.
Definition: libifstubs.h:145
virtual void pause()
pause the script
Definition: libifstubs.cpp:761
void sendEvent(csr useCase, csr event)
Make a registered call.
Definition: libifstubs.cpp:55
Represents something that is notified about events occurring on a symbol.
Definition: vici.h:782
Allow the user to search for, and organise commands.
Definition: vici.h:441
An interface that is notified of a command selection.
Definition: vici.h:1115
virtual void addClient(Symbol::SymbolClient *)
add a client for the symbol manager
Definition: libifstubs.cpp:310
CommandStub(Window *w, Cmnd::CommandClient *c, Canvas::Canvas *)
Constructor.
Definition: libifstubs.cpp:243
virtual bool verifySignature(csr filename)
check to ensure we are allowed to open this file
Definition: libifstubs.cpp:581
An abstract factory for making an instance of ViciEditor.
Definition: vici.h:1415
void clearTrace()
Clear the trace data.
Definition: libifstubs.h:104
virtual void setValue(csr varName, csr value)
this gets called when a script variable has a change of value
Definition: libifstubs.cpp:975
virtual void commandAction(NodeId, const ArgList &)
notification that the command tab is to be displayed
Definition: libifstubs.cpp:850
CanvasStub(Window *w, Symbol::SymbolMgr *s, Interp::Interpreter *i, VICI::Canvas::CanvasClient *c)
Constructor.
Definition: libifstubs.cpp:360
The interface that must implemented for clients of Search.
Definition: vici.h:417
virtual void draw(Scene *, double x, double y, double scale)
display the object
Definition: libifstubs.h:378
virtual void show()
Display the window.
Definition: libifstubs.cpp:642
SymbolMgrStub(Window *w)
Costructor.
Definition: libifstubs.cpp:301
virtual void kill()
stop the script
Definition: libifstubs.cpp:780
A factory for creating stub instances of ViciAdmin.
Definition: libifstubs.h:272
virtual Interp::Interpreter * makeInterpreter(Sec::Secure *)
create an instance of the Interpreter class
Definition: libifstubs.cpp:652
virtual void dataReady(NodeId)
this gets called when data is available on a display
Definition: libifstubs.cpp:993
An abstract factory for making an instance of Cron.
Definition: vici.h:1301
virtual void saveSnapshot(csr filename)
save a snapshot file
Definition: libifstubs.cpp:719
A factory for creating stub instances of Command objects.
Definition: libifstubs.h:352
A stub version of the Installer module.
Definition: libifstubs.h:569
A stub version of the Command module.
Definition: libifstubs.h:323
An abstract factory for making an instance of ViciAdmin.
Definition: vici.h:386
virtual VICI::Window * getMainWindow()
Get a pointer to the app main window.
Definition: libifstubs.h:259
virtual Symbol::TextAttributes getDefaultTextAttr()
get the current default text attributes
Definition: libifstubs.cpp:326
virtual void selection(Symbol::Symbol *)
notify that a symbol has been selected.
Definition: libifstubs.cpp:866
box for a command
Definition: vici.h:729
A type for the parsed form of EBNF.
Definition: vici.h:226
A stub version of the Vici Editor module.
Definition: libifstubs.h:660
virtual void autoStart()
Start the script as soon as the GUI is ready.
Definition: libifstubs.h:739
virtual void setExecution(bool active, csr node)
display of executing script
Definition: libifstubs.cpp:399
virtual void selection(VICI::Symbol::Symbol *)
notification that a symbol has been selected
Definition: libifstubs.cpp:412
virtual void newChart()
called when a new diagram has been started
Definition: libifstubs.cpp:845
virtual Inst::Installer * makeInstaller(Window *)
create an instance of the Installer class
Definition: libifstubs.cpp:626
virtual void breakAction(NodeId, bool)
notification that a breakpoint has been set or cleared
Definition: libifstubs.cpp:860
virtual Symbol::SymbolAttributes getDefaultAttr(Symbol::Style)
get the attributes for a symbol of the given style
Definition: libifstubs.cpp:317
virtual void setArgs(ArgList args)
set the program options
Definition: libifstubs.cpp:682
An abstract factory for making an instance of Canvas.
Definition: vici.h:1086
Manipulate path strings.
Definition: stringy.h:74
int ThreadId
type for identifying a thread in the running script
Definition: vici.h:86
A factory for creating stub instances of Vici objects.
Definition: libifstubs.h:766
virtual void openFile(const VICI::Path &)
Tell the editor which file to start with.
Definition: libifstubs.h:683
A wrapper for QGraphicsScene class.
Definition: vici.h:205
Allow scripts to be scheduled for later running.
Definition: vici.h:1276
virtual void setHighlight(bool)
show the symbol as selected
Definition: libifstubs.h:382
Display a syntax chart of command options.
Definition: vici.h:313
virtual void setValue(csr varName, csr value)
this gets called when a script variable has a change of value
Definition: libifstubs.cpp:439
Hold the attributes of a text comment.
Definition: vici.h:764
void trace(csr x)
Record a trace message.
Definition: libifstubs.h:116
A stub version of the Symbol Manager.
Definition: libifstubs.h:390
Represents something that is drawn on the canvas.
Definition: vici.h:804
virtual void setValue(csr varName, csr value)
this is called when a variable has its value changed by the user
Definition: libifstubs.cpp:703
virtual void debugMode(bool)
enable debug mode
Definition: libifstubs.cpp:686
An abstract factory for making an instance of SymbolMgr.
Definition: vici.h:953
SearchStub(Window *w, VICI::Search::SearchClient *c)
Constructor.
Definition: libifstubs.cpp:209
virtual void dataAck(NodeId)
call this after responding to InterpreterClient::dataReady() to wait for the next set of data...
Definition: libifstubs.cpp:696
std::vector< std::string > ArgList
Type for a list of command arguments and options.
Definition: vici.h:89
virtual void show()
Display the window.
Definition: libifstubs.cpp:615
Project wide declarations and definitions.
virtual void setInterval(double secs)
set the time interval between executing commands
Definition: libifstubs.cpp:768
A stub version of the Symbol class.
Definition: libifstubs.h:365
virtual void newSymbol(Symbol::Symbol *)
called when a symbol is placed on the canvas.
Definition: libifstubs.cpp:838
A stub version of the Vici module.
Definition: libifstubs.h:725
Window * win
The window to display on.
Definition: libifstubs.h:205
An abstract factory for making an instance of Syntax.
Definition: vici.h:336
An abstract factory for making an instance of Installer.
Definition: vici.h:1361
virtual void getError(int &, int &, std::string &)
get location and details of parsing error
Definition: libifstubs.cpp:97
An interface that is notified of canvas actions.
Definition: vici.h:985
An interface that is notified of changes to symbol manager.
Definition: vici.h:877
virtual void execute()=0
Execute the associated function pointer.
virtual Vici * makeVici(Window *w=nullptr)
create an instance of the Vici class
Definition: libifstubs.cpp:948
virtual void done()
this gets called when the script completes
Definition: libifstubs.cpp:466
virtual Admin::ViciAdmin * makeViciAdmin()
Create an instance of the ViciAdmin class.
Definition: libifstubs.cpp:145
static Dispatcher & instance()
Get an instance of the singleton object.
Definition: libifstubs.cpp:44
A stub version of the Canvas module.
Definition: libifstubs.h:429
Holds the attributes of a symbol.
Definition: vici.h:715
Style
The possible styles for symbols and lines.
Definition: vici.h:728
virtual void setCurrentFile(csr filename)
Set the script to install.
Definition: libifstubs.cpp:636
virtual void breakReached(ThreadId, NodeId)
this gets called when a break point is reached
Definition: libifstubs.cpp:998
virtual void addSignature(csr filename)
sign this file with the user's key
Definition: libifstubs.cpp:589
virtual void save(csr filename)
save the chart
Definition: libifstubs.cpp:392
Application for preparing commands.
Definition: vici.h:370
EBNF::EBNF * ebnf
The EBNF module.
Definition: libifstubs.h:208
A factory for creating stub instances of Symbol Manager objects.
Definition: libifstubs.h:416
The facade for the symbol library.
Definition: vici.h:910
A factory for creating stub instances of Security objects.
Definition: libifstubs.h:526
The API for interpreter library.
Definition: vici.h:561
A factory for creating stub instances of Vici Editor objects.
Definition: libifstubs.h:712
virtual void reportError(Severity, csr)
This gets called if an error is detected.
Definition: libifstubs.cpp:1001
The facade for the command library.
Definition: vici.h:1142
virtual void symbolAttr(Symbol::SymbolAttributes &)
notify that the default symbol attributes have changed
Definition: libifstubs.cpp:871
virtual void symbolAttr(VICI::Symbol::SymbolAttributes &)
notification that the default symbol attributes have changed
Definition: libifstubs.cpp:419
virtual void resume()
resume a paused script
Definition: libifstubs.cpp:776
virtual void load(csr filename)
restore the chart from the specified XML file.
Definition: libifstubs.cpp:386
const std::string & csr
short cut for string constants
Definition: vici.h:80
virtual void selectedCommand(NodeId, csr)
this function is called when the user selects a command.
Definition: libifstubs.cpp:888
A factory for creating stub instances of Search objects.
Definition: libifstubs.h:310
virtual void textAttr(Symbol::TextAttributes &)
notify that the default text attributes have changed
Definition: libifstubs.cpp:876
virtual bool isCommand()
check if the symbol represents a command object
Definition: libifstubs.h:376
virtual EBNF::EBNF * makeEBNF()
the factory for EBNF objects
Definition: libifstubs.cpp:74
A stub version of the EBNF module interface.
Definition: libifstubs.h:173
virtual void setScript(csr filename)
the XML VICI script to execute
Definition: libifstubs.cpp:670
virtual Sec::Secure * makeSecure()
create an instance of the Secure class
Definition: libifstubs.cpp:570
virtual void changedChart()
called when the chart is first changed
Definition: libifstubs.cpp:863
An abstract factory for making an instance of EBNF.
Definition: vici.h:278
virtual void setCursor(ThreadId, NodeId)
this gets called as the shell steps through the script
Definition: libifstubs.cpp:450
virtual void setCurrentFile(csr filename)
Set the file to schedule.
Definition: libifstubs.cpp:609
virtual int openDisplay(NodeId)
open a Display object for reading
Definition: libifstubs.cpp:690
A stub version of the Cron module.
Definition: libifstubs.h:539
An abstract factory for making an instance of Search.
Definition: vici.h:460
An abstract factory for making an instance of Secure.
Definition: vici.h:1244
The flowchart editor.
Definition: vici.h:1396
std::vector< std::string > & getTrace()
Get the current trace data.
Definition: libifstubs.h:122
virtual VICI::EBNF::ParseTree * parse(csr s)
parse the EBNF
Definition: libifstubs.cpp:108
A stub version of window objects.
Definition: libifstubs.h:158
virtual Syntax::Syntax * makeSyntax(Window *, EBNF::EBNF *)
Create an instance of Syntax.
Definition: libifstubs.cpp:119
void registerEvent(csr useCase, csr event, Event *fn)
Register a method to be called.
Definition: libifstubs.cpp:65
A stub version of the Syntax module interface.
Definition: libifstubs.h:201
CronStub(Window *w)
Constructor.
Definition: libifstubs.cpp:604
virtual void setCommand(NodeId, const ArgList &)
assigning a command to the current symbol
Definition: libifstubs.cpp:406
A template wrapper for function calls.
Definition: libifstubs.h:131
virtual VICI::ArgList getNames()
get a list of names of variables etc for use in command options
Definition: libifstubs.cpp:431
virtual void show(csr s)
display the syntax chart for the supplied ebnf
Definition: libifstubs.cpp:134
virtual void setFile(int state, csr filename)
this gets called when a monitored file changes state.
Definition: libifstubs.cpp:445
virtual void setAttributes(VICI::Symbol::SymbolAttributes &)
change the attributes of the symbol
Definition: libifstubs.h:377
virtual void setFile(int state, csr filename)
this gets called when a monitored file changes state.
Definition: libifstubs.cpp:981
virtual Symbol * clone(VICI::Symbol::SymbolOwner *)
construct a copy of the symbol
Definition: libifstubs.h:375
The facade for canvas library.
Definition: vici.h:1020
virtual void symbolAttr(Symbol::SymbolAttributes &)
unused by this library
Definition: libifstubs.cpp:275
virtual void step(ThreadId)
Definition: libifstubs.cpp:772
virtual Symbol::Symbol * getSymbol(Symbol::Style, Symbol::SymbolOwner *)
get a new symbol of the specified style
Definition: libifstubs.cpp:334
virtual Search::Search * makeSearch(Window *, Search::SearchClient *)
create an instance of the Search class
Definition: libifstubs.cpp:204
A stub version of the Interpreter module.
Definition: libifstubs.h:599
AnEvent(void(T::*f)(), T *x)
Constructor.
Definition: libifstubs.h:142