Changeset 11479 for trunk/FACT++/src/Configuration.cc
- Timestamp:
- 07/19/11 21:03:37 (13 years ago)
- File:
-
- 1 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>))
Note:
See TracChangeset
for help on using the changeset viewer.