Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7628


Ignore:
Timestamp:
Nov 10, 2010, 10:28:30 AM (13 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.

Location:
code/branches/releasetodo/src
Files:
4 edited

Legend:

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

    r7627 r7628  
    4343#include <CEGUIWindow.h>
    4444#include <CEGUIWindowManager.h>
    45 #include <CEGUI/elements/CEGUIListbox.h>
    46 #include <CEGUI/elements/CEGUIListboxItem.h>
     45#include <elements/CEGUIListbox.h>
     46#include <elements/CEGUIListboxItem.h>
    4747#include <ogreceguirenderer/OgreCEGUIRenderer.h>
    4848
  • 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
  • code/branches/releasetodo/src/libraries/core/Loader.h

    r7401 r7628  
    5757            static void remove(const XMLFile* file);
    5858
    59             static bool load(const ClassTreeMask& mask = ClassTreeMask());
     59            static bool load(const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
    6060            static void unload(const ClassTreeMask& mask = ClassTreeMask());
    61             static bool reload(const ClassTreeMask& mask = ClassTreeMask());
     61            static bool reload(const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
    6262
    63             static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
     63            static bool load(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
    6464            static void unload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
    65             static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask());
     65            static bool reload(const XMLFile* file, const ClassTreeMask& mask = ClassTreeMask(), bool verbose = true);
    6666
    6767            static std::string replaceLuaTags(const std::string& text);
  • code/branches/releasetodo/src/orxonox/LevelManager.cc

    r7626 r7628  
    165165                mask.exclude(ClassIdentifier<BaseObject>::getIdentifier());
    166166                mask.include(ClassIdentifier<LevelInfo>::getIdentifier());
    167                 Loader::load(&file, mask);
     167                Loader::load(&file, mask, false);
    168168                for(ObjectList<LevelInfo>::iterator item = ObjectList<LevelInfo>::begin(); item != ObjectList<LevelInfo>::end(); ++item)
    169169                {
Note: See TracChangeset for help on using the changeset viewer.