#include <boost/archive/archive_exception.hpp>
#include <boost/serialization/export.hpp>
#include <boost/serialization/shared_ptr.hpp>
+#include <boost/algorithm/string.hpp>
// Following boost macros are needed for serialization of derived classes through a base class pointer (Service *).
BOOST_CLASS_EXPORT_GUID(ODS, "ODS")
namespace po = boost::program_options;
namespace fs = boost::filesystem;
+namespace ba = boost::algorithm;
using namespace std;
string login = VariablesMap["login"].as<string>();
string password = VariablesMap["password"].as<string>();
- protocol = to_lower(protocol);
+ protocol = ba::to_lower_copy(protocol);
Service::Ptr service = create_service(protocol,host,login,password);
if ( service )
/**
- * Converts first ten characters of given string to lowercase.
- * @param input String.
- * @return String in lowercase.
- */
-string Config::to_lower(string input) const
-{
- int i = 0;
- while ( input[i] && i<10 )
- {
- input[i] = tolower(input[i]);
- i++;
- }
- return input;
-}
-
-
-/**
* Loads a service config file, invoked by load_config_from_files.
* @param full_filename Filename of the service config file to load.
* @return 0 if all is fine, -1 otherwise.
string login = vm["login"].as<string>();
string password = vm["password"].as<string>();
- protocol = to_lower(protocol);
+ protocol = ba::to_lower_copy(protocol);
Service::Ptr service = create_service(protocol,host,login,password);
if ( service )