FACT++  1.0
RemoteShell Class Reference

Derives the RemoteControl from Shell and adds colored prompt. More...

#include <RemoteControl.h>

+ Inheritance diagram for RemoteShell:
+ Collaboration diagram for RemoteShell:

Public Member Functions

 RemoteShell (const char *name, bool=false)
 
string GetUpdatePrompt () const
 
- Public Member Functions inherited from RemoteControl< Shell >
 RemoteControl (const char *name)
 
bool PrintGeneralHelp ()
 
bool PrintCommands ()
 
bool Process (const std::string &str)
 
void SetReceiver (StateMachineDimControl &imp)
 
- Public Member Functions inherited from Shell
 Shell (const char *prgname)
 
 ~Shell ()
 Ends the ncurses environment by calling endwin(). More...
 
bool Resize (int h)
 
void ShowHide (int v)
 
void Refresh ()
 
bool PrintKeyBindings ()
 
void Lock ()
 
void Run (const char *="")
 
void Unlock ()
 
WindowLogGetStreamOut ()
 
WindowLogGetStreamIn ()
 
const WindowLogGetStreamOut () const
 
const WindowLogGetStreamIn () const
 
- Public Member Functions inherited from ReadlineWindow
 ReadlineWindow (const char *prgname)
 
void SetWindow (WINDOW *w)
 
void SetColorPrompt (int col)
 
void RewindCursor () const
 
- Public Member Functions inherited from Readline
 Readline (const char *prgname)
 
virtual ~Readline ()
 
void BindKeySequence (const char *seq, int(*func)(int, int))
 
std::string GetName () const
 
void AddToHistory (const std::string &str, int skip=2)
 
std::vector< const char * > GetHistory () const
 Return a list of pointer to the history contents. More...
 
void SetMaxSize (int lines)
 
void UpdatePrompt (const std::string &prompt) const
 
void UpdatePrompt () const
 
virtual bool PreProcess (const std::string &str)
 
virtual bool PromptEOF (std::string &str)
 
virtual std::string Prompt (const std::string &prompt)
 
virtual bool ExecuteShellCommand (const std::string &cmd)
 
int Execute (const std::string &fname, const std::map< std::string, std::string > &args=std::map< std::string, std::string >())
 
bool IsStopped () const
 
void ProcessLine (const std::string &str)
 
void SetLabel (int l)
 
int GetLine () const
 
virtual std::string GetLinePrompt () const
 
int GetCols () const
 Get the number of cols readline assumes the screen size to be. More...
 
int GetRows () const
 Get the number of rows readline assumes the screen size to be. More...
 
- Public Member Functions inherited from InterpreterV8
 InterpreterV8 ()
 
virtual ~InterpreterV8 ()
 
std::vector< std::string > JsGetCommandList (const char *, int) const
 
virtual bool JsNewState (int, const std::string &, const std::string &)
 
virtual bool JsHasState (const std::string &) const
 
virtual int JsGetState (const std::string &) const
 
virtual std::vector< StateJsGetStates (const std::string &)
 
virtual std::vector< DescriptionJsGetDescription (const std::string &)
 
virtual std::vector< DescriptionJsDescription (const std::string &)
 
int JsHandleInterrupt (const EventImp &)
 
void JsHandleEvent (const EventImp &, uint64_t, const std::string &)
 
void JsHandleState (const std::string &, const State &)
 
void AddFormatToGlobal ()
 
bool JsRun (const std::string &, const std::map< std::string, std::string > &=std::map< std::string, std::string >())
 

Additional Inherited Members

- Static Public Member Functions inherited from Readline
static bool RedirectionWrapper (std::ostream &out, bool(*function)())
 
static bool DumpVariables ()
 
static bool DumpFunctions ()
 
static bool DumpFunmap ()
 
static bool DumpHistory ()
 
static bool ClearHistory ()
 
static void Stop ()
 
static void StopScript ()
 
static bool IsScriptStopped ()
 
static int GetScriptDepth ()
 
static void SetScriptDepth (unsigned int d)
 
static void SetExternalInput (const std::string &inp)
 
static std::string GetScript ()
 
static std::string GetExternalInput ()
 
static char * Compare (const std::string &str, const std::string &txt)
 
static char ** CompletionMatches (const char *text, char *(*func)(const char *, int))
 
static FILE * SetStreamOut (FILE *f)
 
static FILE * SetStreamIn (FILE *f)
 
static std::string GetPrompt ()
 
static std::string GetBuffer ()
 
static int GetAbsCursor ()
 return strlen(rl_display_prompt) + rl_point More...
 
static int GetCursor ()
 return rl_point (the current cursor position within the line buffer) More...
 
static int GetBufferLength ()
 
static int GetLineLength ()
 return the length of the prompt plus the length of the line buffer More...
 
static void Resize ()
 
static void Resize (int w, int h)
 
static ReadlineInstance ()
 
static void StaticPushHistory (const std::string &fname)
 
static std::string StaticPrompt (const std::string &prompt)
 
static void StaticPopHistory (const std::string &fname)
 
- Static Public Member Functions inherited from InterpreterV8
static void JsStop ()
 
- Protected Member Functions inherited from RemoteControl< Shell >
void SetSection (int s)
 
int Write (const Time &time, const std::string &txt, int qos=MessageImp::kMessage)
 
void exitHandler (int code)
 
char ** Completion (const char *text, int start, int)
 
void EventHook (bool newline)
 
bool HasServer (const std::string &server)
 
vector< string > GetServerList () const
 
vector< string > GetCommandList (const string &server) const
 
vector< string > GetCommandList () const
 
int PrintStates (std::ostream &out, const std::string &serv="") const
 
int PrintDescription (std::ostream &out, bool iscmd, const std::string &serv="", const std::string &service="") const
 
bool SendDimCommand (ostream &out, const std::string &server, const std::string &str, bool do_throw=false)
 
void JsLoad (const std::string &)
 
void JsStart (const std::string &)
 
void JsEnd (const std::string &)
 
bool JsSend (const std::string &str)
 
void JsOut (const std::string &msg)
 
void JsWarn (const std::string &msg)
 
void JsResult (const std::string &msg)
 
void JsPrint (const std::string &msg)
 
void JsAlarm (const std::string &msg)
 
void JsException (const std::string &str)
 
bool JsHasState (int s) const
 
bool JsHasState (const string &n) const
 
bool JsSetState (int s)
 
int JsGetState (const string &n) const
 
vector< StateJsGetStates (const string &server)
 
set< ServiceJsGetServices ()
 
vector< DescriptionJsGetDescription (const string &server)
 
State JsGetCurrentState () const
 
State JsState (const std::string &server)
 
bool JsNewState (int s, const string &n, const string &c)
 
int JsWait (const string &server, int32_t state, uint32_t ms)
 
vector< DescriptionJsDescription (const string &service)
 
pair< uint64_t, EventImp * > JsGetEvent (const std::string &service)
 
int Handle (const EventImp &evt, const string &service)
 
void * JsSubscribe (const std::string &service)
 
bool JsUnsubscribe (const std::string &service)
 
void UnsubscribeAll ()
 
- Protected Member Functions inherited from ReadlineWindow
void Startup ()
 Color index in which the prompt should be displayed. More...
 
void Redisplay ()
 
void CompletionDisplay (char **matches, int num, int max)
 
- Protected Member Functions inherited from Readline
virtual int Getc (FILE *)
 The non static implementations of the callback funtions above. More...
 
virtual char * Complete (const char *text, int state)
 Functions dealing with auto completion. More...
 
void SetCompletion (const std::vector< std::string > *v)
 
char ** Complete (const std::vector< std::string > &v, const char *text)
 
virtual void PrintReadlineError (const std::string &str)
 
- Protected Member Functions inherited from RemoteControlImp
 RemoteControlImp (std::ostream &out, std::ostream &in)
 The server to which we currently cd'ed. More...
 
virtual ~RemoteControlImp ()
 
bool ProcessCommand (const std::string &str, bool change=true)
 
virtual bool SendDimCommand (ostream &, const std::string &, const std::string &, bool=false)
 
- Static Protected Member Functions inherited from RemoteControl< Shell >
static void append (std::string &str)
 
static void chop (std::string &str)
 
- Protected Attributes inherited from RemoteControl< Shell >
StateMachineDimControlfImp
 
map< string, EventInfo > fInfo
 
std::mutex fMutex
 
- Protected Attributes inherited from Shell
WindowLog win
 pointer to our glocal object to get the static member functions into scope More...
 
WindowLog wout
 
- Protected Attributes inherited from Readline
const std::vector< std::string > * fCompletion
 Pointer to a list of possible matched for auto-completion. More...
 
- Protected Attributes inherited from RemoteControlImp
std::ostream & lin
 
std::ostream & lout
 Output stream for local synchrounous output. More...
 
std::string fCurrentServer
 Output stream for local synchrounous output. More...
 
- Static Protected Attributes inherited from Shell
static ShellThis = 0
 
- Static Protected Attributes inherited from Readline
static ReadlineThis = 0
 
static std::string fScript
 

Detailed Description

Derives the RemoteControl from Shell and adds colored prompt.

This is basically a RemoteControl, which derives through the template argument from the Shell class. It enhances the functionality of the local control with a proper updated prompt.

Definition at line 589 of file RemoteControl.h.


The documentation for this class was generated from the following files: