/* Web Polygraph http://www.web-polygraph.org/
* (C) 2003-2006 The Measurement Factory
* Licensed under the Apache License, Version 2.0 */
#include "base/polygraph.h"
#include "client/PrivWorld.h"
int PrivWorld::TheFrozenCount = 0;
int PrivWorld::TheTotalCount = 0;
int PrivWorld::TheWss = 0;
bool PrivWorld::Frozen() {
return TheFrozenCount == TheTotalCount;
}
PrivWorld::PrivWorld(const UniqId &anId) {
id(anId);
}
void PrivWorld::produce(ObjId &oid, RndGen &rng) {
ObjWorld::produce(oid, rng);
incWss(TheWss);
}
void PrivWorld::freezeWss() {
if (wss() < 0) { // not yet frozen
ObjWorld::freezeWss();
TheFrozenCount++;
}
}
syntax highlighted by Code2HTML, v. 0.9.1