Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 31, 2011, 11:42:55 PM (13 years ago)
Author:
landauf
Message:

Removed debugLevel_ from Shell, using correct variable inherited from BaseWriter as config value.
Fixed OutputListener::setLevelMax() which ignored the new output level "message".
Fixed using a boolean called "verbose" instead of the output level with the same name in Loader.
Preventing further problems of this kind by defining OutputLevel as an enum.

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

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/core/Loader.cc

    r8806 r8808  
    9393    @param mask
    9494        A ClassTreeMask, which defines which types of classes are loaded and which aren't.
    95     @param verbose
     95    @param bVerbose
    9696        Whether the loader is verbose (prints its progress in a low output level) or not.
    9797    @return
    9898        Returns true if successful.
    9999    */
    100     bool Loader::load(const ClassTreeMask& mask, bool verbose)
     100    bool Loader::load(const ClassTreeMask& mask, bool bVerbose)
    101101    {
    102102        bool success = true;
    103103        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
    104             if (!Loader::load(it->first, it->second * mask, verbose))
     104            if (!Loader::load(it->first, it->second * mask, bVerbose))
    105105                success = false;
    106106
     
    124124    @param mask
    125125        A ClassTreeMask, which defines which types of classes are reloaded and which aren't.
    126     @param verbose
     126    @param bVerbose
    127127        Whether the loader is verbose (prints its progress in a low output level) or not.
    128128    @return
    129129        Returns true if successful.
    130130    */
    131     bool Loader::reload(const ClassTreeMask& mask, bool verbose)
     131    bool Loader::reload(const ClassTreeMask& mask, bool bVerbose)
    132132    {
    133133        Loader::unload(mask);
    134         return Loader::load(mask, verbose);
     134        return Loader::load(mask, bVerbose);
    135135    }
    136136
     
    142142    @param mask
    143143        A ClassTreeMask, which defines which types of classes are loaded and which aren't.
    144     @param verbose
     144    @param bVerbose
    145145        Whether the loader is verbose (prints its progress in a low output level) or not.
    146146    @param bRemoveLuaTags
     
    149149        Returns true if successful.
    150150    */
    151     bool Loader::load(const XMLFile* file, const ClassTreeMask& mask, bool verbose, bool bRemoveLuaTags)
     151    bool Loader::load(const XMLFile* file, const ClassTreeMask& mask, bool bVerbose, bool bRemoveLuaTags)
    152152    {
    153153        if (!file)
     
    187187        try
    188188        {
    189             if(verbose)
     189            if(bVerbose)
    190190            {
    191191                orxout(user_status, context::loader) << "Start loading " << file->getFilename() << "..." << endl;
     
    216216            rootNamespace->XMLPort(rootElement, XMLPort::LoadObject);
    217217
    218             if(verbose)
     218            if(bVerbose)
    219219                orxout(user_status, context::loader) << "Finished loading " << file->getFilename() << '.' << endl;
    220220            else
     
    271271    @param mask
    272272        A ClassTreeMask, which defines which types of classes are reloaded and which aren't.
    273     @param verbose
     273    @param bVerbose
    274274        Whether the loader is verbose (prints its progress in a low output level) or not.
    275275    @return
    276276        Returns true if successful.
    277277    */
    278     bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask, bool verbose)
     278    bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask, bool bVerbose)
    279279    {
    280280        Loader::unload(file, mask);
    281         return Loader::load(file, mask, verbose);
     281        return Loader::load(file, mask, bVerbose);
    282282    }
    283283
     
    339339                orxout(internal_error, context::loader) << "Error in level file" << endl;
    340340                // TODO: error handling
    341                 return false; 
     341                return false;
    342342            }
    343343        }
  • code/branches/output/src/libraries/core/Loader.h

    r8079 r8808  
    5858            static void remove(const XMLFile* file);
    5959
    60             static bool load(const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
     60            static bool load(const ClassTreeMask& mask = ClassTreeMask(), bool bVerbose = true);
    6161            static void unload(const ClassTreeMask& mask = ClassTreeMask());
    62             static bool reload(const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
     62            static bool reload(const ClassTreeMask& mask = ClassTreeMask(), bool bVerbose = true);
    6363
    6464            static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask(),
    65                              bool verbose = true, bool bRemoveLuaTags = false);
     65                             bool bVerbose = true, bool bRemoveLuaTags = false);
    6666            static void unload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
    67             static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
     67            static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask(), bool bVerbose = true);
    6868
    6969            static std::string replaceLuaTags(const std::string& text);
  • code/branches/output/src/libraries/core/command/Shell.cc

    r8803 r8808  
    170170        if (isNormal)
    171171        {
    172             ModifyConfigValueExternal(debugLevel_, this->getConfigurableMaxLevelName(), update);
     172            ModifyConfigValueExternal(this->configurableMaxLevel_, this->getConfigurableMaxLevelName(), update);
    173173        }
    174174        else
    175175        {
    176176            OutputLevel level = (value ? DefaultLogLevel::Dev : DefaultLogLevel::User);
    177             ModifyConfigValueExternal(debugLevel_, this->getConfigurableMaxLevelName(), tset, level);
     177            ModifyConfigValueExternal(this->configurableMaxLevel_, this->getConfigurableMaxLevelName(), tset, level);
    178178        }
    179179    }
  • code/branches/output/src/libraries/core/command/Shell.h

    r8805 r8808  
    200200            unsigned int              historyOffset_;       ///< The command history is a circular buffer, this variable defines the current write-offset
    201201            std::vector<std::string>  commandHistory_;      ///< The history of commands that were entered by the user
    202             OutputLevel               debugLevel_;          //!< The maximum level of output that is displayed in the shell (will be passed to OutputListener to filter output)
    203202            static unsigned int       cacheSize_s;          ///< The maximum cache size of the CommandExecutor - this is stored here for better readability of the config file and because CommandExecutor is no OrxonoxClass
    204203    };
Note: See TracChangeset for help on using the changeset viewer.