Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2011, 7:51:08 PM (13 years ago)
Author:
landauf
Message:

Code related to config values for output is now implemented in BaseWriter.
There's a config value for the normal output level, a vector with additional contexts, and a config value for the level of these additional contexts.
ioconsole and standard console use the same values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/output/BaseWriter.h

    r8795 r8799  
    3131
    3232#include "util/UtilPrereqs.h"
     33
     34#include <set>
     35#include <vector>
     36
    3337#include "OutputListener.h"
    3438
     
    3842    {
    3943        public:
    40             BaseWriter();
     44            BaseWriter(const std::string& name);
    4145            virtual ~BaseWriter();
     46
     47            const std::string& getName() const
     48                { return this->name_; }
     49
     50            void setLevelMax(OutputLevel max);
     51
     52            OutputLevel configurableMaxLevel_;
     53            inline std::string getConfigurableMaxLevelName() const
     54                { return "outputLevel" + this->name_; }
     55
     56            OutputLevel configurableContextsMaxLevel_;
     57            inline std::string getConfigurableContextsMaxLevelName() const
     58                { return "outputContextsLevel" + this->name_; }
     59
     60            std::vector<std::string> configurableContexts_;
     61            inline std::string getConfigurableContextsName() const
     62                { return "outputContexts" + this->name_; }
     63
     64            void changedConfigurableLevels();
     65            void changedConfigurableContexts();
     66
     67            static inline std::string getConfigurableSectionName()
     68                { return "Output"; }
    4269
    4370        protected:
     
    4673        private:
    4774            virtual void printLine(const std::string& line, OutputLevel level) = 0;
     75
     76            void setLevelRange(OutputLevel min, OutputLevel max);
     77            void setLevelMask(OutputLevel mask);
     78
     79            bool isAdditionalContext(OutputContext context) const;
     80
     81            std::string name_;
     82            std::set<std::string> configurableContextsSet_;
    4883    };
    4984}
Note: See TracChangeset for help on using the changeset viewer.