Changeset 2750 for code/branches/network
- Timestamp:
- Mar 5, 2009, 2:58:42 PM (16 years ago)
- Location:
- code/branches/network/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/core/ArgumentCompletionFunctions.cc
r2728 r2750 76 76 std::string dir = startdirectory.string(); 77 77 if (dir.size() > 0 && dir[dir.size() - 1] == ':') 78 startdirectory = dir + CP_SLASH;78 startdirectory = dir + '/'; 79 79 } 80 80 #endif … … 86 86 { 87 87 if (boost::filesystem::is_directory(*file)) 88 dirlist.push_back(ArgumentCompletionListElement((*file).string() + CP_SLASH, getLowercase((*file).string()) + "/", (*file).BOOST_LEAF_FUNCTION() + "/"));88 dirlist.push_back(ArgumentCompletionListElement((*file).string() + '/', getLowercase((*file).string()) + '/', (*file).BOOST_LEAF_FUNCTION() + '/')); 89 89 else 90 90 filelist.push_back(ArgumentCompletionListElement((*file).string(), getLowercase((*file).string()), (*file).BOOST_LEAF_FUNCTION())); -
code/branches/network/src/core/CommandLine.cc
r2710 r2750 307 307 // They will not overwrite the arguments given directly 308 308 std::ifstream file; 309 file.open(filepath. file_string().c_str());309 file.open(filepath.string().c_str()); 310 310 args.clear(); 311 311 if (file) -
code/branches/network/src/core/ConfigFileManager.cc
r2731 r2750 241 241 // Open the file 242 242 std::ifstream file; 243 file.open(filepath. file_string().c_str(), std::fstream::in);243 file.open(filepath.string().c_str(), std::fstream::in); 244 244 if (file.is_open()) 245 245 { … … 347 347 348 348 std::ofstream file; 349 file.open(filepath. file_string().c_str(), std::fstream::out);349 file.open(filepath.string().c_str(), std::fstream::out); 350 350 file.setf(std::ios::fixed, std::ios::floatfield); 351 351 file.precision(6); -
code/branches/network/src/core/Core.cc
r2727 r2750 260 260 /*static*/ std::string Core::getMediaPathString() 261 261 { 262 return mediaPath_g.directory_string() + CP_SLASH;263 }264 /*static*/ std::string Core::getMediaPathPOSIXString()265 {266 262 return mediaPath_g.string() + '/'; 267 268 263 } 269 264 … … 274 269 /*static*/ std::string Core::getConfigPathString() 275 270 { 276 return configPath_g.directory_string() + CP_SLASH;277 }278 /*static*/ std::string Core::getConfigPathPOSIXString()279 {280 271 return configPath_g.string() + '/'; 281 272 } … … 286 277 } 287 278 /*static*/ std::string Core::getLogPathString() 288 {289 return logPath_g.directory_string() + CP_SLASH;290 }291 /*static*/ std::string Core::getLogPathPOSIXString()292 279 { 293 280 return logPath_g.string() + '/'; … … 456 443 { 457 444 ThrowException(General, std::string("The ") + it->second + " directory has been preoccupied by a file! \ 458 Please remove " + it->first. file_string());445 Please remove " + it->first.string()); 459 446 } 460 447 if (boost::filesystem::create_directories(it->first)) // function may not return true at all (bug?) -
code/branches/network/src/core/Core.h
r2710 r2750 83 83 static std::string getConfigPathString(); 84 84 static std::string getLogPathString(); 85 static std::string getMediaPathPOSIXString();86 static std::string getConfigPathPOSIXString();87 static std::string getLogPathPOSIXString();88 85 89 86 // fast access global variables. -
code/branches/network/src/core/Language.cc
r2710 r2750 210 210 // This creates the file if it's not existing 211 211 std::ofstream createFile; 212 createFile.open(filepath. file_string().c_str(), std::fstream::app);212 createFile.open(filepath.string().c_str(), std::fstream::app); 213 213 createFile.close(); 214 214 215 215 // Open the file 216 216 std::ifstream file; 217 file.open(filepath. file_string().c_str(), std::fstream::in);217 file.open(filepath.string().c_str(), std::fstream::in); 218 218 219 219 if (!file.is_open()) … … 261 261 // Open the file 262 262 std::ifstream file; 263 file.open(filepath. file_string().c_str(), std::fstream::in);263 file.open(filepath.string().c_str(), std::fstream::in); 264 264 265 265 if (!file.is_open()) … … 317 317 // Open the file 318 318 std::ofstream file; 319 file.open(filepath. file_string().c_str(), std::fstream::out);319 file.open(filepath.string().c_str(), std::fstream::out); 320 320 321 321 if (!file.is_open()) -
code/branches/network/src/core/LuaBind.cc
r2710 r2750 53 53 LuaBind::singletonRef_s = this; 54 54 55 this->includePath_ = Core::getMediaPath POSIXString();55 this->includePath_ = Core::getMediaPathString(); 56 56 57 57 luaState_ = lua_open(); … … 90 90 output_ = ""; 91 91 std::ifstream file; 92 file.open(filepath. file_string().c_str(), std::fstream::in);92 file.open(filepath.string().c_str(), std::fstream::in); 93 93 94 94 if (!file.is_open()) -
code/branches/network/src/orxonox/gamestates/GSGraphics.cc
r2710 r2750 136 136 // load debug overlay 137 137 COUT(3) << "Loading Debug Overlay..." << std::endl; 138 this->debugOverlay_ = new XMLFile((Core::getMediaPath() / "overlay" / "debug.oxo"). file_string());138 this->debugOverlay_ = new XMLFile((Core::getMediaPath() / "overlay" / "debug.oxo").string()); 139 139 Loader::open(debugOverlay_); 140 140 … … 304 304 // create our own log that we can listen to 305 305 Ogre::Log *myLog; 306 myLog = ogreLogger_->createLog(ogreLogFilepath. file_string(), true, false, false);306 myLog = ogreLogger_->createLog(ogreLogFilepath.string(), true, false, false); 307 307 COUT(4) << "Ogre Log created" << std::endl; 308 308 … … 317 317 // create a zero sized file 318 318 std::ofstream creator; 319 creator.open(ogreConfigFilepath. file_string().c_str());319 creator.open(ogreConfigFilepath.string().c_str()); 320 320 creator.close(); 321 321 } 322 322 323 323 // Leave plugins file empty. We're going to do that part manually later 324 ogreRoot_ = new Ogre::Root("", ogreConfigFilepath. file_string(), ogreLogFilepath.file_string());324 ogreRoot_ = new Ogre::Root("", ogreConfigFilepath.string(), ogreLogFilepath.string()); 325 325 326 326 COUT(3) << "Ogre set up done." << std::endl; … … 336 336 // Do some SubString magic to get the comma separated list of plugins 337 337 SubString plugins(ogrePlugins_, ",", " ", false, 92, false, 34, false, 40, 41, false, '\0'); 338 // Use backslash paths on Windows! file_string() already does that though. 338 339 for (unsigned int i = 0; i < plugins.size(); ++i) 339 340 ogreRoot_->loadPlugin((folder / plugins[i]).file_string()); … … 356 357 try 357 358 { 358 cf.load((Core::getMediaPath() / resourceFile_). file_string());359 cf.load((Core::getMediaPath() / resourceFile_).string()); 359 360 } 360 361 catch (...) … … 382 383 383 384 Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 384 (Core::getMediaPath() / archName). directory_string(), typeName, secName);385 (Core::getMediaPath() / archName).string(), typeName, secName); 385 386 } 386 387 } -
code/branches/network/src/orxonox/gamestates/GSLevel.cc
r2710 r2750 202 202 std::string levelName; 203 203 CommandLine::getValue("level", &levelName); 204 startFile_ = new XMLFile(Core::getMediaPathString() + "levels" + CP_SLASH+ levelName);204 startFile_ = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName); 205 205 Loader::open(startFile_); 206 206 } -
code/branches/network/src/orxonox/gamestates/GSRoot.cc
r2710 r2750 111 111 112 112 // initialise TCL 113 this->tclBind_ = new TclBind(Core::getMediaPath POSIXString());113 this->tclBind_ = new TclBind(Core::getMediaPathString()); 114 114 this->tclThreadManager_ = new TclThreadManager(tclBind_->getTclInterpreter()); 115 115 -
code/branches/network/src/orxonox/gui/GUIManager.cc
r2710 r2750 154 154 boost::filesystem::path ceguiLogFilepath(Core::getLogPath() / "cegui.log"); 155 155 this->ceguiLogger_ = new DefaultLogger(); 156 this->ceguiLogger_->setLogFilename(ceguiLogFilepath. file_string());156 this->ceguiLogger_->setLogFilename(ceguiLogFilepath.string()); 157 157 // set the log level according to ours (translate by subtracting 1) 158 158 this->ceguiLogger_->setLoggingLevel(
Note: See TracChangeset
for help on using the changeset viewer.