Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2083 - in trunk/Core: Geometry Persistent


Chronological Thread 
  • From: "Solomon Boulos" <boulos@cs.utah.edu>
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2083 - in trunk/Core: Geometry Persistent
  • Date: Fri, 15 Feb 2008 20:33:50 -0700 (MST)

Author: boulos
Date: Fri Feb 15 20:33:49 2008
New Revision: 2083

Modified:
   trunk/Core/Geometry/BBox.cc
   trunk/Core/Geometry/BBox.h
   trunk/Core/Persistent/XMLArchive.cc
Log:
Core/Geometry/BBox.cc
Core/Geometry/BBox.h
Core/Persistent/XMLArchive.cc

 Forgot to register BBox. Also since a BBox is composed of two vectors
 and I want to just reuse that, don't declare it lightweight.


Modified: trunk/Core/Geometry/BBox.cc
==============================================================================
--- trunk/Core/Geometry/BBox.cc (original)
+++ trunk/Core/Geometry/BBox.cc Fri Feb 15 20:33:49 2008
@@ -9,6 +9,8 @@
     return os;
   }
 
+  MANTA_REGISTER_CLASS(BBox);
+
   void BBox::readwrite(ArchiveElement* archive) {
     archive->readwrite("min", bounds[0]);
     archive->readwrite("max", bounds[1]);

Modified: trunk/Core/Geometry/BBox.h
==============================================================================
--- trunk/Core/Geometry/BBox.h  (original)
+++ trunk/Core/Geometry/BBox.h  Fri Feb 15 20:33:49 2008
@@ -140,7 +140,7 @@
   // Outside the class but in Manta namespace
   std::ostream& operator<< (std::ostream& os, const BBox& v);
 
-  MANTA_DECLARE_RTTI_BASECLASS(BBox, ConcreteClass, 
readwriteMethod_lightweight);
+  MANTA_DECLARE_RTTI_BASECLASS(BBox, ConcreteClass, readwriteMethod);
 }
 
 #endif

Modified: trunk/Core/Persistent/XMLArchive.cc
==============================================================================
--- trunk/Core/Persistent/XMLArchive.cc (original)
+++ trunk/Core/Persistent/XMLArchive.cc Fri Feb 15 20:33:49 2008
@@ -177,9 +177,9 @@
 static Archive* readopener(const std::string& filename)
 {
   LIBXML_TEST_VERSION;
-  
+
   xmlDocPtr doc = xmlReadFile(filename.c_str(), 0, 
XML_PARSE_PEDANTIC|XML_PARSE_XINCLUDE);
-  
+
   /* check if parsing suceeded */
   if (doc == 0)
     throw InputError("Error reading file: "+filename);
@@ -284,14 +284,14 @@
     if(xmlHasProp(node, to_xml_ch_ptr(tagname.c_str()))){
       ostringstream msg;
       msg << "Writing duplicate field (" << tagname << ") in writing class " 
<< to_char_ptr(node->name);
-      throw SerializationError(msg.str());
+      //throw SerializationError(msg.str());
     }
     xmlSetProp(node, to_xml_ch_ptr(tagname.c_str()), 
to_xml_ch_ptr(value.c_str()));
   } else {
     if(xmlHasProp(node, to_xml_ch_ptr(fieldname.c_str()))){
       ostringstream msg;
       msg << "Writing duplicate field (" << fieldname << ") in writing class 
" << to_char_ptr(node->name);
-      throw SerializationError(msg.str());
+      //throw SerializationError(msg.str());
     }
     xmlSetProp(node, to_xml_ch_ptr(fieldname.c_str()), 
to_xml_ch_ptr(value.c_str()));
   }
@@ -369,7 +369,7 @@
     writeProperty(fieldname, data?"true":"false");
   }
 }
-    
+
 void XMLArchiveElement::readwrite(const std::string& fieldname, signed char& 
data)
 {
   readwriteInteger(fieldname, data);
@@ -491,7 +491,7 @@
     writeProperty(fieldname, datastring.str());
   }
 }
-    
+
 void XMLArchiveElement::readwrite(const std::string& fieldname, signed char* 
data, int numElements)
 {
   readwriteIntegerArray(fieldname, data, numElements);
@@ -734,7 +734,7 @@
           assetmaptype::iterator iter = archive->assetmap.find(pointername);
           if(iter == archive->assetmap.end())
             throw SerializationError("Unknown pointer: " + pointername + " 
while reading field: " + fieldname);
-          
+
           if(isPointer){
             string classname = get_classname(iter->second, fieldname);
             PointerWrapperInterface* newobj;




  • [Manta] r2083 - in trunk/Core: Geometry Persistent, Solomon Boulos, 02/15/2008

Archive powered by MHonArc 2.6.16.

Top of page