Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7737 in orxonox.OLD for trunk/src/lib/shell/shell_buffer.h


Ignore:
Timestamp:
May 19, 2006, 11:38:34 PM (18 years ago)
Author:
bensch
Message:

Using MultiLine-Text in the Shell. This is much faster, and Nicer :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_buffer.h

    r7661 r7737  
    88#define _SHELL_BUFFER_H
    99
    10 #include <stdarg.h>
    1110#include <list>
    12 #include "lib/util/threading.h"
    1311
    1412#define      SHELL_BUFFER_SIZE       16384         //!< The Size of the input-buffers (should be large enough to carry any kind of input)
     
    5048
    5149  private:
    52     static ShellBuffer*      singletonRef;                       //!< The singleton-reference to the only memeber of this class.
    53     unsigned int             bufferSize;                         //!< The Size of the buffer
    54     std::list<std::string>   buffer;                             //!< A list of stored char-arrays(strings) to store the history
     50    static ShellBuffer*           singletonRef;                       //!< The singleton-reference to the only memeber of this class.
     51    unsigned int                  bufferSize;                         //!< The Size of the buffer
    5552
    56     Shell*                   shell;                              //!< the Registered Shell.
    57     char                     bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    58     char                     keepBufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
    59     bool                     keepBuffer;                         //!< if the keepbuffer contains unfinished lines.
     53    Shell*                        shell;                              //!< the Registered Shell.
     54    char                          bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
     55    char                          keepBufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
     56    bool                          keepBuffer;                         //!< if the keepbuffer contains unfinished lines.
    6057
    61     unsigned long            lineCount;                          //!< how many Lines have been written out so far.
     58    unsigned long                 lineCount;                          //!< how many Lines have been written out so far.
    6259
    63     static SDL_mutex*        bufferMutex;                        //!< Only one thread may write into the ShellBuffer at a time.
     60    static std::list<std::string> buffer;                             //!< A list of stored char-arrays(strings) to store the history
    6461  };
    6562
Note: See TracChangeset for help on using the changeset viewer.