Ejemplo n.º 1
0
// find value, display messagebox if no such value found
string CSunParser::SGetValueMSG(string location) {
	transform(location.begin(), location.end(), location.begin(), (int (*)(int)) tolower);
	string value;

	SGetValue(value, location);
	return value;
}
Ejemplo n.º 2
0
std::string TdfParser::SGetValueDef(std::string const& defaultValue, std::string const& location) const
{
	std::string lowerd = StringToLower(location);
	std::string value;
	bool found = SGetValue(value, lowerd);
	if (!found) {
		value = defaultValue;
	}
	return value;
}
Ejemplo n.º 3
0
	//find value, return default value if no such value found
	std::string TdfParser::SGetValueDef(std::string const& defaultvalue, std::string const& location){
	  std::string lowerd = location;
		std::transform(lowerd.begin(), lowerd.end(), lowerd.begin(), static_cast<int (*)(int)>(std::tolower));
		std::string value;
		bool found = SGetValue(value, lowerd);
		if(!found){
			value = defaultvalue;
		}
		return value;
	}
Ejemplo n.º 4
0
	//find value, display messagebox if no such value found
	std::string TdfParser::SGetValueMSG(std::string const& location){
	  std::string lowerd = location;
		std::transform(lowerd.begin(), lowerd.end(), lowerd.begin(), static_cast<int (*)(int)>(std::tolower));
		std::string value="";
		bool found = SGetValue(value, lowerd);
		if(!found){
			G->L.print(value);
			return string("");
		}
		return value;
	}
Ejemplo n.º 5
0
// find value, return default value if no such value found
string CSunParser::SGetValueDef(string defaultvalue, string location) {
	transform(location.begin(), location.end(), location.begin(), (int (*)(int)) tolower);
	string value;

	bool found = SGetValue(value, location);

	if (!found) {
		value = defaultvalue;
	}

	return value;
}
Ejemplo n.º 6
0
//find value, return default value if no such value found
string CSunParser::SGetValueDef(string defaultvalue, string location)
{
    ////L("CSunParser::SGetValueDef(" << defaultvalue << ", " << location << "): ");
	transform(location.begin(), location.end(), location.begin(), (int (*)(int))tolower);
	string value;

	bool found = SGetValue(value, location);

	if(!found)
	{
		////L("Using Default: ");
		value = defaultvalue;
	}
	return value;
}
Ejemplo n.º 7
0
//find value, display messagebox if no such value found
string CSunParser::SGetValueMSG(string location)
{
    ////L("CSunParser::SGetValueMSG(" << location << ")" << endl);
	transform(location.begin(), location.end(), location.begin(), (int (*)(int))tolower);
	string value;

	bool found = SGetValue(value, location);

	if(!found)
	{
//        MessageBox(hWnd, value.c_str(), "Sun parsing error", MB_OK);
        ////L("Sun Parsing Error: Value " << value << " not found" << endl);
	}
	return value;
}