Changeset 7744 in orxonox.OLD for trunk/src/lib/shell/shell_buffer.h
- Timestamp:
- May 20, 2006, 6:09:17 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell_buffer.h
r7737 r7744 18 18 19 19 //! A class handling output from orxonox via debug.h 20 /** 21 * the ShellBuffer redirects output from PRINTF(x) to the Shell and STDOUT 22 * the ShellBuffer is a front-filling queue of limited length, that has the 23 * youngest added Entry at the beginning, and the oldest at the end. 24 */ 20 25 class ShellBuffer 21 26 { … … 26 31 inline static ShellBuffer* getInstance() { if (!ShellBuffer::singletonRef) ShellBuffer::singletonRef = new ShellBuffer(); return ShellBuffer::singletonRef; }; 27 32 /** @returns true if this class is instanciated, false otherwise */ 28 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };33 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; }; 29 34 30 35 void registerShell(Shell* shell); 31 36 void unregisterShell(Shell* shell); 37 38 static bool addBufferLineStatic(const char* line, ...); 39 void addBufferLine(const char* line, va_list arg); 32 40 33 41 // BUFFER // … … 35 43 void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; }; 36 44 void flush(); 37 static bool addBufferLineStatic(const char* line, ...); 38 void addBufferLine(const char* line, va_list arg); 45 39 46 /** @returns the List of stings from the Buffer */ 40 47 const std::list<std::string>& getBuffer() const { return this->buffer; }; 41 48 /** @returns the Count of lines processed by the Shell. */ 42 inline long getLineCount() const { return this->lineCount; };49 inline unsigned long getLineCount() const { return this->lineCount; }; 43 50 44 51 void debug() const; … … 58 65 unsigned long lineCount; //!< how many Lines have been written out so far. 59 66 67 // The Beginning of buffer (buffer.front()) is the last added line. 60 68 static std::list<std::string> buffer; //!< A list of stored char-arrays(strings) to store the history 61 69 };
Note: See TracChangeset
for help on using the changeset viewer.