ECS/Project/Project/Configuration/Configuration.cpp
//	Load the configuration from the provided file.
Load the configuration from the provided file.
Load the configuration from the provided file .
void Configuration::loadConfigurationFromFile(const std::string & fileName)
{
	std::ifstream filestream(fileName);
	std::string key;
	std::string value;
	std::string line;
	while (std::getline(filestream, line))
	{
		int location = (int) line.find("=");
		key = line.substr(0, location);
		value = line.substr(location + 1, line.length() - location);
		StringModifiers::trim(key);
		StringModifiers::trim(value);
		std::cout << "Key : " << key << std::endl;
		std::cout << "Value : " << value << std::endl;
		properties[key] = value;
	}
}
void Configuration :: loadConfigurationFromFile ( const std :: string & fileName ) { std :: ifstream filestream ( fileName ) ; std :: string key ; std :: string value ; std :: string line ; while ( std :: getline ( filestream , line ) ) { int location = ( int ) line . find ( " " ) ; key = line . substr ( 0 , location ) ; value = line . substr ( location + 1 , line . length ( ) - location ) ; StringModifiers :: trim ( key ) ; StringModifiers :: trim ( value ) ; std :: cout << " " << key << std :: endl ; std :: cout << " " << value << std :: endl ; properties [ key ] = value ; } }
Load the configuration from the provided file.
Load the configuration from the provided file .