FACT++  1.0
string RemoteShell::GetUpdatePrompt ( ) const
virtual

Reimplemented from Readline.

Definition at line 83 of file RemoteControl.cc.

References RemoteControlImp::fCurrentServer, State::index, and State::name.

84 {
85  // If we are continously flushing the buffer omit the buffer size
86  // If we are buffering show the buffer size
87  const string beg = GetLinePrompt();
88 
89  // If we have not cd'ed to a server show only the line start
90  if (fCurrentServer.empty() || !fImp)
91  return beg + "> ";
92 
93  const State state = fImp->GetServerState(fCurrentServer);
94  if (state.index==-256)
95  return beg + "> ";//Form("\n[%d] \033[34m\033[1m%s\033[0m> ", GetLine(), fCurrentServer.c_str());
96 
97  // If no match found or something wrong found just output the server
98  if (state.index<-1)
99  return beg + " " + fCurrentServer + "> ";
100 
101  // If everything found add the state to the server
102  return beg + " " + fCurrentServer + ":" + state.name + "> ";
103 }
StateMachineDimControl * fImp
Definition: RemoteControl.h:70
int index
Definition: State.h:11
std::string fCurrentServer
Output stream for local synchrounous output.
Definition: RemoteControl.h:28
State GetServerState(const std::string &server)
std::string name
Index (e.g. 1)
Definition: State.h:12
virtual std::string GetLinePrompt() const
Definition: Readline.cc:592