Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 17, 2008, 3:58:19 AM (16 years ago)
Author:
landauf
Message:
  • implemented Shell, but not yet linked with the graphical console
  • added new features (cursor, OIS::KeyCode listener) to InputBuffer
  • changed some includes to avoid circular header-dependencies in OrxonoxClass and Shell
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/OutputBuffer.h

    r1312 r1313  
    3030#define _OutputBuffer_H__
    3131
    32 #include <set>
     32#include <list>
    3333#include <sstream>
    3434
     
    3737namespace orxonox
    3838{
    39     class OutputBufferListener
     39    class _CoreExport OutputBufferListener
    4040    {
    4141        friend class OutputBuffer;
     42
    4243        virtual void outputChanged() = 0;
    4344    };
     
    4647    {
    4748        public:
    48             static OutputBuffer& getOutputBuffer();
     49            OutputBuffer() {}
     50            ~OutputBuffer() {}
    4951
    5052            template <class T>
     
    5355                this->stream_ << object;
    5456                this->callListeners();
    55                 return &this;
     57                return *this;
    5658            }
    5759
     
    8688            void unregisterListener(OutputBufferListener* listener);
    8789
     90            inline operator std::stringstream&()
     91            {
     92                return this->stream_;
     93            }
     94
    8895        private:
    89             OutputBuffer() {}
    90             OutputBuffer(const OutputBuffer& other);
    91             ~OutputBuffer() {}
    92 
    9396            void callListeners();
    9497
    9598            std::stringstream stream_;
    96             std::set<OutputBufferListener*> listeners_;
     99            std::list<OutputBufferListener*> listeners_;
    97100    };
    98101}
Note: See TracChangeset for help on using the changeset viewer.