Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7315 in orxonox.OLD for trunk/src/lib/shell/shell.cc


Ignore:
Timestamp:
Apr 17, 2006, 1:32:25 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more std::string style in the Shell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell.cc

    r7221 r7315  
    7474  this->bufferDisplaySize = 10;
    7575  this->bufferOffset = 0;
    76   this->bufferIterator = ShellBuffer::getInstance()->getBuffer()->begin();
     76  this->bufferIterator = ShellBuffer::getInstance()->getBuffer().begin();
    7777
    7878  // INPUT LINE
     
    130130  this->setRelCoorSoft2D(0, 0, 1, 5);
    131131
    132   list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end();
     132  list<std::string>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer().end();
    133133  bool top = false;
    134134  for (int i = 0; i < this->bufferDisplaySize; i++)
     
    138138    {
    139139      this->bufferText[i]->setText((*textLine));
    140     if (textLine != ShellBuffer::getInstance()->getBuffer()->begin())
     140    if (textLine != ShellBuffer::getInstance()->getBuffer().begin())
    141141      top = true;
    142142      textLine--;
     
    159159  this->setRelCoorSoft2D(0, -(int)this->shellHeight, 1, 5);
    160160
    161   list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end();
     161  list<std::string>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer().end();
    162162  for (int i = 0; i < this->bufferDisplaySize; i++)
    163163  {
    164164    this->bufferText[i]->setVisibility(false);
    165     if (textLine != ShellBuffer::getInstance()->getBuffer()->begin())
     165    if (textLine != ShellBuffer::getInstance()->getBuffer().begin())
    166166    {
    167167      this->bufferText[i]->setText((*textLine));
     
    306306  }
    307307
    308   list<char*>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer()->end();
     308  list<std::string>::const_iterator textLine = --ShellBuffer::getInstance()->getBuffer().end();
    309309  bufferText = new Text*[bufferDisplaySize];
    310310  for (unsigned int i = 0; i < bufferDisplaySize; i++)
     
    313313    bufferText[i]->setAlignment(TEXT_ALIGN_LEFT);
    314314    bufferText[i]->setParent2D(this);
    315     if(textLine != ShellBuffer::getInstance()->getBuffer()->begin())
     315    if(textLine != ShellBuffer::getInstance()->getBuffer().begin())
    316316    {
    317317      bufferText[i]->setText(*textLine);
     
    390390  if (this->bufferOffset == 0)
    391391   {
    392      this->bufferIterator = ShellBuffer::getInstance()->getBuffer()->end();
     392     this->bufferIterator = ShellBuffer::getInstance()->getBuffer().end();
    393393//     for (unsigned int i = 0; i < this->bufferDisplaySize; i++)
    394394//       this->bufferIterator->prevStep();
     
    396396
    397397  // boundraries
    398   if (this->bufferOffset + lineCount > (int)ShellBuffer::getInstance()->getBuffer()->size())
    399     lineCount = (int)ShellBuffer::getInstance()->getBuffer()->size()- this->bufferOffset;
     398  if (this->bufferOffset + lineCount > (int)ShellBuffer::getInstance()->getBuffer().size())
     399    lineCount = (int)ShellBuffer::getInstance()->getBuffer().size()- this->bufferOffset;
    400400  else if (this->bufferOffset + lineCount < 0)
    401401    lineCount = -bufferOffset;
     
    418418  }
    419419  // redisplay the buffers
    420   list<char*>::const_iterator it = this->bufferIterator;
     420  list<std::string>::const_iterator it = this->bufferIterator;
    421421  for (unsigned int i = 0; i < this->bufferDisplaySize; i++)
    422422  {
Note: See TracChangeset for help on using the changeset viewer.