Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 28, 2009, 10:47:25 AM (15 years ago)
Author:
rgrieder
Message:

Changed order of declaration/definition in OutputHandler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/libraries/util/OutputHandler.h

    r5994 r5996  
    217217    };
    218218
     219    /**
     220    @brief
     221        Interface for listening to output.
     222    @remarks
     223        Remember to register the listener (not done automatically!)
     224    */
     225    class OutputListener
     226    {
     227        friend class OutputHandler;
     228
     229    public:
     230        OutputListener(const std::string& name)
     231            : outputStream_(NULL)
     232            , name_(name)
     233        {}
     234        virtual ~OutputListener() {}
     235
     236        //! Gets called whenever output is put into the stream
     237        virtual void outputChanged() {}
     238        //! Returns the name of this output listener
     239        const std::string& getOutputListenerName() const { return this->name_; }
     240
     241    protected:
     242        std::ostream*     outputStream_;   //!< Pointer to the associated output stream, can be NULL
     243
     244    private:
     245        const std::string name_;           //!< Name of the listener, constant and unique!
     246        int               softDebugLevel_; //!< Current soft debug level that defines what kind of output is written to the stream
     247    };
     248
    219249    template<class T>
    220250    inline OutputHandler& OutputHandler::output(const T& output)
     
    233263        return *this;
    234264    }
    235 
    236     /**
    237     @brief
    238         Interface for listening to output.
    239     @remarks
    240         Remember to register the listener (not done automatically!)
    241     */
    242     class OutputListener
    243     {
    244         friend class OutputHandler;
    245 
    246     public:
    247         OutputListener(const std::string& name)
    248             : outputStream_(NULL)
    249             , name_(name)
    250         {}
    251         virtual ~OutputListener() {}
    252 
    253         //! Gets called whenever output is put into the stream
    254         virtual void outputChanged() {}
    255         //! Returns the name of this output listener
    256         const std::string& getOutputListenerName() const { return this->name_; }
    257 
    258     protected:
    259         std::ostream*     outputStream_;   //!< Pointer to the associated output stream, can be NULL
    260 
    261     private:
    262         const std::string name_;           //!< Name of the listener, constant and unique!
    263         int               softDebugLevel_; //!< Current soft debug level that defines what kind of output is written to the stream
    264     };
    265265}
    266266
Note: See TracChangeset for help on using the changeset viewer.