source: trunk/FACT++/src/LocalControl.cc@ 10252

Last change on this file since 10252 was 10183, checked in by tbretz, 10 years ago
New import.
File size: 901 bytes
Line 
1#include "LocalControl.h"
2
3#include "tools.h"
4
5string LocalConsole::GetUpdatePrompt() const
6{
7 const string beg = GetLinePrompt();
8
9 // Compile a string like "server:state> "
10 const string end =
11 Form("\033[34m\033[1m%s\033[0m:\033[32m\033[1m%s\033[0m> ",
12 fName.c_str(), fStateMachine->GetStateName().c_str());
13
14 // If we are continously flushing the buffer omit the buffer size
15 // If we are buffering show the buffer size
16 return "\n" + beg + " " + end;
17}
18
19//#include <boost/regex.hpp>
20
21string LocalShell::GetUpdatePrompt() const
22{
23 //const string s = (beg[0]=='\n'?beg.substr(1):beg) + " " + end;
24 //return boost::regex_replace(s, boost::regex("\033[[0-9]+m"), "");
25
26 const string beg = GetLinePrompt();
27
28 const string end =
29 Form("%s:%s> ", fName.c_str(),
30 fStateMachine->GetStateName().c_str());
31
32 return beg + " " + end;
33}
Note: See TracBrowser for help on using the repository browser.