Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

XercesFileElement.cpp

Go to the documentation of this file.
00001 #include "XercesFileElement.h"
00002 
00003 #include <xercesc/util/XMLString.hpp>
00004 #include <xercesc/sax2/Attributes.hpp>
00005 
00006 #include <iostream>
00007 
00008 using namespace std;
00009 using namespace X3DTK;
00010 XERCES_CPP_NAMESPACE_USE
00011 
00012 class X3DTK::XercesFileElementImplementation
00013 {
00014 public:
00015   XercesFileElementImplementation(){};
00016   
00017   SFString _name;
00018   XERCES_CPP_NAMESPACE_QUALIFIER Attributes *_attributes;
00019 };
00020 
00021 XercesFileElement::XercesFileElement(const SFString &name, const void *const attributes)
00022 : _impl(new XercesFileElementImplementation())
00023 {
00024   _impl->_name = name;
00025   _impl->_attributes = (Attributes *)attributes;
00026 }
00027 
00028 XercesFileElement::~XercesFileElement()
00029 {
00030 }
00031 
00032 SFString XercesFileElement::getName() const
00033 {
00034   return _impl->_name;
00035 }
00036 
00037 SFString XercesFileElement::getAttribute(int i) const
00038 {
00039   return XMLString::transcode(_impl->_attributes->getValue(i));
00040 }
00041 
00042 int XercesFileElement::getIndexAttribute(const SFString &attribute) const
00043 {
00044   return _impl->_attributes->getIndex(XMLString::transcode((const char *)attribute));
00045 }

Generated on Wed May 14 10:03:13 2003 for X3DToolKit by doxygen1.3