Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCD_Slice.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // $Id: LCD_Slice.cc,v 1.11 2004/02/28 01:03:34 uid561 Exp $
00003 // ----------------------------------------------------------------------------
00004 //
00005 // LCD_Slice.cxx
00006 //
00007 // class to hold information about a slice of material conveniently
00008 
00009 #include "xercesc/dom/deprecated/DOM_Element.hpp"
00010 #include "xercesc/dom/deprecated/DOMString.hpp"
00011 #include "xercesc/dom/deprecated/DOM_Document.hpp"
00012 XERCES_CPP_NAMESPACE_USE
00013 
00014 #include "LCD_Slice.hh"
00015 
00016 #include "LCD_DocumentUtil.hh"
00017 
00018 /*
00019  * Comment
00020  */
00021 
00022 
00023 LCD_Slice::LCD_Slice(DOM_Element elt) {
00024   bool ok;
00025   DOMString tag = elt.getTagName();
00026 
00027   char  buf[50];
00028 
00029   if (tag.equals("iwall") || (tag.equals("owall")) ) {
00030     sensitive = false;
00031   } else if (tag.equals("slice")) {
00032     valid = LCD_DocumentUtil::convertValue(elt.getAttribute("sensitive"),
00033                                            &sensitive);
00034     if (!valid) return;            // this really isn't good enough
00035   } else {
00036     valid = false;
00037     return;   // bad element type
00038   }
00039 
00040   ok = LCD_DocumentUtil::convertValue(elt.getAttribute("material"),
00041                                       &buf[0], 50);
00042   name = std::string(buf);
00043   //  int iname=name.length();
00044   name.resize(128,0);
00045   //  printf("name=%s buf=%s len=%d\n",name.data(),buf,name.length());
00046   if (ok) LCD_DocumentUtil::convertValue(elt.getAttribute("width"),
00047                                          &thickness);
00048   valid = ok;
00049   return;
00050 }
00051 

Generated on Thu Oct 7 18:44:46 2004 for LCDG4 by doxygen 1.3.4