#include #include "agddSection.hh" #include "agddAttribute.hh" #include "agddAGDD.hh" #include "agddBuildable.hh" namespace agdd { AGDD::AGDD() : KnowsDTDVersion(), Buildable("AGDD"), _sectionVec() { }; void AGDD::addSection(Section * section) { if (!section) { cerr << "ERROR: An attempt was made to insert a NULL section " << "into the AGDD element." << endl; } assert(section); _sectionVec.push_back(section); }; void AGDD::howToBuildMe() { // Let's start the build: makeTheElement(); // First we do the attribute: versionThisElement(theElement()); // Now for all the sections/materials { for (unsigned int i=0; i<_sectionVec.size(); i++) { _sectionVec[i]->putMyselfIn(this); }; } }; /* void AGDD::sendMeTo(ostream & os) { if (!_haveBeenBuiltAlready) { cerr << "ERROR: You are trying to send an AGDD element to " << "an output stream without having first built it." << endl; }; assert(_haveBeenBuiltAlready); theElement()->print(os, ""); }; */ } // end of agdd namespace