本文整理汇总了C++中TiXmlDocument::LoadFileGZ方法的典型用法代码示例。如果您正苦于以下问题:C++ TiXmlDocument::LoadFileGZ方法的具体用法?C++ TiXmlDocument::LoadFileGZ怎么用?C++ TiXmlDocument::LoadFileGZ使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TiXmlDocument
的用法示例。
在下文中一共展示了TiXmlDocument::LoadFileGZ方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupExperimentInProgress
void ExperimentRun::setupExperimentInProgress(
string populationFileName,
string _outputFileName
)
{
outputFileName = _outputFileName;
{
TiXmlDocument *doc = new TiXmlDocument(populationFileName);
cout << "Loading population\n";
bool loadStatus;
if (iends_with(populationFileName,".gz"))
{
loadStatus = doc->LoadFileGZ();
}
else
{
loadStatus = doc->LoadFile();
}
if (!loadStatus)
{
throw CREATE_LOCATEDEXCEPTION_INFO("Error trying to load the XML file!");
}
TiXmlElement *element = doc->FirstChildElement();
NEAT::Globals* globals = NEAT::Globals::init(element);
//Destroy the document
delete doc;
cout << "Population loaded\n";
}
int experimentType = int(NEAT::Globals::getSingleton()->getParameterValue("ExperimentType")+0.001);
NEAT::Globals::getSingleton()->seedRandom((unsigned int)(NEAT::Globals::getSingleton()->getParameterValue("ActualRandomSeed")+0.001));
cout << "Loading Experiment: " << experimentType << endl;
setupExperiment(experimentType,_outputFileName);
cout << "Experiment set up. Creating population...\n";
createPopulation(populationFileName);
cout << "Population Created\n";
/*cout << "Cleaning up old generations\n";
population->cleanupOld(population->getGenerationCount()-1);
cout << "Done cleaning\n";*/
}