以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML源码及示例(仅原创和转载) 』  (http://bbs.xml.org.cn/list.asp?boardid=32)
----  请教高手,在C++中的include中加入xeces_c后如何运用?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=32&rootid=&id=16991)


--  作者:zhle
--  发布时间:4/14/2005 7:26:00 PM

--  请教高手,在C++中的include中加入xeces_c后如何运用?
我在C++中加入了xerces_c后用#include""包含进所耍的*。hpp后,为何在其引用*。hpp 中的类时总说没有定义此类或文件名为空,希望高手们能帮我想想办法。谢谢。


#ifndef Dataflow_Dataflow_StrX_h
#define PSECORE_Dataflow_StrX_h 1

#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#define IRIX
#pragma set woff 1375
#pragma set woff 3303
#endif

#include "xercesc/util/XMLString.hpp"

#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/sax/SAXException.hpp>
#include <xercesc/sax/SAXParseException.hpp>
#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/dom/DOMNamedNodeMap.hpp>
#include <xercesc/dom/DOMText.hpp>
#include <xercesc/sax/ErrorHandler.hpp>

#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma reset woff 1375
#pragma reset woff 3303
#endif


#include <iostream>


#include"xercesc/util/XMLString.hpp"   //我自己加入的内容。

namespace SCIRun {

class StrX
{
public :
   StrX(const XMLCh* const toTranscode)
  {
    // Call the private transcoding method
     fLocalForm = XMLString::transcode(toTranscode);   //编译时XMLString类找不到。
   }

   ~StrX()
  {
     delete [] fLocalForm;
  }
  // -----------------------------------------------------------------------
  const char* localForm() const
   {
    return fLocalForm;
   }
   
private :
   // -----------------------------------------------------------------------
  char*   fLocalForm;
};

std::ostream& operator<<(std::ostream& target, const StrX& toDump);

} // End namespace SCIRun

#endif


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
2,921.875ms