VICI  0.11.815
Visual Chart Interpreter
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
libifstubs.h
Go to the documentation of this file.
1 /*
2  * libifstubs.h
3  *
4  * This is the public interface for a library the provides a stub
5  * version of all the VICI modules. This allows each module to be
6  * developed independently. This library is only used for testing
7  * and is not part of the installed system.
8  *
9  * Copyright 2012 - 2018 Brenton Ross
10  *
11  * This file is part of VICI.
12  *
13  * VICI is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * VICI is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with VICI. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
32 #ifndef STUB_LIBIFSTUBS_H
33 #define STUB_LIBIFSTUBS_H
34 
35 #include <vector>
36 #include <map>
37 #include "vici.h"
38 
39 namespace VICI
40 {
41 
43 namespace stub
44 {
45 
46 // Event simulating infrastructure
47 
52 class Event
53 {
54 public:
55  virtual ~Event(){}
56 
58  virtual void execute() = 0;
59 };
60 
75 {
76 private:
77  Dispatcher();
78  std::map< std::string, std::map< std::string, Event * > > table;
79  std::vector< std::string > traceData;
80  bool tracing;
81 public:
83 
86  static Dispatcher & instance();
87 
89 
94  void registerEvent( csr useCase, csr event, Event *fn );
95 
97 
101  void sendEvent( csr useCase, csr event );
102 
104  void clearTrace() { traceData.clear(); }
105 
107 
110  void enableTracing( bool x ) { tracing = x; if (!x) clearTrace(); }
111 
113 
116  void trace(csr x) { if(tracing) traceData.push_back(x); }
117 
119 
122  std::vector< std::string > &getTrace() { return traceData; }
123 };
124 
130 template < class T >
131 class AnEvent : public Event
132 {
133 private:
134  T * obj;
135  void (T::*fn)();
136 public:
138 
142  AnEvent( void (T::*f)(), T *x ) : obj(x), fn(f) {}
143 
145  virtual void execute() { (obj->*fn)(); }
146 };
147 
148 // Scaffolding classes used to demonstrate module level
149 // use cases.
150 
151 // ----------------------------------------------------------------
152 
158 class WindowStub : public Window
159 {
160 public:
161  WindowStub();
162 };
163 
164 
165 
166 // ----------------------------------------------------------------
167 
173 class EBNF_Stub : public EBNF::EBNF
174 {
175 public:
176  EBNF_Stub();
177  virtual bool validate( csr s );
178  virtual void getError( int &, int &, std::string & );
179  virtual VICI::EBNF::ParseTree * parse( csr s );
180 };
181 
188 {
189 public:
191  virtual EBNF::EBNF * makeEBNF();
192 };
193 
194 // --------------------------------------------------------
195 
202 {
203 protected:
205  Window *win; // reference
206 
208  EBNF::EBNF *ebnf; // reference
209 public:
211 
215  SyntaxStub( Window *w, EBNF::EBNF * e);
216  ~SyntaxStub();
217  virtual void show( csr s );
218 };
219 
226 {
227 public:
229  virtual Syntax::Syntax * makeSyntax( Window *, EBNF::EBNF * );
230 };
231 
232 // ---------------------------------------------------------
233 
240 {
241 private:
242  Window * window; // owned
243  EBNF::EBNF * ebnf; // owned
244  Syntax::Syntax * syntax; // owned
245 
246  // interface testing
247  int line;
248  int column;
249  std::string message;
250  bool validEbnf;
251 
252  void uc102a();
253  void uc102();
254 
255 public:
256  ViciAdminStub();
257  ~ViciAdminStub();
258 
259  virtual VICI::Window * getMainWindow(){ return nullptr; }
260 
262  ViciAdminStub( const ViciAdminStub & ) = delete;
263  ViciAdminStub & operator = ( const ViciAdminStub & ) = delete;
265 };
266 
273 {
274 public:
275  virtual Admin::ViciAdmin * makeViciAdmin();
276 };
277 
278 
279 // --------------------------------------------------------
280 
287 {
288 private:
290 
291  // interface testing
292  void uc107();
293 
294 public:
296 
301  virtual void show();
302  virtual void setNode( NodeId );
303 };
304 
311 {
312 public:
314 };
315 
316 // ------------------------------------------------------------
317 
324 {
325 private:
326  Window *win;
327  Cmnd::CommandClient *client;
328  EBNF::EBNF *ebnf;
329 
330  // use case tests
331  void uc107();
332 
333 public:
335 
340  virtual void show();
341  virtual void setCommand( NodeId nid, const ArgList & args );
342  virtual void selection( Symbol::Symbol * );
343  virtual void symbolAttr( Symbol::SymbolAttributes & );
344  virtual void textAttr( Symbol::TextAttributes & );
345 };
346 
353 {
354 public:
356 };
357 
358 // ----------------------------------------------------------------
359 
366 {
367 private:
368  bool isCommandSymbol;
369 public:
371 
374  SymbolStub( bool command ) : isCommandSymbol(command) {}
375  virtual Symbol *clone(VICI::Symbol::SymbolOwner *) { return new SymbolStub(isCommandSymbol); }
376  virtual bool isCommand() { return isCommandSymbol; }
378  virtual void draw( Scene *, double x, double y, double scale ) {}
379  virtual void attachCommand( const ArgList & ) {}
380  virtual void setNodeId(NodeId) {}
382  virtual void setHighlight(bool){}
383 };
384 
391 {
392 private:
393  std::vector< Symbol::SymbolClient * > clients;
394 
395  // interface testing
396  void uc107();
397 
398 public:
400 
403  SymbolMgrStub( Window *w );
404  virtual void addClient( Symbol::SymbolClient * );
405 
409 };
410 
417 {
418 public:
419  virtual Symbol::SymbolMgr * makeSymbolMgr( Window * );
420 };
421 
422 // ---------------------------------------------------------------
423 
430 {
431 private:
432  Symbol::SymbolMgr *symgr;
434  Interp::Interpreter *interpreter;
435 
436  // use case tests
437  void uc107();
438  void uc109();
439  void uc115();
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();
444 
445 public:
447 
455 
456  // menu actions
457  virtual void load( csr filename );
458  virtual void save( csr filename );
459 
460  // display of executing script
461  virtual void setExecution( bool active, csr node );
462 
463  // assigning a command to the current symbol
464  virtual void setCommand( NodeId, const ArgList & );
465 
466  // symbol interface
467  virtual void selection(VICI::Symbol::Symbol*);
469  virtual void textAttr(VICI::Symbol::TextAttributes&);
470  virtual VICI::ArgList getNames();
471 
472  // InterpreterClient Interface
473  // this gets called when a script variable has a change of value
474  virtual void setValue( csr varName, csr value );
475 
476  // this gets called when a monitored file changes state.
477  virtual void setFile( int state, csr filename );
478 
479  virtual void setCursor( ThreadId, NodeId );
480  virtual void breakReached( ThreadId, NodeId );
481 
482  // this gets called when data is available on a display
483  virtual void dataReady( NodeId );
484 
485  virtual void reportError( Severity, csr );
486 
487 
488  virtual void done();
489 };
490 
497 {
498  virtual Canvas::Canvas * makeCanvas( Window *, Symbol::SymbolMgr *,
500 };
501 
502 
503 
504 // ---------------------------------------------------------------------
505 
511 class SecureStub : public Sec::Secure
512 {
513 public:
514  SecureStub();
515  virtual bool verifySignature( csr filename );
516 
517  // sign this file with the user's key
518  virtual void addSignature( csr filename );
519 };
520 
527 {
528 public:
529  virtual Sec::Secure * makeSecure();
530 };
531 
532 // -----------------------------------------------------------------
533 
539 class CronStub : public Cron::Cron
540 {
541 public:
543 
546  CronStub( Window *w );
547  virtual void setCurrentFile( csr filename );
548  virtual void show();
549 };
550 
557 {
558 public:
559  virtual Cron::Cron * makeCron( Window *);
560 };
561 
562 // ------------------------------------------------------------
563 
570 {
571 public:
573 
576  InstallerStub( Window *w );
577  virtual void setCurrentFile( csr filename );
578  virtual void show();
579 };
580 
587 {
588 public:
589  virtual Inst::Installer * makeInstaller( Window * );
590 };
591 
592 // -----------------------------------------------------------
593 
600 {
601 private:
603 
604  // interface testing
605  std::string state;
606  void uc138() { state = "uc138"; }
607  void uc140() { state = "uc140"; }
608  void uc141() { state = "uc141"; }
609 public:
611 
615  virtual void addClient( Interp::InterpreterClient *sc ) { client = sc; }
616  virtual void debugMode(bool);
617  virtual void setScript( csr filename );
618  virtual void setArgs( ArgList args);
619 
620  // this is called when a variable has its value changed by the user
621  virtual void setValue( csr varName, csr value );
622 
623  virtual void setPosn( ThreadId, NodeId );
624  virtual void setInterval( double secs );
625  virtual void setBreak( NodeId, bool );
626  virtual int openDisplay( NodeId );
627  virtual void dataAck( NodeId );
628  // single step a thread of the script
629  virtual void step( ThreadId );
630  // resume a paused script
631  virtual void resume();
632  virtual void run();
633  virtual void run( csr funcName );
634  virtual void pause();
635  virtual void kill();
636  virtual int result();
637 
638  virtual void saveSnapshot( csr filename );
639  virtual void loadSnapshot( csr filename );
640 };
641 
648 {
649 public:
651 };
652 
653 // -----------------------------------------------------------------
654 
661 {
662 private:
663  Window *win;
664  Symbol::SymbolMgr *symgr;
665  Canvas::Canvas *canvas;
666  Search::Search *search;
667  Cmnd::Command *command;
668  Sec::Secure *secure;
669  Interp::Interpreter *interpreter;
670  Inst::Installer *installer;
671  Cron::Cron *cron;
672 
673  // interface testing
674  void uc108();
675  void uc113();
676  void uc142();
677  void uc144();
678 
679 public:
680  ViciEditorStub();
681 
682  virtual VICI::Window * getMainWindow(){ return nullptr; }
683  virtual void openFile( const VICI::Path & ){}
684 
685  // CanvasClient Interface
686  virtual void newSymbol( Symbol::Symbol * );
687  virtual void newChart();
688  virtual void changedChart();
689  virtual void searchAction( NodeId );
690  virtual void commandAction( NodeId, const ArgList & );
691  virtual void breakAction( NodeId, bool );
692 
693  // SymbolClient Interface
694  virtual void selection( Symbol::Symbol * );
695  virtual void symbolAttr( Symbol::SymbolAttributes & );
696  virtual void textAttr( Symbol::TextAttributes & );
697 
698  // CommandClient Interface
699  virtual void optionsAndParameters( NodeId, const ArgList & );
700  virtual void cmndError( csr );
701 
702  // SearchClient Interface
703  virtual void selectedCommand( NodeId, csr );
704 
705 };
706 
713 {
714 public:
715  virtual Ed::ViciEditor * makeViciEditor();
716 };
717 
718 // ----------------------------------------------------------------
719 
725 class ViciStub : public Vici
726 {
727 private:
728  void uc145();
729  void uc148();
730  void uc150a(); void uc150b(); void uc150c();
731 
732  Sec::Secure * secure;
733  Interp::Interpreter * interpreter;
734 
735 public:
736  ViciStub();
737  virtual Interp::Interpreter * getInterpreter() { return interpreter; }
738  virtual void openFile( const VICI::Path & ){}
739  virtual void autoStart(){}
740 
741  // this gets called when a script variable has a change of value
742  virtual void setValue( csr varName, csr value );
743 
744  // this gets called when a monitored file changes state.
745  virtual void setFile( int state, csr filename );
746 
747  // this gets called as the shell steps through the script
748  virtual void setCursor( ThreadId, NodeId );
749 
750  virtual void breakReached( ThreadId, NodeId );
751 
752  // this gets called when data is available on a display
753  virtual void dataReady( NodeId );
754 
755  virtual void reportError( Severity, csr );
756 
757  // this gets called when the script completes
758  virtual void done();
759 };
760 
767 {
768 public:
769  virtual Vici * makeVici(Window *w = nullptr);
770 };
771 
772 } // end namespace stub
773 } // end namespace VICI
774 #endif
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&#39;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&#39;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