Text archives Help
- From: sparker@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1734 - branches/persistent/Core/Persistent
- Date: Fri, 21 Sep 2007 13:22:45 -0600 (MDT)
Author: sparker
Date: Fri Sep 21 13:22:44 2007
New Revision: 1734
Modified:
branches/persistent/Core/Persistent/XMLArchive.cc
Log:
Minor cleanups
Modified: branches/persistent/Core/Persistent/XMLArchive.cc
==============================================================================
--- branches/persistent/Core/Persistent/XMLArchive.cc (original)
+++ branches/persistent/Core/Persistent/XMLArchive.cc Fri Sep 21 13:22:44
2007
@@ -3,7 +3,6 @@
#include <Core/Persistent/ArchiveElement.h>
#include <Core/Exceptions/InputError.h>
#include <Core/Exceptions/SerializationError.h>
-#include <Core/Util/NotFinished.h>
#include <libxml/parser.h>
#include <sstream>
@@ -536,11 +535,9 @@
const std::string& classname,
const std::string& refname)
{
- if(fieldname == ""){
- NOT_FINISHED("XMLArchiveElement::writeObjectReference");
- } else {
- xmlSetProp(node, to_xml_ch_ptr(fieldname.c_str()),
to_xml_ch_ptr(refname.c_str()));
- }
+ if(xmlHasProp(node, to_xml_ch_ptr(fieldname.c_str())))
+ throw SerializationError("Pointer written twice");
+ xmlSetProp(node, to_xml_ch_ptr(fieldname.c_str()),
to_xml_ch_ptr(refname.c_str()));
}
bool XMLArchiveElement::haveReference(void* ptr, std::string& refname)
- [Manta] r1734 - branches/persistent/Core/Persistent, sparker, 09/21/2007
Archive powered by MHonArc 2.6.16.