Changeset 11479
- Timestamp:
- 07/19/11 21:03:37 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Configuration.cc
r11478 r11479 285 285 } 286 286 287 template<class T, class S> // Needed by the lexical_castto convert the option287 template<class T, class S> // Needed to convert the option 288 288 std::istream &operator>>(std::istream &in, pair<T,S> &f) 289 289 { … … 335 335 #include <boost/regex.hpp> 336 336 #include <boost/filesystem.hpp> 337 #include <boost/lexical_cast.hpp>338 337 339 338 #define HAS_SQL … … 420 419 const string server = what[5]; 421 420 const string db = what[9]; 422 const int port = atoi(string(what[7]).c_str());421 const int port = stoi(string(what[7])); 423 422 424 423 cout << "Connecting to '"; … … 624 623 625 624 if (v.value().type()==typeid(int16_t)) 626 return boost::lexical_cast<string>(v.as<int16_t>());625 return to_string((long long int)v.as<int16_t>()); 627 626 628 627 if (v.value().type()==typeid(int32_t)) 629 return boost::lexical_cast<string>(v.as<int32_t>());628 return to_string((long long int)v.as<int32_t>()); 630 629 631 630 if (v.value().type()==typeid(int64_t)) 632 return boost::lexical_cast<string>(v.as<int64_t>());631 return to_string((long long int)v.as<int64_t>()); 633 632 634 633 if (v.value().type()==typeid(uint16_t)) 635 return boost::lexical_cast<string>(v.as<uint16_t>());634 return to_string((long long unsigned int)v.as<uint16_t>()); 636 635 637 636 if (v.value().type()==typeid(uint32_t)) 638 return boost::lexical_cast<string>(v.as<uint32_t>());637 return to_string((long long unsigned int)v.as<uint32_t>()); 639 638 640 639 if (v.value().type()==typeid(uint64_t)) 641 return boost::lexical_cast<string>(v.as<uint64_t>());640 return to_string((long long unsigned int)v.as<uint64_t>()); 642 641 643 642 if (v.value().type()==typeid(float)) 644 return boost::lexical_cast<string>(v.as<float>());643 return to_string((long double)v.as<float>()); 645 644 646 645 if (v.value().type()==typeid(double)) 647 return boost::lexical_cast<string>(v.as<double>());646 return to_string((long double)v.as<double>()); 648 647 649 648 if (v.value().type()==typeid(vector<string>)) -
trunk/FACT++/src/Connection.cc
r11478 r11479 11 11 #include "Connection.h" 12 12 13 #include <boost/lexical_cast.hpp>14 15 13 using namespace std; 16 14 … … 19 17 namespace dummy = ba::placeholders; 20 18 21 using boost::lexical_cast;22 19 using ba::ip::tcp; 23 20 … … 292 289 { 293 290 const string host = endpoint.port()==0 ? "" : 294 endpoint.address().to_string()+ ":"+lexical_cast<string>(endpoint.port());291 endpoint.address().to_string()+':'+to_string((long long unsigned int)endpoint.port()); 295 292 296 293 // Connection established … … 434 431 435 432 fAddress = addr; 436 fPort = lexical_cast<string>(port);433 fPort = to_string((long long)port); 437 434 } 438 435 -
trunk/FACT++/src/ConnectionUSB.cc
r11314 r11479 9 9 10 10 #include <boost/bind.hpp> 11 #include <boost/lexical_cast.hpp>12 11 13 12 using namespace std; … … 17 16 namespace dummy = ba::placeholders; 18 17 19 using boost::lexical_cast;20 18 using ba::serial_port_base; 21 19 -
trunk/FACT++/src/Console.cc
r11060 r11479 94 94 fLogO.SetBacklog(false); 95 95 fLogO.SetNullOutput(false); 96 usleep( atoi(str.c_str()+3)*1000);96 usleep(stoul(str.substr(3))*1000); 97 97 fLogO.SetNullOutput(true); 98 98 fLogO.SetBacklog(true); -
trunk/FACT++/src/Converter.cc
r11211 r11479 775 775 const string n = what[3]; // counter 776 776 777 const int cnt = atoi(n.c_str());777 const int cnt = stoi(n); 778 778 779 779 // if the :N part was not given assume 1 -
trunk/FACT++/src/EventBuilderWrapper.h
r11471 r11479 1679 1679 ostringstream str; 1680 1680 str << (ver[i]>>8) << '.' << (ver[i]&0xff); 1681 data[i] = atof(str.str().c_str());1681 data[i] = stof(str.str()); 1682 1682 } 1683 1683 Update(fDimFwVersion, data); -
trunk/FACT++/src/EventImp.cc
r11396 r11479 158 158 string buffer; 159 159 while (getline(stream, buffer, sep ? ' ' : ',')) 160 AddAllowedState( atoi(buffer.c_str()));160 AddAllowedState(stoi(buffer)); 161 161 } 162 162 -
trunk/FACT++/src/LocalControl.h
r11303 r11479 115 115 const Time timeout = ms<=0 ? Time(Time::none) : Time()+boost::posix_time::millisec(ms); 116 116 117 const int target = atoi(str.c_str()+3);117 const int target = stoi(str.substr(3)); 118 118 while (fStateMachine->GetCurrentState()!=target && timeout>Time()) 119 119 usleep(1); -
trunk/FACT++/src/Readline.cc
r11326 r11479 993 993 if (str.substr(0, 3)==".w ") 994 994 { 995 usleep( atoi(str.c_str()+3)*1000);995 usleep(stoi(str.substr(3))*1000); 996 996 return true; 997 997 } -
trunk/FACT++/src/StateMachineDim.cc
r11280 r11479 18 18 #include "StateMachineDim.h" 19 19 20 #include <boost/lexical_cast.hpp>21 22 20 #include "tools.h" 23 21 … … 26 24 27 25 using namespace std; 28 using boost::lexical_cast;29 26 30 27 const int StateMachineDim::fVersion = 42; … … 110 107 111 108 const string str0 = reinterpret_cast<char*>(fDescriptionStates.itsData); 112 const string str1 = lexical_cast<string>(state)+':'+name+'=';109 const string str1 = to_string((long long)state)+':'+name+'='; 113 110 114 111 if (str0.find(str1)!=string::npos) -
trunk/FACT++/src/fscctrl.cc
r11476 r11479 172 172 if (buffer.substr(0, 8)=="status: ") 173 173 { 174 status = atoi(buffer.c_str()+8);174 status = stoi(buffer.substr(8)); 175 175 continue; 176 176 } … … 178 178 if (buffer.substr(0, 8)=="time_s: ") 179 179 { 180 time = atof(buffer.c_str()+8);180 time = stof(buffer.substr(8)); 181 181 continue; 182 182 } -
trunk/FACT++/src/scheduler.cc
r11473 r11479 193 193 const string server = what[3]; 194 194 const string db = fDBName.empty() ? what[6] : fDBName; 195 const int port = atoi(string(what[5]).c_str());195 const int port = stoi(what[5]); 196 196 197 197 ostringstream dbnamemsg;
Note:
See TracChangeset
for help on using the changeset viewer.