mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-18 20:24:04 +01:00
commit
1639176953
@ -48,11 +48,12 @@ Christopher Baker
|
||||
Scott Davis
|
||||
Jeff Adams
|
||||
Martin Osborne
|
||||
Björn Schramke
|
||||
Björn Schramke
|
||||
Jonathan Seeley
|
||||
Tor Lillqvist
|
||||
Alexander Bychuk
|
||||
Francisco RamÃrez
|
||||
Francis André
|
||||
Francisco RamÃrez
|
||||
Francis André
|
||||
Benoît Bleuzé
|
||||
--
|
||||
$Id$
|
||||
|
@ -47,6 +47,16 @@ class Crypto_API CipherKey
|
||||
/// std::string salt("asdff8723lasdf(**923412");
|
||||
/// CipherKey key("aes-256", password, salt);
|
||||
///
|
||||
/// You may also control the digest and the number of iterations used to generate the key
|
||||
/// by specifying the specific values. Here we create a key with the same data as before,
|
||||
/// except that we use 100 iterations instead of DEFAULT_ITERATION_COUNT, and sha1 instead of
|
||||
/// the default md5:
|
||||
///
|
||||
/// std::string password = "secret";
|
||||
/// std::string salt("asdff8723lasdf(**923412");
|
||||
/// std::string digest ("sha1");
|
||||
/// CipherKey key("aes-256", password, salt, 100, digest);
|
||||
///
|
||||
{
|
||||
public:
|
||||
typedef CipherKeyImpl::Mode Mode;
|
||||
@ -63,9 +73,10 @@ public:
|
||||
CipherKey(const std::string& name,
|
||||
const std::string& passphrase,
|
||||
const std::string& salt = "",
|
||||
int iterationCount = DEFAULT_ITERATION_COUNT);
|
||||
int iterationCount = DEFAULT_ITERATION_COUNT,
|
||||
const std::string& digest = "md5");
|
||||
/// Creates a new CipherKeyImpl object using the given
|
||||
/// cipher name, passphrase, salt value and iteration count.
|
||||
/// cipher name, passphrase, salt value, iteration count and digest.
|
||||
|
||||
CipherKey(const std::string& name,
|
||||
const ByteVec& key,
|
||||
|
@ -53,17 +53,19 @@ public:
|
||||
MODE_OFB /// Output feedback
|
||||
};
|
||||
|
||||
CipherKeyImpl(const std::string& name,
|
||||
const std::string& passphrase,
|
||||
CipherKeyImpl(const std::string& name,
|
||||
const std::string& passphrase,
|
||||
const std::string& salt,
|
||||
int iterationCount);
|
||||
int iterationCount,
|
||||
const std::string &digest);
|
||||
/// Creates a new CipherKeyImpl object, using
|
||||
/// the given cipher name, passphrase, salt value
|
||||
/// and iteration count.
|
||||
|
||||
CipherKeyImpl(const std::string& name,
|
||||
const ByteVec& key,
|
||||
const ByteVec& iv);
|
||||
const ByteVec& iv
|
||||
);
|
||||
/// Creates a new CipherKeyImpl object, using the
|
||||
/// given cipher name, key and initialization vector.
|
||||
|
||||
@ -118,6 +120,7 @@ private:
|
||||
|
||||
private:
|
||||
const EVP_CIPHER* _pCipher;
|
||||
const EVP_MD* _pDigest;
|
||||
std::string _name;
|
||||
ByteVec _key;
|
||||
ByteVec _iv;
|
||||
|
@ -21,8 +21,9 @@ namespace Poco {
|
||||
namespace Crypto {
|
||||
|
||||
|
||||
CipherKey::CipherKey(const std::string& name, const std::string& passphrase, const std::string& salt, int iterationCount):
|
||||
_pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount))
|
||||
CipherKey::CipherKey(const std::string& name, const std::string& passphrase, const std::string& salt, int iterationCount,
|
||||
const std::string &digest):
|
||||
_pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount, digest))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,13 @@ namespace Poco {
|
||||
namespace Crypto {
|
||||
|
||||
|
||||
CipherKeyImpl::CipherKeyImpl(const std::string& name,
|
||||
CipherKeyImpl::CipherKeyImpl(const std::string& name,
|
||||
const std::string& passphrase,
|
||||
const std::string& salt,
|
||||
int iterationCount):
|
||||
int iterationCount,
|
||||
const std::string& digest):
|
||||
_pCipher(0),
|
||||
_pDigest(0),
|
||||
_name(name),
|
||||
_key(),
|
||||
_iv()
|
||||
@ -42,6 +44,13 @@ CipherKeyImpl::CipherKeyImpl(const std::string& name,
|
||||
|
||||
if (!_pCipher)
|
||||
throw Poco::NotFoundException("Cipher " + name + " was not found");
|
||||
|
||||
_pDigest = EVP_get_digestbyname(digest.c_str());
|
||||
|
||||
if (!_pDigest)
|
||||
throw Poco::NotFoundException("Digest " + name + " was not found");
|
||||
|
||||
|
||||
_key = ByteVec(keySize());
|
||||
_iv = ByteVec(ivSize());
|
||||
generateKey(passphrase, salt, iterationCount);
|
||||
@ -145,7 +154,6 @@ void CipherKeyImpl::generateKey(
|
||||
|
||||
// OpenSSL documentation specifies that the salt must be an 8-byte array.
|
||||
unsigned char saltBytes[8];
|
||||
|
||||
if (!salt.empty())
|
||||
{
|
||||
int len = static_cast<int>(salt.size());
|
||||
@ -156,10 +164,10 @@ void CipherKeyImpl::generateKey(
|
||||
saltBytes[i % 8] ^= salt.at(i);
|
||||
}
|
||||
|
||||
// Now create the key and IV, using the MD5 digest algorithm.
|
||||
// Now create the key and IV, using the digest set in the constructor.
|
||||
int keySize = EVP_BytesToKey(
|
||||
_pCipher,
|
||||
EVP_md5(),
|
||||
_pDigest,
|
||||
(salt.empty() ? 0 : saltBytes),
|
||||
reinterpret_cast<const unsigned char*>(password.data()),
|
||||
static_cast<int>(password.size()),
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "Poco/Crypto/CryptoStream.h"
|
||||
#include "Poco/StreamCopier.h"
|
||||
#include "Poco/Base64Encoder.h"
|
||||
#include "Poco/HexBinaryEncoder.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -125,6 +126,37 @@ void CryptoTest::testEncryptDecryptWithSalt()
|
||||
}
|
||||
}
|
||||
|
||||
void CryptoTest::testEncryptDecryptWithSaltSha1()
|
||||
{
|
||||
Cipher::Ptr pCipher = CipherFactory::defaultFactory().createCipher(
|
||||
CipherKey("aes256", "simplepwd", "Too much salt", 2000, "sha1"));
|
||||
Cipher::Ptr pCipher2 = CipherFactory::defaultFactory().createCipher(
|
||||
CipherKey("aes256", "simplepwd", "Too much salt", 2000, "sha1"));
|
||||
|
||||
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||
{
|
||||
std::string in(n, 'x');
|
||||
std::string out = pCipher->encryptString(in, Cipher::ENC_NONE);
|
||||
std::string result = pCipher2->decryptString(out, Cipher::ENC_NONE);
|
||||
assert (in == result);
|
||||
}
|
||||
|
||||
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||
{
|
||||
std::string in(n, 'x');
|
||||
std::string out = pCipher->encryptString(in, Cipher::ENC_BASE64);
|
||||
std::string result = pCipher2->decryptString(out, Cipher::ENC_BASE64);
|
||||
assert (in == result);
|
||||
}
|
||||
|
||||
for (std::size_t n = 1; n < MAX_DATA_SIZE; n++)
|
||||
{
|
||||
std::string in(n, 'x');
|
||||
std::string out = pCipher->encryptString(in, Cipher::ENC_BINHEX);
|
||||
std::string result = pCipher2->decryptString(out, Cipher::ENC_BINHEX);
|
||||
assert (in == result);
|
||||
}
|
||||
}
|
||||
|
||||
void CryptoTest::testEncryptDecryptDESECB()
|
||||
{
|
||||
@ -168,6 +200,32 @@ void CryptoTest::testPassword()
|
||||
assert (base64Key == "hIzxBt58GDd7/6mRp88bewKk42lM4QwaF78ek0FkVoA=");
|
||||
}
|
||||
|
||||
void CryptoTest::testPasswordSha1()
|
||||
{
|
||||
// the test uses 1 iteration, as the openssl executable does not allow to set a custom number
|
||||
// of iterations
|
||||
CipherKey key("aes256", "password", "saltsalt", 1, "sha1");
|
||||
|
||||
std::ostringstream keyStream;
|
||||
Poco::HexBinaryEncoder hexKeyEnc(keyStream);
|
||||
hexKeyEnc.write(reinterpret_cast<const char*>(&key.getKey()[0]), key.keySize());
|
||||
hexKeyEnc.close();
|
||||
std::string hexKey = keyStream.str();
|
||||
|
||||
std::ostringstream ivStream;
|
||||
Poco::HexBinaryEncoder hexIvEnc(ivStream);
|
||||
hexIvEnc.write(reinterpret_cast<const char*>(&key.getIV()[0]), key.ivSize());
|
||||
hexIvEnc.close();
|
||||
std::string hexIv = ivStream.str();
|
||||
|
||||
// got Hex value for key and iv using:
|
||||
// openssl enc -e -a -md sha1 -aes256 -k password -S 73616c7473616c74 -P
|
||||
// (where "salt" == 73616c74 in Hex, doubled for an 8 bytes salt, openssl padds the salt with 0
|
||||
// whereas Poco's implementation padds with the existing bytes using a modulo operation)
|
||||
assert (hexIv == "c96049b0edc0b67af61ecc43d3de8898");
|
||||
assert (hexKey == "cab86dd6261710891e8cb56ee3625691a75df344f0bff4c12cf3596fc00b39c7");
|
||||
}
|
||||
|
||||
|
||||
void CryptoTest::testEncryptInterop()
|
||||
{
|
||||
@ -265,8 +323,10 @@ CppUnit::Test* CryptoTest::suite()
|
||||
|
||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecrypt);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptWithSalt);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptWithSaltSha1);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptDecryptDESECB);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testPassword);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testPasswordSha1);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testEncryptInterop);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testDecryptInterop);
|
||||
CppUnit_addTest(pSuite, CryptoTest, testStreams);
|
||||
|
@ -33,9 +33,11 @@ public:
|
||||
|
||||
void testEncryptDecrypt();
|
||||
void testEncryptDecryptWithSalt();
|
||||
void testEncryptDecryptWithSaltSha1();
|
||||
void testEncryptDecryptDESECB();
|
||||
void testStreams();
|
||||
void testPassword();
|
||||
void testPasswordSha1();
|
||||
void testEncryptInterop();
|
||||
void testDecryptInterop();
|
||||
void testCertificate();
|
||||
|
@ -107,9 +107,6 @@ bool strToInt(const char* pStr, I& result, short base, char thSep = ',')
|
||||
{
|
||||
switch (*pStr)
|
||||
{
|
||||
case 'x': case 'X':
|
||||
if (base != 0x10) return false;
|
||||
|
||||
case '0':
|
||||
if (state < STATE_SIGNIFICANT_DIGITS) break;
|
||||
|
||||
@ -142,19 +139,12 @@ bool strToInt(const char* pStr, I& result, short base, char thSep = ',')
|
||||
|
||||
case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
|
||||
if (base != 0x10) return false;
|
||||
|
||||
if (state < STATE_SIGNIFICANT_DIGITS) state = STATE_SIGNIFICANT_DIGITS;
|
||||
if (result > limitCheck) return false;
|
||||
result = result * base + (10 + *pStr - 'A');
|
||||
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
case 'u':
|
||||
case 'L':
|
||||
case 'l':
|
||||
goto done;
|
||||
|
||||
case '.':
|
||||
if ((base == 10) && (thSep == '.')) break;
|
||||
else return false;
|
||||
@ -165,19 +155,13 @@ bool strToInt(const char* pStr, I& result, short base, char thSep = ',')
|
||||
|
||||
case ' ':
|
||||
if ((base == 10) && (thSep == ' ')) break;
|
||||
case '\t':
|
||||
case '\n':
|
||||
case '\v':
|
||||
case '\f':
|
||||
case '\r':
|
||||
goto done;
|
||||
// fallthrough
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
if ((sign < 0) && (base == 10)) result *= sign;
|
||||
|
||||
return true;
|
||||
|
@ -160,7 +160,6 @@
|
||||
#else
|
||||
#error "MIPS but neither MIPSEL nor MIPSEB?"
|
||||
#endif
|
||||
|
||||
#elif defined(__hppa) || defined(__hppa__)
|
||||
#define POCO_ARCH POCO_ARCH_HPPA
|
||||
#define POCO_ARCH_BIG_ENDIAN 1
|
||||
@ -242,8 +241,8 @@
|
||||
#define POCO_COMPILER_CBUILDER
|
||||
#elif defined (__DMC__)
|
||||
#define POCO_COMPILER_DMARS
|
||||
#elif defined (__HP_aCC)
|
||||
#define POCO_COMPILER_HP_ACC
|
||||
#elif defined (__DECCXX)
|
||||
#define POCO_COMPILER_COMPAC
|
||||
#elif (defined (__xlc__) || defined (__xlC__)) && defined(__IBMCPP__)
|
||||
#define POCO_COMPILER_IBM_XLC // IBM XL C++
|
||||
#elif defined (__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
|
@ -118,6 +118,12 @@ public:
|
||||
/// specified in a call to load() or the
|
||||
/// constructor.
|
||||
|
||||
static std::string prefix();
|
||||
/// Returns the platform-specific filename prefix
|
||||
/// for shared libraries.
|
||||
/// Most platforms would return an empty string, but
|
||||
/// on Cygwin, the "cyg" prefix will be returned.
|
||||
|
||||
static std::string suffix();
|
||||
/// Returns the platform-specific filename suffix
|
||||
/// for shared libraries (including the period).
|
||||
|
@ -38,6 +38,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -43,6 +43,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -38,6 +38,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
bool isLoadedImpl() const;
|
||||
void* findSymbolImpl(const std::string& name);
|
||||
const std::string& getPathImpl() const;
|
||||
static std::string prefixImpl();
|
||||
static std::string suffixImpl();
|
||||
|
||||
private:
|
||||
|
@ -37,7 +37,7 @@
|
||||
// Ax: alpha releases
|
||||
// Bx: beta releases
|
||||
//
|
||||
#define POCO_VERSION 0x01060000
|
||||
#define POCO_VERSION 0x01070000
|
||||
|
||||
|
||||
#endif // Foundation_Version_INCLUDED
|
||||
|
@ -84,7 +84,9 @@ unsigned NumberParser::parseHex(const std::string& s)
|
||||
|
||||
bool NumberParser::tryParseHex(const std::string& s, unsigned& value)
|
||||
{
|
||||
return strToInt(s.c_str(), value, NUM_BASE_HEX);
|
||||
int offset = 0;
|
||||
if (s.size() > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) offset = 2;
|
||||
return strToInt(s.c_str() + offset, value, NUM_BASE_HEX);
|
||||
}
|
||||
|
||||
|
||||
@ -151,7 +153,9 @@ UInt64 NumberParser::parseHex64(const std::string& s)
|
||||
|
||||
bool NumberParser::tryParseHex64(const std::string& s, UInt64& value)
|
||||
{
|
||||
return strToInt(s.c_str(), value, NUM_BASE_HEX);
|
||||
int offset = 0;
|
||||
if (s.size() > 2 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X')) offset = 2;
|
||||
return strToInt(s.c_str() + offset, value, NUM_BASE_HEX);
|
||||
}
|
||||
|
||||
|
||||
|
@ -104,6 +104,12 @@ const std::string& SharedLibrary::getPath() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibrary::prefix()
|
||||
{
|
||||
return prefixImpl();
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibrary::suffix()
|
||||
{
|
||||
return suffixImpl();
|
||||
|
@ -83,6 +83,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
// Note: cygwin is missing RTLD_LOCAL, set it to 0
|
||||
#if defined(__CYGWIN__) && !defined(RTLD_LOCAL)
|
||||
#if POCO_OS == POCO_OS_CYGWIN && !defined(RTLD_LOCAL)
|
||||
#define RTLD_LOCAL 0
|
||||
#endif
|
||||
|
||||
@ -99,21 +99,31 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
#if POCO_OS == POCO_OS_CYGWIN
|
||||
return "cyg";
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
#if POCO_OS == POCO_OS_MAC_OS_X
|
||||
#if defined(_DEBUG)
|
||||
return "d.dylib";
|
||||
#else
|
||||
return ".dylib";
|
||||
#endif
|
||||
#elif defined(hpux) || defined(_hpux)
|
||||
#elif POCO_OS == POCO_OS_HPUX
|
||||
#if defined(_DEBUG)
|
||||
return "d.sl";
|
||||
#else
|
||||
return ".sl";
|
||||
#endif
|
||||
#elif defined(__CYGWIN__)
|
||||
#elif POCO_OS == POCO_OS_CYGWIN
|
||||
#if defined(_DEBUG)
|
||||
return "d.dll";
|
||||
#else
|
||||
|
@ -106,6 +106,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -128,6 +128,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
return ".out";
|
||||
|
@ -87,6 +87,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -98,6 +98,12 @@ const std::string& SharedLibraryImpl::getPathImpl() const
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::prefixImpl()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
std::string SharedLibraryImpl::suffixImpl()
|
||||
{
|
||||
#if defined(_DEBUG)
|
||||
|
@ -194,7 +194,7 @@ void CoreTest::testEnvironment()
|
||||
catch (Exception&)
|
||||
{
|
||||
}
|
||||
|
||||
std::cout << std::endl;
|
||||
std::cout << "OS Name: " << Environment::osName() << std::endl;
|
||||
std::cout << "OS Display Name: " << Environment::osDisplayName() << std::endl;
|
||||
std::cout << "OS Version: " << Environment::osVersion() << std::endl;
|
||||
|
@ -88,21 +88,27 @@ void FPETest::testFlags()
|
||||
volatile double b = 0;
|
||||
volatile double c = div(a, b);
|
||||
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_DIVIDE_BY_ZERO));
|
||||
#endif
|
||||
assert (FPE::isInfinite(c));
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e210;
|
||||
b = 9.87654321e210;
|
||||
c = mult(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_OVERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
|
||||
FPE::clearFlags();
|
||||
a = 1.23456789e-99;
|
||||
b = 9.87654321e210;
|
||||
c = div(a, b);
|
||||
#if !defined(POCO_NO_FPENVIRONMENT)
|
||||
assert (FPE::isFlag(FPE::FP_UNDERFLOW));
|
||||
#endif
|
||||
assertEqualDelta(c, c, 0);
|
||||
}
|
||||
|
||||
@ -118,7 +124,8 @@ void FPETest::testFlags()
|
||||
|
||||
void FPETest::testRound()
|
||||
{
|
||||
#if !defined(__osf__) && !defined(__VMS)
|
||||
#if !defined(__osf__) && !defined(__VMS) && !defined(POCO_NO_FPENVIRONMENT)
|
||||
|
||||
FPE::setRoundingMode(FPE::FP_ROUND_TONEAREST);
|
||||
assert (FPE::getRoundingMode() == FPE::FP_ROUND_TONEAREST);
|
||||
{
|
||||
|
@ -228,7 +228,11 @@ void FileTest::testFileAttributes2()
|
||||
void FileTest::testFileAttributes3()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
#if POCO_OS==POCO_OS_CYGWIN
|
||||
File f("/dev/tty");
|
||||
#else
|
||||
File f("/dev/console");
|
||||
#endif
|
||||
#elif defined(POCO_OS_FAMILY_WINDOWS) && !defined(_WIN32_WCE)
|
||||
File f("CON");
|
||||
#endif
|
||||
|
@ -69,20 +69,13 @@ void NumberParserTest::testParse()
|
||||
assert(NumberParser::parse("-123") == -123);
|
||||
assert(NumberParser::parse("0") == 0);
|
||||
assert(NumberParser::parse("000") == 0);
|
||||
assert(NumberParser::parse(" 123 ") == 123);
|
||||
assert(NumberParser::parse(" 123") == 123);
|
||||
assert(NumberParser::parse("123 ") == 123);
|
||||
assert(NumberParser::parse("0123") == 123);
|
||||
assert(NumberParser::parse("+0123") == 123);
|
||||
assert(NumberParser::parse("-0123") == -123);
|
||||
assert(NumberParser::parse("-123") == -123);
|
||||
assert(NumberParser::parseUnsigned("123") == 123);
|
||||
assert(NumberParser::parseHex("12AB") == 0x12ab);
|
||||
assert(NumberParser::parseHex("0X12AB") == 0x12ab);
|
||||
assert(NumberParser::parseHex("0x12AB") == 0x12ab);
|
||||
assert(NumberParser::parseHex("0x12aB") == 0x12ab);
|
||||
assert(NumberParser::parseHex("0X98Fe") == 0x98fe);
|
||||
assert(NumberParser::parseHex("0x0") == 0);
|
||||
assert(NumberParser::parseHex("0X12AB") == 0x12ab);
|
||||
assert(NumberParser::parseHex("00") == 0);
|
||||
assert(NumberParser::parseOct("123") == 0123);
|
||||
assert(NumberParser::parseOct("0123") == 0123);
|
||||
@ -103,7 +96,6 @@ void NumberParserTest::testParse()
|
||||
assert(NumberParser::parse64("-0123") == -123);
|
||||
assert(NumberParser::parseUnsigned64("123") == 123);
|
||||
assert(NumberParser::parseHex64("12AB") == 0x12ab);
|
||||
assert(NumberParser::parseHex64("0x12AB") == 0x12ab);
|
||||
assert(NumberParser::parseOct64("123") == 0123);
|
||||
assert(NumberParser::parseOct64("0123") == 0123);
|
||||
#endif
|
||||
@ -155,35 +147,26 @@ void NumberParserTest::testParse()
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("-1%c234e+100", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("-1%c234E100", dp), dp, ts), 0.01);
|
||||
|
||||
d = 1.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 1%c234e-100 ", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 1%c234e-100 ", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 1%c234e-100 ", dp), dp, ts), 0.01);
|
||||
|
||||
d = 1234.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 1%c234%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("1%c234%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
d = 12345.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 12%c345%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("12%c345%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
d = 123456.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" 123%c456%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("123%c456%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
|
||||
d = -1234.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" -1%c234%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("-1%c234%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
d = -12345.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" -12%c345%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("-12%c345%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
d = -123456.234e-100;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format(" -123%c456%c234e-100 ", ts, dp), dp, ts), 0.01);
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("-123%c456%c234e-100", ts, dp), dp, ts), 0.01);
|
||||
}
|
||||
|
||||
double d = 12.34e-10;
|
||||
assertEqualDelta(d, NumberParser::parseFloat(format("12%c34e-10", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(-12.34, NumberParser::parseFloat(format("-12%c34", dp), dp, ts), 0.01);
|
||||
|
||||
assertEqualDelta(12.34, NumberParser::parseFloat(format(" 12%c34", dp),dp, ts), 0.01);
|
||||
assertEqualDelta(12.34, NumberParser::parseFloat(format("12%c34 ", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(12.34, NumberParser::parseFloat(format(" 12%c34 ", dp), dp, ts), 0.01);
|
||||
|
||||
assertEqualDelta(12.34, NumberParser::parseFloat(format("\t\n 12%c34 \v\f\r", dp), dp, ts), 0.01);
|
||||
assertEqualDelta(12.34, NumberParser::parseFloat(format("12%c34", dp), dp, ts), 0.01);
|
||||
}
|
||||
}
|
||||
#endif // POCO_NO_FPENVIRONMENT
|
||||
@ -232,6 +215,13 @@ void NumberParserTest::testParseError()
|
||||
failmsg("must throw SyntaxException");
|
||||
} catch (SyntaxException&) { }
|
||||
|
||||
try
|
||||
{
|
||||
NumberParser::parse(" 123");
|
||||
NumberParser::parseBool("");
|
||||
failmsg("must throw SyntaxException");
|
||||
} catch (SyntaxException&) { }
|
||||
|
||||
try
|
||||
{
|
||||
NumberParser::parse("1 1");
|
||||
|
@ -89,8 +89,9 @@ CppUnit::Test* SharedMemoryTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("SharedMemoryTest");
|
||||
|
||||
#if !defined(POCO_NO_SHAREDMEMORY)
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreate);
|
||||
CppUnit_addTest(pSuite, SharedMemoryTest, testCreateFromFile);
|
||||
|
||||
#endif
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -76,28 +76,12 @@ private:
|
||||
assert(Poco::strToInt("0", result, 10)); assert(result == 0);
|
||||
assert(Poco::strToInt("000", result, 10)); assert(result == 0);
|
||||
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt(" 123 ", result, 10)); assert(result == 123); }
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt(" 123", result, 10)); assert(result == 123); }
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("123 ", result, 10)); assert(result == 123); }
|
||||
if (std::numeric_limits<T>::is_signed && (-123 > std::numeric_limits<T>::min()))
|
||||
{ assert(Poco::strToInt("-123", result, 10)); assert(result == -123); }
|
||||
if (0x123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("123", result, 0x10)); assert(result == 0x123); }
|
||||
if (0x12ab < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("12AB", result, 0x10)); assert(result == 0x12ab); }
|
||||
if (0x12ab < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0X12AB", result, 0x10)); assert(result == 0x12ab); }
|
||||
if (0x12ab < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0x12AB", result, 0x10)); assert(result == 0x12ab); }
|
||||
if (0x12ab < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0x12aB", result, 0x10)); assert(result == 0x12ab); }
|
||||
if (0x98fe < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0X98Fe", result, 0x10)); assert(result == 0x98fe); }
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("0x0", result, 0x10)); assert(result == 0); }
|
||||
if (123 < std::numeric_limits<T>::max())
|
||||
{ assert(Poco::strToInt("00", result, 0x10)); assert(result == 0); }
|
||||
if (0123 < std::numeric_limits<T>::max())
|
||||
|
@ -19,11 +19,13 @@
|
||||
#include "Poco/Ascii.h"
|
||||
#include "Poco/Token.h"
|
||||
#include "Poco/UTF8Encoding.h"
|
||||
#include "Poco/String.h"
|
||||
#undef min
|
||||
#undef max
|
||||
#include <limits>
|
||||
#include <clocale>
|
||||
#include <istream>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -407,9 +409,11 @@ void Parser::parseBuffer()
|
||||
case JSON_T_INTEGER:
|
||||
{
|
||||
#if defined(POCO_HAVE_INT64)
|
||||
std::string numStr(_parseBuffer.begin(), _parseBuffer.size());
|
||||
try
|
||||
{
|
||||
Int64 value = NumberParser::parse64(std::string(_parseBuffer.begin(), _parseBuffer.size()));
|
||||
Poco::trimInPlace(numStr);
|
||||
Int64 value = NumberParser::parse64(numStr);
|
||||
// if number is 32-bit, then handle as such
|
||||
if (value > std::numeric_limits<int>::max()
|
||||
|| value < std::numeric_limits<int>::min() )
|
||||
@ -424,7 +428,7 @@ void Parser::parseBuffer()
|
||||
// try to handle error as unsigned in case of overflow
|
||||
catch ( const SyntaxException& )
|
||||
{
|
||||
UInt64 value = NumberParser::parseUnsigned64(std::string(_parseBuffer.begin(), _parseBuffer.size()));
|
||||
UInt64 value = NumberParser::parseUnsigned64(numStr);
|
||||
// if number is 32-bit, then handle as such
|
||||
if ( value > std::numeric_limits<unsigned>::max() )
|
||||
{
|
||||
@ -438,13 +442,13 @@ void Parser::parseBuffer()
|
||||
#else
|
||||
try
|
||||
{
|
||||
int value = NumberParser::parse(std::string(_parseBuffer.begin(), _parseBuffer.size()));
|
||||
int value = NumberParser::parse(numStr);
|
||||
_pHandler->value(value);
|
||||
}
|
||||
// try to handle error as unsigned in case of overflow
|
||||
catch ( const SyntaxException& )
|
||||
{
|
||||
unsigned value = NumberParser::parseUnsigned(std::string(_parseBuffer.begin(), _parseBuffer.size()));
|
||||
unsigned value = NumberParser::parseUnsigned(numStr);
|
||||
_pHandler->value(value);
|
||||
}
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
DatagramSocket();
|
||||
/// Creates an unconnected IPv4 datagram socket.
|
||||
|
||||
explicit DatagramSocket(IPAddress::Family family);
|
||||
explicit DatagramSocket(SocketAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
/// be an IPv6 socket. Otherwise, it will be
|
||||
/// an IPv4 socket.
|
||||
|
||||
explicit DatagramSocketImpl(IPAddress::Family family);
|
||||
explicit DatagramSocketImpl(SocketAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingError;
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingEnd;
|
||||
|
||||
explicit ICMPClient(IPAddress::Family family);
|
||||
explicit ICMPClient(SocketAddress::Family family);
|
||||
/// Creates an ICMP client.
|
||||
|
||||
~ICMPClient();
|
||||
@ -64,7 +64,7 @@ public:
|
||||
///
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
static int ping(SocketAddress& address, IPAddress::Family family, int repeat = 1);
|
||||
static int ping(SocketAddress& address, SocketAddress::Family family, int repeat = 1);
|
||||
/// Pings the specified address [repeat] times.
|
||||
/// Notifications are not posted for events.
|
||||
///
|
||||
@ -77,7 +77,7 @@ public:
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
private:
|
||||
mutable IPAddress::Family _family;
|
||||
mutable SocketAddress::Family _family;
|
||||
};
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ class Net_API ICMPPacket
|
||||
/// This class is the ICMP packet abstraction.
|
||||
{
|
||||
public:
|
||||
ICMPPacket(IPAddress::Family family, int dataSize = 48);
|
||||
ICMPPacket(SocketAddress::Family family, int dataSize = 48);
|
||||
/// Creates an ICMPPacket of specified family.
|
||||
|
||||
~ICMPPacket();
|
||||
|
@ -33,7 +33,7 @@ class Net_API ICMPSocket: public Socket
|
||||
/// ICMP client socket.
|
||||
{
|
||||
public:
|
||||
ICMPSocket(IPAddress::Family family, int dataSize = 48, int ttl = 128, int timeout = 500000);
|
||||
ICMPSocket(SocketAddress::Family family, int dataSize = 48, int ttl = 128, int timeout = 500000);
|
||||
/// Creates an unconnected ICMP socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -34,7 +34,7 @@ class Net_API ICMPSocketImpl: public RawSocketImpl
|
||||
/// This class implements an ICMP socket.
|
||||
{
|
||||
public:
|
||||
ICMPSocketImpl(IPAddress::Family family, int dataSize, int ttl, int timeout);
|
||||
ICMPSocketImpl(SocketAddress::Family family, int dataSize, int ttl, int timeout);
|
||||
/// Creates an unconnected ICMP socket.
|
||||
///
|
||||
/// The socket will be created for the given address family.
|
||||
|
@ -57,15 +57,15 @@ class Net_API IPAddress
|
||||
{
|
||||
public:
|
||||
typedef std::vector<IPAddress> List;
|
||||
|
||||
enum Family
|
||||
/// Possible address families for IP addresses.
|
||||
{
|
||||
IPv4 = Poco::Net::Impl::IPAddressImpl::IPv4
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
,IPv6 = Poco::Net::Impl::IPAddressImpl::IPv6
|
||||
|
||||
// The following declarations keep the Family type
|
||||
// backwards compatible with the previously used
|
||||
// enum declaration.
|
||||
typedef AddressFamily::Family Family;
|
||||
static const Family IPv4 = AddressFamily::IPv4;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
static const Family IPv6 = AddressFamily::IPv6;
|
||||
#endif
|
||||
};
|
||||
|
||||
IPAddress();
|
||||
/// Creates a wildcard (zero) IPv4 IPAddress.
|
||||
@ -374,21 +374,15 @@ private:
|
||||
#endif
|
||||
|
||||
Ptr pImpl() const;
|
||||
|
||||
void newIPv4(const void* hostAddr);
|
||||
|
||||
void newIPv6(const void* hostAddr);
|
||||
|
||||
void newIPv6(const void* hostAddr, Poco::UInt32 scope);
|
||||
|
||||
void newIPv4(unsigned prefix);
|
||||
|
||||
void newIPv6(unsigned prefix);
|
||||
|
||||
void newIPv4();
|
||||
|
||||
void newIPv4(const void* hostAddr);
|
||||
void newIPv4(unsigned prefix);
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
void newIPv6();
|
||||
|
||||
void newIPv6(const void* hostAddr);
|
||||
void newIPv6(const void* hostAddr, Poco::UInt32 scope);
|
||||
void newIPv6(unsigned prefix);
|
||||
#endif
|
||||
void destruct();
|
||||
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
@ -405,7 +399,11 @@ private:
|
||||
AlignerType aligner;
|
||||
}
|
||||
#else // !POCO_ENABLE_CPP11
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6AddressImpl>
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6AddressImpl>
|
||||
#else
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv4AddressImpl>
|
||||
#endif
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
_memory;
|
||||
#else // !POCO_HAVE_ALIGNMENT
|
||||
@ -438,6 +436,16 @@ inline IPAddress::Ptr IPAddress::pImpl() const
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv4()
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl;
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv4(const void* hostAddr)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
@ -448,6 +456,29 @@ inline void IPAddress::newIPv4(const void* hostAddr)
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv4(unsigned prefix)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl(prefix);
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl(prefix);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
|
||||
|
||||
inline void IPAddress::newIPv6()
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl;
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv6(const void* hostAddr)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
@ -468,16 +499,6 @@ inline void IPAddress::newIPv6(const void* hostAddr, Poco::UInt32 scope)
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv4(unsigned prefix)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl(prefix);
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl(prefix);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv6(unsigned prefix)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
@ -488,24 +509,7 @@ inline void IPAddress::newIPv6(unsigned prefix)
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv4()
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl;
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline void IPAddress::newIPv6()
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl;
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl;
|
||||
#endif
|
||||
}
|
||||
#endif // POCO_HAVE_IPv6
|
||||
|
||||
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
|
@ -39,14 +39,7 @@ class IPAddressImpl
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
enum Family
|
||||
/// Possible address families for IP addresses.
|
||||
{
|
||||
IPv4
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
,IPv6
|
||||
#endif
|
||||
};
|
||||
typedef AddressFamily::Family Family;
|
||||
|
||||
virtual ~IPAddressImpl();
|
||||
|
||||
@ -131,6 +124,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
|
||||
|
||||
//
|
||||
// IPv6AddressImpl
|
||||
//
|
||||
@ -181,6 +177,9 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // POCO_HAVE_IPv6
|
||||
|
||||
|
||||
} } } // namespace Poco::Net::Impl
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
MulticastSocket();
|
||||
/// Creates the MulticastSocket.
|
||||
|
||||
explicit MulticastSocket(IPAddress::Family family);
|
||||
explicit MulticastSocket(SocketAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -36,7 +36,7 @@ class Net_API NTPClient
|
||||
public:
|
||||
mutable Poco::BasicEvent<NTPEventArgs> response;
|
||||
|
||||
explicit NTPClient(IPAddress::Family family, int timeout = 3000000);
|
||||
explicit NTPClient(SocketAddress::Family family, int timeout = 3000000);
|
||||
/// Creates an NTP client.
|
||||
|
||||
~NTPClient();
|
||||
@ -55,7 +55,7 @@ public:
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
private:
|
||||
mutable IPAddress::Family _family;
|
||||
mutable SocketAddress::Family _family;
|
||||
int _timeout;
|
||||
};
|
||||
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
RawSocket();
|
||||
/// Creates an unconnected IPv4 raw socket.
|
||||
|
||||
RawSocket(IPAddress::Family family, int proto = IPPROTO_RAW);
|
||||
RawSocket(SocketAddress::Family family, int proto = IPPROTO_RAW);
|
||||
/// Creates an unconnected raw socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
RawSocketImpl();
|
||||
/// Creates an unconnected IPv4 raw socket with IPPROTO_RAW.
|
||||
|
||||
RawSocketImpl(IPAddress::Family family, int proto = IPPROTO_RAW);
|
||||
RawSocketImpl(SocketAddress::Family family, int proto = IPPROTO_RAW);
|
||||
/// Creates an unconnected raw socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
|
@ -43,6 +43,18 @@ class Net_API SocketAddress
|
||||
/// host address and a port number.
|
||||
{
|
||||
public:
|
||||
// The following declarations keep the Family type
|
||||
// backwards compatible with the previously used
|
||||
// enum declaration.
|
||||
typedef AddressFamily::Family Family;
|
||||
static const Family IPv4 = AddressFamily::IPv4;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
static const Family IPv6 = AddressFamily::IPv6;
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
static const Family UNIX_LOCAL = AddressFamily::UNIX_LOCAL;
|
||||
#endif
|
||||
|
||||
SocketAddress();
|
||||
/// Creates a wildcard (all zero) IPv4 SocketAddress.
|
||||
|
||||
@ -80,6 +92,13 @@ public:
|
||||
/// [::ffff:192.168.1.120]:2040
|
||||
/// www.appinf.com:8080
|
||||
|
||||
SocketAddress(Family family, const std::string& addr);
|
||||
/// Creates a SocketAddress of the given family from a
|
||||
/// string representation of the address, which is
|
||||
/// either an IP address and port number, separated by
|
||||
/// a colon for IPv4 or IPv6 addresses, or a path for
|
||||
/// UNIX_LOCAL sockets.
|
||||
|
||||
SocketAddress(const SocketAddress& addr);
|
||||
/// Creates a SocketAddress by copying another one.
|
||||
|
||||
@ -110,7 +129,7 @@ public:
|
||||
std::string toString() const;
|
||||
/// Returns a string representation of the address.
|
||||
|
||||
IPAddress::Family family() const;
|
||||
Family family() const;
|
||||
/// Returns the address family of the host's address.
|
||||
|
||||
bool operator < (const SocketAddress& socketAddress) const;
|
||||
@ -120,7 +139,9 @@ public:
|
||||
enum
|
||||
{
|
||||
MAX_ADDRESS_LENGTH =
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
sizeof(struct sockaddr_un)
|
||||
#elif defined(POCO_HAVE_IPv6)
|
||||
sizeof(struct sockaddr_in6)
|
||||
#else
|
||||
sizeof(struct sockaddr_in)
|
||||
@ -131,6 +152,8 @@ public:
|
||||
protected:
|
||||
void init(const IPAddress& hostAddress, Poco::UInt16 portNumber);
|
||||
void init(const std::string& hostAddress, Poco::UInt16 portNumber);
|
||||
void init(Family family, const std::string& address);
|
||||
void init(const std::string& hostAndPort);
|
||||
Poco::UInt16 resolveService(const std::string& service);
|
||||
|
||||
private:
|
||||
@ -144,14 +167,18 @@ private:
|
||||
Ptr pImpl() const;
|
||||
|
||||
void newIPv4();
|
||||
|
||||
void newIPv4(const sockaddr_in*);
|
||||
|
||||
void newIPv4(const IPAddress& hostAddress, Poco::UInt16 portNumber);
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
void newIPv6(const sockaddr_in6*);
|
||||
|
||||
void newIPv6(const IPAddress& hostAddress, Poco::UInt16 portNumber);
|
||||
#endif
|
||||
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
void newLocal(const sockaddr_un* sockAddr);
|
||||
void newLocal(const std::string& path);
|
||||
#endif
|
||||
|
||||
void destruct();
|
||||
|
||||
@ -168,7 +195,11 @@ private:
|
||||
AlignerType aligner;
|
||||
}
|
||||
#else // !POCO_ENABLE_CPP11
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6SocketAddressImpl>
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6SocketAddressImpl>
|
||||
#else
|
||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv4SocketAddressImpl>
|
||||
#endif
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
_memory;
|
||||
#else // !POCO_HAVE_ALIGNMENT
|
||||
@ -231,7 +262,7 @@ inline void SocketAddress::newIPv4(const IPAddress& hostAddress, Poco::UInt16 po
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
inline void SocketAddress::newIPv6(const sockaddr_in6* sockAddr)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
@ -240,7 +271,7 @@ inline void SocketAddress::newIPv6(const sockaddr_in6* sockAddr)
|
||||
_pImpl = new Poco::Net::Impl::IPv6SocketAddressImpl(sockAddr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
inline void SocketAddress::newIPv6(const IPAddress& hostAddress, Poco::UInt16 portNumber)
|
||||
{
|
||||
@ -250,14 +281,31 @@ inline void SocketAddress::newIPv6(const IPAddress& hostAddress, Poco::UInt16 po
|
||||
_pImpl = new Poco::Net::Impl::IPv6SocketAddressImpl(hostAddress.addr(), htons(portNumber), hostAddress.scope());
|
||||
#endif
|
||||
}
|
||||
#endif // POCO_HAVE_IPv6
|
||||
|
||||
|
||||
inline IPAddress::Family SocketAddress::family() const
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
inline void SocketAddress::newLocal(const sockaddr_un* sockAddr)
|
||||
{
|
||||
return host().family();
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::LocalSocketAddressImpl(sockAddr);
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::LocalSocketAddressImpl(sockAddr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
inline void SocketAddress::newLocal(const std::string& path)
|
||||
{
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
new (storage()) Poco::Net::Impl::LocalSocketAddressImpl(path.c_str());
|
||||
#else
|
||||
_pImpl = new Poco::Net::Impl::LocalSocketAddressImpl(path.c_str());
|
||||
#endif
|
||||
}
|
||||
#endif // POCO_OS_FAMILY_UNIX
|
||||
|
||||
|
||||
#ifdef POCO_HAVE_ALIGNMENT
|
||||
inline char* SocketAddress::storage()
|
||||
{
|
||||
@ -266,15 +314,20 @@ inline char* SocketAddress::storage()
|
||||
#endif
|
||||
|
||||
|
||||
inline bool SocketAddress::operator == (const SocketAddress& socketAddress) const
|
||||
inline bool SocketAddress::operator == (const SocketAddress& socketAddress) const
|
||||
{
|
||||
return host() == socketAddress.host() && port() == socketAddress.port();
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (family() == UNIX_LOCAL)
|
||||
return toString() == socketAddress.toString();
|
||||
else
|
||||
#endif
|
||||
return host() == socketAddress.host() && port() == socketAddress.port();
|
||||
}
|
||||
|
||||
|
||||
inline bool SocketAddress::operator != (const SocketAddress& socketAddress) const
|
||||
{
|
||||
return host() != socketAddress.host() || port() != socketAddress.port();
|
||||
return !(operator == (socketAddress));
|
||||
}
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "Poco/RefCountedObject.h"
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
namespace Impl {
|
||||
@ -38,6 +39,8 @@ class Net_API SocketAddressImpl
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
typedef AddressFamily::Family Family;
|
||||
|
||||
virtual ~SocketAddressImpl();
|
||||
|
||||
virtual IPAddress host() const = 0;
|
||||
@ -45,6 +48,8 @@ public:
|
||||
virtual poco_socklen_t length() const = 0;
|
||||
virtual const struct sockaddr* addr() const = 0;
|
||||
virtual int af() const = 0;
|
||||
virtual Family family() const = 0;
|
||||
virtual std::string toString() const = 0;
|
||||
|
||||
protected:
|
||||
SocketAddressImpl();
|
||||
@ -59,20 +64,15 @@ class Net_API IPv4SocketAddressImpl: public SocketAddressImpl
|
||||
{
|
||||
public:
|
||||
IPv4SocketAddressImpl();
|
||||
|
||||
IPv4SocketAddressImpl(const struct sockaddr_in* addr);
|
||||
|
||||
IPv4SocketAddressImpl(const void* addr, UInt16 port);
|
||||
|
||||
IPAddress host() const;
|
||||
|
||||
UInt16 port() const;
|
||||
|
||||
poco_socklen_t length() const;
|
||||
|
||||
const struct sockaddr* addr() const;
|
||||
|
||||
int af() const;
|
||||
Family family() const;
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
struct sockaddr_in _addr;
|
||||
@ -113,6 +113,12 @@ inline int IPv4SocketAddressImpl::af() const
|
||||
}
|
||||
|
||||
|
||||
inline SocketAddressImpl::Family IPv4SocketAddressImpl::family() const
|
||||
{
|
||||
return AddressFamily::IPv4;
|
||||
}
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
|
||||
|
||||
@ -120,20 +126,15 @@ class Net_API IPv6SocketAddressImpl: public SocketAddressImpl
|
||||
{
|
||||
public:
|
||||
IPv6SocketAddressImpl(const struct sockaddr_in6* addr);
|
||||
|
||||
IPv6SocketAddressImpl(const void* addr, UInt16 port);
|
||||
|
||||
IPv6SocketAddressImpl(const void* addr, UInt16 port, UInt32 scope);
|
||||
|
||||
IPAddress host() const;
|
||||
|
||||
UInt16 port() const;
|
||||
|
||||
poco_socklen_t length() const;
|
||||
|
||||
const struct sockaddr* addr() const;
|
||||
|
||||
int af() const;
|
||||
int af() const;
|
||||
Family family() const;
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
struct sockaddr_in6 _addr;
|
||||
@ -174,7 +175,87 @@ inline int IPv6SocketAddressImpl::af() const
|
||||
}
|
||||
|
||||
|
||||
#endif //POCO_HAVE_IPv6
|
||||
inline SocketAddressImpl::Family IPv6SocketAddressImpl::family() const
|
||||
{
|
||||
return AddressFamily::IPv6;
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_HAVE_IPv6
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
|
||||
|
||||
class Net_API LocalSocketAddressImpl: public SocketAddressImpl
|
||||
{
|
||||
public:
|
||||
LocalSocketAddressImpl(const struct sockaddr_un* addr);
|
||||
LocalSocketAddressImpl(const char* path);
|
||||
~LocalSocketAddressImpl();
|
||||
IPAddress host() const;
|
||||
UInt16 port() const;
|
||||
poco_socklen_t length() const;
|
||||
const struct sockaddr* addr() const;
|
||||
int af() const;
|
||||
Family family() const;
|
||||
const char* path() const;
|
||||
std::string toString() const;
|
||||
|
||||
private:
|
||||
struct sockaddr_un* _pAddr;
|
||||
// Note: We allocate struct sockaddr_un on the heap, otherwise we would
|
||||
// waste a lot of memory due to small object optimization in SocketAddress.
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
|
||||
inline IPAddress LocalSocketAddressImpl::host() const
|
||||
{
|
||||
throw Poco::InvalidAccessException("local socket address does not have host IP address");
|
||||
}
|
||||
|
||||
|
||||
inline UInt16 LocalSocketAddressImpl::port() const
|
||||
{
|
||||
throw Poco::InvalidAccessException("local socket address does not have port number");
|
||||
}
|
||||
|
||||
|
||||
inline poco_socklen_t LocalSocketAddressImpl::length() const
|
||||
{
|
||||
return sizeof(struct sockaddr_un);
|
||||
}
|
||||
|
||||
|
||||
inline const struct sockaddr* LocalSocketAddressImpl::addr() const
|
||||
{
|
||||
return reinterpret_cast<const struct sockaddr*>(_pAddr);
|
||||
}
|
||||
|
||||
|
||||
inline int LocalSocketAddressImpl::af() const
|
||||
{
|
||||
return _pAddr->sun_family;
|
||||
}
|
||||
|
||||
|
||||
inline SocketAddressImpl::Family LocalSocketAddressImpl::family() const
|
||||
{
|
||||
return AddressFamily::UNIX_LOCAL;
|
||||
}
|
||||
|
||||
|
||||
inline const char* LocalSocketAddressImpl::path() const
|
||||
{
|
||||
return _pAddr->sun_path;
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_OS_FAMILY_UNIX
|
||||
|
||||
|
||||
} } } // namespace Poco::Net::Impl
|
||||
|
@ -134,6 +134,7 @@
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#if POCO_OS != POCO_OS_HPUX
|
||||
#include <sys/select.h>
|
||||
@ -271,15 +272,19 @@
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_SALEN)
|
||||
#define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len)
|
||||
#define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct sockaddr_in)
|
||||
#define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len)
|
||||
#define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct sockaddr_in)
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
#define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(struct sockaddr_in6)
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
#define poco_set_sun_len(pSA, len) (pSA)->sun_len = (len)
|
||||
#endif
|
||||
#else
|
||||
#define poco_set_sa_len(pSA, len) (void) 0
|
||||
#define poco_set_sin_len(pSA) (void) 0
|
||||
#define poco_set_sin6_len(pSA) (void) 0
|
||||
#define poco_set_sa_len(pSA, len) (void) 0
|
||||
#define poco_set_sin_len(pSA) (void) 0
|
||||
#define poco_set_sin6_len(pSA) (void) 0
|
||||
#define poco_set_sun_len(pSA, len) (void) 0
|
||||
#endif
|
||||
|
||||
|
||||
@ -348,4 +353,32 @@
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
struct AddressFamily
|
||||
/// AddressFamily::Family replaces the previously used IPAddress::Family
|
||||
/// enumeration and is now used for IPAddress::Family and SocketAddress::Family.
|
||||
{
|
||||
enum Family
|
||||
/// Possible address families for socket addresses.
|
||||
{
|
||||
IPv4,
|
||||
/// IPv4 address family.
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
IPv6,
|
||||
/// IPv6 address family.
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
UNIX_LOCAL
|
||||
/// UNIX domain socket address family. Available on UNIX/POSIX platforms only.
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_SocketDefs_INCLUDED
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/// Creates a stream socket and connects it to
|
||||
/// the socket specified by address.
|
||||
|
||||
explicit StreamSocket(IPAddress::Family family);
|
||||
explicit StreamSocket(SocketAddress::Family family);
|
||||
/// Creates an unconnected stream socket
|
||||
/// for the given address family.
|
||||
///
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
StreamSocketImpl();
|
||||
/// Creates a StreamSocketImpl.
|
||||
|
||||
explicit StreamSocketImpl(IPAddress::Family addressFamily);
|
||||
explicit StreamSocketImpl(SocketAddress::Family addressFamily);
|
||||
/// Creates a SocketImpl, with the underlying
|
||||
/// socket initialized for the given address family.
|
||||
|
||||
|
@ -31,7 +31,7 @@ DatagramSocket::DatagramSocket(): Socket(new DatagramSocketImpl)
|
||||
}
|
||||
|
||||
|
||||
DatagramSocket::DatagramSocket(IPAddress::Family family): Socket(new DatagramSocketImpl(family))
|
||||
DatagramSocket::DatagramSocket(SocketAddress::Family family): Socket(new DatagramSocketImpl(family))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -31,13 +31,17 @@ DatagramSocketImpl::DatagramSocketImpl()
|
||||
}
|
||||
|
||||
|
||||
DatagramSocketImpl::DatagramSocketImpl(IPAddress::Family family)
|
||||
DatagramSocketImpl::DatagramSocketImpl(SocketAddress::Family family)
|
||||
{
|
||||
if (family == IPAddress::IPv4)
|
||||
if (family == SocketAddress::IPv4)
|
||||
init(AF_INET);
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (family == IPAddress::IPv6)
|
||||
else if (family == SocketAddress::IPv6)
|
||||
init(AF_INET6);
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
else if (family == SocketAddress::UNIX_LOCAL)
|
||||
init(AF_UNIX);
|
||||
#endif
|
||||
else throw InvalidArgumentException("Invalid or unsupported address family passed to DatagramSocketImpl");
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
_pResponseStream = 0;
|
||||
|
||||
bool keepAlive = getKeepAlive();
|
||||
if ((connected() && !keepAlive) || mustReconnect())
|
||||
if (((connected() && !keepAlive) || mustReconnect()) && !_host.empty())
|
||||
{
|
||||
close();
|
||||
_mustReconnect = false;
|
||||
@ -205,7 +205,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
reconnect();
|
||||
if (!keepAlive)
|
||||
request.setKeepAlive(false);
|
||||
if (!request.has(HTTPRequest::HOST))
|
||||
if (!request.has(HTTPRequest::HOST) && !_host.empty())
|
||||
request.setHost(_host, _port);
|
||||
if (!_proxyConfig.host.empty() && !bypassProxy())
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
ICMPClient::ICMPClient(IPAddress::Family family):
|
||||
ICMPClient::ICMPClient(SocketAddress::Family family):
|
||||
_family(family)
|
||||
{
|
||||
}
|
||||
|
@ -35,13 +35,21 @@ using Poco::UInt16;
|
||||
using Poco::UInt32;
|
||||
using Poco::Net::Impl::IPAddressImpl;
|
||||
using Poco::Net::Impl::IPv4AddressImpl;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
using Poco::Net::Impl::IPv6AddressImpl;
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
const IPAddress::Family IPAddress::IPv4;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
const IPAddress::Family IPAddress::IPv6;
|
||||
#endif
|
||||
|
||||
|
||||
IPAddress::IPAddress()
|
||||
{
|
||||
newIPv4();
|
||||
@ -52,8 +60,10 @@ IPAddress::IPAddress(const IPAddress& addr)
|
||||
{
|
||||
if (addr.family() == IPv4)
|
||||
newIPv4(addr.addr());
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else
|
||||
newIPv6(addr.addr(), addr.scope());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -65,8 +75,7 @@ IPAddress::IPAddress(Family family)
|
||||
else if (family == IPv6)
|
||||
newIPv6();
|
||||
#endif
|
||||
else
|
||||
throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
|
||||
else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
|
||||
}
|
||||
|
||||
|
||||
@ -221,8 +230,12 @@ IPAddress& IPAddress::operator = (const IPAddress& addr)
|
||||
destruct();
|
||||
if (addr.family() == IPAddress::IPv4)
|
||||
newIPv4(addr.addr());
|
||||
else
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (addr.family() == IPAddress::IPv6)
|
||||
newIPv6(addr.addr(), addr.scope());
|
||||
#endif
|
||||
else
|
||||
throw Poco::InvalidArgumentException("Invalid or unsupported address family");
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@ -230,7 +243,7 @@ IPAddress& IPAddress::operator = (const IPAddress& addr)
|
||||
|
||||
IPAddress::Family IPAddress::family() const
|
||||
{
|
||||
return static_cast<IPAddress::Family>(pImpl()->family());
|
||||
return pImpl()->family();
|
||||
}
|
||||
|
||||
|
||||
|
@ -145,7 +145,7 @@ const void* IPv4AddressImpl::addr() const
|
||||
|
||||
IPAddressImpl::Family IPv4AddressImpl::family() const
|
||||
{
|
||||
return IPAddressImpl::IPv4;
|
||||
return AddressFamily::IPv4;
|
||||
}
|
||||
|
||||
|
||||
@ -499,7 +499,7 @@ const void* IPv6AddressImpl::addr() const
|
||||
|
||||
IPAddressImpl::Family IPv6AddressImpl::family() const
|
||||
{
|
||||
return IPAddressImpl::IPv6;
|
||||
return AddressFamily::IPv6;
|
||||
}
|
||||
|
||||
|
||||
@ -534,6 +534,8 @@ unsigned IPv6AddressImpl::prefixLength() const
|
||||
throw NotImplementedException("prefixLength() not implemented");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt32 IPv6AddressImpl::scope() const
|
||||
{
|
||||
return _scope;
|
||||
|
@ -53,8 +53,12 @@ MulticastSocket::MulticastSocket()
|
||||
}
|
||||
|
||||
|
||||
MulticastSocket::MulticastSocket(IPAddress::Family family): DatagramSocket(family)
|
||||
MulticastSocket::MulticastSocket(SocketAddress::Family family): DatagramSocket(family)
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (family == SocketAddress::UNIX_LOCAL)
|
||||
throw Poco::InvalidArgumentException("Cannot create a MulticastSocket with UNIX_LOCAL socket");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -82,18 +86,17 @@ MulticastSocket& MulticastSocket::operator = (const Socket& socket)
|
||||
|
||||
void MulticastSocket::setInterface(const NetworkInterface& interfc)
|
||||
{
|
||||
if (address().family() == IPAddress::IPv4)
|
||||
if (address().family() == SocketAddress::IPv4)
|
||||
{
|
||||
impl()->setOption(IPPROTO_IP, IP_MULTICAST_IF, interfc.firstAddress(IPAddress::IPv4));
|
||||
}
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (address().family() == IPAddress::IPv6)
|
||||
else if (address().family() == SocketAddress::IPv6)
|
||||
{
|
||||
impl()->setOption(IPPROTO_IPV6, IPV6_MULTICAST_IF, interfc.index());
|
||||
}
|
||||
#endif
|
||||
else
|
||||
throw UnsupportedFamilyException("Unknown or unsupported socket family.");
|
||||
else throw UnsupportedFamilyException("Unknown or unsupported socket family.");
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ RawSocket::RawSocket():
|
||||
}
|
||||
|
||||
|
||||
RawSocket::RawSocket(IPAddress::Family family, int proto):
|
||||
RawSocket::RawSocket(SocketAddress::Family family, int proto):
|
||||
Socket(new RawSocketImpl(family, proto))
|
||||
{
|
||||
}
|
||||
|
@ -31,12 +31,12 @@ RawSocketImpl::RawSocketImpl()
|
||||
}
|
||||
|
||||
|
||||
RawSocketImpl::RawSocketImpl(IPAddress::Family family, int proto)
|
||||
RawSocketImpl::RawSocketImpl(SocketAddress::Family family, int proto)
|
||||
{
|
||||
if (family == IPAddress::IPv4)
|
||||
if (family == SocketAddress::IPv4)
|
||||
init2(AF_INET, proto);
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (family == IPAddress::IPv6)
|
||||
else if (family == SocketAddress::IPv6)
|
||||
init2(AF_INET6, proto);
|
||||
#endif
|
||||
else throw InvalidArgumentException("Invalid or unsupported address family passed to RawSocketImpl");
|
||||
|
@ -96,9 +96,13 @@ void ServerSocket::bind6(const SocketAddress& address, bool reuseAddress, bool i
|
||||
|
||||
void ServerSocket::bind6(Poco::UInt16 port, bool reuseAddress, bool ipV6Only)
|
||||
{
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
IPAddress wildcardAddr(IPAddress::IPv6);
|
||||
SocketAddress address(wildcardAddr, port);
|
||||
impl()->bind6(address, reuseAddress, ipV6Only);
|
||||
#else
|
||||
throw Poco::NotImplementedException("No IPv6 support available");
|
||||
#endif // POCO_HAVE_IPv6
|
||||
}
|
||||
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "Poco/Net/DNS.h"
|
||||
#include "Poco/RefCountedObject.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include "Poco/BinaryReader.h"
|
||||
#include "Poco/BinaryWriter.h"
|
||||
#include <algorithm>
|
||||
@ -29,12 +28,16 @@
|
||||
|
||||
using Poco::RefCountedObject;
|
||||
using Poco::NumberParser;
|
||||
using Poco::NumberFormatter;
|
||||
using Poco::UInt16;
|
||||
using Poco::InvalidArgumentException;
|
||||
using Poco::Net::Impl::SocketAddressImpl;
|
||||
using Poco::Net::Impl::IPv4SocketAddressImpl;
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
using Poco::Net::Impl::IPv6SocketAddressImpl;
|
||||
#endif
|
||||
#ifdef POCO_OS_FAMILY_UNIX
|
||||
using Poco::Net::Impl::LocalSocketAddressImpl;
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -55,6 +58,15 @@ struct AFLT
|
||||
//
|
||||
|
||||
|
||||
const SocketAddress::Family SocketAddress::IPv4;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
const SocketAddress::Family SocketAddress::IPv6;
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
const SocketAddress::Family SocketAddress::UNIX_LOCAL;
|
||||
#endif
|
||||
|
||||
|
||||
SocketAddress::SocketAddress()
|
||||
{
|
||||
newIPv4();
|
||||
@ -85,53 +97,46 @@ SocketAddress::SocketAddress(const std::string& hostAddress, const std::string&
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(Family family, const std::string& addr)
|
||||
{
|
||||
init(family, addr);
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(const std::string& hostAndPort)
|
||||
{
|
||||
poco_assert (!hostAndPort.empty());
|
||||
|
||||
std::string host;
|
||||
std::string port;
|
||||
std::string::const_iterator it = hostAndPort.begin();
|
||||
std::string::const_iterator end = hostAndPort.end();
|
||||
if (*it == '[')
|
||||
{
|
||||
++it;
|
||||
while (it != end && *it != ']') host += *it++;
|
||||
if (it == end) throw InvalidArgumentException("Malformed IPv6 address");
|
||||
++it;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (it != end && *it != ':') host += *it++;
|
||||
}
|
||||
if (it != end && *it == ':')
|
||||
{
|
||||
++it;
|
||||
while (it != end) port += *it++;
|
||||
}
|
||||
else throw InvalidArgumentException("Missing port number");
|
||||
init(host, resolveService(port));
|
||||
init(hostAndPort);
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(const SocketAddress& socketAddress)
|
||||
{
|
||||
if (socketAddress.family() == IPAddress::IPv4)
|
||||
if (socketAddress.family() == IPv4)
|
||||
newIPv4(reinterpret_cast<const sockaddr_in*>(socketAddress.addr()));
|
||||
else
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (socketAddress.family() == IPv6)
|
||||
newIPv6(reinterpret_cast<const sockaddr_in6*>(socketAddress.addr()));
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
else if (socketAddress.family() == UNIX_LOCAL)
|
||||
newLocal(reinterpret_cast<const sockaddr_un*>(socketAddress.addr()));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::SocketAddress(const struct sockaddr* sockAddr, poco_socklen_t length)
|
||||
{
|
||||
if (length == sizeof(struct sockaddr_in))
|
||||
if (length == sizeof(struct sockaddr_in) && sockAddr->sa_family == AF_INET)
|
||||
newIPv4(reinterpret_cast<const struct sockaddr_in*>(sockAddr));
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (length == sizeof(struct sockaddr_in6))
|
||||
else if (length == sizeof(struct sockaddr_in6) && sockAddr->sa_family == AF_INET6)
|
||||
newIPv6(reinterpret_cast<const struct sockaddr_in6*>(sockAddr));
|
||||
#endif
|
||||
else throw Poco::InvalidArgumentException("Invalid address length passed to SocketAddress()");
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
else if (length > 0 && length <= sizeof(struct sockaddr_un) && sockAddr->sa_family == AF_UNIX)
|
||||
newLocal(reinterpret_cast<const sockaddr_un*>(sockAddr));
|
||||
#endif
|
||||
else throw Poco::InvalidArgumentException("Invalid address length or family passed to SocketAddress()");
|
||||
}
|
||||
|
||||
|
||||
@ -145,6 +150,9 @@ bool SocketAddress::operator < (const SocketAddress& socketAddress) const
|
||||
{
|
||||
if (family() < socketAddress.family()) return true;
|
||||
if (family() > socketAddress.family()) return false;
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (family() == UNIX_LOCAL) return toString() < socketAddress.toString();
|
||||
#endif
|
||||
if (host() < socketAddress.host()) return true;
|
||||
if (host() > socketAddress.host()) return false;
|
||||
return (port() < socketAddress.port());
|
||||
@ -156,10 +164,16 @@ SocketAddress& SocketAddress::operator = (const SocketAddress& socketAddress)
|
||||
if (&socketAddress != this)
|
||||
{
|
||||
destruct();
|
||||
if (socketAddress.family() == IPAddress::IPv4)
|
||||
if (socketAddress.family() == IPv4)
|
||||
newIPv4(reinterpret_cast<const sockaddr_in*>(socketAddress.addr()));
|
||||
else
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (socketAddress.family() == IPv6)
|
||||
newIPv6(reinterpret_cast<const sockaddr_in6*>(socketAddress.addr()));
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
else if (socketAddress.family() == UNIX_LOCAL)
|
||||
newLocal(reinterpret_cast<const sockaddr_un*>(socketAddress.addr()));
|
||||
#endif
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@ -195,19 +209,15 @@ int SocketAddress::af() const
|
||||
}
|
||||
|
||||
|
||||
SocketAddress::Family SocketAddress::family() const
|
||||
{
|
||||
return static_cast<Family>(pImpl()->family());
|
||||
}
|
||||
|
||||
|
||||
std::string SocketAddress::toString() const
|
||||
{
|
||||
std::string result;
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
if (host().family() == IPAddress::IPv6)
|
||||
result.append("[");
|
||||
result.append(host().toString());
|
||||
if (host().family() == IPAddress::IPv6)
|
||||
result.append("]");
|
||||
#endif
|
||||
result.append(":");
|
||||
NumberFormatter::append(result, port());
|
||||
return result;
|
||||
return pImpl()->toString();
|
||||
}
|
||||
|
||||
|
||||
@ -247,6 +257,51 @@ void SocketAddress::init(const std::string& hostAddress, Poco::UInt16 portNumber
|
||||
}
|
||||
|
||||
|
||||
void SocketAddress::init(Family fam, const std::string& address)
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (fam == UNIX_LOCAL)
|
||||
{
|
||||
newLocal(address);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
init(address);
|
||||
if (fam != family()) throw Poco::InvalidArgumentException("address does not fit family");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SocketAddress::init(const std::string& hostAndPort)
|
||||
{
|
||||
poco_assert (!hostAndPort.empty());
|
||||
|
||||
std::string host;
|
||||
std::string port;
|
||||
std::string::const_iterator it = hostAndPort.begin();
|
||||
std::string::const_iterator end = hostAndPort.end();
|
||||
if (*it == '[')
|
||||
{
|
||||
++it;
|
||||
while (it != end && *it != ']') host += *it++;
|
||||
if (it == end) throw InvalidArgumentException("Malformed IPv6 address");
|
||||
++it;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (it != end && *it != ':') host += *it++;
|
||||
}
|
||||
if (it != end && *it == ':')
|
||||
{
|
||||
++it;
|
||||
while (it != end) port += *it++;
|
||||
}
|
||||
else throw InvalidArgumentException("Missing port number");
|
||||
init(host, resolveService(port));
|
||||
}
|
||||
|
||||
|
||||
Poco::UInt16 SocketAddress::resolveService(const std::string& service)
|
||||
{
|
||||
unsigned port;
|
||||
@ -291,7 +346,7 @@ Poco::BinaryReader& operator >> (Poco::BinaryReader& reader, Poco::Net::SocketAd
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream& operator << (std::ostream& ostr, const Poco::Net::SocketAddress& address)
|
||||
std::ostream& operator << (std::ostream& ostr, const Poco::Net::SocketAddress& address)
|
||||
{
|
||||
ostr << address.toString();
|
||||
return ostr;
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "Poco/Net/SocketAddressImpl.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@ -23,6 +24,7 @@ namespace Poco {
|
||||
namespace Net {
|
||||
namespace Impl {
|
||||
|
||||
|
||||
//
|
||||
// SocketAddressImpl
|
||||
//
|
||||
@ -61,11 +63,22 @@ IPv4SocketAddressImpl::IPv4SocketAddressImpl(const void* addr, UInt16 port)
|
||||
{
|
||||
std::memset(&_addr, 0, sizeof(_addr));
|
||||
_addr.sin_family = AF_INET;
|
||||
poco_set_sin_len(&_addr);
|
||||
std::memcpy(&_addr.sin_addr, addr, sizeof(_addr.sin_addr));
|
||||
_addr.sin_port = port;
|
||||
}
|
||||
|
||||
|
||||
std::string IPv4SocketAddressImpl::toString() const
|
||||
{
|
||||
std::string result;
|
||||
result.append(host().toString());
|
||||
result.append(":");
|
||||
NumberFormatter::append(result, ntohs(port()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
|
||||
|
||||
@ -101,7 +114,59 @@ IPv6SocketAddressImpl::IPv6SocketAddressImpl(const void* addr, UInt16 port, UInt
|
||||
}
|
||||
|
||||
|
||||
std::string IPv6SocketAddressImpl::toString() const
|
||||
{
|
||||
std::string result;
|
||||
result.append("[");
|
||||
result.append(host().toString());
|
||||
result.append("]");
|
||||
result.append(":");
|
||||
NumberFormatter::append(result, ntohs(port()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_HAVE_IPv6
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
|
||||
|
||||
//
|
||||
// LocalSocketAddressImpl
|
||||
//
|
||||
|
||||
|
||||
LocalSocketAddressImpl::LocalSocketAddressImpl(const struct sockaddr_un* addr)
|
||||
{
|
||||
_pAddr = new sockaddr_un;
|
||||
std::memcpy(_pAddr, addr, sizeof(struct sockaddr_un));
|
||||
}
|
||||
|
||||
|
||||
LocalSocketAddressImpl::LocalSocketAddressImpl(const char* path)
|
||||
{
|
||||
_pAddr = new sockaddr_un;
|
||||
poco_set_sun_len(_pAddr, std::strlen(path) + sizeof(struct sockaddr_un) - sizeof(_pAddr->sun_path) + 1);
|
||||
_pAddr->sun_family = AF_UNIX;
|
||||
std::strcpy(_pAddr->sun_path, path);
|
||||
}
|
||||
|
||||
|
||||
LocalSocketAddressImpl::~LocalSocketAddressImpl()
|
||||
{
|
||||
delete _pAddr;
|
||||
}
|
||||
|
||||
|
||||
std::string LocalSocketAddressImpl::toString() const
|
||||
{
|
||||
std::string result(path());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#endif // POCO_OS_FAMILY_UNIX
|
||||
|
||||
|
||||
} } } // namespace Poco::Net::Impl
|
||||
|
@ -212,7 +212,7 @@ void SocketImpl::bind(const SocketAddress& address, bool reuseAddress)
|
||||
void SocketImpl::bind6(const SocketAddress& address, bool reuseAddress, bool ipV6Only)
|
||||
{
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
if (address.family() != IPAddress::IPv6)
|
||||
if (address.family() != SocketAddress::IPv6)
|
||||
throw Poco::InvalidArgumentException("SocketAddress must be an IPv6 address");
|
||||
|
||||
if (_sockfd == POCO_INVALID_SOCKET)
|
||||
@ -1092,6 +1092,8 @@ void SocketImpl::error(int code, const std::string& arg)
|
||||
throw IOException("Broken pipe", code);
|
||||
case EBADF:
|
||||
throw IOException("Bad socket descriptor", code);
|
||||
case ENOENT:
|
||||
throw IOException("Not found", arg, code);
|
||||
#endif
|
||||
default:
|
||||
throw IOException(NumberFormatter::format(code), arg, code);
|
||||
|
@ -41,7 +41,7 @@ StreamSocket::StreamSocket(const SocketAddress& address): Socket(new StreamSocke
|
||||
}
|
||||
|
||||
|
||||
StreamSocket::StreamSocket(IPAddress::Family family): Socket(new StreamSocketImpl(family))
|
||||
StreamSocket::StreamSocket(SocketAddress::Family family): Socket(new StreamSocketImpl(family))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -28,13 +28,17 @@ StreamSocketImpl::StreamSocketImpl()
|
||||
}
|
||||
|
||||
|
||||
StreamSocketImpl::StreamSocketImpl(IPAddress::Family family)
|
||||
StreamSocketImpl::StreamSocketImpl(SocketAddress::Family family)
|
||||
{
|
||||
if (family == IPAddress::IPv4)
|
||||
if (family == SocketAddress::IPv4)
|
||||
init(AF_INET);
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
else if (family == IPAddress::IPv6)
|
||||
else if (family == SocketAddress::IPv6)
|
||||
init(AF_INET6);
|
||||
#endif
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
else if (family == SocketAddress::UNIX_LOCAL)
|
||||
init(AF_UNIX);
|
||||
#endif
|
||||
else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to StreamSocketImpl");
|
||||
}
|
||||
|
@ -120,8 +120,13 @@ void TCPServer::run()
|
||||
try
|
||||
{
|
||||
StreamSocket ss = _socket.acceptConnection();
|
||||
// enabe nodelay per default: OSX really needs that
|
||||
ss.setNoDelay(true);
|
||||
// enable nodelay per default: OSX really needs that
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (ss.address().family() != AddressFamily::UNIX_LOCAL)
|
||||
#endif
|
||||
{
|
||||
ss.setNoDelay(true);
|
||||
}
|
||||
_pDispatcher->enqueue(ss);
|
||||
}
|
||||
catch (Poco::Exception& exc)
|
||||
|
@ -32,6 +32,16 @@ EchoServer::EchoServer():
|
||||
}
|
||||
|
||||
|
||||
EchoServer::EchoServer(const Poco::Net::SocketAddress& address):
|
||||
_socket(address),
|
||||
_thread("EchoServer"),
|
||||
_stop(false)
|
||||
{
|
||||
_thread.start(*this);
|
||||
_ready.wait();
|
||||
}
|
||||
|
||||
|
||||
EchoServer::~EchoServer()
|
||||
{
|
||||
_stop = true;
|
||||
|
@ -29,6 +29,9 @@ public:
|
||||
EchoServer();
|
||||
/// Creates the EchoServer.
|
||||
|
||||
EchoServer(const Poco::Net::SocketAddress& address);
|
||||
/// Creates the EchoServer using the given address.
|
||||
|
||||
~EchoServer();
|
||||
/// Destroys the EchoServer.
|
||||
|
||||
|
@ -43,8 +43,11 @@ void SocketAddressTest::testSocketAddress()
|
||||
assert (wild.port() == 0);
|
||||
|
||||
SocketAddress sa1("192.168.1.100", 100);
|
||||
assert (sa1.af() == AF_INET);
|
||||
assert (sa1.family() == SocketAddress::IPv4);
|
||||
assert (sa1.host().toString() == "192.168.1.100");
|
||||
assert (sa1.port() == 100);
|
||||
assert (sa1.toString() == "192.168.1.100:100");
|
||||
|
||||
SocketAddress sa2("192.168.1.100", "100");
|
||||
assert (sa2.host().toString() == "192.168.1.100");
|
||||
@ -135,6 +138,38 @@ void SocketAddressTest::testSocketRelationals()
|
||||
void SocketAddressTest::testSocketAddress6()
|
||||
{
|
||||
#ifdef POCO_HAVE_IPv6
|
||||
SocketAddress sa1("FE80::E6CE:8FFF:FE4A:EDD0", 100);
|
||||
assert (sa1.af() == AF_INET6);
|
||||
assert (sa1.family() == SocketAddress::IPv6);
|
||||
assert (sa1.host().toString() == "fe80::e6ce:8fff:fe4a:edd0");
|
||||
assert (sa1.port() == 100);
|
||||
assert (sa1.toString() == "[fe80::e6ce:8fff:fe4a:edd0]:100");
|
||||
|
||||
SocketAddress sa2("[FE80::E6CE:8FFF:FE4A:EDD0]:100");
|
||||
assert (sa2.af() == AF_INET6);
|
||||
assert (sa2.family() == SocketAddress::IPv6);
|
||||
assert (sa2.host().toString() == "fe80::e6ce:8fff:fe4a:edd0");
|
||||
assert (sa2.port() == 100);
|
||||
assert (sa2.toString() == "[fe80::e6ce:8fff:fe4a:edd0]:100");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void SocketAddressTest::testSocketAddressUnixLocal()
|
||||
{
|
||||
#ifdef POCO_OS_FAMILY_UNIX
|
||||
SocketAddress sa1(SocketAddress::UNIX_LOCAL, "/tmp/sock1");
|
||||
assert (sa1.af() == AF_UNIX);
|
||||
assert (sa1.family() == SocketAddress::UNIX_LOCAL);
|
||||
assert (sa1.toString() == "/tmp/sock1");
|
||||
|
||||
SocketAddress sa2(SocketAddress::UNIX_LOCAL, "/tmp/sock2");
|
||||
assert (sa1 != sa2);
|
||||
assert (sa1 < sa2);
|
||||
|
||||
SocketAddress sa3(SocketAddress::UNIX_LOCAL, "/tmp/sock1");
|
||||
assert (sa1 == sa3);
|
||||
assert (!(sa1 < sa3));
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -156,6 +191,7 @@ CppUnit::Test* SocketAddressTest::suite()
|
||||
CppUnit_addTest(pSuite, SocketAddressTest, testSocketAddress);
|
||||
CppUnit_addTest(pSuite, SocketAddressTest, testSocketRelationals);
|
||||
CppUnit_addTest(pSuite, SocketAddressTest, testSocketAddress6);
|
||||
CppUnit_addTest(pSuite, SocketAddressTest, testSocketAddressUnixLocal);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ public:
|
||||
void testSocketAddress();
|
||||
void testSocketRelationals();
|
||||
void testSocketAddress6();
|
||||
void testSocketAddressUnixLocal();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "Poco/Buffer.h"
|
||||
#include "Poco/FIFOBuffer.h"
|
||||
#include "Poco/Delegate.h"
|
||||
#include "Poco/File.h"
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -501,6 +502,28 @@ void SocketTest::testSelect3()
|
||||
}
|
||||
|
||||
|
||||
void SocketTest::testEchoUnixLocal()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
Poco::File socketFile("/tmp/SocketTest.sock");
|
||||
if (socketFile.exists()) socketFile.remove();
|
||||
SocketAddress localAddr(SocketAddress::UNIX_LOCAL, socketFile.path());
|
||||
EchoServer echoServer(localAddr);
|
||||
StreamSocket ss(SocketAddress::UNIX_LOCAL);
|
||||
ss.connect(localAddr);
|
||||
int n = ss.sendBytes("hello", 5);
|
||||
assert (n == 5);
|
||||
char buffer[256];
|
||||
n = ss.receiveBytes(buffer, sizeof(buffer));
|
||||
assert (n == 5);
|
||||
assert (std::string(buffer, n) == "hello");
|
||||
ss.close();
|
||||
socketFile.remove();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SocketTest::onReadable(bool& b)
|
||||
{
|
||||
if (b) ++_notToReadable;
|
||||
@ -549,6 +572,7 @@ CppUnit::Test* SocketTest::suite()
|
||||
CppUnit_addTest(pSuite, SocketTest, testSelect);
|
||||
CppUnit_addTest(pSuite, SocketTest, testSelect2);
|
||||
CppUnit_addTest(pSuite, SocketTest, testSelect3);
|
||||
CppUnit_addTest(pSuite, SocketTest, testEchoUnixLocal);
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
void testSelect();
|
||||
void testSelect2();
|
||||
void testSelect3();
|
||||
void testEchoUnixLocal();
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
1
README
1
README
@ -153,6 +153,7 @@ message compiler may fail when building the Foundation library.
|
||||
|
||||
|
||||
BUILDING FOR WINDOWS CE
|
||||
=======================
|
||||
|
||||
Building for Windows CE is supported with Microsoft Visual Studio 2008.
|
||||
Unless you have the Digi JumpStart Windows CE 6.0 SDK installed, you'll
|
||||
|
@ -438,6 +438,8 @@
|
||||
Name="XML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Content.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Name.h"/>
|
||||
<File
|
||||
@ -446,12 +448,20 @@
|
||||
RelativePath=".\include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\ParserEngine.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\QName.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\ValueTraits.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XML.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParser.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLString.h"/>
|
||||
<File
|
||||
@ -467,8 +477,16 @@
|
||||
RelativePath=".\src\NamespaceStrategy.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ParserEngine.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QName.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ValueTraits.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParser.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParserException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLString.cpp">
|
||||
<FileConfiguration
|
||||
|
@ -257,13 +257,18 @@
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\Attributes.h"/>
|
||||
@ -346,7 +351,11 @@
|
||||
<ClCompile Include="src\NamePool.cpp"/>
|
||||
<ClCompile Include="src\NamespaceStrategy.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|SDK_AM335X_SK_WEC2013_V300'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|SDK_AM335X_SK_WEC2013_V300'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{0a27ef56-d026-41bb-b4a6-815c736c20de}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{510c128c-0ade-44b5-a9f3-6db227aef09d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{ee5c0026-27ea-497e-b85a-44ef9193d6d4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{eb8e48e5-e7d7-4fc2-bee2-301cab23d8ee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{313a431c-94c1-423a-845f-ccc3f8051420}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a621b86a-9f8d-41a3-a2b1-834702c9b214}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{5a587ae3-0947-4436-b3f5-a43e5ada5473}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f18ca99c-69dc-47e1-84a6-8179fb89e252}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{182eaaff-f16c-44a8-bfcd-689486365f7a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{42f77d62-a0a1-4993-b5ef-fe3c80b7de8e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{b883bb0b-ecf7-4d5c-a9a6-f79d10d97972}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{14685372-8923-479b-9b7b-0608409613c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{95e9ef8e-3cf0-4f95-b111-e079410adbb1}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b20d129b-1a74-43db-82c4-f0386333d35b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{f5579eb9-c0d3-45de-8182-471394cf1e2e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{13a1ba93-0ecc-48a8-a272-6c2305b0b0de}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{cdd3c97f-bc1c-44e3-a063-1fccb2ccd54a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fc75763f-6295-43ad-84b1-238b2a7bc88f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{3e206c78-0fec-4487-96d1-b9d7d201a9fe}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fddcd22d-4141-4243-8216-c8f7dc015483}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{5df33881-4d8e-4cf6-970f-739fa9552915}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{27f63b8d-80c8-4221-acf8-2f9a66820ad2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{7e73cd8a-56f2-4830-9fb9-56870af1ca42}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a9f27e9b-c698-4ae8-aefd-0af0888b21b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -318,15 +318,20 @@
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilter.h"/>
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilterImpl.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\XMLReader.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat_external.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="src\ascii.h"/>
|
||||
@ -398,10 +403,12 @@
|
||||
<ClCompile Include="src\Notation.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\ProcessingInstruction.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\SAXException.cpp"/>
|
||||
<ClCompile Include="src\SAXParser.cpp"/>
|
||||
<ClCompile Include="src\Text.cpp"/>
|
||||
<ClCompile Include="src\TreeWalker.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\WhitespaceFilter.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLFilter.cpp"/>
|
||||
@ -409,6 +416,8 @@
|
||||
<ClCompile Include="src\xmlparse.cpp"/>
|
||||
<ClCompile Include="src\XMLReader.cpp"/>
|
||||
<ClCompile Include="src\xmlrole.c"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|SDK_AM335X_SK_WEC2013_V310'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|SDK_AM335X_SK_WEC2013_V310'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{607e5536-55e7-4e1c-8f7a-ead0b6fbb8a5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ae9d5858-a285-4cfd-8714-c2bb23b90257}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{6a4ab1a6-fde6-424c-9280-cf3f84f3b922}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2bb463d2-36d4-4681-8626-05967eddeabb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{52d539ce-9c2c-427d-9eeb-a1b0464ee70b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{92673221-b6d4-44d0-8b5d-f5fb1a029a8e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{29c0ac4a-5923-4581-a688-ad63661a6f69}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{cbfcc7ca-f0ab-4c63-b9b6-448d6562f30c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{29fab171-3cd5-439c-87ca-cd7d5378c610}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{3e622a06-6c0c-498b-bba2-55fb5d707f18}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{261566a4-8657-4175-a627-61d33b927a9f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f7c29f4d-3835-4455-8b31-bfaee8880392}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{11e9e69a-837e-43bf-b0c4-ebf06b41da0c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{dccce482-4adf-47de-91ff-fe678f4d33bd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{f9b59c23-1a04-40dd-ad55-dedaa84c950d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0c5fd4ee-c77b-4e77-b524-65057356a480}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{9af80e24-06aa-464f-aca3-4d6676f4ea80}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{94764808-1760-4d49-806e-176306d945fa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{b0347d1c-78f0-479e-9026-40302bd099a0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{99b93127-5895-4119-8e21-1cf0c251e133}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{abceea86-9fd4-4b54-8ffe-00ff7a7c7ea2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5d6e3cd0-aefc-43ef-a743-41a7b8072db6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{f3796949-1eb2-487d-a280-34101b469ded}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{12cf45cc-4baf-419f-86c9-a4b187548303}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -275,13 +275,18 @@
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\Attributes.h"/>
|
||||
@ -364,7 +369,11 @@
|
||||
<ClCompile Include="src\NamePool.cpp"/>
|
||||
<ClCompile Include="src\NamespaceStrategy.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{945aef23-2a80-45dc-8849-17f49c429628}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{65edf253-2918-415f-b844-3dc8476e9220}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{2387b12c-3d91-4a05-ae0a-5fa5f2f053b8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9ebb8cab-c404-4260-8645-a4ac53cc60af}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{cc309da4-8a97-4cf0-8a43-335332e5c36a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0b9a4efc-33d2-4942-bd02-ed6f65267a43}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{59745370-646f-4b63-8a9e-3da50498645a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f332bb84-587e-40b0-afe2-db0c29432a43}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{26ca3b75-75c6-4839-a0ec-cc907bbf7854}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e4557921-321d-483c-a8a2-334d5db19d18}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{cefbbfb3-bad1-4a6f-b582-2b86cce8b66b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{20ed4584-5386-4f5d-8165-e3ec8a7d2b85}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{4c1944da-731c-4f58-9075-e02ab859103f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{1b8ee62a-1051-46a8-b707-a5bec27508d6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{34469edc-3620-4681-9ec8-9ec0c8be3af0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a898e832-e332-4044-bcc6-7cef571d39a2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{66e7d765-fff0-451b-92f1-d0bae40f24d3}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ee2e1498-4015-48ce-9463-ed5bb37c82d2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{6c219dda-366c-48f6-beb6-fba9249e4870}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5b5ead3e-11b3-4bb1-92be-88393ddfe15d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{e81d5d15-c25d-4b8c-80e5-3c08b0586acc}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{cc161af7-9f27-41b3-a5a4-51c06232a6d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{5a304a8f-2138-4643-a9e1-2e7148e40bf3}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ab77295e-6e6a-403e-a160-cd4bacbfc722}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -276,13 +276,18 @@
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\Attributes.h"/>
|
||||
@ -365,7 +370,11 @@
|
||||
<ClCompile Include="src\NamePool.cpp"/>
|
||||
<ClCompile Include="src\NamespaceStrategy.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{a2887584-c87a-473e-9213-6ea412a66190}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2614bd4a-a27e-4c67-a033-1675289f29c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{599ab01a-ce8b-4771-9d58-7b47d241edc7}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ee056f43-19dc-4389-bb0e-cd55d6c98b14}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{958342fd-277a-4f96-a083-dc4ea4ff9476}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{307488ab-b8f2-4dc9-afb9-184fc7ac57c8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{5945dd24-9617-40d3-a969-607dd6ccc09a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{745badfa-021d-457f-8559-00aea54d23f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{a145dac2-fe47-4eaf-b01a-876e529b7cc8}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0f198452-c208-4aeb-9997-ecef2b296b8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{0d6314c0-65f2-40f0-b02c-9561e4e173af}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{76ea17bb-be2d-47fe-97ac-bcddea9fae37}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{abd48d02-956b-4925-87ba-ba830d38799e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d9357220-87c9-4569-8401-eac5c663688f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{792651c3-1394-44f8-9679-c351e8c1c20f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{65baa972-8a32-4bd1-a9a5-c12550542b5c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{ce6751ed-0db8-4246-95c6-8427a987c2a1}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e5d81645-e2a7-413f-b675-339f4b4b117a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{64ae7a77-3d4b-44b9-a791-88d45d2b4a30}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{1015755a-27ea-4e5a-bec2-ea2c15a940ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{54029fec-369c-407d-805b-fd982184a1b5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b756e985-c22b-45cc-96a4-c7807f7da20c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{dd157b6d-8794-43f2-a526-fa294e983138}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{024d08ea-dd60-489b-84cb-669aa8a7cae9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -337,15 +337,20 @@
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilter.h"/>
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilterImpl.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\XMLReader.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat_external.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="src\ascii.h"/>
|
||||
@ -417,10 +422,12 @@
|
||||
<ClCompile Include="src\Notation.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\ProcessingInstruction.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\SAXException.cpp"/>
|
||||
<ClCompile Include="src\SAXParser.cpp"/>
|
||||
<ClCompile Include="src\Text.cpp"/>
|
||||
<ClCompile Include="src\TreeWalker.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\WhitespaceFilter.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLFilter.cpp"/>
|
||||
@ -428,6 +435,8 @@
|
||||
<ClCompile Include="src\xmlparse.cpp"/>
|
||||
<ClCompile Include="src\XMLReader.cpp"/>
|
||||
<ClCompile Include="src\xmlrole.c"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{f8c939c5-d561-45ef-af14-574018eb24df}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b61b4dc4-6c51-4d81-8d4b-99c7cef7afe5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{d7fdaf18-37a9-41c0-895c-204a7fec0fb2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5b3e63a0-0182-414d-9733-b55e6c720494}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{3ce9b3eb-d690-4d52-bd1c-536d25b09aa4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f89b42ee-c77a-4046-9d0f-9083e1618b6f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{9220f641-2d43-44c8-a757-882a94ade8cc}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{301d2339-3fba-49d7-8877-69cc3bdd7ac2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{265754a5-e5c5-46ac-9549-27fbfbd2c7e0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4ce8a48b-462f-4b89-8aa8-3eb09161bef7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{d1a6a322-33b1-4049-ba3e-25649837ea15}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{935c0e34-ee3c-48ec-b40a-6071020bd2b4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{08e4032d-7dfe-4f9e-8791-79a62f4a89e3}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ca1fa1b9-9526-4e7a-adba-5503848a5f56}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{87060c43-254e-44ec-9651-ff16e6505d5b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{703bde44-00d7-45fd-aef4-a790934909b1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{aa3e33e9-0e87-470f-a2f6-31fcc089874f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f93ef8be-bab9-46da-82e6-fe60256e9989}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{7a1cc54d-11ed-4a5c-b394-c17f00e85f4c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{cb4bdd1a-1598-4ca2-ae05-f56368dbf4b4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{6ea00709-b54b-41f6-a3f0-9a560d90da3d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{01034770-0bdc-46a4-ab48-525db37849d2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{9c81622a-12cb-4471-a624-310cb2fa9351}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{814d64ca-c357-4e33-a81f-b9f203a7a728}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -337,15 +337,20 @@
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilter.h"/>
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilterImpl.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\XMLReader.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat_external.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="src\ascii.h"/>
|
||||
@ -417,10 +422,12 @@
|
||||
<ClCompile Include="src\Notation.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\ProcessingInstruction.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\SAXException.cpp"/>
|
||||
<ClCompile Include="src\SAXParser.cpp"/>
|
||||
<ClCompile Include="src\Text.cpp"/>
|
||||
<ClCompile Include="src\TreeWalker.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\WhitespaceFilter.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLFilter.cpp"/>
|
||||
@ -428,6 +435,8 @@
|
||||
<ClCompile Include="src\xmlparse.cpp"/>
|
||||
<ClCompile Include="src\XMLReader.cpp"/>
|
||||
<ClCompile Include="src\xmlrole.c"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{2ef8c8e9-851b-4df3-8aab-64725b0ba3a2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a5de6ebc-cce9-4746-b3a5-e85625954430}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{a2ddcd8c-da4e-4d6f-8263-a6e60f38c6ca}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{6581ec1a-3ca5-42cb-8570-56a5b4caa5e1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{160479fd-e5b1-4abd-84f4-085cb460a64a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5b3dcd04-3da8-44f6-bc5c-eabd83f89a31}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{9e21f3ad-5f0c-44b3-8d74-13e45441b3cc}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{da1b2d71-07b5-4941-829b-5ba4e1f60290}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{7d508b25-17a3-4a92-b28e-d5bb2f2bfb3e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9676bd0e-fdb4-41b1-8617-389c757c765b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{7429db87-b9f6-48f7-bb67-19ecad21031e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{91b86e4b-db6a-490b-a345-bf66851b739b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{dbb18fe7-3f1c-4968-b064-c7b653a05407}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2709168d-bbd1-43e7-8a54-2964f69ce5be}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{e24fe209-67d6-4c67-9191-9a61f5b00b3a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5abd420d-b947-457a-a1df-067c553baf6f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{d322c835-050c-43b7-ac46-a878fe1748db}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4de0fdfd-f2f1-4932-bd74-a4cf3dda99d0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{228f93b4-0920-4a2c-a064-45fdd9c4af67}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{fd935cc1-fa5e-4e21-a5f0-a9048ae3e8c6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{c513ee9e-d3e4-4763-8646-835279d44d24}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{52492a95-5a47-4310-8bed-f3430d893bdd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{19fad315-d45a-47ac-9889-e7ea49f44598}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9bf7efd3-533b-4f95-9802-36b74615b464}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -392,6 +392,8 @@
|
||||
Name="XML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Content.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Name.h"/>
|
||||
<File
|
||||
@ -400,12 +402,20 @@
|
||||
RelativePath=".\include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\ParserEngine.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\QName.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\ValueTraits.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XML.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParser.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLString.h"/>
|
||||
<File
|
||||
@ -421,8 +431,16 @@
|
||||
RelativePath=".\src\NamespaceStrategy.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ParserEngine.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QName.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ValueTraits.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParser.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParserException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLString.cpp">
|
||||
<FileConfiguration
|
||||
|
@ -273,13 +273,18 @@
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\Attributes.h"/>
|
||||
@ -362,7 +367,11 @@
|
||||
<ClCompile Include="src\NamePool.cpp"/>
|
||||
<ClCompile Include="src\NamespaceStrategy.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{a4f62ec2-6187-462b-b5b5-efaa10d0e0f4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a9a1dca5-d1a2-4559-9874-4e79c7416c53}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{c4f6829b-aaaa-4ffb-8cef-d663e1cb83cf}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{80da8a7b-da57-441f-9373-6704174b4cf7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{6c9db7e3-5b7b-4ae0-afd0-15fe40263e34}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{50af371a-9a79-4856-a74a-c24a18bd27fb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{a2893b1e-dda6-404b-b4f3-ca4a4f3bde6d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b741e391-f97a-412a-82ec-831db3076755}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{51794fbc-6c5f-4b1b-b4e4-047a3b9de526}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{69517bed-4e9a-4183-8663-5c898ca4ff4a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{6725b3d4-b051-4317-aaee-8ff4d61bef22}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{4161f045-63d3-47ea-98b8-9233ac9ddc4b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{270b0f18-6867-413b-95e4-ba5f8bfe849b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2a9a41eb-1acb-447f-8303-ecee7c85f218}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{b0291fff-e080-4447-9991-b270c5ce00ef}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{8ee24584-ac70-48f7-8543-3244abbfede7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{48c6f5d5-2adf-4c14-8748-fe6a4a9a9428}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{8ebf4fd1-e05f-46ac-aa3c-31a3049e98f3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{0e0c68ec-e7d5-4528-b931-51425ef49688}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{7e7f5e71-ded6-4d32-a483-d28a06a45d46}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{c0e34258-e71b-47a3-a3c6-94b72282f7d9}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{e3fb4c9a-ce84-469b-a5ab-326b2ee5da6b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{41b27c83-c251-4fbe-b9cb-791730e14dab}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{bb2b6642-57c6-4103-b2fe-0f083f0d0ab2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -275,13 +275,18 @@
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\Attributes.h"/>
|
||||
@ -364,7 +369,11 @@
|
||||
<ClCompile Include="src\NamePool.cpp"/>
|
||||
<ClCompile Include="src\NamespaceStrategy.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{0b14b184-8d7d-4f7d-b918-8476e5f3647d}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{a04fb07b-1189-423b-a072-98f32e1bdd83}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{d21f4bf9-cfbd-4937-b00f-c7a34c421ca5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{24c2029b-9e98-4cd6-81ee-054e8fc41f76}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{090b7370-14c8-4643-9ca9-a2ebed4a58e4}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{c12a9af7-dc7b-4e15-b98c-ac11171891b0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{e7a0a2f6-c1e5-486c-a740-3b0b167380c6}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{606f4b9d-41f3-4c94-aa12-c63b0cfe5843}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{17c8b296-68f9-4551-b093-4d4369806e9a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{85fb778c-dde8-4196-8848-3a086f883f53}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{ca808b76-0cfb-423a-ac2b-eb7834e1caad}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{5f815669-612b-4323-b373-374acedac950}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{c6683b8a-9a4d-48f9-8800-a8ee42bc74e5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d004e13b-5b70-4e31-a595-2246ac3b8b81}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{6508cc30-b59c-4328-ba6c-a0889ed72faf}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{2bfe27a4-664b-449d-bef8-6f2f94fe31df}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{84e6cf67-ab5a-4d70-880e-771857ec1256}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{56025ad2-7e96-4399-8333-b8314670ff23}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{7f54c3aa-c33c-4b64-8966-ca0bae468de5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d88f94e7-32c2-4b70-95a2-a41d84b6ef03}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{85fe699d-ee7c-4ba7-be01-87e6d5ff15f2}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f2f7a9d9-b9ba-4818-9e82-5953f1cf35dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{fad7bac7-fac2-41db-a71c-dc1e357ca070}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9448fb5f-afa6-43ce-93fa-76090c8cea04}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -336,15 +336,20 @@
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilter.h"/>
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilterImpl.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\XMLReader.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat_external.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="src\ascii.h"/>
|
||||
@ -416,10 +421,12 @@
|
||||
<ClCompile Include="src\Notation.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\ProcessingInstruction.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\SAXException.cpp"/>
|
||||
<ClCompile Include="src\SAXParser.cpp"/>
|
||||
<ClCompile Include="src\Text.cpp"/>
|
||||
<ClCompile Include="src\TreeWalker.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\WhitespaceFilter.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLFilter.cpp"/>
|
||||
@ -427,6 +434,8 @@
|
||||
<ClCompile Include="src\xmlparse.cpp"/>
|
||||
<ClCompile Include="src\XMLReader.cpp"/>
|
||||
<ClCompile Include="src\xmlrole.c"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{19ba2980-0f44-4bd5-8289-8b32ac24b059}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{ee8b01d7-9bf5-40f2-bd7b-99622a98390a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{33102eef-eba2-4b89-9c73-498777984b85}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{23c5c17d-0c71-4b00-9cf0-a632e2bf6719}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{6a3aa816-1fc2-4278-bb97-fcc6128baf68}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{9192ee3a-4acd-4405-a1f8-4cd3f34775c0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{dcd92315-7121-47ea-bb75-f0307756e168}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{58aff733-d608-4393-af4e-e31cde3cae69}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{f6cc5dd4-80e2-4d9a-bbe6-f0e0d5870ac0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{57ce4863-5d93-404f-9c5c-bec22d005975}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{34440a29-b84f-4292-83a1-9782a25e5433}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{53b95691-345e-4488-bc6e-05bf6cb1ad9b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{7f1fb15f-84ca-4441-8399-96d4fac3ba4b}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b86cd6c2-9b2a-45a2-a3a3-30d6a6da71be}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{55498c8d-fbb4-4f64-9cca-3030b66fe65c}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{70a35331-ee55-4abe-9d38-8630e3fa0125}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{32bae4d9-8852-48e6-b777-7e2217871772}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{3afeb546-5432-40f1-967a-b0152ff36224}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{17bf0a7b-d886-4a56-9ae8-72a6a58bf16e}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{f9036c78-eea8-4420-9959-1b56027be6d5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{6d0fc498-2cc8-4571-b9de-002f5352cf25}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{12d0f128-7704-4192-b925-1d7614115340}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{128367df-4699-4de6-b8f5-b00861effb31}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{acba0677-86b6-4f7d-833b-7467a3e0d3c2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -336,15 +336,20 @@
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilter.h"/>
|
||||
<ClInclude Include="include\Poco\Sax\XMLFilterImpl.h"/>
|
||||
<ClInclude Include="include\Poco\SAX\XMLReader.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Content.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\expat_external.h"/>
|
||||
<ClInclude Include="include\Poco\XML\Name.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamePool.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h"/>
|
||||
<ClInclude Include="include\Poco\XML\QName.h"/>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h"/>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h"/>
|
||||
<ClInclude Include="include\Poco\Xml\XMLWriter.h"/>
|
||||
<ClInclude Include="src\ascii.h"/>
|
||||
@ -416,10 +421,12 @@
|
||||
<ClCompile Include="src\Notation.cpp"/>
|
||||
<ClCompile Include="src\ParserEngine.cpp"/>
|
||||
<ClCompile Include="src\ProcessingInstruction.cpp"/>
|
||||
<ClCompile Include="src\QName.cpp"/>
|
||||
<ClCompile Include="src\SAXException.cpp"/>
|
||||
<ClCompile Include="src\SAXParser.cpp"/>
|
||||
<ClCompile Include="src\Text.cpp"/>
|
||||
<ClCompile Include="src\TreeWalker.cpp"/>
|
||||
<ClCompile Include="src\ValueTraits.cpp"/>
|
||||
<ClCompile Include="src\WhitespaceFilter.cpp"/>
|
||||
<ClCompile Include="src\XMLException.cpp"/>
|
||||
<ClCompile Include="src\XMLFilter.cpp"/>
|
||||
@ -427,6 +434,8 @@
|
||||
<ClCompile Include="src\xmlparse.cpp"/>
|
||||
<ClCompile Include="src\XMLReader.cpp"/>
|
||||
<ClCompile Include="src\xmlrole.c"/>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp"/>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp"/>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
|
@ -2,43 +2,46 @@
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="XML">
|
||||
<UniqueIdentifier>{d5bfdd0a-e08a-4d10-a2b0-df134f9a2bbd}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{0340d279-0fb2-4dff-82e3-9e7ab1b82a10}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Header Files">
|
||||
<UniqueIdentifier>{0448e9b9-9f7b-4981-8aeb-c4cf5cbd36d5}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{b991e209-98d2-4336-a9ac-309525db32cf}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="XML\Source Files">
|
||||
<UniqueIdentifier>{d828eef0-4a7c-4380-ac75-33fc3393a84a}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{61ae2918-df85-4ee5-a205-4342bc2c78ef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX">
|
||||
<UniqueIdentifier>{33b839dc-3ad1-4486-ac47-39bec0fec025}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d2ccc3a8-d84d-4384-9211-0ca17b60376b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Header Files">
|
||||
<UniqueIdentifier>{26da183a-31ab-48f0-8453-34d9cfec235f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{998cc9bb-73f6-48df-a71e-2abacea24ff2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAX\Source Files">
|
||||
<UniqueIdentifier>{e3fc1e67-200d-42be-a573-2e862d30899f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{96a40ea9-5072-4b66-8029-6985f40a9a5c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM">
|
||||
<UniqueIdentifier>{cadc79f9-1742-464e-8d08-00e6298d6c10}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{14ea6404-dd3a-4544-bc57-93f6373c6656}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Header Files">
|
||||
<UniqueIdentifier>{c764dc45-cceb-41f5-8d1b-a6fb4b1031af}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{326adfd3-09af-4630-8a33-e9cc0a806682}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="DOM\Source Files">
|
||||
<UniqueIdentifier>{f12e7abd-38e9-4749-bae7-83b490edb149}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{d341d7c9-033c-49c4-9e47-205fd1fb4393}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat">
|
||||
<UniqueIdentifier>{47f3e86a-f62a-4b7b-ada8-30e2cadf71e0}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{224b9ae3-766b-47f7-9dc3-eb00e04a7705}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Header Files">
|
||||
<UniqueIdentifier>{e3a46273-c07b-4909-a55b-d26abfbea174}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{85b43ec0-ac23-4eb6-be6f-5ef60144777b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Expat\Source Files">
|
||||
<UniqueIdentifier>{5c1350fa-7d1b-4ab2-9fc0-cd64458c276f}</UniqueIdentifier>
|
||||
<UniqueIdentifier>{db32d5c6-e354-4a3c-8e36-8637f5cfb226}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\XML\Content.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\Name.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -51,6 +54,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\ParserEngine.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\QName.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\ValueTraits.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XML.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -60,6 +69,12 @@
|
||||
<ClInclude Include="include\Poco\Xml\XMLStream.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParser.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\XML\XMLStreamParserException.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Xml\XMLString.h">
|
||||
<Filter>XML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
@ -302,9 +317,21 @@
|
||||
<ClCompile Include="src\ParserEngine.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QName.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ValueTraits.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParser.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLStreamParserException.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\XMLString.cpp">
|
||||
<Filter>XML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -397,6 +397,8 @@
|
||||
Name="XML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Content.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\Name.h"/>
|
||||
<File
|
||||
@ -405,12 +407,20 @@
|
||||
RelativePath=".\include\Poco\Xml\NamespaceStrategy.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\ParserEngine.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\QName.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\ValueTraits.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XML.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParser.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\XML\XMLStreamParserException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Xml\XMLString.h"/>
|
||||
<File
|
||||
@ -426,8 +436,16 @@
|
||||
RelativePath=".\src\NamespaceStrategy.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ParserEngine.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QName.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ValueTraits.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParser.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLStreamParserException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\XMLString.cpp">
|
||||
<FileConfiguration
|
||||
|
@ -63,11 +63,9 @@ public:
|
||||
std::string& prefix();
|
||||
/// Returns the namespace prefix of the name.
|
||||
|
||||
std::string string() const;
|
||||
std::string toString() const;
|
||||
/// Returns a printable representation in the [<namespace>#]<name> form.
|
||||
|
||||
// Note that comparison operators
|
||||
//
|
||||
public:
|
||||
friend bool operator < (const QName& x, const QName& y)
|
||||
{
|
||||
@ -130,7 +128,7 @@ inline std::string& QName::prefix()
|
||||
}
|
||||
|
||||
|
||||
XML_API std::ostream& operator<<(std::ostream&, const QName&);
|
||||
XML_API std::ostream& operator << (std::ostream&, const QName&);
|
||||
|
||||
|
||||
} } // namespace Poco::XML
|
||||
|
@ -38,7 +38,6 @@
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <cstddef>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
@ -64,7 +63,7 @@ class XML_API XMLStreamParser
|
||||
/// are not very common).
|
||||
///
|
||||
/// Attribute map is valid throughout at the "element level" until
|
||||
/// end_element and not just during startElement. As a special case,
|
||||
/// end_element and not just during EV_START_ELEMENT. As a special case,
|
||||
/// the map is still valid after peek() that returned end_element until
|
||||
/// this end_element event is retrieved with next().
|
||||
///
|
||||
@ -75,17 +74,17 @@ class XML_API XMLStreamParser
|
||||
/// {
|
||||
/// switch (e)
|
||||
/// {
|
||||
/// case XMLStreamParser::startElement:
|
||||
/// case XMLStreamParser::EV_START_ELEMENT:
|
||||
/// cerr << p.line () << ':' << p.column () << ": start " << p.name () << endl;
|
||||
/// break;
|
||||
/// case XMLStreamParser::endElement:
|
||||
/// case XMLStreamParser::EV_END_ELEMENT:
|
||||
/// cerr << p.line () << ':' << p.column () << ": end " << p.name () << endl;
|
||||
/// break;
|
||||
/// case XMLStreamParser::startAttribute:
|
||||
/// case XMLStreamParser::EV_START_ATTRIBUTE:
|
||||
/// ...
|
||||
/// case XMLStreamParser::endAttribute:
|
||||
/// case XMLStreamParser::EV_END_ATTRIBUTE:
|
||||
/// ...
|
||||
/// case XMLStreamParser::characters:
|
||||
/// case XMLStreamParser::EV_CHARACTERS:
|
||||
/// ...
|
||||
/// }
|
||||
/// }
|
||||
@ -94,14 +93,14 @@ public:
|
||||
enum EventType
|
||||
/// Parsing events.
|
||||
{
|
||||
StartElement,
|
||||
EndElement,
|
||||
StartAttribute,
|
||||
EndAttribute,
|
||||
Characters,
|
||||
StartNamespaceDecl,
|
||||
EndNamespaceDecl,
|
||||
Eof
|
||||
EV_START_ELEMENT,
|
||||
EV_END_ELEMENT,
|
||||
EV_START_ATTRIBUTE,
|
||||
EV_END_ATTRIBUTE,
|
||||
EV_CHARACTERS,
|
||||
EV_START_NAMESPACE_DECL,
|
||||
EV_END_NAMESPACE_DECL,
|
||||
EV_EOF
|
||||
};
|
||||
|
||||
typedef unsigned short FeatureType;
|
||||
@ -130,16 +129,18 @@ public:
|
||||
{
|
||||
typedef EventType value_type;
|
||||
|
||||
Iterator(XMLStreamParser* p = 0, EventType e = Eof) :
|
||||
Iterator(XMLStreamParser* p = 0, EventType e = EV_EOF):
|
||||
_parser(p),
|
||||
_e(e)
|
||||
{
|
||||
}
|
||||
value_type operator*() const
|
||||
|
||||
value_type operator * () const
|
||||
{
|
||||
return _e;
|
||||
}
|
||||
Iterator& operator++()
|
||||
|
||||
Iterator& operator ++ ()
|
||||
{
|
||||
_e = _parser->next();
|
||||
return *this;
|
||||
@ -148,10 +149,10 @@ public:
|
||||
bool operator == (Iterator y) const
|
||||
/// Comparison only makes sense when comparing to end (eof).
|
||||
{
|
||||
return _e == Eof && y._e == Eof;
|
||||
return _e == EV_EOF && y._e == EV_EOF;
|
||||
}
|
||||
|
||||
bool operator!=(Iterator y) const
|
||||
bool operator != (Iterator y) const
|
||||
/// Comparison only makes sense when comparing to end (eof).
|
||||
{
|
||||
return !(*this == y);
|
||||
@ -169,10 +170,10 @@ public:
|
||||
|
||||
Iterator end()
|
||||
{
|
||||
return Iterator(this, Eof);
|
||||
return Iterator(this, EV_EOF);
|
||||
}
|
||||
|
||||
XMLStreamParser(std::istream&, const std::string& input_name, FeatureType = RECEIVE_DEFAULT);
|
||||
XMLStreamParser(std::istream&, const std::string& inputName, FeatureType = RECEIVE_DEFAULT);
|
||||
/// The parser constructor takes three arguments: the stream to parse,
|
||||
/// input name that is used in diagnostics to identify the document being
|
||||
/// parsed, and the list of events we want the parser to report.
|
||||
@ -184,7 +185,7 @@ public:
|
||||
/// exception is used to report io errors (badbit and failbit).
|
||||
/// Otherwise, those are reported as the parsing exception.
|
||||
|
||||
XMLStreamParser(const void* data, std::size_t size, const std::string& input_name, FeatureType = RECEIVE_DEFAULT);
|
||||
XMLStreamParser(const void* data, std::size_t size, const std::string& inputName, FeatureType = RECEIVE_DEFAULT);
|
||||
/// Parse memory buffer that contains the whole document. Input name
|
||||
/// is used in diagnostics to identify the document being parsed.
|
||||
|
||||
@ -204,7 +205,7 @@ public:
|
||||
|
||||
EventType peek();
|
||||
EventType event();
|
||||
/// Return the even that was last returned by the call to next() or peek().
|
||||
/// Return the event that was last returned by the call to next() or peek().
|
||||
|
||||
const std::string& inputName() const;
|
||||
const QName& getQName() const;
|
||||
@ -213,21 +214,21 @@ public:
|
||||
const std::string& prefix() const;
|
||||
std::string& value();
|
||||
const std::string& value() const;
|
||||
template<typename T> T value() const;
|
||||
template <typename T> T value() const;
|
||||
Poco::UInt64 line() const;
|
||||
Poco::UInt64 column() const;
|
||||
const std::string& attribute(const std::string& name) const;
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T attribute(const std::string& name) const;
|
||||
std::string attribute(const std::string& name, const std::string& default_value) const;
|
||||
template<typename T>
|
||||
T attribute(const std::string& name, const T& default_value) const;
|
||||
std::string attribute(const std::string& name, const std::string& deflt) const;
|
||||
template <typename T>
|
||||
T attribute(const std::string& name, const T& deflt) const;
|
||||
const std::string& attribute(const QName& qname) const;
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T attribute(const QName& qname) const;
|
||||
std::string attribute(const QName& qname, const std::string& default_value) const;
|
||||
template<typename T>
|
||||
T attribute(const QName& qname, const T& default_value) const;
|
||||
std::string attribute(const QName& qname, const std::string& deflt) const;
|
||||
template <typename T>
|
||||
T attribute(const QName& qname, const T& deflt) const;
|
||||
bool attributePresent(const std::string& name) const;
|
||||
bool attributePresent(const QName& qname) const;
|
||||
const AttributeMapType& attributeMap() const;
|
||||
@ -240,46 +241,44 @@ public:
|
||||
void nextExpect(EventType, const std::string& ns, const std::string& name, Content);
|
||||
|
||||
// Helpers for parsing elements with simple content. The first two
|
||||
// functions assume that startElement has already been parsed. The
|
||||
// functions assume that EV_START_ELEMENT has already been parsed. The
|
||||
// rest parse the complete element, from start to end.
|
||||
//
|
||||
// Note also that as with attribute(), there is no (namespace,name)
|
||||
// overload since it would conflicts with (namespace,default_value).
|
||||
//
|
||||
// overload since it would conflicts with (namespace,deflt).
|
||||
std::string element();
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T element();
|
||||
std::string element(const std::string& name);
|
||||
std::string element(const QName& qname);
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T element(const std::string& name);
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T element(const QName& qname);
|
||||
std::string element(const std::string& name, const std::string& default_value);
|
||||
std::string element(const QName& qname, const std::string& default_value);
|
||||
template<typename T>
|
||||
T element(const std::string& name, const T& default_value);
|
||||
template<typename T>
|
||||
T element(const QName& qname, const T& default_value);
|
||||
std::string element(const std::string& name, const std::string& deflt);
|
||||
std::string element(const QName& qname, const std::string& deflt);
|
||||
template <typename T>
|
||||
T element(const std::string& name, const T& deflt);
|
||||
template <typename T>
|
||||
T element(const QName& qname, const T& deflt);
|
||||
|
||||
private:
|
||||
XMLStreamParser(const XMLStreamParser&);
|
||||
XMLStreamParser& operator=(const XMLStreamParser&);
|
||||
XMLStreamParser& operator = (const XMLStreamParser&);
|
||||
|
||||
static void XMLCALL start_element_(void*, const XML_Char*, const XML_Char**);
|
||||
static void XMLCALL end_element_(void*, const XML_Char*);
|
||||
static void XMLCALL characters_(void*, const XML_Char*, int);
|
||||
static void XMLCALL start_namespace_decl_(void*, const XML_Char*, const XML_Char*);
|
||||
static void XMLCALL end_namespace_decl_(void*, const XML_Char*);
|
||||
static void XMLCALL handleStartElement(void*, const XML_Char*, const XML_Char**);
|
||||
static void XMLCALL handleEndElement(void*, const XML_Char*);
|
||||
static void XMLCALL handleCharacters(void*, const XML_Char*, int);
|
||||
static void XMLCALL handleStartNamespaceDecl(void*, const XML_Char*, const XML_Char*);
|
||||
static void XMLCALL handleEndNamespaceDecl(void*, const XML_Char*);
|
||||
|
||||
void init();
|
||||
EventType next_(bool peek);
|
||||
EventType next_body();
|
||||
void handle_error();
|
||||
EventType nextImpl(bool peek);
|
||||
EventType nextBody();
|
||||
void handleError();
|
||||
|
||||
// If size_ is 0, then data is std::istream. Otherwise, it is a buffer.
|
||||
//
|
||||
// If _size is 0, then data is std::istream. Otherwise, it is a buffer.
|
||||
union
|
||||
{
|
||||
std::istream* is;
|
||||
@ -303,13 +302,13 @@ private:
|
||||
Poco::UInt64 _line;
|
||||
Poco::UInt64 _column;
|
||||
|
||||
struct attribute_type
|
||||
struct AttributeType
|
||||
{
|
||||
QName qname;
|
||||
std::string value;
|
||||
};
|
||||
|
||||
typedef std::vector<attribute_type> attributes;
|
||||
typedef std::vector<AttributeType> attributes;
|
||||
attributes _attributes;
|
||||
attributes::size_type _currentAttributeIndex; // Index of the current attribute.
|
||||
|
||||
@ -321,7 +320,7 @@ private:
|
||||
|
||||
struct ElementEntry
|
||||
{
|
||||
ElementEntry(std::size_t d, Content c = Content::Mixed) :
|
||||
ElementEntry(std::size_t d, Content c = Content::Mixed):
|
||||
depth(d),
|
||||
content(c),
|
||||
attributesUnhandled(0)
|
||||
@ -418,14 +417,14 @@ inline XMLStreamParser::EventType XMLStreamParser::peek()
|
||||
return _currentEvent;
|
||||
else
|
||||
{
|
||||
EventType e(next_(true));
|
||||
_parserState = state_peek; // Set it after the call to next_().
|
||||
EventType e(nextImpl(true));
|
||||
_parserState = state_peek; // Set it after the call to nextImpl().
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::value() const
|
||||
{
|
||||
return ValueTraits < T > ::parse(value(), *this);
|
||||
@ -438,7 +437,7 @@ inline const std::string& XMLStreamParser::attribute(const std::string& n) const
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::attribute(const std::string& n) const
|
||||
{
|
||||
return attribute < T > (QName(n));
|
||||
@ -451,14 +450,14 @@ inline std::string XMLStreamParser::attribute(const std::string& n, const std::s
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::attribute(const std::string& n, const T& dv) const
|
||||
{
|
||||
return attribute < T > (QName(n), dv);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::attribute(const QName& qn) const
|
||||
{
|
||||
return ValueTraits < T > ::parse(attribute(qn), *this);
|
||||
@ -498,7 +497,7 @@ inline void XMLStreamParser::nextExpect(EventType e, const std::string& n)
|
||||
inline void XMLStreamParser::nextExpect(EventType e, const QName& qn, Content c)
|
||||
{
|
||||
nextExpect(e, qn);
|
||||
assert(e == StartElement);
|
||||
poco_assert(e == EV_START_ELEMENT);
|
||||
content(c);
|
||||
}
|
||||
|
||||
@ -506,7 +505,7 @@ inline void XMLStreamParser::nextExpect(EventType e, const QName& qn, Content c)
|
||||
inline void XMLStreamParser::nextExpect(EventType e, const std::string& n, Content c)
|
||||
{
|
||||
nextExpect(e, std::string(), n);
|
||||
assert(e == StartElement);
|
||||
poco_assert(e == EV_START_ELEMENT);
|
||||
content(c);
|
||||
}
|
||||
|
||||
@ -514,12 +513,12 @@ inline void XMLStreamParser::nextExpect(EventType e, const std::string& n, Conte
|
||||
inline void XMLStreamParser::nextExpect(EventType e, const std::string& ns, const std::string& n, Content c)
|
||||
{
|
||||
nextExpect(e, ns, n);
|
||||
assert(e == StartElement);
|
||||
poco_assert(e == EV_START_ELEMENT);
|
||||
content(c);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::element()
|
||||
{
|
||||
return ValueTraits < T > ::parse(element(), *this);
|
||||
@ -528,26 +527,26 @@ inline T XMLStreamParser::element()
|
||||
|
||||
inline std::string XMLStreamParser::element(const std::string& n)
|
||||
{
|
||||
nextExpect(StartElement, n);
|
||||
nextExpect(EV_START_ELEMENT, n);
|
||||
return element();
|
||||
}
|
||||
|
||||
|
||||
inline std::string XMLStreamParser::element(const QName& qn)
|
||||
{
|
||||
nextExpect(StartElement, qn);
|
||||
nextExpect(EV_START_ELEMENT, qn);
|
||||
return element();
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::element(const std::string& n)
|
||||
{
|
||||
return ValueTraits < T > ::parse(element(n), *this);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::element(const QName& qn)
|
||||
{
|
||||
return ValueTraits < T > ::parse(element(qn), *this);
|
||||
@ -560,7 +559,7 @@ inline std::string XMLStreamParser::element(const std::string& n, const std::str
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
inline T XMLStreamParser::element(const std::string& n, const T& dv)
|
||||
{
|
||||
return element < T > (QName(n), dv);
|
||||
@ -569,7 +568,7 @@ inline T XMLStreamParser::element(const std::string& n, const T& dv)
|
||||
|
||||
inline void XMLStreamParser::content(Content c)
|
||||
{
|
||||
assert(_parserState == state_next);
|
||||
poco_assert(_parserState == state_next);
|
||||
|
||||
if (!_elementState.empty() && _elementState.back().depth == _depth)
|
||||
_elementState.back().content = c;
|
||||
@ -580,7 +579,7 @@ inline void XMLStreamParser::content(Content c)
|
||||
|
||||
inline Content XMLStreamParser::content() const
|
||||
{
|
||||
assert(_parserState == state_next);
|
||||
poco_assert(_parserState == state_next);
|
||||
|
||||
return !_elementState.empty() && _elementState.back().depth == _depth ? _elementState.back().content : Content(Content::Mixed);
|
||||
}
|
||||
@ -592,7 +591,7 @@ inline const XMLStreamParser::ElementEntry* XMLStreamParser::getElement() const
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T XMLStreamParser::attribute(const QName& qn, const T& dv) const
|
||||
{
|
||||
if (const ElementEntry* e = getElement())
|
||||
@ -614,10 +613,10 @@ T XMLStreamParser::attribute(const QName& qn, const T& dv) const
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T XMLStreamParser::element(const QName& qn, const T& dv)
|
||||
{
|
||||
if (peek() == StartElement && getQName() == qn)
|
||||
if (peek() == EV_START_ELEMENT && getQName() == qn)
|
||||
{
|
||||
next();
|
||||
return element<T>();
|
||||
|
@ -7,8 +7,6 @@
|
||||
// Package: XML
|
||||
// Module: QName
|
||||
//
|
||||
// Definition of the QName class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
@ -53,7 +51,7 @@ QName::QName(const std::string& ns, const std::string& name, const std::string&
|
||||
}
|
||||
|
||||
|
||||
std::string QName::string() const
|
||||
std::string QName::toString() const
|
||||
{
|
||||
std::string r;
|
||||
if (!_ns.empty())
|
||||
@ -67,9 +65,9 @@ std::string QName::string() const
|
||||
}
|
||||
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const QName& qn)
|
||||
std::ostream& operator << (std::ostream& os, const QName& qn)
|
||||
{
|
||||
return os << qn.string();
|
||||
return os << qn.toString();
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
// Package: XML
|
||||
// Module: XMLStreamParser
|
||||
//
|
||||
// Definition of the XMLStreamParser class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
@ -21,7 +19,6 @@
|
||||
|
||||
#include "Poco/XML/XMLStreamParser.h"
|
||||
#include <new>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
@ -105,7 +102,7 @@ XMLStreamParser::XMLStreamParser(const void* data, std::size_t size, const std::
|
||||
_inputName(iname),
|
||||
_feature(f)
|
||||
{
|
||||
assert(data != 0 && size != 0);
|
||||
poco_assert(data != 0 && size != 0);
|
||||
|
||||
_data.buf = data;
|
||||
init();
|
||||
@ -122,8 +119,8 @@ void XMLStreamParser::init()
|
||||
{
|
||||
_depth = 0;
|
||||
_parserState = state_next;
|
||||
_currentEvent = Eof;
|
||||
_queue = Eof;
|
||||
_currentEvent = EV_EOF;
|
||||
_queue = EV_EOF;
|
||||
|
||||
_qualifiedName = &_qname;
|
||||
_pvalue = &_value;
|
||||
@ -156,26 +153,26 @@ void XMLStreamParser::init()
|
||||
|
||||
if ((_feature & RECEIVE_ELEMENTS) != 0)
|
||||
{
|
||||
XML_SetStartElementHandler(_parser, &start_element_);
|
||||
XML_SetEndElementHandler(_parser, &end_element_);
|
||||
XML_SetStartElementHandler(_parser, &handleStartElement);
|
||||
XML_SetEndElementHandler(_parser, &handleEndElement);
|
||||
}
|
||||
|
||||
if ((_feature & RECEIVE_CHARACTERS) != 0)
|
||||
XML_SetCharacterDataHandler(_parser, &characters_);
|
||||
XML_SetCharacterDataHandler(_parser, &handleCharacters);
|
||||
|
||||
if ((_feature & RECEIVE_NAMESPACE_DECLS) != 0)
|
||||
XML_SetNamespaceDeclHandler(_parser, &start_namespace_decl_, &end_namespace_decl_);
|
||||
XML_SetNamespaceDeclHandler(_parser, &handleStartNamespaceDecl, &handleEndNamespaceDecl);
|
||||
}
|
||||
|
||||
|
||||
void XMLStreamParser::handle_error()
|
||||
void XMLStreamParser::handleError()
|
||||
{
|
||||
XML_Error e(XML_GetErrorCode(_parser));
|
||||
|
||||
if (e == XML_ERROR_ABORTED)
|
||||
{
|
||||
// For now we only abort the XMLStreamParser in the characters_() and
|
||||
// start_element_() handlers.
|
||||
// For now we only abort the XMLStreamParser in the handleCharacters() and
|
||||
// handleStartElement() handlers.
|
||||
//
|
||||
switch (content())
|
||||
{
|
||||
@ -186,7 +183,7 @@ void XMLStreamParser::handle_error()
|
||||
case Content::Complex:
|
||||
throw XMLStreamParserException(*this, "characters in complex content");
|
||||
default:
|
||||
assert(false);
|
||||
poco_assert(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -197,7 +194,7 @@ void XMLStreamParser::handle_error()
|
||||
XMLStreamParser::EventType XMLStreamParser::next()
|
||||
{
|
||||
if (_parserState == state_next)
|
||||
return next_(false);
|
||||
return nextImpl(false);
|
||||
else
|
||||
{
|
||||
// If we previously peeked at start/end_element, then adjust
|
||||
@ -205,7 +202,7 @@ XMLStreamParser::EventType XMLStreamParser::next()
|
||||
//
|
||||
switch (_currentEvent)
|
||||
{
|
||||
case EndElement:
|
||||
case EV_END_ELEMENT:
|
||||
{
|
||||
if (!_elementState.empty() && _elementState.back().depth == _depth)
|
||||
popElement();
|
||||
@ -213,7 +210,7 @@ XMLStreamParser::EventType XMLStreamParser::next()
|
||||
_depth--;
|
||||
break;
|
||||
}
|
||||
case StartElement:
|
||||
case EV_START_ELEMENT:
|
||||
{
|
||||
_depth++;
|
||||
break;
|
||||
@ -245,7 +242,7 @@ const std::string& XMLStreamParser::attribute(const QName& qn) const
|
||||
}
|
||||
}
|
||||
|
||||
throw XMLStreamParserException(*this, "attribute '" + qn.string() + "' expected");
|
||||
throw XMLStreamParserException(*this, "attribute '" + qn.toString() + "' expected");
|
||||
}
|
||||
|
||||
|
||||
@ -301,7 +298,7 @@ void XMLStreamParser::nextExpect(EventType e)
|
||||
void XMLStreamParser::nextExpect(EventType e, const std::string& ns, const std::string& n)
|
||||
{
|
||||
if (next() != e || namespaceURI() != ns || localName() != n)
|
||||
throw XMLStreamParserException(*this, std::string(parserEventStrings[e]) + " '" + QName(ns, n).string() + "' expected");
|
||||
throw XMLStreamParserException(*this, std::string(parserEventStrings[e]) + " '" + QName(ns, n).toString() + "' expected");
|
||||
}
|
||||
|
||||
|
||||
@ -314,7 +311,7 @@ std::string XMLStreamParser::element()
|
||||
// will be no characters event.
|
||||
//
|
||||
EventType e(next());
|
||||
if (e == Characters)
|
||||
if (e == EV_CHARACTERS)
|
||||
{
|
||||
r.swap(value());
|
||||
e = next();
|
||||
@ -323,7 +320,7 @@ std::string XMLStreamParser::element()
|
||||
// We cannot really get anything other than end_element since
|
||||
// the simple content validation won't allow it.
|
||||
//
|
||||
assert(e == EndElement);
|
||||
poco_assert(e == EV_END_ELEMENT);
|
||||
|
||||
return r;
|
||||
}
|
||||
@ -331,7 +328,7 @@ std::string XMLStreamParser::element()
|
||||
|
||||
std::string XMLStreamParser::element(const QName& qn, const std::string& dv)
|
||||
{
|
||||
if (peek() == StartElement && getQName() == qn)
|
||||
if (peek() == EV_START_ELEMENT && getQName() == qn)
|
||||
{
|
||||
next();
|
||||
return element();
|
||||
@ -343,7 +340,7 @@ std::string XMLStreamParser::element(const QName& qn, const std::string& dv)
|
||||
|
||||
const XMLStreamParser::ElementEntry* XMLStreamParser::getElementImpl() const
|
||||
{
|
||||
// The start_element_() Expat handler may have already provisioned
|
||||
// The handleStartElement() Expat handler may have already provisioned
|
||||
// an entry in the element stack. In this case, we need to get the
|
||||
// one before it, if any.
|
||||
//
|
||||
@ -375,21 +372,21 @@ void XMLStreamParser::popElement()
|
||||
for (AttributeMapType::const_iterator i(e.attributeMap.begin()); i != e.attributeMap.end(); ++i)
|
||||
{
|
||||
if (!i->second.handled)
|
||||
throw XMLStreamParserException(*this, "unexpected attribute '" + i->first.string() + "'");
|
||||
throw XMLStreamParserException(*this, "unexpected attribute '" + i->first.toString() + "'");
|
||||
}
|
||||
assert(false);
|
||||
poco_assert(false);
|
||||
}
|
||||
|
||||
_elementState.pop_back();
|
||||
}
|
||||
|
||||
|
||||
XMLStreamParser::EventType XMLStreamParser::next_(bool peek)
|
||||
XMLStreamParser::EventType XMLStreamParser::nextImpl(bool peek)
|
||||
{
|
||||
EventType e(next_body());
|
||||
EventType e(nextBody());
|
||||
|
||||
// Content-specific processing. Note that we handle characters in the
|
||||
// characters_() Expat handler for two reasons. Firstly, it is faster
|
||||
// handleCharacters() Expat handler for two reasons. Firstly, it is faster
|
||||
// to ignore the whitespaces at the source. Secondly, this allows us
|
||||
// to distinguish between element and attribute characters. We can
|
||||
// move this processing to the handler because the characters event
|
||||
@ -397,7 +394,7 @@ XMLStreamParser::EventType XMLStreamParser::next_(bool peek)
|
||||
//
|
||||
switch (e)
|
||||
{
|
||||
case EndElement:
|
||||
case EV_END_ELEMENT:
|
||||
{
|
||||
// If this is a peek, then avoid popping the stack just yet.
|
||||
// This way, the attribute map will still be valid until we
|
||||
@ -412,7 +409,7 @@ XMLStreamParser::EventType XMLStreamParser::next_(bool peek)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case StartElement:
|
||||
case EV_START_ELEMENT:
|
||||
{
|
||||
if (const ElementEntry* e = getElement())
|
||||
{
|
||||
@ -442,7 +439,7 @@ XMLStreamParser::EventType XMLStreamParser::next_(bool peek)
|
||||
}
|
||||
|
||||
|
||||
XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
XMLStreamParser::EventType XMLStreamParser::nextBody()
|
||||
{
|
||||
// See if we have any start namespace declarations we need to return.
|
||||
//
|
||||
@ -452,7 +449,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
//
|
||||
switch (_currentEvent)
|
||||
{
|
||||
case StartNamespaceDecl:
|
||||
case EV_START_NAMESPACE_DECL:
|
||||
{
|
||||
if (++_startNamespaceIndex == _startNamespace.size())
|
||||
{
|
||||
@ -463,16 +460,16 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
}
|
||||
// Fall through.
|
||||
}
|
||||
case StartElement:
|
||||
case EV_START_ELEMENT:
|
||||
{
|
||||
_currentEvent = StartNamespaceDecl;
|
||||
_currentEvent = EV_START_NAMESPACE_DECL;
|
||||
_qualifiedName = &_startNamespace[_startNamespaceIndex];
|
||||
return _currentEvent;
|
||||
}
|
||||
default:
|
||||
{
|
||||
assert(false);
|
||||
return _currentEvent = Eof;
|
||||
poco_assert(false);
|
||||
return _currentEvent = EV_EOF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -485,18 +482,18 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
//
|
||||
switch (_currentEvent)
|
||||
{
|
||||
case StartAttribute:
|
||||
case EV_START_ATTRIBUTE:
|
||||
{
|
||||
_currentEvent = Characters;
|
||||
_currentEvent = EV_CHARACTERS;
|
||||
_pvalue = &_attributes[_currentAttributeIndex].value;
|
||||
return _currentEvent;
|
||||
}
|
||||
case Characters:
|
||||
case EV_CHARACTERS:
|
||||
{
|
||||
_currentEvent = EndAttribute; // Name is already set.
|
||||
_currentEvent = EV_END_ATTRIBUTE; // Name is already set.
|
||||
return _currentEvent;
|
||||
}
|
||||
case EndAttribute:
|
||||
case EV_END_ATTRIBUTE:
|
||||
{
|
||||
if (++_currentAttributeIndex == _attributes.size())
|
||||
{
|
||||
@ -508,17 +505,17 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
}
|
||||
// Fall through.
|
||||
}
|
||||
case StartElement:
|
||||
case StartNamespaceDecl:
|
||||
case EV_START_ELEMENT:
|
||||
case EV_START_NAMESPACE_DECL:
|
||||
{
|
||||
_currentEvent = StartAttribute;
|
||||
_currentEvent = EV_START_ATTRIBUTE;
|
||||
_qualifiedName = &_attributes[_currentAttributeIndex].qname;
|
||||
return _currentEvent;
|
||||
}
|
||||
default:
|
||||
{
|
||||
assert(false);
|
||||
return _currentEvent = Eof;
|
||||
poco_assert(false);
|
||||
return _currentEvent = EV_EOF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -531,7 +528,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
//
|
||||
switch (_currentEvent)
|
||||
{
|
||||
case EndNamespaceDecl:
|
||||
case EV_END_NAMESPACE_DECL:
|
||||
{
|
||||
if (++_endNamespaceIndex == _endNamespace.size())
|
||||
{
|
||||
@ -547,7 +544,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
//
|
||||
default:
|
||||
{
|
||||
_currentEvent = EndNamespaceDecl;
|
||||
_currentEvent = EV_END_NAMESPACE_DECL;
|
||||
_qualifiedName = &_endNamespace[_endNamespaceIndex];
|
||||
return _currentEvent;
|
||||
}
|
||||
@ -556,10 +553,10 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
|
||||
// Check the queue.
|
||||
//
|
||||
if (_queue != Eof)
|
||||
if (_queue != EV_EOF)
|
||||
{
|
||||
_currentEvent = _queue;
|
||||
_queue = Eof;
|
||||
_queue = EV_EOF;
|
||||
|
||||
_line = XML_GetCurrentLineNumber(_parser);
|
||||
_column = XML_GetCurrentColumnNumber(_parser);
|
||||
@ -583,12 +580,12 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
}
|
||||
case XML_PARSING:
|
||||
{
|
||||
assert(false);
|
||||
return _currentEvent = Eof;
|
||||
poco_assert(false);
|
||||
return _currentEvent = EV_EOF;
|
||||
}
|
||||
case XML_FINISHED:
|
||||
{
|
||||
return _currentEvent = Eof;
|
||||
return _currentEvent = EV_EOF;
|
||||
}
|
||||
case XML_SUSPENDED:
|
||||
{
|
||||
@ -607,12 +604,12 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
// unless this was the last chunk, in which case this is eof.
|
||||
//
|
||||
if (ps.finalBuffer)
|
||||
return _currentEvent = Eof;
|
||||
return _currentEvent = EV_EOF;
|
||||
|
||||
break;
|
||||
}
|
||||
case XML_STATUS_ERROR:
|
||||
handle_error();
|
||||
handleError();
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -622,7 +619,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
// or reach eof.
|
||||
//
|
||||
if (!_accumulateContent)
|
||||
_currentEvent = Eof;
|
||||
_currentEvent = EV_EOF;
|
||||
|
||||
XML_Status s;
|
||||
do
|
||||
@ -632,7 +629,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
s = XML_Parse(_parser, static_cast<const char*>(_data.buf), static_cast<int>(_size), true);
|
||||
|
||||
if (s == XML_STATUS_ERROR)
|
||||
handle_error();
|
||||
handleError();
|
||||
|
||||
break;
|
||||
}
|
||||
@ -664,7 +661,7 @@ XMLStreamParser::EventType XMLStreamParser::next_body()
|
||||
s = XML_ParseBuffer(_parser, static_cast<int>(is.gcount()), eof);
|
||||
|
||||
if (s == XML_STATUS_ERROR)
|
||||
handle_error();
|
||||
handleError();
|
||||
|
||||
if (eof)
|
||||
break;
|
||||
@ -710,7 +707,7 @@ static void splitName(const XML_Char* s, QName& qn)
|
||||
}
|
||||
|
||||
|
||||
void XMLCALL XMLStreamParser::start_element_(void* v, const XML_Char* name, const XML_Char** atts)
|
||||
void XMLCALL XMLStreamParser::handleStartElement(void* v, const XML_Char* name, const XML_Char** atts)
|
||||
{
|
||||
XMLStreamParser& p(*static_cast<XMLStreamParser*>(v));
|
||||
|
||||
@ -725,7 +722,7 @@ void XMLCALL XMLStreamParser::start_element_(void* v, const XML_Char* name, cons
|
||||
|
||||
// Cannot be a followup event.
|
||||
//
|
||||
assert(ps.parsing == XML_PARSING);
|
||||
poco_assert(ps.parsing == XML_PARSING);
|
||||
|
||||
// When accumulating characters in simple content, we expect to
|
||||
// see more characters or end element. Seeing start element is
|
||||
@ -742,7 +739,7 @@ void XMLCALL XMLStreamParser::start_element_(void* v, const XML_Char* name, cons
|
||||
return;
|
||||
}
|
||||
|
||||
p._currentEvent = StartElement;
|
||||
p._currentEvent = EV_START_ELEMENT;
|
||||
splitName(name, p._qname);
|
||||
|
||||
p._line = XML_GetCurrentLineNumber(p._parser);
|
||||
@ -779,7 +776,7 @@ void XMLCALL XMLStreamParser::start_element_(void* v, const XML_Char* name, cons
|
||||
}
|
||||
else
|
||||
{
|
||||
p._attributes.push_back(attribute_type());
|
||||
p._attributes.push_back(AttributeType());
|
||||
splitName(*atts, p._attributes.back().qname);
|
||||
p._attributes.back().value = *(atts + 1);
|
||||
}
|
||||
@ -794,7 +791,7 @@ void XMLCALL XMLStreamParser::start_element_(void* v, const XML_Char* name, cons
|
||||
}
|
||||
|
||||
|
||||
void XMLCALL XMLStreamParser::end_element_(void* v, const XML_Char* name)
|
||||
void XMLCALL XMLStreamParser::handleEndElement(void* v, const XML_Char* name)
|
||||
{
|
||||
XMLStreamParser& p(*static_cast<XMLStreamParser*>(v));
|
||||
|
||||
@ -811,7 +808,7 @@ void XMLCALL XMLStreamParser::end_element_(void* v, const XML_Char* name)
|
||||
// case the element name is already set.
|
||||
//
|
||||
if (ps.parsing != XML_PARSING)
|
||||
p._queue = EndElement;
|
||||
p._queue = EV_END_ELEMENT;
|
||||
else
|
||||
{
|
||||
splitName(name, p._qname);
|
||||
@ -819,10 +816,10 @@ void XMLCALL XMLStreamParser::end_element_(void* v, const XML_Char* name)
|
||||
// If we are accumulating characters, then queue this event.
|
||||
//
|
||||
if (p._accumulateContent)
|
||||
p._queue = EndElement;
|
||||
p._queue = EV_END_ELEMENT;
|
||||
else
|
||||
{
|
||||
p._currentEvent = EndElement;
|
||||
p._currentEvent = EV_END_ELEMENT;
|
||||
|
||||
p._line = XML_GetCurrentLineNumber(p._parser);
|
||||
p._column = XML_GetCurrentColumnNumber(p._parser);
|
||||
@ -833,7 +830,7 @@ void XMLCALL XMLStreamParser::end_element_(void* v, const XML_Char* name)
|
||||
}
|
||||
|
||||
|
||||
void XMLCALL XMLStreamParser::characters_(void* v, const XML_Char* s, int n)
|
||||
void XMLCALL XMLStreamParser::handleCharacters(void* v, const XML_Char* s, int n)
|
||||
{
|
||||
XMLStreamParser& p(*static_cast<XMLStreamParser*>(v));
|
||||
|
||||
@ -881,12 +878,12 @@ void XMLCALL XMLStreamParser::characters_(void* v, const XML_Char* s, int n)
|
||||
//
|
||||
if (p._accumulateContent || ps.parsing != XML_PARSING)
|
||||
{
|
||||
assert(p._currentEvent == Characters);
|
||||
poco_assert(p._currentEvent == EV_CHARACTERS);
|
||||
p._value.append(s, n);
|
||||
}
|
||||
else
|
||||
{
|
||||
p._currentEvent = Characters;
|
||||
p._currentEvent = EV_CHARACTERS;
|
||||
p._value.assign(s, n);
|
||||
|
||||
p._line = XML_GetCurrentLineNumber(p._parser);
|
||||
@ -904,7 +901,7 @@ void XMLCALL XMLStreamParser::characters_(void* v, const XML_Char* s, int n)
|
||||
}
|
||||
|
||||
|
||||
void XMLCALL XMLStreamParser::start_namespace_decl_(void* v, const XML_Char* prefix, const XML_Char* ns)
|
||||
void XMLCALL XMLStreamParser::handleStartNamespaceDecl(void* v, const XML_Char* prefix, const XML_Char* ns)
|
||||
{
|
||||
XMLStreamParser& p(*static_cast<XMLStreamParser*>(v));
|
||||
|
||||
@ -923,7 +920,7 @@ void XMLCALL XMLStreamParser::start_namespace_decl_(void* v, const XML_Char* pre
|
||||
}
|
||||
|
||||
|
||||
void XMLCALL XMLStreamParser::end_namespace_decl_(void* v, const XML_Char* prefix)
|
||||
void XMLCALL XMLStreamParser::handleEndNamespaceDecl(void* v, const XML_Char* prefix)
|
||||
{
|
||||
XMLStreamParser& p(*static_cast<XMLStreamParser*>(v));
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
// Package: XML
|
||||
// Module: XMLStreamParserException
|
||||
//
|
||||
// Definition of the XMLStreamParserException class.
|
||||
//
|
||||
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user