ClientHandler/ClientHandler.cpp
XmlDocument ClientHandler::builDocument(std::string filename, std::vector<std::string> deps) {
	using sPtr = std::shared_ptr<AbstractXmlElement>;
	sPtr pRoot = makeTaggedElement("metadata");
	XmlDocument doc(XmlProcessing::makeDocElement(pRoot));

	sPtr name = makeTaggedElement("name");
	name->addChild(makeTextElement(filename));
	pRoot->addChild(name);
	sPtr depNames = makeTaggedElement("deps");
	for (auto depName : deps) {
		sPtr dep = makeTaggedElement("dep");
		dep->addChild(makeTextElement(depName));
		depNames->addChild(dep);
	}
	pRoot->addChild(depNames);
	return doc;
}
// ---------------< create the xml document for a checked in file >-------------
< create the xml document for a checked in file >
< create the xml document for a checked in file >
XmlDocument ClientHandler::builDocument(std::string filename, std::vector<std::string> deps) {
	using sPtr = std::shared_ptr<AbstractXmlElement>;
	sPtr pRoot = makeTaggedElement("metadata");
	XmlDocument doc(XmlProcessing::makeDocElement(pRoot));
	sPtr name = makeTaggedElement("name");
	name->addChild(makeTextElement(filename));
	pRoot->addChild(name);
	sPtr depNames = makeTaggedElement("deps");
	for (auto depName : deps) {
		sPtr dep = makeTaggedElement("dep");
		dep->addChild(makeTextElement(depName));
		depNames->addChild(dep);
	}
	pRoot->addChild(depNames);
	return doc;
}
XmlDocument ClientHandler :: builDocument ( std :: string filename , std :: vector < std :: string > deps ) { using sPtr = std :: shared_ptr < AbstractXmlElement > ; sPtr pRoot = makeTaggedElement ( " " ) ; XmlDocument doc ( XmlProcessing :: makeDocElement ( pRoot ) ) ; sPtr name = makeTaggedElement ( " " ) ; name -> addChild ( makeTextElement ( filename ) ) ; pRoot -> addChild ( name ) ; sPtr depNames = makeTaggedElement ( " " ) ; for ( auto depName : deps ) { sPtr dep = makeTaggedElement ( " " ) ; dep -> addChild ( makeTextElement ( depName ) ) ; depNames -> addChild ( dep ) ; } pRoot -> addChild ( depNames ) ; return doc ; }
< create the xml document for a checked in file >
< create the xml document for a checked in file >