Changeset 5176 in orxonox.OLD for trunk/src/lib/shell
- Timestamp:
- Sep 12, 2005, 12:18:25 AM (19 years ago)
- Location:
- trunk/src/lib/shell
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/shell/shell.cc
r5175 r5176 433 433 } 434 434 } 435 436 435 /** 437 436 * displays the Shell -
trunk/src/lib/shell/shell.h
r5175 r5176 40 40 inline static Shell* getInstance() { if (!Shell::singletonRef) Shell::singletonRef = new Shell(); return Shell::singletonRef; }; 41 41 /** @returns true if this class is instanciated, false otherwise */ 42 inline static bool isInstanciated() { return (Shell::singletonRef == NULL)? true:false; };42 inline static bool isInstanciated() { return (Shell::singletonRef == NULL)?false:true; }; 43 43 44 44 void activate(); 45 45 void deactivate(); 46 inline bool isActive() const { return this->bActive; }; 46 47 47 48 void setTextSize(unsigned int textSize, unsigned int lineSpacing = 1); … … 49 50 50 51 // BUFFERS 52 void flush(); 51 53 void setBufferDisplaySize(unsigned int bufferDisplaySize); 52 void flush();53 54 void printToDisplayBuffer(const char* text); 54 55 -
trunk/src/lib/shell/shell_buffer.cc
r5175 r5176 70 70 { 71 71 delete charElem; 72 73 72 charElem = bufferIterator->nextElement(); 74 73 } … … 149 148 strcpy(addLine, newLineBegin); 150 149 150 this->lineCount++; 151 151 this->buffer->add(addLine); 152 this->lineCount++; 152 if (Shell::isInstanciated() && Shell::getInstance()->isActive()) 153 Shell::getInstance()->printToDisplayBuffer(addLine); 153 154 154 155 if (this->buffer->getSize() > this->bufferSize) -
trunk/src/lib/shell/shell_buffer.h
r5175 r5176 26 26 inline static ShellBuffer* getInstance() { if (!ShellBuffer::singletonRef) ShellBuffer::singletonRef = new ShellBuffer(); return ShellBuffer::singletonRef; }; 27 27 /** @returns true if this class is instanciated, false otherwise */ 28 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)? true:false; };28 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; }; 29 29 30 30 // BUFFER // … … 37 37 // void moveBufferTo(unsigned int lineNumber); 38 38 const char* getBufferLine(unsigned int lineNumber); 39 inline tIterator<char>* getBufferIterator() const { return bufferIterator; }; 39 /** @returns the Buffer Iterator, that enables externals to walk through the Buffer */ 40 inline tIterator<char>* getBufferIterator() const { return bufferIterator; }; 41 /** @returns the Count of lines processed by the Shell. 42 inline long getLineCount() const { return this->lineCount; }; 40 43 41 44 private:
Note: See TracChangeset
for help on using the changeset viewer.