⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmluniformiser.h

📁 这是国外的resip协议栈
💻 H
字号:
#ifndef CPPUNITTEST_XMLUNIFORMISER_H#define CPPUNITTEST_XMLUNIFORMISER_H#include <cppunit/SourceLine.h>#include <cppunit/TestAssert.h>#include <string>/*! Uniformise an XML string. * * Strips spaces between attribut in Element. * \warning Attribute values must be double-quoted (att="value"). * No support for embedded DTD declaration */class XmlUniformiser{public:  XmlUniformiser( const std::string &xml );  std::string stripped();private:  void skipSpaces();  bool isValidIndex();  void skipNext( int count =1 );  void copyNext( int count =1 );  void skipProcessed();  void skipComment();  void copyElement();  void copyElementContent();  bool isSpace( char c );  bool isSpace();  bool startsWith( std::string expected );  void copyElementName();  void copyElementAttributes();  void copyAttributeName();  bool isEndOfAttributeName();  void copyAttributeValue();  void copyUntilDoubleQuote();  void removeTrailingSpaces();private:  unsigned int m_index;  std::string m_xml;  std::string m_stripped;};void checkXmlEqual( std::string expectedXml,               std::string actualXml,               CPPUNIT_NS::SourceLine sourceLine );/// Asserts that two XML strings are equivalent.#define CPPUNITTEST_ASSERT_XML_EQUAL( expected, actual ) \    ::checkXmlEqual( expected, actual,      \                     CPPUNIT_SOURCELINE() )#endif  // XMLUNIFORMISER_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -