Changeset 11053 for trunk/FACT++/src/Console.cc
- Timestamp:
- 06/17/11 09:56:41 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Console.cc
r10922 r11053 180 180 fLogO.Display(true); 181 181 } 182 183 // ************************************************************************** 184 /** @class ConsoleStream 185 186 @brief This is an extension to the Readline class provding a colored output 187 188 This in an extension to the Readline class. It's purpose is just to have a 189 colored output stream available. It's main idea is that it is used in 190 environments without user interaction as a replacement the Console class. 191 This is interesting to be able to do everything identical as if Console 192 would be used, but Run() does not prompt but just wait until Stop() 193 was called. The advantage is that some functions of Readline can be used 194 like Execute and the history (just for Execute() commands of course) 195 196 */ 197 // ************************************************************************** 198 199 200 // -------------------------------------------------------------------------- 201 // 202 //! Instantiate a console stream. It will create a single WindowLog object 203 //! which is returned as input and output stream. 204 //! 205 //! @param name 206 //! The name of the program passed to the Readline constructor 207 //! 208 ConsoleStream::ConsoleStream(const char *name) : Readline(name) 209 { 210 ReadlineColor::PrintBootMsg(fLogO, GetName()); 211 } 212 213 // -------------------------------------------------------------------------- 214 // 215 //! Just usleep until Stop() was called. 216 // 217 void ConsoleStream::Run(const char *) 218 { 219 while (!IsStopped()) 220 usleep(10000); 221 }
Note:
See TracChangeset
for help on using the changeset viewer.