Esempio n. 1
0
void BigPotConfig::setRecord(int v, const char * name)
{
	if (strlen(name) == 0) return;
	auto mainname = getFilenameWithoutPath(name);
	getElement(_record, ("_" + _sha3(mainname)).c_str())
		->SetText(formatString("%d", v).c_str());
}
Esempio n. 2
0
int BigPotConfig::getRecord(const char * name)
{
	if (strlen(name) == 0) return 0;
	auto mainname = getFilenameWithoutPath(name);
	const char * str = getElement(_record, ("_" + _sha3(mainname)).c_str())->GetText();
	if (!str)
		return 0;
	return atoi(str);
}
Esempio n. 3
0
XString getFilenameWithoutPathAndExtension(XString s)
{       
  XString k = getFilenameWithoutPath(s);

  int i = k.findRev('.');

  k = k.left(i);
  return k; 
}
Esempio n. 4
0
void BigPotConfig::removeRecord(const char * name)
{
	if (strlen(name) == 0) return;
	auto mainname = getFilenameWithoutPath(name);
	_record->DeleteChild(getElement(_record, ("_" + _sha3(mainname)).c_str()));
}