void rollover() const { const std::string& filename = backend.filename(); const std::string& basename = generator.transform(filename); if (counter.valid()) { rollover(backend.listdir(), basename); } if (backend.exists(filename)) { backend.rename(filename, backup_filename(basename)); } }
void AssertionCount::condrollover(int newvalue) { static const int rolloverPoint = (1 << 30); if (newvalue >= rolloverPoint) rollover(); }
void AssertionCount::condrollover( int newvalue ){ static int max = (int)pow( 2.0 , 30 ); if ( newvalue >= max ) rollover(); }
void rotate() const { backend.flush(); backend.close(); rollover(); backend.open(); }