#include "X3D_SimpleNodeCounter.h" #include #include using namespace X3DTK; using namespace std; int main(int argc, char *argv[]) { if (argc <= 1) { cerr << "usage: nodecounter input" << endl; exit(0); } // DefaultLoader to load the default X3D Nodes. X3D::Loader *loader = Singleton::getInstance(); // Instanciation of MyMemReleaser. X3D::SimpleNodeCounter *counter = Singleton::getInstance(); // Loads the scene. X3D::Scene *s = loader->load(argv[1]); // Releases the memory. counter->count(s); // removes the instance. Singleton::removeInstance(); Singleton::removeInstance(); return 1; }