Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Sep 11, 2005, 11:21:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cleaner outtakes of the ShellBuffer

File:
1 edited

Legend:

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

    r5174 r5175  
    3939    /** @returns a Pointer to the only object of this Class */
    4040    inline static Shell* getInstance() { if (!Shell::singletonRef) Shell::singletonRef = new Shell();  return Shell::singletonRef; };
     41    /** @returns true if this class is instanciated, false otherwise */
     42    inline static bool isInstanciated() { return (Shell::singletonRef == NULL)?true:false; };
    4143
    4244    void activate();
     
    4648    void rebuildText();
    4749
    48     // BUFFER //
    49     /** @param bufferSize the new Buffer-Size */
    50     void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; };
     50    // BUFFERS
    5151    void setBufferDisplaySize(unsigned int bufferDisplaySize);
    52     void flushBuffers();
    53     static bool addBufferLineStatic(const char* line, ...);
    54     void addBufferLine(const char* line, va_list arg);
     52    void flush();
    5553    void printToDisplayBuffer(const char* text);
    56     void moveBuffer(unsigned int lineCount);
    57 //    void moveBufferTo(unsigned int lineNumber);
    58     const char* getBufferLine(unsigned int lineNumber);
    5954
    6055    // InputLine
     
    10398    static Shell*            singletonRef;           //!< The singleton-reference to the only memeber of this class.
    10499
    105     unsigned int             bufferSize;             //!< The Size of the buffer
    106100    unsigned int             bufferDisplaySize;      //!< The Size of the Display-buffer, in lines (not in characters)
    107101
     102    // HANDLING TEXT INPUT
    108103    Text*                    inputLineText;          //!< The inputLine of the Shell
    109104    char*                    inputLine;              //!< the Char-Array of the Buffer
     
    112107    float                    delayed;                //!< how much of the delay is remaining.
    113108    int                      pressedKey;             //!< the pressed key that will be repeated.
    114 
    115     tList<char>*             buffer;                 //!< A list of stored char-arrays(strings) to store the history
    116     tIterator<char>*         bufferIterator;         //!< An iterator for the Shells main buffer.
    117109
    118110    tList<char>*             inputHistory;           //!< The history of given commands.
     
    124116    bool                     bActive;                //!< if the shell is active;
    125117
    126     char                     bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    127     char                     keepBufferArray[SHELL_BUFFER_SIZE]; //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
    128     bool                     keepBuffer;             //!< if the keepbuffer contains unfinished lines.
    129 
    130118    // completion
    131119    tList<const char>*       completionList;          //!< A list of completions, that are io.
Note: See TracChangeset for help on using the changeset viewer.