#include "X3D_InfoReaderGroupingVisitor.h" #include "X3D_Info.h" #include "X3D_Price.h" #include "X3D_Modeler.h" #include using namespace std; namespace X3DTK { namespace X3D { InfoReaderGroupingVisitor::InfoReaderGroupingVisitor() : GroupingVisitor() { // Enter functions. define(Recorder::getEnterFunction(&InfoReaderGroupingVisitor::enterInfo)); define(Recorder::getEnterFunction(&InfoReaderGroupingVisitor::enterPrice)); define(Recorder::getEnterFunction(&InfoReaderGroupingVisitor::enterModeler)); } void InfoReaderGroupingVisitor::enterInfo(Info *I) { cout << "Informations relative to the scene:"<< endl; cout << "Date = " << I->getDate() << endl; } void InfoReaderGroupingVisitor::enterPrice(Price *P) { cout << " price = " << P->getPrice() << " " << P->getMoney() << endl; } void InfoReaderGroupingVisitor::enterModeler(Modeler *M) { cout << " realized on the " << M->getMName() << " modeler" << endl; } } }