enh(Poco): Mark deprecated functionality with C++ attributes and resolve internal usage of deprecated functions (#4551)

* enh(poco): Replace deprecated comments with C++ deprecated attribute.

* enh(Poco): Replace some deprecated functionality in Poco sources. (#4426)

* enh(Poco): Replace more deprecated functionality in Poco sources. (#4426)

* fix(CMake): Variable BUILD_SHARED_LIBS must be defined properly to create valid binaries.

* enh: Code improvements done while resolving deprecated functionality (#4426)

* Un-deprecate LocalDateTme (#4426)

* enh(Poco): Replace usage of deprecated functionality with other functions/classes (#4426)

* chore(SSL): temporarily un-deprecate SSL-related functionality (#4426)

* chore(SSL): temporarily un-deprecate old MongoDB protocol functionality (#4426)

* enh(Poco): Minor Hash improvements (#4426)

* enh(Foundation): Compile deprecated hash tests only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Net): Compile deprecated Socket::select functionality only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Bonjour): Replace deprecated Socket::select with PollSet (#4426)

* enh(Poco): Introduce POCO_DEPRECATED macro to have the ability to disable deprecation warnings in applications (#4426)

* test(ODBC): add few asserts to testStoredProcedureDynamicVar

* fix(ODBC): rename DynamicAny -> DynamicVar in tests

* fix(ODBC): make Dignostics static members inline to prevent explicit instantiation warnings on windows

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
This commit is contained in:
Matej Kenda 2024-07-29 08:16:50 +02:00
parent 5117e27515
commit f24547cdcf
112 changed files with 586 additions and 550 deletions

View File

@ -65,12 +65,7 @@ include(GNUInstallDirs)
# Include some common macros to simpilfy the Poco CMake files # Include some common macros to simpilfy the Poco CMake files
include(PocoMacros) include(PocoMacros)
if(POCO_STATIC) option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
message(WARNING "POCO_STATIC has been deprecated. Please use BUILD_SHARED_LIBS=NO to build static libraries.")
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
else()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()
if(MSVC) if(MSVC)
option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF) option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)

View File

@ -81,14 +81,14 @@ void TestCase::assertEquals(const char* expected, const std::string& actual, lon
void TestCase::assertNotNull(const void* pointer, const std::string& pointerExpression, long lineNumber, const std::string& fileName) void TestCase::assertNotNull(const void* pointer, const std::string& pointerExpression, long lineNumber, const std::string& fileName)
{ {
if (pointer == NULL) if (pointer == nullptr)
throw CppUnitException(pointerExpression + " must not be NULL", lineNumber, fileName); throw CppUnitException(pointerExpression + " must not be NULL", lineNumber, fileName);
} }
void TestCase::assertNull(const void* pointer, const std::string& pointerExpression, long lineNumber, const std::string& fileName) void TestCase::assertNull(const void* pointer, const std::string& pointerExpression, long lineNumber, const std::string& fileName)
{ {
if (pointer != NULL) if (pointer != nullptr)
throw CppUnitException(pointerExpression + " must be NULL", lineNumber, fileName); throw CppUnitException(pointerExpression + " must be NULL", lineNumber, fileName);
} }

View File

@ -162,19 +162,18 @@ void TextTestResult::printErrors(std::ostream& stream)
stream << "There were " << testErrors() << " errors: " << std::endl; stream << "There were " << testErrors() << " errors: " << std::endl;
int i = 1; int i = 1;
for (std::vector<TestFailure*>::iterator it = errors().begin(); it != errors().end(); ++it) for (const auto& failure : errors())
{ {
TestFailure* failure = *it;
CppUnitException* e = failure->thrownException(); CppUnitException* e = failure->thrownException();
stream << std::setw(2) << i stream << std::setw(2) << i
<< ": " << ": "
<< failure->failedTest()->toString() << "\n" << failure->failedTest()->toString() << "\n"
<< " \"" << (e ? e->what() : "") << "\"\n" << " \"" << (e ? e->what() : "") << "\"\n"
<< " in \"" << " in \""
<< (e ? e->fileName() : std::string()) << (e ? e->fileName() : std::string())
<< "\", line "; << "\", line ";
if (e == 0) if (e == nullptr)
{ {
stream << "0"; stream << "0";
} }
@ -210,10 +209,9 @@ void TextTestResult::printFailures(std::ostream& stream)
int i = 1; int i = 1;
for (std::vector<TestFailure*>::iterator it = failures().begin(); it != failures().end(); ++it) for (const auto& failure : failures())
{ {
TestFailure* failure = *it; CppUnitException* e = failure->thrownException();
CppUnitException* e = failure->thrownException();
stream << std::setw(2) << i stream << std::setw(2) << i
<< ": " << ": "
@ -222,7 +220,7 @@ void TextTestResult::printFailures(std::ostream& stream)
<< " in \"" << " in \""
<< (e ? e->fileName() : std::string()) << (e ? e->fileName() : std::string())
<< "\", line "; << "\", line ";
if (e == 0) if (e == nullptr)
{ {
stream << "0"; stream << "0";
} }

View File

@ -31,8 +31,8 @@ namespace Crypto {
class X509Certificate; class X509Certificate;
class PKCS12Container; class PKCS12Container;
//class [[deprecated]] ECKey;
//@ deprecated
class Crypto_API ECKey: public KeyPair class Crypto_API ECKey: public KeyPair
/// This class stores an EC key pair, consisting /// This class stores an EC key pair, consisting
/// of private and public key. Storage of the private /// of private and public key. Storage of the private

View File

@ -22,8 +22,6 @@
#include "Poco/Crypto/Crypto.h" #include "Poco/Crypto/Crypto.h"
#include "Poco/Crypto/EVPPKey.h" #include "Poco/Crypto/EVPPKey.h"
#include "Poco/Crypto/KeyPairImpl.h" #include "Poco/Crypto/KeyPairImpl.h"
#include "Poco/Crypto/OpenSSLInitializer.h"
#include "Poco/RefCountedObject.h"
#include "Poco/AutoPtr.h" #include "Poco/AutoPtr.h"
#include <istream> #include <istream>
#include <ostream> #include <ostream>

View File

@ -28,16 +28,15 @@
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#include <sstream> #include <sstream>
#include <typeinfo>
#include <map> #include <map>
namespace Poco { namespace Poco {
namespace Crypto { namespace Crypto {
//@deprecated //class [[deprecated]] ECKey;
//class [[deprecated]] RSAKey;
class ECKey; class ECKey;
//@deprecated
class RSAKey; class RSAKey;
class PKCS12Container; class PKCS12Container;
class X509Certificate; class X509Certificate;
@ -93,8 +92,8 @@ public:
/// Constructs EVPPKey from EVP_PKEY pointer. /// Constructs EVPPKey from EVP_PKEY pointer.
/// The content behind the supplied pointer is internally duplicated. /// The content behind the supplied pointer is internally duplicated.
//@ deprecated
template<typename K> template<typename K>
//[[deprecated]] explicit EVPPKey(K* pKey): _pEVPPKey(EVP_PKEY_new())
explicit EVPPKey(K* pKey): _pEVPPKey(EVP_PKEY_new()) explicit EVPPKey(K* pKey): _pEVPPKey(EVP_PKEY_new())
/// Constructs EVPPKey from a "native" OpenSSL (RSA or EC_KEY), /// Constructs EVPPKey from a "native" OpenSSL (RSA or EC_KEY),
/// or a Poco wrapper (RSAKey, ECKey) key pointer. /// or a Poco wrapper (RSAKey, ECKey) key pointer.
@ -185,13 +184,16 @@ private:
void newECKey(const char* group); void newECKey(const char* group);
void duplicate(EVP_PKEY* pEVPPKey); void duplicate(EVP_PKEY* pEVPPKey);
//@ deprecated //[[deprecated]]
void setKey(ECKey* pKey); void setKey(ECKey* pKey);
//@ deprecated
//[[deprecated]]
void setKey(RSAKey* pKey); void setKey(RSAKey* pKey);
//@ deprecated
//[[deprecated]]
void setKey(EC_KEY* pKey); void setKey(EC_KEY* pKey);
//@ deprecated
//[[deprecated]]
void setKey(RSA* pKey); void setKey(RSA* pKey);
static int passCB(char* buf, int size, int, void* pass); static int passCB(char* buf, int size, int, void* pass);
@ -336,9 +338,7 @@ private:
EVP_PKEY* _pEVPPKey = 0; EVP_PKEY* _pEVPPKey = 0;
static const std::map<int, std::string> KNOWN_TYPES; static const std::map<int, std::string> KNOWN_TYPES;
//@deprecated
friend class ECKeyImpl; friend class ECKeyImpl;
//@deprecated
friend class RSAKeyImpl; friend class RSAKeyImpl;
}; };

View File

@ -51,7 +51,7 @@ public:
DIGEST_SHA1 DIGEST_SHA1
}; };
//@ deprecated //[[deprecated]] RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1);
RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1); RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1);
/// Creates the RSADigestEngine with the given RSA key, /// Creates the RSADigestEngine with the given RSA key,
/// using the MD5 or SHA-1 hash algorithm. /// using the MD5 or SHA-1 hash algorithm.

View File

@ -30,8 +30,8 @@ namespace Crypto {
class X509Certificate; class X509Certificate;
class PKCS12Container; class PKCS12Container;
//class [[deprecated]] RSAKey;
//@ deprecated
class Crypto_API RSAKey: public KeyPair class Crypto_API RSAKey: public KeyPair
/// This class stores an RSA key pair, consisting /// This class stores an RSA key pair, consisting
/// of private and public key. Storage of the private /// of private and public key. Storage of the private
@ -81,7 +81,7 @@ public:
/// OpenSSL will auto-create the public key from the private key. /// OpenSSL will auto-create the public key from the private key.
RSAKey(std::istream* pPublicKeyStream, RSAKey(std::istream* pPublicKeyStream,
std::istream* pPrivateKeyStream = 0, std::istream* pPrivateKeyStream = nullptr,
const std::string& privateKeyPassphrase = ""); const std::string& privateKeyPassphrase = "");
/// Creates the RSAKey, by reading public and private key from the given streams and /// Creates the RSAKey, by reading public and private key from the given streams and
/// using the given passphrase for the private key. /// using the given passphrase for the private key.
@ -132,4 +132,4 @@ inline RSAKeyImpl::Ptr RSAKey::impl() const
} } // namespace Poco::Crypto } } // namespace Poco::Crypto
#endif // Crypto_RSAKey_INCLUDED #endif // Crypto_RSAKey_INCLUDED

View File

@ -32,6 +32,7 @@ ECTest::~ECTest()
{ {
} }
#if defined(POCO_TEST_DEPRECATED)
void ECTest::testECNewKeys() void ECTest::testECNewKeys()
{ {
@ -176,6 +177,7 @@ void ECTest::testECDSASignManipulated()
} }
} }
#endif
void ECTest::setUp() void ECTest::setUp()
{ {
@ -191,10 +193,13 @@ CppUnit::Test* ECTest::suite()
{ {
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ECTest"); CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ECTest");
#if defined(POCO_TEST_DEPRECATED)
CppUnit_addTest(pSuite, ECTest, testECNewKeys); CppUnit_addTest(pSuite, ECTest, testECNewKeys);
CppUnit_addTest(pSuite, ECTest, testECNewKeysNoPassphrase); CppUnit_addTest(pSuite, ECTest, testECNewKeysNoPassphrase);
CppUnit_addTest(pSuite, ECTest, testECDSASignSha256); CppUnit_addTest(pSuite, ECTest, testECDSASignSha256);
CppUnit_addTest(pSuite, ECTest, testECDSASignManipulated); CppUnit_addTest(pSuite, ECTest, testECDSASignManipulated);
#endif
return pSuite; return pSuite;
} }

View File

@ -25,11 +25,15 @@ public:
ECTest(const std::string& name); ECTest(const std::string& name);
~ECTest(); ~ECTest();
#if defined(POCO_TEST_DEPRECATED)
void testECNewKeys(); void testECNewKeys();
void testECNewKeysNoPassphrase(); void testECNewKeysNoPassphrase();
void testECDSASignSha256(); void testECDSASignSha256();
void testECDSASignManipulated(); void testECDSASignManipulated();
#endif
void setUp(); void setUp();
void tearDown(); void tearDown();

View File

@ -41,7 +41,7 @@ class DNSSD_Bonjour_API EventLoop: public Poco::Runnable
/// Bonjour machinery. /// Bonjour machinery.
{ {
public: public:
typedef Poco::ScopedLock<EventLoop> ScopedLock; using ScopedLock = Poco::ScopedLock<EventLoop>;
enum enum
{ {
@ -51,7 +51,7 @@ public:
EventLoop(); EventLoop();
/// Creates the EventLoop. /// Creates the EventLoop.
~EventLoop(); ~EventLoop() override;
/// Destroys the EventLoop. /// Destroys the EventLoop.
void add(DNSServiceRef sdRef); void add(DNSServiceRef sdRef);

View File

@ -15,6 +15,7 @@
#include "Poco/DNSSD/Bonjour/EventLoop.h" #include "Poco/DNSSD/Bonjour/EventLoop.h"
#include "Poco/Net/PollSet.h"
#include "Poco/Net/StreamSocket.h" #include "Poco/Net/StreamSocket.h"
#include "Poco/Net/StreamSocketImpl.h" #include "Poco/Net/StreamSocketImpl.h"
#include <dns_sd.h> #include <dns_sd.h>
@ -46,11 +47,9 @@ EventLoop::~EventLoop()
void EventLoop::shutdown() void EventLoop::shutdown()
{ {
RefToSock::iterator it = _refs.begin(); for (auto& it: _refs)
RefToSock::iterator itEnd = _refs.end();
for (; it != itEnd; ++it)
{ {
DNSServiceRefDeallocate(it->first); DNSServiceRefDeallocate(it.first);
} }
_refs.clear(); _refs.clear();
_sockets.clear(); _sockets.clear();
@ -83,7 +82,7 @@ void EventLoop::remove(DNSServiceRef sdRef)
void EventLoop::removeImpl(DNSServiceRef sdRef) void EventLoop::removeImpl(DNSServiceRef sdRef)
{ {
RefToSock::iterator it = _refs.find(sdRef); auto it = _refs.find(sdRef);
if (it != _refs.end()) if (it != _refs.end())
{ {
_sockets.erase(it->second); _sockets.erase(it->second);
@ -95,59 +94,52 @@ void EventLoop::removeImpl(DNSServiceRef sdRef)
void EventLoop::run() void EventLoop::run()
{ {
Poco::Net::Socket::SocketList readList; Poco::Net::PollSet pollSet;
Poco::Net::Socket::SocketList writeList;
Poco::Net::Socket::SocketList errList;
while (!_stop) while (!_stop)
{ {
readList.clear();
if (!_refs.empty() || _refAdded.tryWait(EVENTLOOP_TIMEOUT)) if (!_refs.empty() || _refAdded.tryWait(EVENTLOOP_TIMEOUT))
{ {
Poco::Mutex::ScopedLock lock(_mutex); Poco::Mutex::ScopedLock lock(_mutex);
for (const auto& r: _refs)
RefToSock::const_iterator it = _refs.begin();
RefToSock::const_iterator itEnd = _refs.end();
for (; it != itEnd; ++it)
{ {
readList.push_back(it->second); pollSet.add(r.second, Net::Socket::SELECT_READ);
} }
} }
if (!readList.empty()) if (!pollSet.empty())
{ {
Poco::Timespan timeout(1000*EVENTLOOP_TIMEOUT); Poco::Timespan timeout(1000LL * EVENTLOOP_TIMEOUT);
int ready = Poco::Net::Socket::select(readList, writeList, errList, timeout); const auto sm = pollSet.poll(timeout);
if (ready > 0) if (!sm.empty())
{ {
Poco::Net::Socket::SocketList::iterator it = readList.begin(); for (const auto& it: sm)
Poco::Net::Socket::SocketList::iterator itEnd = readList.end();
for (; it != itEnd; ++it)
{ {
Poco::Mutex::ScopedLock lock(_mutex); Poco::Mutex::ScopedLock lock(_mutex);
if (it.second & Net::PollSet::POLL_READ)
SockToRef::iterator itSock = _sockets.find(*it);
poco_assert_dbg (itSock != _sockets.end());
RefSet::iterator itSet = _invalidatedRefs.find(itSock->second);
if (itSet != _invalidatedRefs.end())
{ {
removeImpl(itSock->second); auto& socket = it.first;
_invalidatedRefs.erase(itSet); const auto itSock = _sockets.find(socket);
} poco_assert_dbg (itSock != _sockets.end());
else auto itSet = _invalidatedRefs.find(itSock->second);
{ if (itSet != _invalidatedRefs.end())
DNSServiceProcessResult(itSock->second); {
removeImpl(itSock->second);
_invalidatedRefs.erase(itSet);
}
else
{
DNSServiceProcessResult(itSock->second);
}
} }
} }
} }
} }
Poco::Mutex::ScopedLock lock(_mutex); Poco::Mutex::ScopedLock lock(_mutex);
RefSet::iterator itSet =_invalidatedRefs.begin(); for (auto& ir: _invalidatedRefs)
RefSet::iterator itSetEnd = _invalidatedRefs.end();
for (; itSet != itSetEnd; ++itSet)
{ {
removeImpl(*itSet); removeImpl(ir);
} }
_invalidatedRefs.clear(); _invalidatedRefs.clear();
} }

View File

@ -2983,7 +2983,7 @@ void SQLExecutor::filter(const std::string& query, const std::string& intFldName
{ {
Statement stmt = (session() << query, now); Statement stmt = (session() << query, now);
RecordSet rset(stmt); RecordSet rset(stmt);
assertTrue (rset.totalRowCount() == 4); assertTrue (rset.getTotalRowCount() == 4);
RowFilter::Ptr pRF = new RowFilter(&rset); RowFilter::Ptr pRF = new RowFilter(&rset);
assertTrue (pRF->isEmpty()); assertTrue (pRF->isEmpty());
pRF->add(intFldName, RowFilter::VALUE_EQUAL, 1); pRF->add(intFldName, RowFilter::VALUE_EQUAL, 1);

View File

@ -45,10 +45,10 @@ class Diagnostics
{ {
public: public:
static const unsigned int SQL_STATE_SIZE = SQL_SQLSTATE_SIZE + 1; inline static const unsigned int SQL_STATE_SIZE = SQL_SQLSTATE_SIZE + 1;
static const unsigned int SQL_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH + 1; inline static const unsigned int SQL_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH + 1;
static const unsigned int SQL_NAME_LENGTH = 128; inline static const unsigned int SQL_NAME_LENGTH = 128;
static const std::string DATA_TRUNCATED; inline static const std::string DATA_TRUNCATED;
struct DiagnosticFields struct DiagnosticFields
{ {

View File

@ -323,17 +323,17 @@ public:
bool extract(std::size_t pos, std::list<Poco::Any>& val); bool extract(std::size_t pos, std::list<Poco::Any>& val);
/// Extracts an Any list. /// Extracts an Any list.
bool extract(std::size_t pos, Poco::DynamicAny& val); bool extract(std::size_t pos, Poco::Dynamic::Var& val);
/// Extracts a DynamicAny. /// Extracts a Dynamic::Var.
bool extract(std::size_t pos, std::vector<Poco::DynamicAny>& val); bool extract(std::size_t pos, std::vector<Poco::Dynamic::Var>& val);
/// Extracts a DynamicAny vector. /// Extracts a Dynamic::Var vector.
bool extract(std::size_t pos, std::deque<Poco::DynamicAny>& val); bool extract(std::size_t pos, std::deque<Poco::Dynamic::Var>& val);
/// Extracts a DynamicAny deque. /// Extracts a Dynamic::Var deque.
bool extract(std::size_t pos, std::list<Poco::DynamicAny>& val); bool extract(std::size_t pos, std::list<Poco::Dynamic::Var>& val);
/// Extracts a DynamicAny list. /// Extracts a Dynamic::Var list.
void setDataExtraction(Preparator::DataExtraction ext); void setDataExtraction(Preparator::DataExtraction ext);
/// Set data extraction mode. /// Set data extraction mode.
@ -515,7 +515,7 @@ private:
template <typename T> template <typename T>
bool extractImpl(std::size_t pos, T& val) bool extractImpl(std::size_t pos, T& val)
/// Utility function for extraction of Any and DynamicAny. /// Utility function for extraction of Any and Dynamic::Var.
{ {
ODBCMetaColumn column(_rStmt, pos); ODBCMetaColumn column(_rStmt, pos);

View File

@ -27,7 +27,7 @@
#include "Poco/Data/LOB.h" #include "Poco/Data/LOB.h"
#include "Poco/Types.h" #include "Poco/Types.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/SharedPtr.h" #include "Poco/SharedPtr.h"
#include "Poco/UTFString.h" #include "Poco/UTFString.h"
@ -369,17 +369,17 @@ public:
void prepare(std::size_t pos, const std::list<Poco::Any>& val); void prepare(std::size_t pos, const std::list<Poco::Any>& val);
/// Prepares an Any list. /// Prepares an Any list.
void prepare(std::size_t pos, const Poco::DynamicAny& val); void prepare(std::size_t pos, const Poco::Dynamic::Var& val);
/// Prepares a DynamicAny. /// Prepares a Dynamic::Var.
void prepare(std::size_t pos, const std::vector<Poco::DynamicAny>& val); void prepare(std::size_t pos, const std::vector<Poco::Dynamic::Var>& val);
/// Prepares a DynamicAny vector. /// Prepares a Dynamic::Var vector.
void prepare(std::size_t pos, const std::deque<Poco::DynamicAny>& val); void prepare(std::size_t pos, const std::deque<Poco::Dynamic::Var>& val);
/// Prepares a DynamicAny deque. /// Prepares a Dynamic::Var deque.
void prepare(std::size_t pos, const std::list<Poco::DynamicAny>& val); void prepare(std::size_t pos, const std::list<Poco::Dynamic::Var>& val);
/// Prepares a DynamicAny list. /// Prepares a Dynamic::Var list.
std::size_t columns() const; std::size_t columns() const;
/// Returns the number of columns. /// Returns the number of columns.
@ -429,7 +429,7 @@ private:
template <typename C> template <typename C>
void prepareImpl(std::size_t pos, const C* pVal = 0) void prepareImpl(std::size_t pos, const C* pVal = 0)
/// Utility function to prepare Any and DynamicAny. /// Utility function to prepare Any and Dynamic::Var.
{ {
ODBCMetaColumn col(_rStmt, pos); ODBCMetaColumn col(_rStmt, pos);
@ -1213,27 +1213,27 @@ inline void Preparator::prepare(std::size_t pos, const std::list<Poco::Any>& val
} }
inline void Preparator::prepare(std::size_t pos, const Poco::DynamicAny& val) inline void Preparator::prepare(std::size_t pos, const Poco::Dynamic::Var& val)
{ {
prepareImpl<std::vector<Poco::DynamicAny> >(pos); prepareImpl<std::vector<Poco::Dynamic::Var> >(pos);
} }
inline void Preparator::prepare(std::size_t pos, const std::vector<Poco::DynamicAny>& val) inline void Preparator::prepare(std::size_t pos, const std::vector<Poco::Dynamic::Var>& val)
{ {
prepareImpl<std::vector<Poco::DynamicAny> >(pos, &val); prepareImpl<std::vector<Poco::Dynamic::Var> >(pos, &val);
} }
inline void Preparator::prepare(std::size_t pos, const std::deque<Poco::DynamicAny>& val) inline void Preparator::prepare(std::size_t pos, const std::deque<Poco::Dynamic::Var>& val)
{ {
prepareImpl<std::deque<Poco::DynamicAny> >(pos, &val); prepareImpl<std::deque<Poco::Dynamic::Var> >(pos, &val);
} }
inline void Preparator::prepare(std::size_t pos, const std::list<Poco::DynamicAny>& val) inline void Preparator::prepare(std::size_t pos, const std::list<Poco::Dynamic::Var>& val)
{ {
prepareImpl<std::list<Poco::DynamicAny> >(pos, &val); prepareImpl<std::list<Poco::Dynamic::Var> >(pos, &val);
} }

View File

@ -67,8 +67,7 @@ public:
/// Creates the SessionImpl. Opens a connection to the database. /// Creates the SessionImpl. Opens a connection to the database.
/// Throws NotConnectedException if connection was not succesful. /// Throws NotConnectedException if connection was not succesful.
//@ deprecated POCO_DEPRECATED("") SessionImpl(const std::string& connect,
SessionImpl(const std::string& connect,
Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE, Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE,
bool enforceCapability=false, bool enforceCapability=false,
bool autoBind = true, bool autoBind = true,

View File

@ -20,7 +20,7 @@
#include "Poco/Data/ODBC/ODBC.h" #include "Poco/Data/ODBC/ODBC.h"
#include "Poco/NamedTuple.h" #include "Poco/NamedTuple.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include <vector> #include <vector>
#include <map> #include <map>
#ifdef POCO_OS_FAMILY_WINDOWS #ifdef POCO_OS_FAMILY_WINDOWS
@ -85,12 +85,12 @@ public:
void fillTypeInfo(const SQLHDBC* pHDBC); void fillTypeInfo(const SQLHDBC* pHDBC);
/// Fills the data type info structure for the database. /// Fills the data type info structure for the database.
DynamicAny getInfo(SQLSMALLINT type, const std::string& param) const; Dynamic::Var getInfo(SQLSMALLINT type, const std::string& param) const;
/// Returns information about specified data type as specified by parameter 'type'. /// Returns information about specified data type as specified by parameter 'type'.
/// The requested information is specified by parameter 'param'. /// The requested information is specified by parameter 'param'.
/// Will fail with a Poco::NotFoundException thrown if the param is not found /// Will fail with a Poco::NotFoundException thrown if the param is not found
bool tryGetInfo(SQLSMALLINT type, const std::string& param, DynamicAny& result) const; bool tryGetInfo(SQLSMALLINT type, const std::string& param, Dynamic::Var& result) const;
/// Returns information about specified data type as specified by parameter 'type' in param result. /// Returns information about specified data type as specified by parameter 'type' in param result.
/// The requested information is specified by parameter 'param'. /// The requested information is specified by parameter 'param'.
/// Will return false if the param is not found. The value of result will be not changed in this case. /// Will return false if the param is not found. The value of result will be not changed in this case.

View File

@ -518,7 +518,7 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
// Hence the funky flow control. // Hence the funky flow control.
if (_pTypeInfo) if (_pTypeInfo)
{ {
DynamicAny tmp; Dynamic::Var tmp;
bool foundSize(false); bool foundSize(false);
bool foundPrec(false); bool foundPrec(false);
foundSize = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp); foundSize = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);

View File

@ -1328,13 +1328,13 @@ bool Extractor::extract(std::size_t pos, std::list<Poco::Any>& val)
} }
bool Extractor::extract(std::size_t pos, Poco::DynamicAny& val) bool Extractor::extract(std::size_t pos, Poco::Dynamic::Var& val)
{ {
return extractImpl(pos, val); return extractImpl(pos, val);
} }
bool Extractor::extract(std::size_t pos, std::vector<Poco::DynamicAny>& val) bool Extractor::extract(std::size_t pos, std::vector<Poco::Dynamic::Var>& val)
{ {
if (Preparator::DE_BOUND == _dataExtraction) if (Preparator::DE_BOUND == _dataExtraction)
return extractBoundImpl(pos, val); return extractBoundImpl(pos, val);
@ -1343,7 +1343,7 @@ bool Extractor::extract(std::size_t pos, std::vector<Poco::DynamicAny>& val)
} }
bool Extractor::extract(std::size_t pos, std::deque<Poco::DynamicAny>& val) bool Extractor::extract(std::size_t pos, std::deque<Poco::Dynamic::Var>& val)
{ {
if (Preparator::DE_BOUND == _dataExtraction) if (Preparator::DE_BOUND == _dataExtraction)
return extractBoundImpl(pos, val); return extractBoundImpl(pos, val);
@ -1352,7 +1352,7 @@ bool Extractor::extract(std::size_t pos, std::deque<Poco::DynamicAny>& val)
} }
bool Extractor::extract(std::size_t pos, std::list<Poco::DynamicAny>& val) bool Extractor::extract(std::size_t pos, std::list<Poco::Dynamic::Var>& val)
{ {
if (Preparator::DE_BOUND == _dataExtraction) if (Preparator::DE_BOUND == _dataExtraction)
return extractBoundImpl(pos, val); return extractBoundImpl(pos, val);

View File

@ -167,7 +167,7 @@ void TypeInfo::fillTypeInfo(const SQLHDBC* pHDBC)
} }
DynamicAny TypeInfo::getInfo(SQLSMALLINT type, const std::string& param) const Dynamic::Var TypeInfo::getInfo(SQLSMALLINT type, const std::string& param) const
{ {
TypeInfoVec::const_iterator it = _typeInfo.begin(); TypeInfoVec::const_iterator it = _typeInfo.begin();
TypeInfoVec::const_iterator end = _typeInfo.end(); TypeInfoVec::const_iterator end = _typeInfo.end();
@ -181,7 +181,7 @@ DynamicAny TypeInfo::getInfo(SQLSMALLINT type, const std::string& param) const
} }
bool TypeInfo::tryGetInfo(SQLSMALLINT type, const std::string& param, DynamicAny& result) const bool TypeInfo::tryGetInfo(SQLSMALLINT type, const std::string& param, Dynamic::Var& result) const
{ {
TypeInfoVec::const_iterator it = _typeInfo.begin(); TypeInfoVec::const_iterator it = _typeInfo.begin();
TypeInfoVec::const_iterator end = _typeInfo.end(); TypeInfoVec::const_iterator end = _typeInfo.end();

View File

@ -14,7 +14,7 @@
#include "Poco/String.h" #include "Poco/String.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/Tuple.h" #include "Poco/Tuple.h"
#include "Poco/Exception.h" #include "Poco/Exception.h"
#include "Poco/Data/LOB.h" #include "Poco/Data/LOB.h"
@ -38,7 +38,7 @@ using Poco::format;
using Poco::Tuple; using Poco::Tuple;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::NotFoundException; using Poco::NotFoundException;
@ -265,7 +265,7 @@ void ODBCDB2Test::testStoredProcedureAny()
} }
void ODBCDB2Test::testStoredProcedureDynamicAny() void ODBCDB2Test::testStoredProcedureDynamicVar()
{ {
if (!_pSession) fail ("Test not available."); if (!_pSession) fail ("Test not available.");
@ -273,8 +273,8 @@ void ODBCDB2Test::testStoredProcedureDynamicAny()
{ {
_pSession->setFeature("autoBind", bindValue(k)); _pSession->setFeature("autoBind", bindValue(k));
DynamicAny i = 2; Var i = 2;
DynamicAny j = 0; Var j = 0;
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) " *_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
"BEGIN " "BEGIN "
@ -659,7 +659,7 @@ CppUnit::Test* ODBCDB2Test::suite()
CppUnit_addTest(pSuite, ODBCDB2Test, testInternalStorageType); CppUnit_addTest(pSuite, ODBCDB2Test, testInternalStorageType);
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedure); CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedure);
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureAny); CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureAny);
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureDynamicAny); CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureDynamicVar);
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredFunction); CppUnit_addTest(pSuite, ODBCDB2Test, testStoredFunction);
CppUnit_addTest(pSuite, ODBCDB2Test, testNull); CppUnit_addTest(pSuite, ODBCDB2Test, testNull);
CppUnit_addTest(pSuite, ODBCDB2Test, testRowIterator); CppUnit_addTest(pSuite, ODBCDB2Test, testRowIterator);

View File

@ -37,7 +37,7 @@ public:
void testStoredProcedure(); void testStoredProcedure();
void testStoredProcedureAny(); void testStoredProcedureAny();
void testStoredProcedureDynamicAny(); void testStoredProcedureDynamicVar();
void testStoredFunction(); void testStoredFunction();
static CppUnit::Test* suite(); static CppUnit::Test* suite();

View File

@ -15,7 +15,7 @@
#include "Poco/Tuple.h" #include "Poco/Tuple.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/Data/RecordSet.h" #include "Poco/Data/RecordSet.h"
#include "Poco/Data/AutoTransaction.h" #include "Poco/Data/AutoTransaction.h"
@ -37,7 +37,7 @@ using Poco::format;
using Poco::Tuple; using Poco::Tuple;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::DateTime; using Poco::DateTime;
@ -370,21 +370,28 @@ void ODBCOracleTest::testStoredProcedureAny()
} }
void ODBCOracleTest::testStoredProcedureDynamicAny() void ODBCOracleTest::testStoredProcedureDynamicVar()
{ {
for (int k = 0; k < 8;) for (int k = 0; k < 8;)
{ {
session().setFeature("autoBind", bindValue(k)); session().setFeature("autoBind", bindValue(k));
DynamicAny i = 2; Var i = 2;
DynamicAny j = 0; Var j = 0;
*_pSession << "CREATE OR REPLACE " *_pSession << "CREATE OR REPLACE "
"PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS " "PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS "
" BEGIN outParam := inParam*inParam; " " BEGIN outParam := inParam*inParam; "
"END storedProcedure;" , now; "END storedProcedure;" , now;
*_pSession << "{call storedProcedure(?, ?)}", in(i), out(j), now; auto inI = in(i);
auto outJ = out(j);
assertTrue (nullptr != inI);
assertTrue (inI->canBind());
assertTrue (nullptr != outJ);
assertTrue (outJ->canBind());
*_pSession << "{call storedProcedure(?, ?)}", inI, outJ, now;
assertTrue (4 == j); assertTrue (4 == j);
dropObject("PROCEDURE", "storedProcedure"); dropObject("PROCEDURE", "storedProcedure");
@ -394,7 +401,12 @@ void ODBCOracleTest::testStoredProcedureDynamicAny()
" END storedProcedure;" , now; " END storedProcedure;" , now;
i = 2; i = 2;
*_pSession << "{call storedProcedure(?)}", io(i), now;
auto ioI = io(i);
assertTrue (nullptr != ioI);
assertTrue (ioI->canBind());
*_pSession << "{call storedProcedure(?)}", ioI, now;
assertTrue (4 == i); assertTrue (4 == i);
dropObject("PROCEDURE", "storedProcedure"); dropObject("PROCEDURE", "storedProcedure");
@ -988,7 +1000,7 @@ CppUnit::Test* ODBCOracleTest::suite()
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedure); CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedure);
//CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredProcedure); //CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredProcedure);
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureAny); CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureAny);
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureDynamicAny); CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureDynamicVar);
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredFunction); CppUnit_addTest(pSuite, ODBCOracleTest, testStoredFunction);
//CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredFunction); //CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredFunction);
CppUnit_addTest(pSuite, ODBCOracleTest, testInternalExtraction); CppUnit_addTest(pSuite, ODBCOracleTest, testInternalExtraction);

View File

@ -45,7 +45,7 @@ public:
void testStoredFunction(); void testStoredFunction();
void testCursorStoredFunction(); void testCursorStoredFunction();
void testStoredProcedureAny(); void testStoredProcedureAny();
void testStoredProcedureDynamicAny(); void testStoredProcedureDynamicVar();
void testAutoTransaction(); void testAutoTransaction();
void testNull(); void testNull();

View File

@ -14,7 +14,7 @@
#include "ODBCTest.h" #include "ODBCTest.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/Data/ODBC/Diagnostics.h" #include "Poco/Data/ODBC/Diagnostics.h"
#include "Poco/Data/ODBC/ODBCException.h" #include "Poco/Data/ODBC/ODBCException.h"
@ -29,7 +29,7 @@ using Poco::Data::ODBC::StatementDiagnostics;
using Poco::format; using Poco::format;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::DateTime; using Poco::DateTime;
@ -326,8 +326,8 @@ void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
session().setFeature("autoBind", bindValue(k)); session().setFeature("autoBind", bindValue(k));
session().setFeature("autoExtract", bindValue(k+1)); session().setFeature("autoExtract", bindValue(k+1));
DynamicAny i = 2; Var i = 2;
DynamicAny result = 0; Var result = 0;
session() << "{? = call storedFunction(?)}", out(result), in(i), now; session() << "{? = call storedFunction(?)}", out(result), in(i), now;
assertTrue (4 == result); assertTrue (4 == result);

View File

@ -14,7 +14,7 @@
#include "Poco/String.h" #include "Poco/String.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/Tuple.h" #include "Poco/Tuple.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/Data/RecordSet.h" #include "Poco/Data/RecordSet.h"
@ -38,7 +38,7 @@ using Poco::format;
using Poco::Tuple; using Poco::Tuple;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::DateTime; using Poco::DateTime;
@ -554,7 +554,7 @@ void ODBCSQLServerTest::testStoredProcedureAny()
} }
void ODBCSQLServerTest::testStoredProcedureDynamicAny() void ODBCSQLServerTest::testStoredProcedureDynamicVar()
{ {
try try
{ {
@ -562,8 +562,8 @@ void ODBCSQLServerTest::testStoredProcedureDynamicAny()
{ {
session().setFeature("autoBind", bindValue(k)); session().setFeature("autoBind", bindValue(k));
DynamicAny i = 2; Var i = 2;
DynamicAny j = 0; Var j = 0;
dropObject("PROCEDURE", "storedProcedure"); dropObject("PROCEDURE", "storedProcedure");
session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS " session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS "
@ -590,8 +590,8 @@ void ODBCSQLServerTest::testStoredProcedureDynamicAny()
} }
dropObject("PROCEDURE", "storedProcedure"); dropObject("PROCEDURE", "storedProcedure");
} }
catch (ConnectionException& ce) { std::cout << ce.toString() << std::endl; fail("testStoredProcedureDynamicAny()"); } catch (ConnectionException& ce) { std::cout << ce.toString() << std::endl; fail("testStoredProcedureDynamicVar()"); }
catch (StatementException& se) { std::cout << se.toString() << std::endl; fail("testStoredProcedureDynamicAny()"); } catch (StatementException& se) { std::cout << se.toString() << std::endl; fail("testStoredProcedureDynamicVar()"); }
} }
@ -1033,7 +1033,7 @@ CppUnit::Test* ODBCSQLServerTest::suite()
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedure); CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedure);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testCursorStoredProcedure); CppUnit_addTest(pSuite, ODBCSQLServerTest, testCursorStoredProcedure);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureAny); CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureAny);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureDynamicAny); CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureDynamicVar);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureReturn); CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureReturn);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredFunction); CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredFunction);
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalExtraction); CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalExtraction);

View File

@ -55,7 +55,7 @@ public:
void testStoredProcedure(); void testStoredProcedure();
void testCursorStoredProcedure(); void testCursorStoredProcedure();
void testStoredProcedureAny(); void testStoredProcedureAny();
void testStoredProcedureDynamicAny(); void testStoredProcedureDynamicVar();
void testStoredProcedureReturn(); void testStoredProcedureReturn();
void testStoredFunction(); void testStoredFunction();

View File

@ -14,7 +14,7 @@
#include "Poco/String.h" #include "Poco/String.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/Tuple.h" #include "Poco/Tuple.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/Exception.h" #include "Poco/Exception.h"
@ -43,7 +43,7 @@ using Poco::format;
using Poco::Tuple; using Poco::Tuple;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::DateTime; using Poco::DateTime;
using Poco::NotFoundException; using Poco::NotFoundException;

View File

@ -132,7 +132,7 @@ public:
virtual void testStoredProcedure(); virtual void testStoredProcedure();
virtual void testStoredProcedureAny(); virtual void testStoredProcedureAny();
virtual void testStoredProcedureDynamicAny(); virtual void testStoredProcedureDynamicVar();
virtual void testStoredFunction(); virtual void testStoredFunction();
virtual void testStoredFunctionAny(); virtual void testStoredFunctionAny();
@ -251,9 +251,9 @@ inline void ODBCTest::testStoredProcedureAny()
} }
inline void ODBCTest::testStoredProcedureDynamicAny() inline void ODBCTest::testStoredProcedureDynamicVar()
{ {
throw Poco::NotImplementedException("ODBCTest::testStoredProcedureDynamicAny()"); throw Poco::NotImplementedException("ODBCTest::testStoredProcedureDynamicVar()");
} }

View File

@ -37,11 +37,12 @@ CppUnit::Test* ODBCTestSuite::suite()
// //
// For the time being, the workaround is to connect to DB2 after connecting to PostgreSQL and Oracle. // For the time being, the workaround is to connect to DB2 after connecting to PostgreSQL and Oracle.
addTest(pSuite, ODBCMySQLTest::suite());
addTest(pSuite, ODBCSQLServerTest::suite());
addTest(pSuite, ODBCOracleTest::suite()); addTest(pSuite, ODBCOracleTest::suite());
addTest(pSuite, ODBCMySQLTest::suite());
addTest(pSuite, ODBCPostgreSQLTest::suite()); addTest(pSuite, ODBCPostgreSQLTest::suite());
addTest(pSuite, ODBCSQLiteTest::suite()); addTest(pSuite, ODBCSQLiteTest::suite());
addTest(pSuite, ODBCSQLServerTest::suite());
addTest(pSuite, ODBCDB2Test::suite()); addTest(pSuite, ODBCDB2Test::suite());
// MS Access driver does not support connection status detection // MS Access driver does not support connection status detection
// disabled for the time being // disabled for the time being

View File

@ -25,7 +25,7 @@
#include "Poco/Data/LOB.h" #include "Poco/Data/LOB.h"
#include "Poco/Types.h" #include "Poco/Types.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/Dynamic/Var.h" #include "Poco/Dynamic/Var.h"

View File

@ -25,7 +25,7 @@
#include "Poco/Data/LOB.h" #include "Poco/Data/LOB.h"
#include "Poco/Types.h" #include "Poco/Types.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/Dynamic/Var.h" #include "Poco/Dynamic/Var.h"
@ -325,7 +325,7 @@ private:
template <typename T> template <typename T>
bool extractStringImpl(std::size_t pos, T& val) bool extractStringImpl(std::size_t pos, T& val)
/// Utility function for extraction of Any and DynamicAny. /// Utility function for extraction of Any and Dynamic::Var.
{ {
OutputParameter outputParameter = extractPreamble(pos); OutputParameter outputParameter = extractPreamble(pos);

View File

@ -2,7 +2,6 @@
#define SQLPARSER_SQLPARSER_H #define SQLPARSER_SQLPARSER_H
#include "SQLParserResult.h" #include "SQLParserResult.h"
#include "sql/statements.h"
namespace hsql { namespace hsql {
@ -18,12 +17,12 @@ class SQLParser_API SQLParser {
// Run tokenization on the given string and store the tokens in the output vector. // Run tokenization on the given string and store the tokens in the output vector.
static bool tokenize(const std::string& sql, std::vector<int16_t>* tokens); static bool tokenize(const std::string& sql, std::vector<int16_t>* tokens);
// Deprecated.
// Old method to parse SQL strings. Replaced by parse(). // Old method to parse SQL strings. Replaced by parse().
POCO_DEPRECATED("Use parse()")
static bool parseSQLString(const char* sql, SQLParserResult* result); static bool parseSQLString(const char* sql, SQLParserResult* result);
// Deprecated.
// Old method to parse SQL strings. Replaced by parse(). // Old method to parse SQL strings. Replaced by parse().
POCO_DEPRECATED("Use parse()")
static bool parseSQLString(const std::string& sql, SQLParserResult* result); static bool parseSQLString(const std::string& sql, SQLParserResult* result);
private: private:
@ -32,4 +31,4 @@ class SQLParser_API SQLParser {
} // namespace hsql } // namespace hsql
#endif #endif

View File

@ -22,7 +22,7 @@
#include "Poco/Data/AbstractBinder.h" #include "Poco/Data/AbstractBinder.h"
#include "Poco/Data/LOB.h" #include "Poco/Data/LOB.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "sqlite3.h" #include "sqlite3.h"

View File

@ -29,7 +29,7 @@
#include "Poco/Data/Date.h" #include "Poco/Data/Date.h"
#include "Poco/Data/Time.h" #include "Poco/Data/Time.h"
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "sqlite3.h" #include "sqlite3.h"
#include <vector> #include <vector>
#include <utility> #include <utility>
@ -122,8 +122,8 @@ public:
bool extract(std::size_t pos, Poco::Any& val); bool extract(std::size_t pos, Poco::Any& val);
/// Extracts an Any. /// Extracts an Any.
bool extract(std::size_t pos, Poco::DynamicAny& val); bool extract(std::size_t pos, Poco::Dynamic::Var& val);
/// Extracts a DynamicAny. /// Extracts a Dynamic::Var.
bool isNull(std::size_t pos, std::size_t row = POCO_DATA_INVALID_ROW); bool isNull(std::size_t pos, std::size_t row = POCO_DATA_INVALID_ROW);
/// Returns true if the current row value at pos column is null. /// Returns true if the current row value at pos column is null.
@ -147,7 +147,7 @@ public:
private: private:
template <typename T> template <typename T>
bool extractImpl(std::size_t pos, T& val) bool extractImpl(std::size_t pos, T& val)
/// Utility function for extraction of Any and DynamicAny. /// Utility function for extraction of Any and Dynamic::Var.
{ {
if (isNull(pos)) return false; if (isNull(pos)) return false;

View File

@ -224,7 +224,7 @@ bool Extractor::extract(std::size_t pos, Poco::Any& val)
} }
bool Extractor::extract(std::size_t pos, Poco::DynamicAny& val) bool Extractor::extract(std::size_t pos, Dynamic::Var& val)
{ {
return extractImpl(pos, val); return extractImpl(pos, val);
} }

View File

@ -32,7 +32,7 @@
#include "Poco/Any.h" #include "Poco/Any.h"
#include "Poco/UUIDGenerator.h" #include "Poco/UUIDGenerator.h"
#include "Poco/SharedPtr.h" #include "Poco/SharedPtr.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/DateTime.h" #include "Poco/DateTime.h"
#include "Poco/Logger.h" #include "Poco/Logger.h"
#include "Poco/Message.h" #include "Poco/Message.h"
@ -68,7 +68,7 @@ using Poco::Nullable;
using Poco::Tuple; using Poco::Tuple;
using Poco::Any; using Poco::Any;
using Poco::AnyCast; using Poco::AnyCast;
using Poco::DynamicAny; using Poco::Dynamic::Var;
using Poco::DateTime; using Poco::DateTime;
using Poco::Logger; using Poco::Logger;
using Poco::Message; using Poco::Message;
@ -86,7 +86,6 @@ using Poco::Data::SQLite::ConstraintViolationException;
using Poco::Data::SQLite::ParameterCountMismatchException; using Poco::Data::SQLite::ParameterCountMismatchException;
using Poco::Int32; using Poco::Int32;
using Poco::Int64; using Poco::Int64;
using Poco::Dynamic::Var;
using Poco::Data::SQLite::Utility; using Poco::Data::SQLite::Utility;
using Poco::delegate; using Poco::delegate;
using Poco::Stopwatch; using Poco::Stopwatch;
@ -2394,10 +2393,10 @@ void SQLiteTest::testDynamicAny()
tmp << "DROP TABLE IF EXISTS Anys", now; tmp << "DROP TABLE IF EXISTS Anys", now;
tmp << "CREATE TABLE Anys (int0 INTEGER, flt0 REAL, str0 VARCHAR, empty INTEGER)", now; tmp << "CREATE TABLE Anys (int0 INTEGER, flt0 REAL, str0 VARCHAR, empty INTEGER)", now;
DynamicAny i = Int32(42); Var i = Int32(42);
DynamicAny f = double(42.5); Var f = double(42.5);
DynamicAny s = std::string("42"); Var s = std::string("42");
DynamicAny e; Var e;
assertTrue (e.isEmpty()); assertTrue (e.isEmpty());
tmp << "INSERT INTO Anys VALUES (?, ?, ?, null)", use(i), use(f), use(s), now; tmp << "INSERT INTO Anys VALUES (?, ?, ?, null)", use(i), use(f), use(s), now;

View File

@ -140,9 +140,8 @@ public:
/// execution. /// execution.
/// The number of rows reported is independent of filtering. /// The number of rows reported is independent of filtering.
POCO_DEPRECATED("Replaced with subTotalRowCount() and getTotalRowCount()")
std::size_t totalRowCount() const; std::size_t totalRowCount() const;
//@ deprecated
/// Replaced with subTotalRowCount() and getTotalRowCount().
std::size_t getTotalRowCount() const; std::size_t getTotalRowCount() const;
/// Returns the total number of rows in the RecordSet. /// Returns the total number of rows in the RecordSet.

View File

@ -19,7 +19,6 @@
#include "Poco/Data/Data.h" #include "Poco/Data/Data.h"
#include "Poco/Data/Connector.h"
#include "Poco/Data/Session.h" #include "Poco/Data/Session.h"
#include "Poco/Data/Statement.h" #include "Poco/Data/Statement.h"
#include "Poco/Logger.h" #include "Poco/Logger.h"
@ -218,7 +217,7 @@ public:
static const std::string PROP_TABLE; static const std::string PROP_TABLE;
static const std::string PROP_ARCHIVE_TABLE; static const std::string PROP_ARCHIVE_TABLE;
static const std::string PROP_MAX_AGE; static const std::string PROP_MAX_AGE;
static const std::string PROP_ASYNC; POCO_DEPRECATED("") static const std::string PROP_ASYNC;
static const std::string PROP_TIMEOUT; static const std::string PROP_TIMEOUT;
static const std::string PROP_MIN_BATCH; static const std::string PROP_MIN_BATCH;
static const std::string PROP_MAX_BATCH; static const std::string PROP_MAX_BATCH;

View File

@ -13,11 +13,8 @@
#include "Poco/Data/SQLChannel.h" #include "Poco/Data/SQLChannel.h"
#include "Poco/Data/SessionFactory.h"
#include "Poco/Data/BulkBinding.h" #include "Poco/Data/BulkBinding.h"
#include "Poco/DateTime.h"
#include "Poco/DateTimeFormatter.h" #include "Poco/DateTimeFormatter.h"
#include "Poco/DateTimeFormat.h"
#include "Poco/LoggingFactory.h" #include "Poco/LoggingFactory.h"
#include "Poco/Instantiator.h" #include "Poco/Instantiator.h"
#include "Poco/NumberParser.h" #include "Poco/NumberParser.h"
@ -27,7 +24,7 @@
#include "Poco/File.h" #include "Poco/File.h"
#include "Poco/UUID.h" #include "Poco/UUID.h"
#include "Poco/UUIDGenerator.h" #include "Poco/UUIDGenerator.h"
#include <fstream>
#include <memory> #include <memory>
@ -259,6 +256,7 @@ void SQLChannel::run()
{ {
try try
{ {
sleepTime = 100;
if (_reconnect) if (_reconnect)
{ {
close(); close();
@ -267,7 +265,6 @@ void SQLChannel::run()
if (_reconnect && sleepTime < 12800) if (_reconnect && sleepTime < 12800)
sleepTime *= 2; sleepTime *= 2;
} }
if (!_reconnect) if (!_reconnect)
{ {
if (_logQueue.size()) processBatch(_minBatch); if (_logQueue.size()) processBatch(_minBatch);

View File

@ -21,8 +21,7 @@
#include "Poco/KeyValueArgs.h" #include "Poco/KeyValueArgs.h"
#include "Poco/ValidArgs.h" #include "Poco/ValidArgs.h"
#include "Poco/Mutex.h" #include "Poco/Mutex.h"
#include "Poco/Exception.h" #include "Poco/BasicEvent.h"
#include "Poco/FIFOEvent.h"
#include "Poco/EventArgs.h" #include "Poco/EventArgs.h"
#include "Poco/Delegate.h" #include "Poco/Delegate.h"
#include "Poco/SharedPtr.h" #include "Poco/SharedPtr.h"
@ -39,16 +38,16 @@ class AbstractCache
/// An AbstractCache is the interface of all caches. /// An AbstractCache is the interface of all caches.
{ {
public: public:
FIFOEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Add; BasicEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Add;
FIFOEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Update; BasicEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Update;
FIFOEvent<const TKey, TEventMutex> Remove; BasicEvent<const TKey, TEventMutex> Remove;
FIFOEvent<const TKey, TEventMutex> Get; BasicEvent<const TKey, TEventMutex> Get;
FIFOEvent<const EventArgs, TEventMutex> Clear; BasicEvent<const EventArgs, TEventMutex> Clear;
typedef std::map<TKey, SharedPtr<TValue>> DataHolder; using DataHolder = std::map<TKey, SharedPtr<TValue>>;
typedef typename DataHolder::iterator Iterator; using Iterator = typename DataHolder::iterator;
typedef typename DataHolder::const_iterator ConstIterator; using ConstIterator = typename DataHolder::const_iterator;
typedef std::set<TKey> KeySet; using KeySet = std::set<TKey>;
AbstractCache() AbstractCache()
{ {
@ -72,6 +71,9 @@ public:
} }
} }
AbstractCache(const AbstractCache& aCache) = delete;
AbstractCache& operator = (const AbstractCache& aCache) = delete;
void add(const TKey& key, const TValue& val) void add(const TKey& key, const TValue& val)
/// Adds the key value pair to the cache. /// Adds the key value pair to the cache.
/// If for the key already an entry exists, it will be overwritten. /// If for the key already an entry exists, it will be overwritten.
@ -194,8 +196,8 @@ public:
} }
protected: protected:
mutable FIFOEvent<ValidArgs<TKey>> IsValid; mutable BasicEvent<ValidArgs<TKey>> IsValid;
mutable FIFOEvent<KeySet> Replace; mutable BasicEvent<KeySet> Replace;
void initialize() void initialize()
/// Sets up event registration. /// Sets up event registration.
@ -371,9 +373,6 @@ protected:
mutable DataHolder _data; mutable DataHolder _data;
mutable TMutex _mutex; mutable TMutex _mutex;
private:
AbstractCache(const AbstractCache& aCache);
AbstractCache& operator = (const AbstractCache& aCache);
}; };

View File

@ -40,7 +40,7 @@ public:
virtual bool equals(const AbstractObserver& observer) const = 0; virtual bool equals(const AbstractObserver& observer) const = 0;
[[deprecated("use `Poco::Any accepts(Notification*)` instead")]] POCO_DEPRECATED("use `Poco::Any accepts(Notification*)` instead")
virtual bool accepts(Notification* pNf, const char* pName) const = 0; virtual bool accepts(Notification* pNf, const char* pName) const = 0;
virtual bool accepts(const Notification::Ptr& pNf) const = 0; virtual bool accepts(const Notification::Ptr& pNf) const = 0;

View File

@ -67,13 +67,13 @@ extern "C" \
#define POCO_BEGIN_MANIFEST_IMPL(fnName, base) \ #define POCO_BEGIN_MANIFEST_IMPL(fnName, base) \
bool fnName(Poco::ManifestBase* pManifest_) \ bool fnName(Poco::ManifestBase* pManifest_) \
{ \ { \
typedef base _Base; \ using BaseType = base; \
typedef Poco::Manifest<_Base> _Manifest; \ using ManifestType = Poco::Manifest<BaseType>; \
std::string requiredType(typeid(_Manifest).name()); \ const std::string requiredType(typeid(ManifestType).name()); \
std::string actualType(pManifest_->className()); \ const std::string actualType(pManifest_->className()); \
if (requiredType == actualType) \ if (requiredType == actualType) \
{ \ { \
Poco::Manifest<_Base>* pManifest = static_cast<_Manifest*>(pManifest_); Poco::Manifest<BaseType>* pManifest = static_cast<ManifestType*>(pManifest_);
#define POCO_BEGIN_MANIFEST(base) \ #define POCO_BEGIN_MANIFEST(base) \
@ -93,15 +93,15 @@ extern "C" \
#define POCO_EXPORT_CLASS(cls) \ #define POCO_EXPORT_CLASS(cls) \
pManifest->insert(new Poco::MetaObject<cls, _Base>(#cls)); pManifest->insert(new Poco::MetaObject<cls, BaseType>(#cls));
#define POCO_EXPORT_INTERFACE(cls, itf) \ #define POCO_EXPORT_INTERFACE(cls, itf) \
pManifest->insert(new Poco::MetaObject<cls, _Base>(itf)); pManifest->insert(new Poco::MetaObject<cls, BaseType>(itf));
#define POCO_EXPORT_SINGLETON(cls) \ #define POCO_EXPORT_SINGLETON(cls) \
pManifest->insert(new Poco::MetaSingleton<cls, _Base>(#cls)); pManifest->insert(new Poco::MetaSingleton<cls, BaseType>(#cls));
#endif // Foundation_ClassLibrary_INCLUDED #endif // Foundation_ClassLibrary_INCLUDED

View File

@ -254,7 +254,7 @@ public:
if (itm != pManif->end()) if (itm != pManif->end())
return *itm; return *itm;
} }
return 0; return nullptr;
} }
const Meta& classFor(const std::string& className) const const Meta& classFor(const std::string& className) const

View File

@ -175,10 +175,6 @@
// to "d.so", "d.dll", etc. for _DEBUG builds in Poco::SharedLibrary. // to "d.so", "d.dll", etc. for _DEBUG builds in Poco::SharedLibrary.
// #define POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX // #define POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX
// Disarm POCO_DEPRECATED macro.
// #define POCO_NO_DEPRECATED
// Enable usage of Poco::Mutex and Poco::FastMutex // Enable usage of Poco::Mutex and Poco::FastMutex
// as wrappers for std::recursive_mutex and std::mutex // as wrappers for std::recursive_mutex and std::mutex
#ifndef POCO_ENABLE_STD_MUTEX #ifndef POCO_ENABLE_STD_MUTEX
@ -187,6 +183,13 @@
#define POCO_HAVE_CPP17_COMPILER (__cplusplus >= 201703L) #define POCO_HAVE_CPP17_COMPILER (__cplusplus >= 201703L)
// Option to silence deprecation warnings.
#ifndef POCO_SILENCE_DEPRECATED
#define POCO_DEPRECATED(reason) [[deprecated(reason)]]
#else
#define POCO_DEPRECATED(reason)
#endif
// Uncomment to explicitly disable SQLParser // Uncomment to explicitly disable SQLParser
// #define POCO_DATA_NO_SQL_PARSER // #define POCO_DATA_NO_SQL_PARSER

View File

@ -75,7 +75,7 @@ public:
virtual DirectoryIterator& operator ++ (); // prefix virtual DirectoryIterator& operator ++ (); // prefix
//@ deprecated POCO_DEPRECATED("")
DirectoryIterator operator ++ (int); // postfix DirectoryIterator operator ++ (int); // postfix
/// Please use the prefix increment operator instead. /// Please use the prefix increment operator instead.

View File

@ -210,7 +210,7 @@ public:
if (pHolder && pHolder->type() == typeid(T)) if (pHolder && pHolder->type() == typeid(T))
{ {
VarHolderImpl<T>* pHolderImpl = static_cast<VarHolderImpl<T>*>(pHolder); auto* pHolderImpl = static_cast<VarHolderImpl<T>*>(pHolder);
return pHolderImpl->value(); return pHolderImpl->value();
} }
else if (!pHolder) else if (!pHolder)
@ -480,7 +480,7 @@ public:
/// If demangling is available and emangle is true, /// If demangling is available and emangle is true,
/// the returnsed string will be demangled. /// the returnsed string will be demangled.
//@ deprecated POCO_DEPRECATED("Use clear() instead")
void empty(); void empty();
/// Empties Var. /// Empties Var.
/// This function is deprecated and will be removed. /// This function is deprecated and will be removed.
@ -733,7 +733,7 @@ inline bool Var::operator ! () const
inline bool Var::isEmpty() const inline bool Var::isEmpty() const
{ {
return 0 == content(); return nullptr == content();
} }
@ -2288,8 +2288,7 @@ inline bool operator >= (const unsigned long& other, const Var& da)
} // namespace Dynamic } // namespace Dynamic
//@ deprecated using DynamicAny POCO_DEPRECATED("") = Dynamic::Var;
typedef Dynamic::Var DynamicAny;
} // namespace Poco } // namespace Poco

View File

@ -131,12 +131,12 @@ class Foundation_API VarHolder
/// throw BadCastException. /// throw BadCastException.
{ {
public: public:
typedef Var ArrayValueType; using ArrayValueType = Var;
virtual ~VarHolder(); virtual ~VarHolder();
/// Destroys the VarHolder. /// Destroys the VarHolder.
virtual VarHolder* clone(Placeholder<VarHolder>* pHolder = 0) const = 0; virtual VarHolder* clone(Placeholder<VarHolder>* pHolder = nullptr) const = 0;
/// Implementation must implement this function to /// Implementation must implement this function to
/// deep-copy the VarHolder. /// deep-copy the VarHolder.
/// If small object optimization is enabled (i.e. if /// If small object optimization is enabled (i.e. if
@ -323,17 +323,17 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<(std::is_integral<F>::value && std::is_signed<F>::value) || std::enable_if_t<(std::is_integral_v<F> && std::is_signed_v<F>) ||
std::is_floating_point<F>::value, F>::type* = nullptr, std::is_floating_point_v<F>, F>* = nullptr,
typename std::enable_if<(std::is_integral<T>::value && std::is_signed<T>::value) || std::enable_if_t<(std::is_integral_v<T> && std::is_signed_v<T>) ||
std::is_floating_point<F>::value, T>::type* = nullptr> std::is_floating_point_v<F>, T>* = nullptr>
static void convertToSmaller(const F& from, T& to) static void convertToSmaller(const F& from, T& to)
/// Converts signed integral, as well as floating-point, values from /// Converts signed integral, as well as floating-point, values from
/// larger to smaller type. It checks the upper and lower bound and /// larger to smaller type. It checks the upper and lower bound and
/// if from value is within limits of type T (i.e. check calls do not throw), /// if from value is within limits of type T (i.e. check calls do not throw),
/// it is converted. /// it is converted.
{ {
if constexpr((std::is_integral<F>::value) && (std::is_floating_point<T>::value)) if constexpr((std::is_integral_v<F>) && (std::is_floating_point_v<T>))
{ {
if (isPrecisionLost<F, T>(from)) if (isPrecisionLost<F, T>(from))
POCO_VAR_RANGE_EXCEPTION ("Lost precision", from); POCO_VAR_RANGE_EXCEPTION ("Lost precision", from);
@ -344,8 +344,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<std::is_integral<F>::value && std::is_signed<T>::value, F>::type* = nullptr, std::enable_if_t<std::is_integral_v<F> && std::is_signed_v<T>, F>* = nullptr,
typename std::enable_if<std::is_floating_point<T>::value, T>::type* = nullptr> std::enable_if_t<std::is_floating_point_v<T>, T>* = nullptr>
static void convertToSmaller(const F& from, T& to) static void convertToSmaller(const F& from, T& to)
/// Converts signed integral values from integral to floating-point type. Checks for /// Converts signed integral values from integral to floating-point type. Checks for
/// the loss of precision and if from value is within limits of type T (i.e. check calls do not throw), /// the loss of precision and if from value is within limits of type T (i.e. check calls do not throw),
@ -357,8 +357,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<std::is_same<F, bool>::value>::type* = nullptr, std::enable_if_t<std::is_same_v<F, bool>>* = nullptr,
typename std::enable_if<std::is_floating_point<T>::value, T>::type* = nullptr> std::enable_if_t<std::is_floating_point_v<T>, T>* = nullptr>
static void convertToSmaller(const F& from, T& to) static void convertToSmaller(const F& from, T& to)
/// Converts boolean values to floating-point type. /// Converts boolean values to floating-point type.
{ {
@ -366,8 +366,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<std::is_integral<F>::value && !std::is_signed<F>::value, F>::type* = nullptr, std::enable_if_t<std::is_integral_v<F> && !std::is_signed_v<F>, F>* = nullptr,
typename std::enable_if<(std::is_integral<T>::value && !std::is_signed<T>::value) || std::is_floating_point<T>::value, T>::type* = nullptr> std::enable_if_t<(std::is_integral_v<T> && !std::is_signed<T>::value) || std::is_floating_point<T>::value, T>* = nullptr>
static void convertToSmallerUnsigned(const F& from, T& to) static void convertToSmallerUnsigned(const F& from, T& to)
/// Converts unsigned integral data types from larger to smaller, as well as to floating-point, types. /// Converts unsigned integral data types from larger to smaller, as well as to floating-point, types.
/// Since lower limit is always 0 for unsigned types, only the upper limit is checked, thus /// Since lower limit is always 0 for unsigned types, only the upper limit is checked, thus
@ -380,8 +380,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<std::is_integral<F>::value && std::is_signed<F>::value, F>::type* = nullptr, std::enable_if_t<std::is_integral_v<F> && std::is_signed_v<F>, F>* = nullptr,
typename std::enable_if<std::is_integral<T>::value && !std::is_signed<T>::value, T>::type* = nullptr> std::enable_if_t<std::is_integral_v<T> && !std::is_signed_v<T>, T>* = nullptr>
static void convertSignedToUnsigned(const F& from, T& to) static void convertSignedToUnsigned(const F& from, T& to)
/// Converts signed integral data types to unsigned data types. /// Converts signed integral data types to unsigned data types.
/// Negative values can not be converted and if one is encountered, RangeException is thrown. /// Negative values can not be converted and if one is encountered, RangeException is thrown.
@ -393,8 +393,8 @@ protected:
to = static_cast<T>(from); to = static_cast<T>(from);
} }
template <typename F, typename T, std::enable_if_t<std::is_floating_point<F>::value, bool> = true, template <typename F, typename T, std::enable_if_t<std::is_floating_point_v<F>, bool> = true,
typename std::enable_if<std::is_integral<T>::value && !std::is_signed<T>::value, T>::type* = nullptr> std::enable_if_t<std::is_integral_v<T> && !std::is_signed_v<T>, T>* = nullptr>
static void convertSignedFloatToUnsigned(const F& from, T& to) static void convertSignedFloatToUnsigned(const F& from, T& to)
/// Converts floating point data types to unsigned integral data types. Negative values /// Converts floating point data types to unsigned integral data types. Negative values
/// can not be converted and if one is encountered, RangeException is thrown. /// can not be converted and if one is encountered, RangeException is thrown.
@ -407,8 +407,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
typename std::enable_if<std::is_integral<F>::value && !std::is_signed<F>::value, F>::type* = nullptr, std::enable_if_t<std::is_integral_v<F> && !std::is_signed_v<F>, F>* = nullptr,
typename std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value, T>::type* = nullptr> std::enable_if_t<std::is_integral_v<T> && std::is_signed_v<T>, T>* = nullptr>
static void convertUnsignedToSigned(const F& from, T& to) static void convertUnsignedToSigned(const F& from, T& to)
/// Converts unsigned integral data types to signed integral data types. /// Converts unsigned integral data types to signed integral data types.
/// If upper limit is within the target data type limits, the conversion is performed. /// If upper limit is within the target data type limits, the conversion is performed.
@ -418,8 +418,8 @@ protected:
} }
template <typename F, typename T, template <typename F, typename T,
std::enable_if_t<std::is_integral<F>::value, bool> = true, std::enable_if_t<std::is_integral_v<F>, bool> = true,
std::enable_if_t<std::is_floating_point<T>::value, bool> = true> std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static void convertToFP(F& from, T& to) static void convertToFP(F& from, T& to)
/// Converts unsigned integral data types to floating-point data types. /// Converts unsigned integral data types to floating-point data types.
/// If the number of significant digits used for the integer vaue exceeds the number /// If the number of significant digits used for the integer vaue exceeds the number
@ -433,7 +433,7 @@ protected:
private: private:
template <typename T, std::enable_if_t<std::is_integral<T>::value, bool> = true> template <typename T, std::enable_if_t<std::is_integral_v<T>, bool> = true>
static constexpr int numValDigits(const T& value) static constexpr int numValDigits(const T& value)
{ {
using U = std::make_unsigned_t<T>; using U = std::make_unsigned_t<T>;
@ -444,58 +444,58 @@ private:
return digitCount; return digitCount;
} }
template <typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true> template <typename T, std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static constexpr int numValDigits(T value) static constexpr int numValDigits(T value)
{ {
return numValDigits<int64_t>(static_cast<int64_t>(value)); return numValDigits<int64_t>(static_cast<int64_t>(value));
} }
template <typename T, std::enable_if_t<std::is_floating_point<T>::value, bool> = true> template <typename T, std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static constexpr int numTypeDigits() static constexpr int numTypeDigits()
{ {
return std::numeric_limits<T>::digits; return std::numeric_limits<T>::digits;
} }
template <typename T, std::enable_if_t<std::is_integral<T>::value, bool> = true> template <typename T, std::enable_if_t<std::is_integral_v<T>, bool> = true>
static constexpr int numTypeDigits() static constexpr int numTypeDigits()
{ {
return numValDigits(std::numeric_limits<T>::max()); return numValDigits(std::numeric_limits<T>::max());
} }
template <typename F, typename T, template <typename F, typename T,
std::enable_if_t<std::is_integral<F>::value, bool> = true, std::enable_if_t<std::is_integral_v<F>, bool> = true,
std::enable_if_t<std::is_floating_point<T>::value, bool> = true> std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
static bool isPrecisionLost(const F& from) static bool isPrecisionLost(const F& from)
// Checks for loss of precision in integral -> floating point conversion. // Checks for loss of precision in integral -> floating point conversion.
{ {
return numValDigits(from) > numTypeDigits<T>(); return numValDigits(from) > numTypeDigits<T>();
} }
template <typename F, typename T, std::enable_if_t<std::is_integral<F>::value, bool> = true> template <typename F, typename T, std::enable_if_t<std::is_integral_v<F>, bool> = true>
static void checkUpperLimit(const F& from) static void checkUpperLimit(const F& from)
{ {
if (from > static_cast<F>(std::numeric_limits<T>::max())) if (from > static_cast<F>(std::numeric_limits<T>::max()))
POCO_VAR_RANGE_EXCEPTION ("Value too big", from); POCO_VAR_RANGE_EXCEPTION ("Value too big", from);
} }
template <typename F, typename T, std::enable_if_t<std::is_integral<F>::value, bool> = true> template <typename F, typename T, std::enable_if_t<std::is_integral_v<F>, bool> = true>
static void checkLowerLimit(const F& from) static void checkLowerLimit(const F& from)
{ {
if (from < static_cast<F>(std::numeric_limits<T>::min())) if (from < static_cast<F>(std::numeric_limits<T>::min()))
POCO_VAR_RANGE_EXCEPTION ("Value too small", from); POCO_VAR_RANGE_EXCEPTION ("Value too small", from);
} }
template <typename F, typename T, std::enable_if_t<std::is_floating_point<F>::value, bool> = true> template <typename F, typename T, std::enable_if_t<std::is_floating_point_v<F>, bool> = true>
static void checkUpperLimit(const F& from) static void checkUpperLimit(const F& from)
{ {
if ((from > static_cast<F>(std::numeric_limits<T>::max()))) if ((from > static_cast<F>(std::numeric_limits<T>::max())))
POCO_VAR_RANGE_EXCEPTION ("Value too big", from); POCO_VAR_RANGE_EXCEPTION ("Value too big", from);
} }
template <typename F, typename T, std::enable_if_t<std::is_floating_point<F>::value, bool> = true> template <typename F, typename T, std::enable_if_t<std::is_floating_point_v<F>, bool> = true>
static void checkLowerLimit(const F& from) static void checkLowerLimit(const F& from)
{ {
if constexpr(std::is_floating_point<T>::value) if constexpr(std::is_floating_point_v<T>)
{ {
if (static_cast<F>(-std::numeric_limits<T>::max()) > from) if (static_cast<F>(-std::numeric_limits<T>::max()) > from)
POCO_VAR_RANGE_EXCEPTION ("Value too small", from); POCO_VAR_RANGE_EXCEPTION ("Value too small", from);
@ -4376,10 +4376,10 @@ private:
}; };
typedef std::vector<Var> Vector; using Vector = std::vector<Var>;
typedef std::deque<Var> Deque; using Deque = std::deque<Var>;
typedef std::list<Var> List; using List = std::list<Var>;
typedef Vector Array; using Array = Vector;
} } // namespace Poco::Dynamic } } // namespace Poco::Dynamic

View File

@ -55,7 +55,7 @@ public:
/// the event is automatically reset after /// the event is automatically reset after
/// a wait() successfully returns. /// a wait() successfully returns.
//@ deprecated POCO_DEPRECATED("")
explicit Event(bool autoReset); explicit Event(bool autoReset);
/// Please use Event::Event(EventType) instead. /// Please use Event::Event(EventType) instead.

View File

@ -26,9 +26,8 @@
namespace Poco { namespace Poco {
//@ deprecated
template <class TArgs, class TMutex = FastMutex> template <class TArgs, class TMutex = FastMutex>
class FIFOEvent: public AbstractEvent < class POCO_DEPRECATED("use BasicEvent") FIFOEvent: public AbstractEvent <
TArgs, TArgs,
FIFOStrategy<TArgs, AbstractDelegate<TArgs>>, FIFOStrategy<TArgs, AbstractDelegate<TArgs>>,
AbstractDelegate<TArgs>, AbstractDelegate<TArgs>,

View File

@ -24,9 +24,8 @@
namespace Poco { namespace Poco {
//@ deprecated
template <class TArgs, class TDelegate> template <class TArgs, class TDelegate>
class FIFOStrategy: public DefaultStrategy<TArgs, TDelegate> class POCO_DEPRECATED("") FIFOStrategy: public DefaultStrategy<TArgs, TDelegate>
/// Note: As of release 1.4.2, DefaultStrategy already /// Note: As of release 1.4.2, DefaultStrategy already
/// implements FIFO behavior, so this class is provided /// implements FIFO behavior, so this class is provided
/// for backwards compatibility only. /// for backwards compatibility only.

View File

@ -141,25 +141,6 @@ using namespace std::literals;
#define POCO_DO_JOIN(X, Y) POCO_DO_JOIN2(X, Y) #define POCO_DO_JOIN(X, Y) POCO_DO_JOIN2(X, Y)
#define POCO_DO_JOIN2(X, Y) X##Y #define POCO_DO_JOIN2(X, Y) X##Y
//
// POCO_DEPRECATED
//
// A macro expanding to a compiler-specific clause to
// mark a class or function as deprecated.
//
#if defined(POCO_NO_DEPRECATED)
#define POCO_DEPRECATED
#elif defined(_GNUC_)
#define POCO_DEPRECATED __attribute__((deprecated))
#elif defined(__clang__)
#define POCO_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define POCO_DEPRECATED __declspec(deprecated)
#else
#define POCO_DEPRECATED
#endif
// //
// MS Visual Studio can use type long for __LINE__ macro // MS Visual Studio can use type long for __LINE__ macro
// when /ZI compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1 // when /ZI compilation flag is used - https://learn.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format?view=msvc-170#zi-1
@ -176,7 +157,7 @@ using LineNumber = decltype(__LINE__);
// //
#include "Poco/Bugcheck.h" #include "Poco/Bugcheck.h"
#include "Poco/Types.h" #include "Poco/Types.h"
#include <string>
#endif // Foundation_Foundation_INCLUDED #endif // Foundation_Foundation_INCLUDED

View File

@ -25,9 +25,8 @@
namespace Poco { namespace Poco {
//@ deprecated
template <class T> template <class T>
struct HashFunction struct POCO_DEPRECATED("use Hash") HashFunction
/// A generic hash function. /// A generic hash function.
{ {
UInt32 operator () (T key, UInt32 maxValue) const UInt32 operator () (T key, UInt32 maxValue) const
@ -38,9 +37,8 @@ struct HashFunction
}; };
//@ deprecated
template <> template <>
struct HashFunction<std::string> struct POCO_DEPRECATED("use Hash") HashFunction<std::string>
/// A generic hash function. /// A generic hash function.
{ {
UInt32 operator () (const std::string& key, UInt32 maxValue) const UInt32 operator () (const std::string& key, UInt32 maxValue) const

View File

@ -85,26 +85,23 @@ class HashMap
/// A HashMap can be used just like a std::map. /// A HashMap can be used just like a std::map.
{ {
public: public:
typedef Key KeyType; using KeyType = Key;
typedef Mapped MappedType; using MappedType = Mapped;
typedef Mapped& Reference; using Reference = Mapped &;
typedef const Mapped& ConstReference; using ConstReference = const Mapped &;
typedef Mapped* Pointer; using Pointer = Mapped *;
typedef const Mapped* ConstPointer; using ConstPointer = const Mapped *;
typedef HashMapEntry<Key, Mapped> ValueType; using ValueType = HashMapEntry<Key, Mapped>;
typedef std::pair<KeyType, MappedType> PairType; using PairType = std::pair<KeyType, MappedType>;
typedef HashMapEntryHash<ValueType, HashFunc> HashType; using HashType = HashMapEntryHash<ValueType, HashFunc>;
typedef LinearHashTable<ValueType, HashType> HashTable; using HashTable = LinearHashTable<ValueType, HashType>;
typedef typename HashTable::Iterator Iterator; using Iterator = typename HashTable::Iterator;
typedef typename HashTable::ConstIterator ConstIterator; using ConstIterator = typename HashTable::ConstIterator;
HashMap() HashMap() = default;
/// Creates an empty HashMap.
{
}
HashMap(std::size_t initialReserve): HashMap(std::size_t initialReserve):
_table(initialReserve) _table(initialReserve)

View File

@ -24,8 +24,8 @@
namespace Poco { namespace Poco {
class POCO_DEPRECATED("") HashStatistic;
//@ deprecated
class Foundation_API HashStatistic class Foundation_API HashStatistic
/// HashStatistic class bundles statistical information on the current state of a HashTable /// HashStatistic class bundles statistical information on the current state of a HashTable
{ {

View File

@ -31,9 +31,8 @@
namespace Poco { namespace Poco {
//@ deprecated
template <class Key, class Value, class KeyHashFunction = HashFunction<Key>> template <class Key, class Value, class KeyHashFunction = HashFunction<Key>>
class HashTable class POCO_DEPRECATED("use LinearHashTable") HashTable
/// A HashTable stores a key value pair that can be looked up via a hashed key. /// A HashTable stores a key value pair that can be looked up via a hashed key.
/// ///
/// Collision handling is done via overflow maps(!). With small hash tables performance of this /// Collision handling is done via overflow maps(!). With small hash tables performance of this

View File

@ -20,7 +20,6 @@
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "Poco/Hash.h" #include "Poco/Hash.h"
#include <functional>
#include <algorithm> #include <algorithm>
#include <vector> #include <vector>
#include <cstddef> #include <cstddef>
@ -55,16 +54,16 @@ class LinearHashTable
/// elements in a bucket should not exceed 3. /// elements in a bucket should not exceed 3.
{ {
public: public:
typedef Value ValueType; using ValueType = Value;
typedef Value& Reference; using Reference = Value &;
typedef const Value& ConstReference; using ConstReference = const Value &;
typedef Value* Pointer; using Pointer = Value *;
typedef const Value* ConstPointer; using ConstPointer = const Value *;
typedef HashFunc Hash; using Hash = HashFunc;
typedef std::vector<Value> Bucket; using Bucket = std::vector<Value>;
typedef std::vector<Bucket> BucketVec; using BucketVec = std::vector<Bucket>;
typedef typename Bucket::iterator BucketIterator; using BucketIterator = typename Bucket::iterator;
typedef typename BucketVec::iterator BucketVecIterator; using BucketVecIterator = typename BucketVec::iterator;
class ConstIterator class ConstIterator
{ {
@ -176,9 +175,7 @@ public:
class Iterator: public ConstIterator class Iterator: public ConstIterator
{ {
public: public:
Iterator() Iterator() = default;
{
}
Iterator(const BucketVecIterator& vecIt, const BucketVecIterator& endIt, const BucketIterator& buckIt): Iterator(const BucketVecIterator& vecIt, const BucketVecIterator& endIt, const BucketIterator& buckIt):
ConstIterator(vecIt, endIt, buckIt) ConstIterator(vecIt, endIt, buckIt)
@ -238,10 +235,7 @@ public:
friend class LinearHashTable; friend class LinearHashTable;
}; };
LinearHashTable(std::size_t initialReserve = 64): LinearHashTable(std::size_t initialReserve = 64)
_split(0),
_front(1),
_size(0)
/// Creates the LinearHashTable, using the given initialReserve. /// Creates the LinearHashTable, using the given initialReserve.
{ {
_buckets.reserve(calcSize(initialReserve)); _buckets.reserve(calcSize(initialReserve));
@ -257,10 +251,8 @@ public:
{ {
} }
~LinearHashTable() ~LinearHashTable() = default;
/// Destroys the LinearHashTable. /// Destroys the LinearHashTable.
{
}
LinearHashTable& operator = (const LinearHashTable& table) LinearHashTable& operator = (const LinearHashTable& table)
/// Assigns another LinearHashTable. /// Assigns another LinearHashTable.
@ -495,9 +487,9 @@ private:
// Evil hack: _buckets must be mutable because both ConstIterator and Iterator hold // Evil hack: _buckets must be mutable because both ConstIterator and Iterator hold
// ordinary iterator's (not const_iterator's). // ordinary iterator's (not const_iterator's).
mutable BucketVec _buckets; mutable BucketVec _buckets;
std::size_t _split; std::size_t _split{0};
std::size_t _front; std::size_t _front{1};
std::size_t _size; std::size_t _size{0};
HashFunc _hash; HashFunc _hash;
}; };

View File

@ -67,7 +67,6 @@ public:
/// * millisecond is from 0 to 999. /// * millisecond is from 0 to 999.
/// * microsecond is from 0 to 999. /// * microsecond is from 0 to 999.
//@ deprecated
LocalDateTime(int tzd, int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond); LocalDateTime(int tzd, int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond);
/// Creates a LocalDateTime for the given Gregorian date and time in the /// Creates a LocalDateTime for the given Gregorian date and time in the
/// time zone denoted by the time zone differential in tzd. /// time zone denoted by the time zone differential in tzd.
@ -85,13 +84,11 @@ public:
/// Creates a LocalDateTime from the UTC time given in dateTime, /// Creates a LocalDateTime from the UTC time given in dateTime,
/// using the time zone differential of the current time zone. /// using the time zone differential of the current time zone.
//@ deprecated
LocalDateTime(int tzd, const DateTime& dateTime); LocalDateTime(int tzd, const DateTime& dateTime);
/// Creates a LocalDateTime from the UTC time given in dateTime, /// Creates a LocalDateTime from the UTC time given in dateTime,
/// using the given time zone differential. Adjusts dateTime /// using the given time zone differential. Adjusts dateTime
/// for the given time zone differential. /// for the given time zone differential.
//@ deprecated
LocalDateTime(int tzd, const DateTime& dateTime, bool adjust); LocalDateTime(int tzd, const DateTime& dateTime, bool adjust);
/// Creates a LocalDateTime from the UTC time given in dateTime, /// Creates a LocalDateTime from the UTC time given in dateTime,
/// using the given time zone differential. If adjust is true, /// using the given time zone differential. If adjust is true,
@ -100,7 +97,6 @@ public:
LocalDateTime(double julianDay); LocalDateTime(double julianDay);
/// Creates a LocalDateTime for the given Julian day in the local time zone. /// Creates a LocalDateTime for the given Julian day in the local time zone.
//@ deprecated
LocalDateTime(int tzd, double julianDay); LocalDateTime(int tzd, double julianDay);
/// Creates a LocalDateTime for the given Julian day in the time zone /// Creates a LocalDateTime for the given Julian day in the time zone
/// denoted by the time zone differential in tzd. /// denoted by the time zone differential in tzd.
@ -131,7 +127,6 @@ public:
/// * millisecond is from 0 to 999. /// * millisecond is from 0 to 999.
/// * microsecond is from 0 to 999. /// * microsecond is from 0 to 999.
//@ deprecated
LocalDateTime& assign(int tzd, int year, int month, int day, int hour, int minute, int second, int millisecond, int microseconds); LocalDateTime& assign(int tzd, int year, int month, int day, int hour, int minute, int second, int millisecond, int microseconds);
/// Assigns a Gregorian local date and time in the time zone denoted by /// Assigns a Gregorian local date and time in the time zone denoted by
/// the time zone differential in tzd. /// the time zone differential in tzd.
@ -145,7 +140,6 @@ public:
/// * millisecond is from 0 to 999. /// * millisecond is from 0 to 999.
/// * microsecond is from 0 to 999. /// * microsecond is from 0 to 999.
//@ deprecated
LocalDateTime& assign(int tzd, double julianDay); LocalDateTime& assign(int tzd, double julianDay);
/// Assigns a Julian day in the time zone denoted by the /// Assigns a Julian day in the time zone denoted by the
/// time zone differential in tzd. /// time zone differential in tzd.

View File

@ -99,7 +99,7 @@ public:
return pObs && pObs->_pObject == _pObject && pObs->_handler == _handler && pObs->_matcher == _matcher; return pObs && pObs->_pObject == _pObject && pObs->_handler == _handler && pObs->_matcher == _matcher;
} }
[[deprecated("use `bool accepts(const Notification::Ptr&)` instead")]] POCO_DEPRECATED("use `bool accepts(const Notification::Ptr&)` instead")
virtual bool accepts(Notification* pNf, const char* pName) const virtual bool accepts(Notification* pNf, const char* pName) const
{ {
return (!pName || pNf->name() == pName) && dynamic_cast<N*>(pNf) != nullptr; return (!pName || pNf->name() == pName) && dynamic_cast<N*>(pNf) != nullptr;

View File

@ -21,7 +21,7 @@
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "Poco/Tuple.h" #include "Poco/Tuple.h"
#include "Poco/TypeList.h" #include "Poco/TypeList.h"
#include "Poco/DynamicAny.h" #include "Poco/Dynamic/Var.h"
#include "Poco/SharedPtr.h" #include "Poco/SharedPtr.h"
#include "Poco/Format.h" #include "Poco/Format.h"
@ -265,12 +265,12 @@ struct NamedTuple: public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T1
const std::string& n39 = "N1", const std::string& n39 = "N1",
typename TypeWrapper<T39>::CONSTTYPE& t39 = POCO_TYPEWRAPPER_DEFAULTVALUE(T39)): typename TypeWrapper<T39>::CONSTTYPE& t39 = POCO_TYPEWRAPPER_DEFAULTVALUE(T39)):
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39), TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20,t21,t22,t23,t24,t25,t26,t27,t28,t29,t30,t31,t32,t33,t34,t35,t36,t37,t38,t39),
_pNames(0) _pNames(nullptr)
{ {
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38,n39); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38,n39);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -329,7 +329,7 @@ struct NamedTuple: public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T1
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -722,7 +722,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -780,7 +780,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -1166,7 +1166,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -1223,7 +1223,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -1602,7 +1602,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -1658,7 +1658,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -2030,7 +2030,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -2085,7 +2085,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -2450,7 +2450,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -2504,7 +2504,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -2862,7 +2862,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -2915,7 +2915,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -3266,7 +3266,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -3318,7 +3318,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -3662,7 +3662,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -3713,7 +3713,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -4050,7 +4050,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -4100,7 +4100,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -4430,7 +4430,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -4479,7 +4479,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -4802,7 +4802,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -4850,7 +4850,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -5166,7 +5166,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -5213,7 +5213,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -5522,7 +5522,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -5568,7 +5568,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -5870,7 +5870,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -5915,7 +5915,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -6210,7 +6210,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -6254,7 +6254,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -6542,7 +6542,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -6585,7 +6585,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -6866,7 +6866,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -6908,7 +6908,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -7182,7 +7182,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -7223,7 +7223,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -7490,7 +7490,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19,n20);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -7530,7 +7530,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -7790,7 +7790,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18,n19);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -7829,7 +7829,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -8082,7 +8082,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17,n18);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -8120,7 +8120,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -8366,7 +8366,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -8403,7 +8403,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -8642,7 +8642,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,Null
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -8678,7 +8678,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,Null
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -8911,7 +8911,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,NullType
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -8946,7 +8946,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,NullType
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -9172,7 +9172,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTypeList
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -9206,7 +9206,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTypeList
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -9425,7 +9425,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -9458,7 +9458,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -9669,7 +9669,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -9701,7 +9701,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -9906,7 +9906,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -9937,7 +9937,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -10134,7 +10134,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -10164,7 +10164,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -10355,7 +10355,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9); init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -10384,7 +10384,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -10568,7 +10568,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7,n8); init(n0,n1,n2,n3,n4,n5,n6,n7,n8);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -10596,7 +10596,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -10773,7 +10773,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6,n7); init(n0,n1,n2,n3,n4,n5,n6,n7);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -10800,7 +10800,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -10968,7 +10968,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>:
init(n0,n1,n2,n3,n4,n5,n6); init(n0,n1,n2,n3,n4,n5,n6);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -10994,7 +10994,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11155,7 +11155,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>:
init(n0,n1,n2,n3,n4,n5); init(n0,n1,n2,n3,n4,n5);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11180,7 +11180,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11336,7 +11336,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>:
init(n0,n1,n2,n3,n4); init(n0,n1,n2,n3,n4);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11360,7 +11360,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11508,7 +11508,7 @@ struct NamedTuple<T0,T1,T2,T3,NullTypeList>:
init(n0,n1,n2,n3); init(n0,n1,n2,n3);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11531,7 +11531,7 @@ struct NamedTuple<T0,T1,T2,T3,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11673,7 +11673,7 @@ struct NamedTuple<T0,T1,T2,NullTypeList>:
init(n0,n1,n2); init(n0,n1,n2);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11695,7 +11695,7 @@ struct NamedTuple<T0,T1,T2,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11830,7 +11830,7 @@ struct NamedTuple<T0,T1,NullTypeList>:
init(n0,n1); init(n0,n1);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11851,7 +11851,7 @@ struct NamedTuple<T0,T1,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }
@ -11978,7 +11978,7 @@ struct NamedTuple<T0,NullTypeList>:
init(n0); init(n0);
} }
const DynamicAny get(const std::string& name) const const Dynamic::Var get(const std::string& name) const
{ {
NameVec::const_iterator it = _pNames->begin(); NameVec::const_iterator it = _pNames->begin();
NameVec::const_iterator itEnd = _pNames->end(); NameVec::const_iterator itEnd = _pNames->end();
@ -11998,7 +11998,7 @@ struct NamedTuple<T0,NullTypeList>:
throw NotFoundException("Name not found: " + name); throw NotFoundException("Name not found: " + name);
} }
const DynamicAny operator [] (const std::string& name) const const Dynamic::Var operator [] (const std::string& name) const
{ {
return get(name); return get(name);
} }

View File

@ -517,14 +517,14 @@ public:
// Deprecated functions // Deprecated functions
// //
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(int value, bool prefix); static std::string formatHex(int value, bool prefix);
/// Formats an int value in hexadecimal notation. /// Formats an int value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(int value, int width, bool prefix); static std::string formatHex(int value, int width, bool prefix);
/// Formats an int value in hexadecimal notation, /// Formats an int value in hexadecimal notation,
/// right justified and zero-padded in /// right justified and zero-padded in
@ -533,13 +533,13 @@ public:
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned value, bool prefix); static std::string formatHex(unsigned value, bool prefix);
/// Formats an unsigned int value in hexadecimal notation. /// Formats an unsigned int value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned value, int width, bool prefix); static std::string formatHex(unsigned value, int width, bool prefix);
/// Formats an unsigned value in hexadecimal notation, /// Formats an unsigned value in hexadecimal notation,
/// right justified and zero-padded in /// right justified and zero-padded in
@ -547,14 +547,14 @@ public:
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(long value, bool prefix); static std::string formatHex(long value, bool prefix);
/// Formats a long value in hexadecimal notation. /// Formats a long value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(long value, int width, bool prefix); static std::string formatHex(long value, int width, bool prefix);
/// Formats a long value in hexadecimal notation, /// Formats a long value in hexadecimal notation,
/// right justified and zero-padded in a field having at least the /// right justified and zero-padded in a field having at least the
@ -563,13 +563,13 @@ public:
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned long value, bool prefix); static std::string formatHex(unsigned long value, bool prefix);
/// Formats an unsigned long value in hexadecimal notation. /// Formats an unsigned long value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned long value, int width, bool prefix); static std::string formatHex(unsigned long value, int width, bool prefix);
/// Formats an unsigned long value in hexadecimal notation, /// Formats an unsigned long value in hexadecimal notation,
/// right justified and zero-padded in a field having at least the /// right justified and zero-padded in a field having at least the
@ -580,14 +580,14 @@ public:
#ifdef POCO_HAVE_INT64 #ifdef POCO_HAVE_INT64
#ifdef POCO_INT64_IS_LONG #ifdef POCO_INT64_IS_LONG
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(long long value, bool prefix); static std::string formatHex(long long value, bool prefix);
/// Formats a 64-bit integer value in hexadecimal notation. /// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(long long value, int width, bool prefix); static std::string formatHex(long long value, int width, bool prefix);
/// Formats a 64-bit integer value in hexadecimal notation, /// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least /// right justified and zero-padded in a field having at least
@ -595,13 +595,13 @@ public:
/// The value is treated as unsigned. /// The value is treated as unsigned.
/// If prefix is true, "0x" prefix is prepended to the resulting string. /// If prefix is true, "0x" prefix is prepended to the resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned long long value, bool prefix); static std::string formatHex(unsigned long long value, bool prefix);
/// Formats an unsigned 64-bit integer value in hexadecimal notation. /// Formats an unsigned 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(unsigned long long value, int width, bool prefix); static std::string formatHex(unsigned long long value, int width, bool prefix);
/// Formats an unsigned 64-bit integer value in hexadecimal notation, /// Formats an unsigned 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least /// right justified and zero-padded in a field having at least
@ -610,14 +610,14 @@ public:
#else // ifndef POCO_INT64_IS_LONG #else // ifndef POCO_INT64_IS_LONG
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(Int64 value, bool prefix); static std::string formatHex(Int64 value, bool prefix);
/// Formats a 64-bit integer value in hexadecimal notation. /// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
/// The value is treated as unsigned. /// The value is treated as unsigned.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(Int64 value, int width, bool prefix); static std::string formatHex(Int64 value, int width, bool prefix);
/// Formats a 64-bit integer value in hexadecimal notation, /// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least /// right justified and zero-padded in a field having at least
@ -625,13 +625,13 @@ public:
/// The value is treated as unsigned. /// The value is treated as unsigned.
/// If prefix is true, "0x" prefix is prepended to the resulting string. /// If prefix is true, "0x" prefix is prepended to the resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(UInt64 value, bool prefix); static std::string formatHex(UInt64 value, bool prefix);
/// Formats an unsigned 64-bit integer value in hexadecimal notation. /// Formats an unsigned 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the /// If prefix is true, "0x" prefix is prepended to the
/// resulting string. /// resulting string.
[[deprecated("use formatHex with options instead")]] POCO_DEPRECATED("use formatHex with options instead")
static std::string formatHex(UInt64 value, int width, bool prefix); static std::string formatHex(UInt64 value, int width, bool prefix);
/// Formats an unsigned 64-bit integer value in hexadecimal notation, /// Formats an unsigned 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least /// right justified and zero-padded in a field having at least

View File

@ -536,7 +536,7 @@ bool intToStr(T value,
template <typename T> template <typename T>
[[deprecated("use intToStr instead")]] POCO_DEPRECATED("use intToStr instead")
bool uIntToStr(T value, bool uIntToStr(T value,
unsigned short base, unsigned short base,
char* result, char* result,
@ -581,7 +581,7 @@ bool intToStr (T number,
template <typename T> template <typename T>
[[deprecated("use intToStr instead")]] POCO_DEPRECATED("use intToStr instead")
bool uIntToStr (T number, bool uIntToStr (T number,
unsigned short base, unsigned short base,
std::string& result, std::string& result,

View File

@ -87,7 +87,7 @@ public:
return pObs && pObs->_pObject == _pObject && pObs->_method == _method; return pObs && pObs->_pObject == _pObject && pObs->_method == _method;
} }
[[deprecated("use `bool accepts(const Notification::Ptr&)` instead")]] POCO_DEPRECATED("use `bool accepts(const Notification::Ptr&)` instead")
bool accepts(Notification* pNf, const char* pName) const bool accepts(Notification* pNf, const char* pName) const
{ {
return (!pName || pNf->name() == pName) && (dynamic_cast<N*>(pNf) != nullptr); return (!pName || pNf->name() == pName) && (dynamic_cast<N*>(pNf) != nullptr);

View File

@ -31,9 +31,8 @@
namespace Poco { namespace Poco {
//@ deprecated
template <class Key, class Value, class KeyHashFunction = HashFunction<Key>> template <class Key, class Value, class KeyHashFunction = HashFunction<Key>>
class SimpleHashTable class POCO_DEPRECATED("use LinearHashTable") SimpleHashTable
/// A SimpleHashTable stores a key value pair that can be looked up via a hashed key. /// A SimpleHashTable stores a key value pair that can be looked up via a hashed key.
/// ///
/// In comparison to a HashTable, this class handles collisions by sequentially searching the next /// In comparison to a HashTable, this class handles collisions by sequentially searching the next

View File

@ -19,6 +19,7 @@
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "Poco/Mutex.h"
#include "Poco/Runnable.h" #include "Poco/Runnable.h"
#include "Poco/SignalHandler.h" #include "Poco/SignalHandler.h"
#include "Poco/Event.h" #include "Poco/Event.h"
@ -31,7 +32,6 @@
#if !defined(POCO_NO_SYS_SELECT_H) #if !defined(POCO_NO_SYS_SELECT_H)
#include <sys/select.h> #include <sys/select.h>
#endif #endif
#include <errno.h>
#if defined(POCO_VXWORKS) #if defined(POCO_VXWORKS)
#include <cstring> #include <cstring>
#endif #endif
@ -41,8 +41,8 @@ namespace Poco {
class Foundation_API ThreadImpl class Foundation_API ThreadImpl
{ {
public: public:
typedef pthread_t TIDImpl; using TIDImpl = pthread_t;
typedef void (*Callable)(void*); using Callable = void (*)(void *);
enum Priority enum Priority
{ {
@ -99,7 +99,7 @@ private:
public: public:
CurrentThreadHolder() CurrentThreadHolder()
{ {
if (pthread_key_create(&_key, NULL)) if (pthread_key_create(&_key, nullptr))
throw SystemException("cannot allocate thread context key"); throw SystemException("cannot allocate thread context key");
} }
~CurrentThreadHolder() ~CurrentThreadHolder()
@ -126,7 +126,7 @@ private:
prio(PRIO_NORMAL_IMPL), prio(PRIO_NORMAL_IMPL),
osPrio(), osPrio(),
policy(SCHED_OTHER), policy(SCHED_OTHER),
done(false), done(Event::EVENT_MANUALRESET),
stackSize(POCO_THREAD_STACK_SIZE), stackSize(POCO_THREAD_STACK_SIZE),
started(false), started(false),
joined(false) joined(false)

View File

@ -20,7 +20,6 @@
#include "Poco/ErrorHandler.h" #include "Poco/ErrorHandler.h"
#include "Poco/NotificationQueue.h" #include "Poco/NotificationQueue.h"
#include <sstream> #include <sstream>
#include <ctime>
#include <utility> #include <utility>
namespace Poco { namespace Poco {
@ -103,7 +102,7 @@ private:
ActiveThread::ActiveThread(const std::string& name, int stackSize): ActiveThread::ActiveThread(const std::string& name, int stackSize):
_name(name), _name(name),
_thread(name), _thread(name),
_targetCompleted(false) _targetCompleted(Event::EVENT_MANUALRESET)
{ {
poco_assert_dbg (stackSize >= 0); poco_assert_dbg (stackSize >= 0);
_thread.setStackSize(stackSize); _thread.setStackSize(stackSize);

View File

@ -27,7 +27,7 @@
namespace Poco { namespace Poco {
Event::Event(EventType type): EventImpl(type == EVENT_AUTORESET) Event::Event(EventType type) : EventImpl(type == EVENT_AUTORESET)
{ {
} }
@ -37,9 +37,7 @@ Event::Event(bool autoReset): EventImpl(autoReset)
} }
Event::~Event() Event::~Event() = default;
{
}
} // namespace Poco } // namespace Poco

View File

@ -66,11 +66,9 @@ public:
{ {
} }
~CallableHolder() ~CallableHolder() override = default;
{
}
void run() void run() override
{ {
_callable(_pData); _callable(_pData);
} }
@ -86,8 +84,8 @@ private:
Thread::Thread(uint32_t sigMask): Thread::Thread(uint32_t sigMask):
_id(uniqueId()), _id(uniqueId()),
_pTLS(0), _pTLS(nullptr),
_event(true) _event(Event::EVENT_AUTORESET)
{ {
setNameImpl(makeName()); setNameImpl(makeName());
#if defined(POCO_OS_FAMILY_UNIX) #if defined(POCO_OS_FAMILY_UNIX)
@ -98,8 +96,8 @@ Thread::Thread(uint32_t sigMask):
Thread::Thread(const std::string& name, uint32_t sigMask): Thread::Thread(const std::string& name, uint32_t sigMask):
_id(uniqueId()), _id(uniqueId()),
_pTLS(0), _pTLS(nullptr),
_event(true) _event(Event::EVENT_AUTORESET)
{ {
setNameImpl(name); setNameImpl(name);
#if defined(POCO_OS_FAMILY_UNIX) #if defined(POCO_OS_FAMILY_UNIX)
@ -190,7 +188,7 @@ void Thread::clearTLS()
if (_pTLS) if (_pTLS)
{ {
delete _pTLS; delete _pTLS;
_pTLS = 0; _pTLS = nullptr;
} }
} }

View File

@ -39,7 +39,7 @@ public:
void join(); void join();
void activate(); void activate();
void release(); void release();
void run(); void run() override;
private: private:
volatile bool _idle; volatile bool _idle;
@ -57,14 +57,14 @@ private:
PooledThread::PooledThread(const std::string& name, int stackSize): PooledThread::PooledThread(const std::string& name, int stackSize):
_idle(true), _idle(true),
_idleTime(0), _idleTime(0),
_pTarget(0), _pTarget(nullptr),
_name(name), _name(name),
_thread(name), _thread(name),
_targetCompleted(false) _targetCompleted(Event::EVENT_MANUALRESET)
{ {
poco_assert_dbg (stackSize >= 0); poco_assert_dbg (stackSize >= 0);
_thread.setStackSize(stackSize); _thread.setStackSize(stackSize);
_idleTime = std::time(NULL); _idleTime = std::time(nullptr);
} }
@ -84,7 +84,7 @@ void PooledThread::start(Thread::Priority priority, Runnable& target)
{ {
FastMutex::ScopedLock lock(_mutex); FastMutex::ScopedLock lock(_mutex);
poco_assert (_pTarget == 0); poco_assert (_pTarget == nullptr);
_pTarget = &target; _pTarget = &target;
_thread.setPriority(priority); _thread.setPriority(priority);
@ -110,7 +110,7 @@ void PooledThread::start(Thread::Priority priority, Runnable& target, const std:
_thread.setName(fullName); _thread.setName(fullName);
_thread.setPriority(priority); _thread.setPriority(priority);
poco_assert (_pTarget == 0); poco_assert (_pTarget == nullptr);
_pTarget = &target; _pTarget = &target;
_targetReady.set(); _targetReady.set();
@ -128,7 +128,7 @@ int PooledThread::idleTime()
{ {
FastMutex::ScopedLock lock(_mutex); FastMutex::ScopedLock lock(_mutex);
return (int) (time(NULL) - _idleTime); return (int) (time(nullptr) - _idleTime);
} }
@ -157,7 +157,7 @@ void PooledThread::release()
const long JOIN_TIMEOUT = 10000; const long JOIN_TIMEOUT = 10000;
_mutex.lock(); _mutex.lock();
_pTarget = 0; _pTarget = nullptr;
_mutex.unlock(); _mutex.unlock();
// In case of a statically allocated thread pool (such // In case of a statically allocated thread pool (such
// as the default thread pool), Windows may have already // as the default thread pool), Windows may have already
@ -200,8 +200,8 @@ void PooledThread::run()
ErrorHandler::handle(); ErrorHandler::handle();
} }
FastMutex::ScopedLock lock(_mutex); FastMutex::ScopedLock lock(_mutex);
_pTarget = 0; _pTarget = nullptr;
_idleTime = time(NULL); _idleTime = time(nullptr);
_idle = true; _idle = true;
_targetCompleted.set(); _targetCompleted.set();
ThreadLocalStorage::clear(); ThreadLocalStorage::clear();
@ -430,8 +430,8 @@ PooledThread* ThreadPool::getThread()
if (++_age == 32) if (++_age == 32)
housekeep(); housekeep();
PooledThread* pThread = 0; PooledThread* pThread = nullptr;
for (ThreadVec::iterator it = _threads.begin(); !pThread && it != _threads.end(); ++it) for (auto it = _threads.begin(); !pThread && it != _threads.end(); ++it)
{ {
if ((*it)->idle()) if ((*it)->idle())
pThread = *it; pThread = *it;
@ -472,7 +472,7 @@ class ThreadPoolSingletonHolder
public: public:
ThreadPoolSingletonHolder() ThreadPoolSingletonHolder()
{ {
_pPool = 0; _pPool = nullptr;
} }
~ThreadPoolSingletonHolder() ~ThreadPoolSingletonHolder()
{ {

View File

@ -17,8 +17,6 @@
#include "Poco/Exception.h" #include "Poco/Exception.h"
#include "Poco/Error.h" #include "Poco/Error.h"
#include "Poco/ErrorHandler.h" #include "Poco/ErrorHandler.h"
#include "Poco/Timespan.h"
#include "Poco/Timestamp.h"
#include "Poco/Format.h" #include "Poco/Format.h"
#include "Poco/Error.h" #include "Poco/Error.h"
#include <signal.h> #include <signal.h>

View File

@ -39,6 +39,11 @@ ClassLoaderTest::~ClassLoaderTest()
{ {
} }
namespace Poco {
template class ClassLoader<TestPlugin>;
}
void ClassLoaderTest::testClassLoader1() void ClassLoaderTest::testClassLoader1()
{ {
@ -126,7 +131,7 @@ void ClassLoaderTest::testClassLoader2()
TestPlugin& POCO_UNUSED plgB = cl.instance("PluginB"); TestPlugin& POCO_UNUSED plgB = cl.instance("PluginB");
fail("not a singleton - must throw"); fail("not a singleton - must throw");
} }
catch (InvalidAccessException&) catch (const Poco::InvalidAccessException&)
{ {
} }
@ -135,7 +140,7 @@ void ClassLoaderTest::testClassLoader2()
TestPlugin* POCO_UNUSED pPluginC = cl.create("PluginC"); TestPlugin* POCO_UNUSED pPluginC = cl.create("PluginC");
fail("cannot create a singleton - must throw"); fail("cannot create a singleton - must throw");
} }
catch (InvalidAccessException&) catch (const Poco::InvalidAccessException&)
{ {
} }
@ -145,7 +150,7 @@ void ClassLoaderTest::testClassLoader2()
meta.autoDelete(&(meta.instance())); meta.autoDelete(&(meta.instance()));
fail("cannot take ownership of a singleton - must throw"); fail("cannot take ownership of a singleton - must throw");
} }
catch (InvalidAccessException&) catch (const Poco::InvalidAccessException&)
{ {
} }

View File

@ -9,17 +9,22 @@
#include "EventTestSuite.h" #include "EventTestSuite.h"
#if defined(POCO_TEST_DEPRECATED)
#include "FIFOEventTest.h" #include "FIFOEventTest.h"
#endif
#include "BasicEventTest.h" #include "BasicEventTest.h"
#include "PriorityEventTest.h" #include "PriorityEventTest.h"
CppUnit::Test* EventTestSuite::suite() CppUnit::Test* EventTestSuite::suite()
{ {
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("EventTestSuite"); auto* pSuite = new CppUnit::TestSuite("EventTestSuite");
pSuite->addTest(BasicEventTest::suite()); pSuite->addTest(BasicEventTest::suite());
pSuite->addTest(PriorityEventTest::suite()); pSuite->addTest(PriorityEventTest::suite());
#if defined(POCO_TEST_DEPRECATED)
pSuite->addTest(FIFOEventTest::suite()); pSuite->addTest(FIFOEventTest::suite());
#endif
return pSuite; return pSuite;
} }

View File

@ -7,6 +7,7 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
// //
#if defined(POCO_TEST_DEPRECATED)
#include "FIFOEventTest.h" #include "FIFOEventTest.h"
#include "DummyDelegate.h" #include "DummyDelegate.h"
@ -495,3 +496,5 @@ CppUnit::Test* FIFOEventTest::suite()
//CppUnit_addTest(pSuite, FIFOEventTest, testAsyncNotifyBenchmark); //CppUnit_addTest(pSuite, FIFOEventTest, testAsyncNotifyBenchmark);
return pSuite; return pSuite;
} }
#endif

View File

@ -13,6 +13,7 @@
#ifndef FIFOEventTest_INCLUDED #ifndef FIFOEventTest_INCLUDED
#define FIFOEventTest_INCLUDED #define FIFOEventTest_INCLUDED
#if defined(POCO_TEST_DEPRECATED)
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "CppUnit/TestCase.h" #include "CppUnit/TestCase.h"
@ -68,5 +69,6 @@ private:
std::atomic<Poco::Int64> _count; std::atomic<Poco::Int64> _count;
}; };
#endif
#endif // FIFOEventTest_INCLUDED #endif // FIFOEventTest_INCLUDED

View File

@ -7,6 +7,8 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
// //
#if defined(POCO_TEST_DEPRECATED)
#include "HashTableTest.h" #include "HashTableTest.h"
#include "CppUnit/TestCaller.h" #include "CppUnit/TestCaller.h"
@ -200,3 +202,5 @@ CppUnit::Test* HashTableTest::suite()
return pSuite; return pSuite;
} }
#endif

View File

@ -13,6 +13,8 @@
#ifndef HashTableTest_INCLUDED #ifndef HashTableTest_INCLUDED
#define HashTableTest_INCLUDED #define HashTableTest_INCLUDED
#if defined(POCO_TEST_DEPRECATED)
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "CppUnit/TestCase.h" #include "CppUnit/TestCase.h"
@ -39,5 +41,6 @@ public:
private: private:
}; };
#endif
#endif // HashTableTest_INCLUDED #endif // HashTableTest_INCLUDED

View File

@ -9,8 +9,10 @@
#include "HashingTestSuite.h" #include "HashingTestSuite.h"
#if defined(POCO_TEST_DEPRECATED)
#include "HashTableTest.h" #include "HashTableTest.h"
#include "SimpleHashTableTest.h" #include "SimpleHashTableTest.h"
#endif
#include "LinearHashTableTest.h" #include "LinearHashTableTest.h"
#include "HashSetTest.h" #include "HashSetTest.h"
#include "HashMapTest.h" #include "HashMapTest.h"
@ -20,8 +22,10 @@ CppUnit::Test* HashingTestSuite::suite()
{ {
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HashingTestSuite"); CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HashingTestSuite");
#if defined(POCO_TEST_DEPRECATED)
pSuite->addTest(HashTableTest::suite()); pSuite->addTest(HashTableTest::suite());
pSuite->addTest(SimpleHashTableTest::suite()); pSuite->addTest(SimpleHashTableTest::suite());
#endif
pSuite->addTest(LinearHashTableTest::suite()); pSuite->addTest(LinearHashTableTest::suite());
pSuite->addTest(HashSetTest::suite()); pSuite->addTest(HashSetTest::suite());
pSuite->addTest(HashMapTest::suite()); pSuite->addTest(HashMapTest::suite());

View File

@ -12,12 +12,14 @@
#include "CppUnit/TestCaller.h" #include "CppUnit/TestCaller.h"
#include "CppUnit/TestSuite.h" #include "CppUnit/TestSuite.h"
#include "Poco/LinearHashTable.h" #include "Poco/LinearHashTable.h"
#include "Poco/HashTable.h"
#include "Poco/Stopwatch.h" #include "Poco/Stopwatch.h"
#include "Poco/NumberFormatter.h" #include "Poco/NumberFormatter.h"
#include <set> #include <set>
#include <iostream>
#if defined(POCO_TEST_DEPRECATED)
#include "Poco/HashTable.h"
#include <iostream>
#endif
#ifdef POCO_COMPILER_MSVC #ifdef POCO_COMPILER_MSVC
#pragma warning(push) #pragma warning(push)
@ -27,9 +29,11 @@
using Poco::LinearHashTable; using Poco::LinearHashTable;
using Poco::Hash; using Poco::Hash;
using Poco::HashTable;
using Poco::Stopwatch; using Poco::Stopwatch;
using Poco::NumberFormatter; using Poco::NumberFormatter;
#if defined(POCO_TEST_DEPRECATED)
using Poco::HashTable;
#endif
LinearHashTableTest::LinearHashTableTest(const std::string& name): CppUnit::TestCase(name) LinearHashTableTest::LinearHashTableTest(const std::string& name): CppUnit::TestCase(name)
@ -189,10 +193,11 @@ void LinearHashTableTest::testConstIterator()
assertTrue (values.size() == N); assertTrue (values.size() == N);
} }
#if defined(POCO_TEST_DEPRECATED)
void LinearHashTableTest::testPerformanceInt() void LinearHashTableTest::testPerformanceInt()
{ {
const int N = 5000000; const int N = 50000000;
Stopwatch sw; Stopwatch sw;
{ {
@ -263,10 +268,11 @@ void LinearHashTableTest::testPerformanceInt()
void LinearHashTableTest::testPerformanceStr() void LinearHashTableTest::testPerformanceStr()
{ {
const int N = 5000000; const int N = 50000000;
Stopwatch sw; Stopwatch sw;
std::vector<std::string> values; std::vector<std::string> values;
values.reserve(N);
for (int i = 0; i < N; ++i) for (int i = 0; i < N; ++i)
{ {
values.push_back(NumberFormatter::format0(i, 8)); values.push_back(NumberFormatter::format0(i, 8));
@ -336,6 +342,7 @@ void LinearHashTableTest::testPerformanceStr()
} }
} }
#endif
void LinearHashTableTest::setUp() void LinearHashTableTest::setUp()
{ {
@ -355,8 +362,11 @@ CppUnit::Test* LinearHashTableTest::suite()
CppUnit_addTest(pSuite, LinearHashTableTest, testErase); CppUnit_addTest(pSuite, LinearHashTableTest, testErase);
CppUnit_addTest(pSuite, LinearHashTableTest, testIterator); CppUnit_addTest(pSuite, LinearHashTableTest, testIterator);
CppUnit_addTest(pSuite, LinearHashTableTest, testConstIterator); CppUnit_addTest(pSuite, LinearHashTableTest, testConstIterator);
//CppUnit_addTest(pSuite, LinearHashTableTest, testPerformanceInt);
//CppUnit_addTest(pSuite, LinearHashTableTest, testPerformanceStr); #if defined(POCO_TEST_DEPRECATED)
CppUnit_addTest(pSuite, LinearHashTableTest, testPerformanceInt);
CppUnit_addTest(pSuite, LinearHashTableTest, testPerformanceStr);
#endif
return pSuite; return pSuite;
} }

View File

@ -22,17 +22,20 @@ class LinearHashTableTest: public CppUnit::TestCase
{ {
public: public:
LinearHashTableTest(const std::string& name); LinearHashTableTest(const std::string& name);
~LinearHashTableTest(); ~LinearHashTableTest() override;
void testInsert(); void testInsert();
void testErase(); void testErase();
void testIterator(); void testIterator();
void testConstIterator(); void testConstIterator();
#if defined(POCO_TEST_DEPRECATED)
void testPerformanceInt(); void testPerformanceInt();
void testPerformanceStr(); void testPerformanceStr();
#endif
void setUp(); void setUp() override;
void tearDown(); void tearDown() override;
static CppUnit::Test* suite(); static CppUnit::Test* suite();

View File

@ -7,6 +7,7 @@
// SPDX-License-Identifier: BSL-1.0 // SPDX-License-Identifier: BSL-1.0
// //
#if defined(POCO_TEST_DEPRECATED)
#include "SimpleHashTableTest.h" #include "SimpleHashTableTest.h"
#include "CppUnit/TestCaller.h" #include "CppUnit/TestCaller.h"
@ -153,3 +154,5 @@ CppUnit::Test* SimpleHashTableTest::suite()
return pSuite; return pSuite;
} }
#endif

View File

@ -13,6 +13,8 @@
#ifndef SimpleHashTableTest_INCLUDED #ifndef SimpleHashTableTest_INCLUDED
#define SimpleHashTableTest_INCLUDED #define SimpleHashTableTest_INCLUDED
#if defined(POCO_TEST_DEPRECATED)
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
#include "CppUnit/TestCase.h" #include "CppUnit/TestCase.h"
@ -39,5 +41,6 @@ public:
private: private:
}; };
#endif
#endif // SimpleHashTableTest_INCLUDED #endif // SimpleHashTableTest_INCLUDED

View File

@ -23,7 +23,7 @@ using Poco::RunnableAdapter;
using Poco::Thread; using Poco::Thread;
ThreadPoolTest::ThreadPoolTest(const std::string& name): CppUnit::TestCase(name), _event(false) ThreadPoolTest::ThreadPoolTest(const std::string& name): CppUnit::TestCase(name), _event(Poco::Event::EVENT_MANUALRESET)
{ {
} }

View File

@ -3002,7 +3002,7 @@ void VarTest::testEmpty()
std::string s = da.extract<std::string>(); std::string s = da.extract<std::string>();
assertTrue ("123" == s); assertTrue ("123" == s);
assertTrue (!da.isEmpty()); assertTrue (!da.isEmpty());
da.empty(); da.clear();
assertTrue (da.isEmpty()); assertTrue (da.isEmpty());
assertTrue (da.type() == typeid(void)); assertTrue (da.type() == typeid(void));
assertTrue (!da.isArray()); assertTrue (!da.isArray());

View File

@ -79,7 +79,7 @@ int main(int argc, char** argv)
Poco::JSON::Parser sparser; Poco::JSON::Parser sparser;
sw.restart(); sw.restart();
sparser.parse(jsonStr); sparser.parse(jsonStr);
Poco::DynamicAny result = sparser.result(); Poco::Dynamic::Var result = sparser.result();
sw.stop(); sw.stop();
std::cout << "-----------------------------------------" << std::endl; std::cout << "-----------------------------------------" << std::endl;
std::cout << "[std::string] parsed/handled in " << sw.elapsed() << " [us]" << std::endl; std::cout << "[std::string] parsed/handled in " << sw.elapsed() << " [us]" << std::endl;

View File

@ -37,7 +37,7 @@ void ParseHandler::reset()
{ {
while (!_stack.empty()) _stack.pop(); while (!_stack.empty()) _stack.pop();
_key = ""; _key = "";
_result.empty(); _result.clear();
} }

View File

@ -142,7 +142,7 @@ Var Query::find(const std::string& path) const
result = o.get(name); result = o.get(name);
found = true; found = true;
} }
else result.empty(); else result.clear();
} }
@ -166,7 +166,7 @@ Var Query::find(const std::string& path) const
} }
} }
} }
if (!found) result.empty(); if (!found) result.clear();
return result; return result;
} }

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] Cursor;
class Cursor;
class MongoDB_API Cursor: public Document class MongoDB_API Cursor: public Document
/// Cursor is an helper class for querying multiple documents. /// Cursor is an helper class for querying multiple documents.

View File

@ -72,25 +72,31 @@ public:
/// ///
/// If the command fails, -1 is returned. /// If the command fails, -1 is returned.
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCommand() const; Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCommand() const;
/// Creates a QueryRequest for a command. (old wire protocol) /// Creates a QueryRequest for a command. (old wire protocol)
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCountRequest(const std::string& collectionName) const; Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCountRequest(const std::string& collectionName) const;
/// Creates a QueryRequest to count the given collection. /// Creates a QueryRequest to count the given collection.
/// The collectionname must not contain the database name. (old wire protocol) /// The collectionname must not contain the database name. (old wire protocol)
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::DeleteRequest> createDeleteRequest(const std::string& collectionName) const; Poco::SharedPtr<Poco::MongoDB::DeleteRequest> createDeleteRequest(const std::string& collectionName) const;
/// Creates a DeleteRequest to delete documents in the given collection. /// Creates a DeleteRequest to delete documents in the given collection.
/// The collectionname must not contain the database name. (old wire protocol) /// The collectionname must not contain the database name. (old wire protocol)
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::InsertRequest> createInsertRequest(const std::string& collectionName) const; Poco::SharedPtr<Poco::MongoDB::InsertRequest> createInsertRequest(const std::string& collectionName) const;
/// Creates an InsertRequest to insert new documents in the given collection. /// Creates an InsertRequest to insert new documents in the given collection.
/// The collectionname must not contain the database name. (old wire protocol) /// The collectionname must not contain the database name. (old wire protocol)
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createQueryRequest(const std::string& collectionName) const; Poco::SharedPtr<Poco::MongoDB::QueryRequest> createQueryRequest(const std::string& collectionName) const;
/// Creates a QueryRequest. (old wire protocol) /// Creates a QueryRequest. (old wire protocol)
/// The collectionname must not contain the database name. /// The collectionname must not contain the database name.
//[[deprecated]]
Poco::SharedPtr<Poco::MongoDB::UpdateRequest> createUpdateRequest(const std::string& collectionName) const; Poco::SharedPtr<Poco::MongoDB::UpdateRequest> createUpdateRequest(const std::string& collectionName) const;
/// Creates an UpdateRequest. (old wire protocol) /// Creates an UpdateRequest. (old wire protocol)
/// The collectionname must not contain the database name. /// The collectionname must not contain the database name.
@ -115,10 +121,12 @@ public:
/// Creates an index. The document returned is the result of a getLastError call. /// Creates an index. The document returned is the result of a getLastError call.
/// For more info look at the ensureIndex information on the MongoDB website. (old wire protocol) /// For more info look at the ensureIndex information on the MongoDB website. (old wire protocol)
//[[deprecated]]
Document::Ptr getLastErrorDoc(Connection& connection) const; Document::Ptr getLastErrorDoc(Connection& connection) const;
/// Sends the getLastError command to the database and returns the error document. /// Sends the getLastError command to the database and returns the error document.
/// (old wire protocol) /// (old wire protocol)
//[[deprecated]]
std::string getLastError(Connection& connection) const; std::string getLastError(Connection& connection) const;
/// Sends the getLastError command to the database and returns the err element /// Sends the getLastError command to the database and returns the err element
/// from the error document. When err is null, an empty string is returned. /// from the error document. When err is null, an empty string is returned.

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] DeleteRequest;
class DeleteRequest;
class MongoDB_API DeleteRequest: public RequestMessage class MongoDB_API DeleteRequest: public RequestMessage
/// A DeleteRequest is used to delete one ore more documents from a database. /// A DeleteRequest is used to delete one ore more documents from a database.

View File

@ -25,6 +25,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] GetMoreRequest;
class GetMoreRequest;
class MongoDB_API GetMoreRequest: public RequestMessage class MongoDB_API GetMoreRequest: public RequestMessage
/// A GetMoreRequest is used to query the database for more documents in a collection /// A GetMoreRequest is used to query the database for more documents in a collection

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] InsertRequest;
class InsertRequest;
class MongoDB_API InsertRequest: public RequestMessage class MongoDB_API InsertRequest: public RequestMessage
/// A request for inserting one or more documents to the database /// A request for inserting one or more documents to the database

View File

@ -38,7 +38,16 @@ public:
enum OpCode enum OpCode
{ {
#if false
// Opcodes deprecated in MongoDB 5.0 // Opcodes deprecated in MongoDB 5.0
OP_REPLY [[deprecated]] = 1,
OP_UPDATE [[deprecated]] = 2001,
OP_INSERT [[deprecated]] = 2002,
OP_QUERY [[deprecated]] = 2004,
OP_GET_MORE [[deprecated]] = 2005,
OP_DELETE [[deprecated]] = 2006,
OP_KILL_CURSORS [[deprecated]] = 2007,
#else
OP_REPLY = 1, OP_REPLY = 1,
OP_UPDATE = 2001, OP_UPDATE = 2001,
OP_INSERT = 2002, OP_INSERT = 2002,
@ -46,6 +55,7 @@ public:
OP_GET_MORE = 2005, OP_GET_MORE = 2005,
OP_DELETE = 2006, OP_DELETE = 2006,
OP_KILL_CURSORS = 2007, OP_KILL_CURSORS = 2007,
#endif
/// Opcodes supported in MongoDB 5.1 and later /// Opcodes supported in MongoDB 5.1 and later
OP_COMPRESSED = 2012, OP_COMPRESSED = 2012,

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] QueryRequest;
class QueryRequest;
class MongoDB_API QueryRequest: public RequestMessage class MongoDB_API QueryRequest: public RequestMessage
/// A request to query documents in a MongoDB database /// A request to query documents in a MongoDB database

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] RequestMessage;
class RequestMessage;
class MongoDB_API RequestMessage: public Message class MongoDB_API RequestMessage: public Message
/// Base class for a request sent to the MongoDB server. /// Base class for a request sent to the MongoDB server.

View File

@ -28,6 +28,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] ResponseMessage;
class ResponseMessage;
class MongoDB_API ResponseMessage: public Message class MongoDB_API ResponseMessage: public Message
/// This class represents a response (OP_REPLY) from MongoDB. /// This class represents a response (OP_REPLY) from MongoDB.

View File

@ -26,6 +26,8 @@
namespace Poco { namespace Poco {
namespace MongoDB { namespace MongoDB {
//class [[deprecated]] UpdateRequest;
class UpdateRequest;
class MongoDB_API UpdateRequest: public RequestMessage class MongoDB_API UpdateRequest: public RequestMessage
/// This request is used to update a document in a database /// This request is used to update a document in a database

View File

@ -62,7 +62,7 @@ public:
HTTP_SEE_OTHER = 303, HTTP_SEE_OTHER = 303,
HTTP_NOT_MODIFIED = 304, HTTP_NOT_MODIFIED = 304,
HTTP_USE_PROXY = 305, HTTP_USE_PROXY = 305,
HTTP_USEPROXY = 305, /// @deprecated HTTP_USEPROXY POCO_DEPRECATED("use HTTP_USE_PROXY") = 305,
// UNUSED: 306 // UNUSED: 306
HTTP_TEMPORARY_REDIRECT = 307, HTTP_TEMPORARY_REDIRECT = 307,
HTTP_PERMANENT_REDIRECT = 308, HTTP_PERMANENT_REDIRECT = 308,
@ -80,11 +80,11 @@ public:
HTTP_LENGTH_REQUIRED = 411, HTTP_LENGTH_REQUIRED = 411,
HTTP_PRECONDITION_FAILED = 412, HTTP_PRECONDITION_FAILED = 412,
HTTP_REQUEST_ENTITY_TOO_LARGE = 413, HTTP_REQUEST_ENTITY_TOO_LARGE = 413,
HTTP_REQUESTENTITYTOOLARGE = 413, /// @deprecated HTTP_REQUESTENTITYTOOLARGE POCO_DEPRECATED("") = 413,
HTTP_REQUEST_URI_TOO_LONG = 414, HTTP_REQUEST_URI_TOO_LONG = 414,
HTTP_REQUESTURITOOLONG = 414, /// @deprecated HTTP_REQUESTURITOOLONG POCO_DEPRECATED("") = 414,
HTTP_UNSUPPORTED_MEDIA_TYPE = 415, HTTP_UNSUPPORTED_MEDIA_TYPE = 415,
HTTP_UNSUPPORTEDMEDIATYPE = 415, /// @deprecated HTTP_UNSUPPORTEDMEDIATYPE POCO_DEPRECATED("") = 415,
HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416,
HTTP_EXPECTATION_FAILED = 417, HTTP_EXPECTATION_FAILED = 417,
HTTP_IM_A_TEAPOT = 418, HTTP_IM_A_TEAPOT = 418,
@ -134,7 +134,7 @@ public:
HTTPResponse(const HTTPResponse& other); HTTPResponse(const HTTPResponse& other);
/// Creates the HTTPResponse by copying another one. /// Creates the HTTPResponse by copying another one.
virtual ~HTTPResponse(); ~HTTPResponse() override;
/// Destroys the HTTPResponse. /// Destroys the HTTPResponse.
HTTPResponse& operator = (const HTTPResponse& other); HTTPResponse& operator = (const HTTPResponse& other);
@ -185,11 +185,11 @@ public:
/// May throw an exception in case of a malformed /// May throw an exception in case of a malformed
/// Set-Cookie header. /// Set-Cookie header.
void write(std::ostream& ostr) const; void write(std::ostream& ostr) const override;
/// Writes the HTTP response to the given /// Writes the HTTP response to the given
/// output stream. /// output stream.
void read(std::istream& istr); void read(std::istream& istr) override;
/// Reads the HTTP response from the /// Reads the HTTP response from the
/// given input stream. /// given input stream.
/// ///

View File

@ -60,14 +60,14 @@ class Net_API NetworkInterface
/// and XP. /// and XP.
{ {
public: public:
typedef std::vector<NetworkInterface> List; using List = std::vector<NetworkInterface>;
typedef List NetworkInterfaceList;//@deprecated using NetworkInterfaceList POCO_DEPRECATED("") = List;
typedef std::map<unsigned, NetworkInterface> Map; using Map = std::map<unsigned int, NetworkInterface>;
typedef Poco::Tuple<IPAddress, IPAddress, IPAddress> AddressTuple; using AddressTuple = Poco::Tuple<IPAddress, IPAddress, IPAddress>;
typedef std::vector<AddressTuple> AddressList; using AddressList = std::vector<AddressTuple>;
typedef AddressList::iterator AddressIterator; using AddressIterator = AddressList::iterator;
typedef AddressList::const_iterator ConstAddressIterator; using ConstAddressIterator = AddressList::const_iterator;
typedef std::vector<unsigned char> MACAddress; using MACAddress = std::vector<unsigned char>;
enum AddressType enum AddressType
{ {
@ -281,13 +281,13 @@ public:
/// member of the pair. /// member of the pair.
protected: protected:
NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, const IPAddress& address, unsigned index, MACAddress* pMACAddress = 0); NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, const IPAddress& address, unsigned index, MACAddress* pMACAddress = nullptr);
/// Creates the NetworkInterface. /// Creates the NetworkInterface.
NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, unsigned index, MACAddress* pMACAddress = 0); NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, unsigned index, MACAddress* pMACAddress = nullptr);
/// Creates the NetworkInterface. /// Creates the NetworkInterface.
NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress = 0); NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress = nullptr);
/// Creates the NetworkInterface. /// Creates the NetworkInterface.
NetworkInterface(const std::string& name, NetworkInterface(const std::string& name,
@ -297,7 +297,7 @@ protected:
const IPAddress& subnetMask, const IPAddress& subnetMask,
const IPAddress& broadcastAddress, const IPAddress& broadcastAddress,
unsigned index, unsigned index,
MACAddress* pMACAddress = 0); MACAddress* pMACAddress = nullptr);
/// Creates the NetworkInterface. /// Creates the NetworkInterface.
NetworkInterface(const std::string& name, NetworkInterface(const std::string& name,
@ -305,7 +305,7 @@ protected:
const IPAddress& subnetMask, const IPAddress& subnetMask,
const IPAddress& broadcastAddress, const IPAddress& broadcastAddress,
unsigned index, unsigned index,
MACAddress* pMACAddress = 0); MACAddress* pMACAddress = nullptr);
/// Creates the NetworkInterface. /// Creates the NetworkInterface.
IPAddress interfaceNameToAddress(const std::string& interfaceName) const; IPAddress interfaceNameToAddress(const std::string& interfaceName) const;

View File

@ -134,7 +134,7 @@ public:
void close(); void close();
/// Closes the socket. /// Closes the socket.
//@deprecated POCO_DEPRECATED("Use PollSet instead")
static int select(SocketList& readList, SocketList& writeList, SocketList& exceptList, const Poco::Timespan& timeout); static int select(SocketList& readList, SocketList& writeList, SocketList& exceptList, const Poco::Timespan& timeout);
/// Determines the status of one or more sockets, /// Determines the status of one or more sockets,
/// using a call to select(). /// using a call to select().

Some files were not shown because too many files have changed in this diff Show More