Пример #1
0
			/*
			 **From  JudgeRet jr
			*/
			XMLHandler getSendXML(){
				XMLHandler xmlh;
				xml_node nd=xmlh.addChild("result",NULL);
				nd.append_child("runid").append_child(node_pcdata).set_value(to_string(jr.runid).c_str());
				nd.append_child("compilecode").append_child(node_pcdata).set_value(to_string(jr.compilecode).c_str());
				nd.append_child("inputtype").append_child(node_pcdata).set_value(to_string(jr.inputtype).c_str());
				nd.append_child("time").append_child(node_pcdata).set_value(to_string(jr.usg._timeUsage).c_str());
				nd.append_child("mem").append_child(node_pcdata).set_value(to_string(jr.usg._memUsage).c_str());
				nd.append_child("RE").append_child(node_pcdata).set_value(to_string(jr.usg._re).c_str());
				nd.append_child("TLE").append_child(node_pcdata).set_value(to_string(jr.usg._tle).c_str());
				nd.append_child("MLE").append_child(node_pcdata).set_value(to_string(jr.usg._mle).c_str());
				nd.append_child("outpath").append_child(node_pcdata).set_value((runnablepath+"1.out").c_str());
				JudgeInfo ji=jer->getRet();
				nd.append_child("judgercorrect").append_child(node_pcdata).set_value(to_string(ji.correct).c_str());
				nd.append_child("judgererrtype").append_child(node_pcdata).set_value(to_string(ji.err_type).c_str());
				#if _DEBUG
				cout<<"getSendXML ret"<<endl;
				xmlh.dump();
				#endif
				return xmlh;
			}