Changeset 15111 for trunk/FACT++
- Timestamp:
- 03/18/13 16:43:51 (12 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineDimControl.cc
r15087 r15111 1 1 #include "StateMachineDimControl.h" 2 3 #include <boost/filesystem.hpp> 2 4 3 5 #include "Dim.h" … … 546 548 // fVerbosity = 90; 547 549 548 if (conf.GetName()=="dimserver") 550 const boost::filesystem::path path(conf.GetName()); 551 const string fname = path.filename().string(); 552 553 if (fname=="dimserver") 549 554 return -1; 550 555 -
trunk/FACT++/src/dimctrl.cc
r15086 r15111 11 11 int RunShell(Configuration &conf) 12 12 { 13 StateMachineDimControl::fIsServer = conf.GetName()=="dimserver"; 13 const boost::filesystem::path path(conf.GetName()); 14 const string fname = path.filename().string(); 15 16 StateMachineDimControl::fIsServer = fname=="dimserver"; 14 17 return Main::execute<T, StateMachineDimControl>(conf); 15 18 } … … 17 20 void SetupConfiguration(Configuration &conf) 18 21 { 19 po::options_description control("Options ("+conf.GetName()+")"); 22 const boost::filesystem::path path(conf.GetName()); 23 const string fname = path.filename().string(); 24 25 po::options_description control("Options ("+fname+")"); 20 26 control.add_options() 21 27 ("force-console", po_switch(), "Forces console mode in server-mode.") 22 28 ("debug", po_bool(false), "Print the labels for debugging purpose") 23 29 ("user,u", var<string>(""), "A user name - just for logging purposes (default is ${USER})") 24 ("JavaScript.*", var<string>( ""),"Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command")30 ("JavaScript.*", var<string>(), "Additional arguments which are provided to JavaScripts started in a dimctrl server via the START command") 25 31 ; 26 32 27 if ( conf.GetName()!="dimserver")33 if (fname!="dimserver") 28 34 { 29 35 control.add_options() … … 102 108 throw runtime_error("--force-console must be used with --console/-c"); 103 109 104 if (conf.GetName()=="dimserver" && !conf.Get<bool>("force-console")) 110 const boost::filesystem::path path(conf.GetName()); 111 const string fname = path.filename().string(); 112 113 if (fname=="dimserver" && !conf.Get<bool>("force-console")) 105 114 conf.Remove("console"); 106 115
Note:
See TracChangeset
for help on using the changeset viewer.