Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 22, 2006, 6:20:35 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: ShellBuffer gets polled from the Shell, and does not put the other way round

File:
1 edited

Legend:

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

    r7761 r7762  
    1616namespace OrxShell
    1717{
    18   // FORWARD DECLARATION
    19   class Shell;
    20 
    2118  //! A class handling output from orxonox via debug.h
    2219  /**
     
    3532    inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };
    3633
    37     void registerShell(Shell* shell);
    38     void unregisterShell(Shell* shell);
    39 
    4034    static bool addBufferLineStatic(const char* line, ...);
    4135    void addBufferLine(const char* line, va_list arg);
    4236
    43     // BUFFER //
     37    /// BUFFER
    4438    /** @param bufferSize the new Buffer-Size */
    45     void setBufferSize(unsigned int bufferSize) { this->bufferSize = bufferSize; };
     39    void setMaxBufferSize(unsigned int maxBufferSize) { this->maxBufferSize = maxBufferSize; };
    4640    void flush();
    4741
     
    5044    /** @returns the Count of lines processed by the Shell. */
    5145    inline unsigned long getLineCount() const { return this->lineCount; };
     46    /** @returns the Current Buffer Size. */
     47    inline unsigned int getBufferSize() const { return this->buffer.size(); };
    5248
    5349    void debug() const;
     
    5854  private:
    5955    static ShellBuffer*           singletonRef;                       //!< The singleton-reference to the only memeber of this class.
    60     unsigned int                  bufferSize;                         //!< The Size of the buffer
     56    unsigned int                  maxBufferSize;                         //!< The Size of the buffer
    6157
    62     Shell*                        shell;                              //!< the Registered Shell.
    6358    char                          bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    6459    std::string                   keepBuffer;                         //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
Note: See TracChangeset for help on using the changeset viewer.