Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 10, 2010, 10:28:30 AM (14 years ago)
Author:
dafrick
Message:

Adjusting include paths of CEGUIListbox and CEGUILisbtoxItem.
Added verbose parameter to the load and reload methods of the Loader, to be able to supress (i.e. shift the output level) the output, when convenient.
Suppressing the output, when loading all levels to extract the LevelInfo.

File:
1 edited

Legend:

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

    r6422 r7628  
    8888    }
    8989
    90     bool Loader::load(const ClassTreeMask& mask)
     90    bool Loader::load(const ClassTreeMask& mask, bool verbose)
    9191    {
    9292        bool success = true;
    9393        for (std::vector<std::pair<const XMLFile*, ClassTreeMask> >::iterator it = Loader::files_s.begin(); it != Loader::files_s.end(); ++it)
    94             if (!Loader::load(it->first, it->second * mask))
     94            if (!Loader::load(it->first, it->second * mask, verbose))
    9595                success = false;
    9696
     
    109109    }
    110110
    111     bool Loader::reload(const ClassTreeMask& mask)
     111    bool Loader::reload(const ClassTreeMask& mask, bool verbose)
    112112    {
    113113        Loader::unload(mask);
    114         return Loader::load(mask);
    115     }
    116 
    117     bool Loader::load(const XMLFile* file, const ClassTreeMask& mask)
     114        return Loader::load(mask, verbose);
     115    }
     116
     117    bool Loader::load(const XMLFile* file, const ClassTreeMask& mask, bool verbose)
    118118    {
    119119        if (!file)
     
    144144        try
    145145        {
    146             COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
    147             COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
     146            if(verbose)
     147            {
     148                COUT(0) << "Start loading " << file->getFilename() << "..." << std::endl;
     149                COUT(3) << "Mask: " << Loader::currentMask_s << std::endl;
     150            }
     151            else
     152            {
     153                COUT(4) << "Start loading " << file->getFilename() << "..." << std::endl;
     154                COUT(4) << "Mask: " << Loader::currentMask_s << std::endl;
     155            }
    148156
    149157            ticpp::Document xmlfile(file->getFilename());
     
    165173            rootNamespace->XMLPort(rootElement, XMLPort::LoadObject);
    166174
    167             COUT(0) << "Finished loading " << file->getFilename() << '.' << std::endl;
     175            if(verbose)
     176                COUT(0) << "Finished loading " << file->getFilename() << '.' << std::endl;
     177            else
     178                COUT(4) << "Finished loading " << file->getFilename() << '.' << std::endl;
    168179
    169180            COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString("  ") << std::endl;
     
    210221    }
    211222
    212     bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask)
     223    bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask, bool verbose)
    213224    {
    214225        Loader::unload(file, mask);
    215         return Loader::load(file, mask);
     226        return Loader::load(file, mask, verbose);
    216227    }
    217228
Note: See TracChangeset for help on using the changeset viewer.