- TODO and FIXME reduced to 38
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@941 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
57059b647b
commit
696c513ed2
13 changed files with 13 additions and 106 deletions
|
@ -251,12 +251,11 @@ XMLSerializerFactory::create_subrequest(Parameters& parameters)
|
|||
|
||||
int old_key = 0;
|
||||
int lasts_for = 0;
|
||||
//int places=1;
|
||||
Parameters::iterator pos;
|
||||
resource_key_t new_key = 0;
|
||||
|
||||
|
||||
// read "arrival-time" property
|
||||
// read "resource" property
|
||||
pos = parameters.find(Glib::ustring("resource"));
|
||||
if (pos != parameters.end())
|
||||
{
|
||||
|
@ -271,23 +270,16 @@ XMLSerializerFactory::create_subrequest(Parameters& parameters)
|
|||
}
|
||||
}
|
||||
|
||||
// read "priority" property
|
||||
//pos = parameters.find(Glib::ustring("how-many"));
|
||||
//if (pos != parameters.end()) {
|
||||
// string_to_int(pos->second, places);
|
||||
//}
|
||||
|
||||
// read "priority" property
|
||||
// read "lasts-for" property
|
||||
pos = parameters.find(Glib::ustring("lasts-for"));
|
||||
if (pos != parameters.end())
|
||||
{
|
||||
string_to_int(pos->second, lasts_for);
|
||||
}
|
||||
|
||||
//FIXME places?
|
||||
return _hist->add_subrequest(*_last_request, new_key, (History::time_t)lasts_for/*, (History::size_t)places*/);
|
||||
return _hist->add_subrequest(*_last_request, new_key, (History::time_t)lasts_for);
|
||||
}
|
||||
// add a sub request - Request, resource_key, duration, places
|
||||
// add a sub request - Request, resource_key, duration
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -298,16 +298,12 @@ void XMLVisitor::from_subrequest(xmlNodePtr parent, const SubRequest& obj) throw
|
|||
{
|
||||
|
||||
Glib::ustring strResource;
|
||||
//Glib::ustring strHowMany;
|
||||
Glib::ustring strLastsFor;
|
||||
int_to_string(obj.get_resource_key(), strResource);
|
||||
//FIXME places?
|
||||
//int_to_string(obj.get_places(), strHowMany);
|
||||
int_to_string(obj.get_length(), strLastsFor);
|
||||
|
||||
xmlNodePtr subrequest_node = xmlNewChild(parent, NULL, (const xmlChar *) "subrequest", NULL);
|
||||
xmlNewProp(subrequest_node, (const xmlChar *) "resource", (const xmlChar *) strResource.c_str());
|
||||
//xmlNewProp(subrequest_node, (const xmlChar *) "how-many", (const xmlChar *) strHowMany.c_str());
|
||||
xmlNewProp(subrequest_node, (const xmlChar *) "lasts-for", (const xmlChar *) strLastsFor.c_str());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue