Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8789 for code


Ignore:
Timestamp:
Jul 26, 2011, 11:06:01 AM (13 years ago)
Author:
landauf
Message:

some small details, allow direct usage of OutputStream()

Location:
code/branches/output/src/libraries/util/output
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/output/ConsoleWriter.cc

    r8787 r8789  
    2828
    2929#include "ConsoleWriter.h"
     30
     31#include <iostream>
    3032
    3133#include "OutputManager.h"
  • code/branches/output/src/libraries/util/output/OutputDefinitions.h

    r8787 r8789  
    3434
    3535#define REGISTER_OUTPUT_CONTEXT(name) \
    36     OutputContext name() { static OutputContext value = registerContext(#name); return value; }
     36    OutputContext name() { static OutputContext context = registerContext(#name); return context; }
    3737
    3838namespace orxonox
  • code/branches/output/src/libraries/util/output/OutputStream.cc

    r8787 r8789  
    3535    OutputStream::OutputStream()
    3636    {
    37         this->level_ = level::none;
    38         this->context_ = context::none;
    39         this->bAcceptsOutput_ = false;
     37        this->setOutputAttributes(level::debug_output, context::undefined());
     38    }
     39
     40    OutputStream::OutputStream(OutputLevel level, OutputContext context)
     41    {
     42        this->setOutputAttributes(level, context);
    4043    }
    4144
     
    5154        this->context_ = context;
    5255
    53         this->bAcceptsOutput_ = OutputManager::getInstanceAndCreateListeners().acceptsOutput(this->level_, this->context_);
     56        this->bAcceptsOutput_ = OutputManager::getInstanceAndCreateListeners().acceptsOutput(level, context);
    5457    }
    5558}
  • code/branches/output/src/libraries/util/output/OutputStream.h

    r8787 r8789  
    4444        public:
    4545            _UtilExport OutputStream();
     46            _UtilExport OutputStream(OutputLevel level, OutputContext context);
    4647
    4748            void _UtilExport setOutputAttributes(OutputLevel level, OutputContext context);
Note: See TracChangeset for help on using the changeset viewer.