Changeset 7628 for code/branches/releasetodo/src/libraries/core/Loader.cc
- Timestamp:
- Nov 10, 2010, 10:28:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/releasetodo/src/libraries/core/Loader.cc
r6422 r7628 88 88 } 89 89 90 bool Loader::load(const ClassTreeMask& mask )90 bool Loader::load(const ClassTreeMask& mask, bool verbose) 91 91 { 92 92 bool success = true; 93 93 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)) 95 95 success = false; 96 96 … … 109 109 } 110 110 111 bool Loader::reload(const ClassTreeMask& mask )111 bool Loader::reload(const ClassTreeMask& mask, bool verbose) 112 112 { 113 113 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) 118 118 { 119 119 if (!file) … … 144 144 try 145 145 { 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 } 148 156 149 157 ticpp::Document xmlfile(file->getFilename()); … … 165 173 rootNamespace->XMLPort(rootElement, XMLPort::LoadObject); 166 174 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; 168 179 169 180 COUT(4) << "Namespace-tree:" << std::endl << rootNamespace->toString(" ") << std::endl; … … 210 221 } 211 222 212 bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask )223 bool Loader::reload(const XMLFile* file, const ClassTreeMask& mask, bool verbose) 213 224 { 214 225 Loader::unload(file, mask); 215 return Loader::load(file, mask );226 return Loader::load(file, mask, verbose); 216 227 } 217 228
Note: See TracChangeset
for help on using the changeset viewer.