00001
00002
00003
00004
00005
00006
00007
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
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;
00035 } else {
00036 valid = false;
00037 return;
00038 }
00039
00040 ok = LCD_DocumentUtil::convertValue(elt.getAttribute("material"),
00041 &buf[0], 50);
00042 name = std::string(buf);
00043
00044 name.resize(128,0);
00045
00046 if (ok) LCD_DocumentUtil::convertValue(elt.getAttribute("width"),
00047 &thickness);
00048 valid = ok;
00049 return;
00050 }
00051