bool Puzzle::setInitState(State* const s) { if (initState != nullptr) initState->unref(); initState = s; if (initState != nullptr) { initState->ref(); // Add to our lists (to be processed) putHash(initState); putOpen(initState); } return true; }
void KmlGenerator::putKmlHeader() { time_t t = time(0); std::tm *now = localtime(&t); startKml(); skipLine(); putComment("====================================================================================================================="); putComment("This file was generated automatically with real meteorological data and is part of the Ensimag visualization project."); putComment("====================================================================================================================="); skipLine(); startDocument("Root"); putName("Environemental contaminant viewer"); putDescription("PM10 particles"); putDate(*now, YYYY_MM_DD_hh_mm_ss); putAuthor("Jean-Baptiste Keck"); putAuthor("Alexandre Ribard"); skipLine(); putVisibility(true); putOpen(true); skipLine(); }