mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
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:
parent
5117e27515
commit
f24547cdcf
@ -65,12 +65,7 @@ include(GNUInstallDirs)
|
||||
# Include some common macros to simpilfy the Poco CMake files
|
||||
include(PocoMacros)
|
||||
|
||||
if(POCO_STATIC)
|
||||
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()
|
||||
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
||||
|
||||
if(MSVC)
|
||||
option(POCO_MT "Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD" OFF)
|
||||
|
@ -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)
|
||||
{
|
||||
if (pointer == NULL)
|
||||
if (pointer == nullptr)
|
||||
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)
|
||||
{
|
||||
if (pointer != NULL)
|
||||
if (pointer != nullptr)
|
||||
throw CppUnitException(pointerExpression + " must be NULL", lineNumber, fileName);
|
||||
}
|
||||
|
||||
|
@ -162,19 +162,18 @@ void TextTestResult::printErrors(std::ostream& stream)
|
||||
stream << "There were " << testErrors() << " errors: " << std::endl;
|
||||
|
||||
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();
|
||||
|
||||
stream << std::setw(2) << i
|
||||
<< ": "
|
||||
<< failure->failedTest()->toString() << "\n"
|
||||
<< " \"" << (e ? e->what() : "") << "\"\n"
|
||||
<< " \"" << (e ? e->what() : "") << "\"\n"
|
||||
<< " in \""
|
||||
<< (e ? e->fileName() : std::string())
|
||||
<< "\", line ";
|
||||
if (e == 0)
|
||||
if (e == nullptr)
|
||||
{
|
||||
stream << "0";
|
||||
}
|
||||
@ -210,10 +209,9 @@ void TextTestResult::printFailures(std::ostream& stream)
|
||||
|
||||
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
|
||||
<< ": "
|
||||
@ -222,7 +220,7 @@ void TextTestResult::printFailures(std::ostream& stream)
|
||||
<< " in \""
|
||||
<< (e ? e->fileName() : std::string())
|
||||
<< "\", line ";
|
||||
if (e == 0)
|
||||
if (e == nullptr)
|
||||
{
|
||||
stream << "0";
|
||||
}
|
||||
|
@ -31,8 +31,8 @@ namespace Crypto {
|
||||
class X509Certificate;
|
||||
class PKCS12Container;
|
||||
|
||||
//class [[deprecated]] ECKey;
|
||||
|
||||
//@ deprecated
|
||||
class Crypto_API ECKey: public KeyPair
|
||||
/// This class stores an EC key pair, consisting
|
||||
/// of private and public key. Storage of the private
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include "Poco/Crypto/Crypto.h"
|
||||
#include "Poco/Crypto/EVPPKey.h"
|
||||
#include "Poco/Crypto/KeyPairImpl.h"
|
||||
#include "Poco/Crypto/OpenSSLInitializer.h"
|
||||
#include "Poco/RefCountedObject.h"
|
||||
#include "Poco/AutoPtr.h"
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
@ -28,16 +28,15 @@
|
||||
#include <openssl/evp.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <sstream>
|
||||
#include <typeinfo>
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Crypto {
|
||||
|
||||
//@deprecated
|
||||
//class [[deprecated]] ECKey;
|
||||
//class [[deprecated]] RSAKey;
|
||||
class ECKey;
|
||||
//@deprecated
|
||||
class RSAKey;
|
||||
class PKCS12Container;
|
||||
class X509Certificate;
|
||||
@ -93,8 +92,8 @@ public:
|
||||
/// Constructs EVPPKey from EVP_PKEY pointer.
|
||||
/// The content behind the supplied pointer is internally duplicated.
|
||||
|
||||
//@ deprecated
|
||||
template<typename K>
|
||||
//[[deprecated]] 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),
|
||||
/// or a Poco wrapper (RSAKey, ECKey) key pointer.
|
||||
@ -185,13 +184,16 @@ private:
|
||||
void newECKey(const char* group);
|
||||
void duplicate(EVP_PKEY* pEVPPKey);
|
||||
|
||||
//@ deprecated
|
||||
//[[deprecated]]
|
||||
void setKey(ECKey* pKey);
|
||||
//@ deprecated
|
||||
|
||||
//[[deprecated]]
|
||||
void setKey(RSAKey* pKey);
|
||||
//@ deprecated
|
||||
|
||||
//[[deprecated]]
|
||||
void setKey(EC_KEY* pKey);
|
||||
//@ deprecated
|
||||
|
||||
//[[deprecated]]
|
||||
void setKey(RSA* pKey);
|
||||
|
||||
static int passCB(char* buf, int size, int, void* pass);
|
||||
@ -336,9 +338,7 @@ private:
|
||||
EVP_PKEY* _pEVPPKey = 0;
|
||||
static const std::map<int, std::string> KNOWN_TYPES;
|
||||
|
||||
//@deprecated
|
||||
friend class ECKeyImpl;
|
||||
//@deprecated
|
||||
friend class RSAKeyImpl;
|
||||
};
|
||||
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
DIGEST_SHA1
|
||||
};
|
||||
|
||||
//@ deprecated
|
||||
//[[deprecated]] RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1);
|
||||
RSADigestEngine(const RSAKey& key, DigestType digestType = DIGEST_SHA1);
|
||||
/// Creates the RSADigestEngine with the given RSA key,
|
||||
/// using the MD5 or SHA-1 hash algorithm.
|
||||
|
@ -30,8 +30,8 @@ namespace Crypto {
|
||||
class X509Certificate;
|
||||
class PKCS12Container;
|
||||
|
||||
//class [[deprecated]] RSAKey;
|
||||
|
||||
//@ deprecated
|
||||
class Crypto_API RSAKey: public KeyPair
|
||||
/// This class stores an RSA key pair, consisting
|
||||
/// 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.
|
||||
|
||||
RSAKey(std::istream* pPublicKeyStream,
|
||||
std::istream* pPrivateKeyStream = 0,
|
||||
std::istream* pPrivateKeyStream = nullptr,
|
||||
const std::string& privateKeyPassphrase = "");
|
||||
/// Creates the RSAKey, by reading public and private key from the given streams and
|
||||
/// using the given passphrase for the private key.
|
||||
@ -132,4 +132,4 @@ inline RSAKeyImpl::Ptr RSAKey::impl() const
|
||||
} } // namespace Poco::Crypto
|
||||
|
||||
|
||||
#endif // Crypto_RSAKey_INCLUDED
|
||||
#endif // Crypto_RSAKey_INCLUDED
|
||||
|
@ -32,6 +32,7 @@ ECTest::~ECTest()
|
||||
{
|
||||
}
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
void ECTest::testECNewKeys()
|
||||
{
|
||||
@ -176,6 +177,7 @@ void ECTest::testECDSASignManipulated()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void ECTest::setUp()
|
||||
{
|
||||
@ -191,10 +193,13 @@ CppUnit::Test* ECTest::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("ECTest");
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
CppUnit_addTest(pSuite, ECTest, testECNewKeys);
|
||||
CppUnit_addTest(pSuite, ECTest, testECNewKeysNoPassphrase);
|
||||
CppUnit_addTest(pSuite, ECTest, testECDSASignSha256);
|
||||
CppUnit_addTest(pSuite, ECTest, testECDSASignManipulated);
|
||||
|
||||
#endif
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -25,11 +25,15 @@ public:
|
||||
ECTest(const std::string& name);
|
||||
~ECTest();
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
void testECNewKeys();
|
||||
void testECNewKeysNoPassphrase();
|
||||
void testECDSASignSha256();
|
||||
void testECDSASignManipulated();
|
||||
|
||||
#endif
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
|
||||
|
@ -41,7 +41,7 @@ class DNSSD_Bonjour_API EventLoop: public Poco::Runnable
|
||||
/// Bonjour machinery.
|
||||
{
|
||||
public:
|
||||
typedef Poco::ScopedLock<EventLoop> ScopedLock;
|
||||
using ScopedLock = Poco::ScopedLock<EventLoop>;
|
||||
|
||||
enum
|
||||
{
|
||||
@ -51,7 +51,7 @@ public:
|
||||
EventLoop();
|
||||
/// Creates the EventLoop.
|
||||
|
||||
~EventLoop();
|
||||
~EventLoop() override;
|
||||
/// Destroys the EventLoop.
|
||||
|
||||
void add(DNSServiceRef sdRef);
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
|
||||
#include "Poco/DNSSD/Bonjour/EventLoop.h"
|
||||
#include "Poco/Net/PollSet.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Net/StreamSocketImpl.h"
|
||||
#include <dns_sd.h>
|
||||
@ -46,11 +47,9 @@ EventLoop::~EventLoop()
|
||||
|
||||
void EventLoop::shutdown()
|
||||
{
|
||||
RefToSock::iterator it = _refs.begin();
|
||||
RefToSock::iterator itEnd = _refs.end();
|
||||
for (; it != itEnd; ++it)
|
||||
for (auto& it: _refs)
|
||||
{
|
||||
DNSServiceRefDeallocate(it->first);
|
||||
DNSServiceRefDeallocate(it.first);
|
||||
}
|
||||
_refs.clear();
|
||||
_sockets.clear();
|
||||
@ -83,7 +82,7 @@ void EventLoop::remove(DNSServiceRef sdRef)
|
||||
|
||||
void EventLoop::removeImpl(DNSServiceRef sdRef)
|
||||
{
|
||||
RefToSock::iterator it = _refs.find(sdRef);
|
||||
auto it = _refs.find(sdRef);
|
||||
if (it != _refs.end())
|
||||
{
|
||||
_sockets.erase(it->second);
|
||||
@ -95,59 +94,52 @@ void EventLoop::removeImpl(DNSServiceRef sdRef)
|
||||
|
||||
void EventLoop::run()
|
||||
{
|
||||
Poco::Net::Socket::SocketList readList;
|
||||
Poco::Net::Socket::SocketList writeList;
|
||||
Poco::Net::Socket::SocketList errList;
|
||||
Poco::Net::PollSet pollSet;
|
||||
|
||||
while (!_stop)
|
||||
{
|
||||
readList.clear();
|
||||
if (!_refs.empty() || _refAdded.tryWait(EVENTLOOP_TIMEOUT))
|
||||
{
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
|
||||
RefToSock::const_iterator it = _refs.begin();
|
||||
RefToSock::const_iterator itEnd = _refs.end();
|
||||
for (; it != itEnd; ++it)
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
for (const auto& r: _refs)
|
||||
{
|
||||
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);
|
||||
int ready = Poco::Net::Socket::select(readList, writeList, errList, timeout);
|
||||
if (ready > 0)
|
||||
Poco::Timespan timeout(1000LL * EVENTLOOP_TIMEOUT);
|
||||
const auto sm = pollSet.poll(timeout);
|
||||
if (!sm.empty())
|
||||
{
|
||||
Poco::Net::Socket::SocketList::iterator it = readList.begin();
|
||||
Poco::Net::Socket::SocketList::iterator itEnd = readList.end();
|
||||
for (; it != itEnd; ++it)
|
||||
for (const auto& it: sm)
|
||||
{
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
|
||||
SockToRef::iterator itSock = _sockets.find(*it);
|
||||
poco_assert_dbg (itSock != _sockets.end());
|
||||
RefSet::iterator itSet = _invalidatedRefs.find(itSock->second);
|
||||
if (itSet != _invalidatedRefs.end())
|
||||
if (it.second & Net::PollSet::POLL_READ)
|
||||
{
|
||||
removeImpl(itSock->second);
|
||||
_invalidatedRefs.erase(itSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
DNSServiceProcessResult(itSock->second);
|
||||
auto& socket = it.first;
|
||||
const auto itSock = _sockets.find(socket);
|
||||
poco_assert_dbg (itSock != _sockets.end());
|
||||
auto itSet = _invalidatedRefs.find(itSock->second);
|
||||
if (itSet != _invalidatedRefs.end())
|
||||
{
|
||||
removeImpl(itSock->second);
|
||||
_invalidatedRefs.erase(itSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
DNSServiceProcessResult(itSock->second);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
RefSet::iterator itSet =_invalidatedRefs.begin();
|
||||
RefSet::iterator itSetEnd = _invalidatedRefs.end();
|
||||
for (; itSet != itSetEnd; ++itSet)
|
||||
Poco::Mutex::ScopedLock lock(_mutex);
|
||||
for (auto& ir: _invalidatedRefs)
|
||||
{
|
||||
removeImpl(*itSet);
|
||||
removeImpl(ir);
|
||||
}
|
||||
_invalidatedRefs.clear();
|
||||
}
|
||||
|
@ -2983,7 +2983,7 @@ void SQLExecutor::filter(const std::string& query, const std::string& intFldName
|
||||
{
|
||||
Statement stmt = (session() << query, now);
|
||||
RecordSet rset(stmt);
|
||||
assertTrue (rset.totalRowCount() == 4);
|
||||
assertTrue (rset.getTotalRowCount() == 4);
|
||||
RowFilter::Ptr pRF = new RowFilter(&rset);
|
||||
assertTrue (pRF->isEmpty());
|
||||
pRF->add(intFldName, RowFilter::VALUE_EQUAL, 1);
|
||||
|
@ -45,10 +45,10 @@ class Diagnostics
|
||||
{
|
||||
public:
|
||||
|
||||
static const unsigned int SQL_STATE_SIZE = SQL_SQLSTATE_SIZE + 1;
|
||||
static const unsigned int SQL_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH + 1;
|
||||
static const unsigned int SQL_NAME_LENGTH = 128;
|
||||
static const std::string DATA_TRUNCATED;
|
||||
inline static const unsigned int SQL_STATE_SIZE = SQL_SQLSTATE_SIZE + 1;
|
||||
inline static const unsigned int SQL_MESSAGE_LENGTH = SQL_MAX_MESSAGE_LENGTH + 1;
|
||||
inline static const unsigned int SQL_NAME_LENGTH = 128;
|
||||
inline static const std::string DATA_TRUNCATED;
|
||||
|
||||
struct DiagnosticFields
|
||||
{
|
||||
|
@ -323,17 +323,17 @@ public:
|
||||
bool extract(std::size_t pos, std::list<Poco::Any>& val);
|
||||
/// Extracts an Any list.
|
||||
|
||||
bool extract(std::size_t pos, Poco::DynamicAny& val);
|
||||
/// Extracts a DynamicAny.
|
||||
bool extract(std::size_t pos, Poco::Dynamic::Var& val);
|
||||
/// Extracts a Dynamic::Var.
|
||||
|
||||
bool extract(std::size_t pos, std::vector<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny vector.
|
||||
bool extract(std::size_t pos, std::vector<Poco::Dynamic::Var>& val);
|
||||
/// Extracts a Dynamic::Var vector.
|
||||
|
||||
bool extract(std::size_t pos, std::deque<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny deque.
|
||||
bool extract(std::size_t pos, std::deque<Poco::Dynamic::Var>& val);
|
||||
/// Extracts a Dynamic::Var deque.
|
||||
|
||||
bool extract(std::size_t pos, std::list<Poco::DynamicAny>& val);
|
||||
/// Extracts a DynamicAny list.
|
||||
bool extract(std::size_t pos, std::list<Poco::Dynamic::Var>& val);
|
||||
/// Extracts a Dynamic::Var list.
|
||||
|
||||
void setDataExtraction(Preparator::DataExtraction ext);
|
||||
/// Set data extraction mode.
|
||||
@ -515,7 +515,7 @@ private:
|
||||
|
||||
template <typename T>
|
||||
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);
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Types.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/UTFString.h"
|
||||
@ -369,17 +369,17 @@ public:
|
||||
void prepare(std::size_t pos, const std::list<Poco::Any>& val);
|
||||
/// Prepares an Any list.
|
||||
|
||||
void prepare(std::size_t pos, const Poco::DynamicAny& val);
|
||||
/// Prepares a DynamicAny.
|
||||
void prepare(std::size_t pos, const Poco::Dynamic::Var& val);
|
||||
/// Prepares a Dynamic::Var.
|
||||
|
||||
void prepare(std::size_t pos, const std::vector<Poco::DynamicAny>& val);
|
||||
/// Prepares a DynamicAny vector.
|
||||
void prepare(std::size_t pos, const std::vector<Poco::Dynamic::Var>& val);
|
||||
/// Prepares a Dynamic::Var vector.
|
||||
|
||||
void prepare(std::size_t pos, const std::deque<Poco::DynamicAny>& val);
|
||||
/// Prepares a DynamicAny deque.
|
||||
void prepare(std::size_t pos, const std::deque<Poco::Dynamic::Var>& val);
|
||||
/// Prepares a Dynamic::Var deque.
|
||||
|
||||
void prepare(std::size_t pos, const std::list<Poco::DynamicAny>& val);
|
||||
/// Prepares a DynamicAny list.
|
||||
void prepare(std::size_t pos, const std::list<Poco::Dynamic::Var>& val);
|
||||
/// Prepares a Dynamic::Var list.
|
||||
|
||||
std::size_t columns() const;
|
||||
/// Returns the number of columns.
|
||||
@ -429,7 +429,7 @@ private:
|
||||
|
||||
template <typename C>
|
||||
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);
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,8 +67,7 @@ public:
|
||||
/// Creates the SessionImpl. Opens a connection to the database.
|
||||
/// Throws NotConnectedException if connection was not succesful.
|
||||
|
||||
//@ deprecated
|
||||
SessionImpl(const std::string& connect,
|
||||
POCO_DEPRECATED("") SessionImpl(const std::string& connect,
|
||||
Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE,
|
||||
bool enforceCapability=false,
|
||||
bool autoBind = true,
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "Poco/Data/ODBC/ODBC.h"
|
||||
#include "Poco/NamedTuple.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||
@ -85,12 +85,12 @@ public:
|
||||
void fillTypeInfo(const SQLHDBC* pHDBC);
|
||||
/// 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'.
|
||||
/// The requested information is specified by parameter 'param'.
|
||||
/// 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.
|
||||
/// 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.
|
||||
|
@ -518,7 +518,7 @@ void Binder::getColSizeAndPrecision(std::size_t pos,
|
||||
// Hence the funky flow control.
|
||||
if (_pTypeInfo)
|
||||
{
|
||||
DynamicAny tmp;
|
||||
Dynamic::Var tmp;
|
||||
bool foundSize(false);
|
||||
bool foundPrec(false);
|
||||
foundSize = _pTypeInfo->tryGetInfo(cDataType, "COLUMN_SIZE", tmp);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
return extractBoundImpl(pos, val);
|
||||
|
@ -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 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 end = _typeInfo.end();
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
@ -38,7 +38,7 @@ using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
||||
@ -265,7 +265,7 @@ void ODBCDB2Test::testStoredProcedureAny()
|
||||
}
|
||||
|
||||
|
||||
void ODBCDB2Test::testStoredProcedureDynamicAny()
|
||||
void ODBCDB2Test::testStoredProcedureDynamicVar()
|
||||
{
|
||||
if (!_pSession) fail ("Test not available.");
|
||||
|
||||
@ -273,8 +273,8 @@ void ODBCDB2Test::testStoredProcedureDynamicAny()
|
||||
{
|
||||
_pSession->setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
Var i = 2;
|
||||
Var j = 0;
|
||||
|
||||
*_pSession << "CREATE PROCEDURE storedProcedure(inParam INTEGER, OUT outParam INTEGER) "
|
||||
"BEGIN "
|
||||
@ -659,7 +659,7 @@ CppUnit::Test* ODBCDB2Test::suite()
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testInternalStorageType);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredProcedureDynamicVar);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testNull);
|
||||
CppUnit_addTest(pSuite, ODBCDB2Test, testRowIterator);
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
|
||||
void testStoredProcedure();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
void testStoredProcedureDynamicVar();
|
||||
void testStoredFunction();
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/RecordSet.h"
|
||||
#include "Poco/Data/AutoTransaction.h"
|
||||
@ -37,7 +37,7 @@ using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
@ -370,21 +370,28 @@ void ODBCOracleTest::testStoredProcedureAny()
|
||||
}
|
||||
|
||||
|
||||
void ODBCOracleTest::testStoredProcedureDynamicAny()
|
||||
void ODBCOracleTest::testStoredProcedureDynamicVar()
|
||||
{
|
||||
for (int k = 0; k < 8;)
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
Var i = 2;
|
||||
Var j = 0;
|
||||
|
||||
*_pSession << "CREATE OR REPLACE "
|
||||
"PROCEDURE storedProcedure(inParam IN NUMBER, outParam OUT NUMBER) IS "
|
||||
" BEGIN outParam := inParam*inParam; "
|
||||
"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);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
@ -394,7 +401,12 @@ void ODBCOracleTest::testStoredProcedureDynamicAny()
|
||||
" END storedProcedure;" , now;
|
||||
|
||||
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);
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
|
||||
@ -988,7 +1000,7 @@ CppUnit::Test* ODBCOracleTest::suite()
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedure);
|
||||
//CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredProcedureDynamicVar);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testStoredFunction);
|
||||
//CppUnit_addTest(pSuite, ODBCOracleTest, testCursorStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCOracleTest, testInternalExtraction);
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
void testStoredFunction();
|
||||
void testCursorStoredFunction();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
void testStoredProcedureDynamicVar();
|
||||
void testAutoTransaction();
|
||||
|
||||
void testNull();
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "ODBCTest.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/ODBC/Diagnostics.h"
|
||||
#include "Poco/Data/ODBC/ODBCException.h"
|
||||
@ -29,7 +29,7 @@ using Poco::Data::ODBC::StatementDiagnostics;
|
||||
using Poco::format;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
@ -326,8 +326,8 @@ void ODBCPostgreSQLTest::testStoredFunctionDynamicAny()
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
session().setFeature("autoExtract", bindValue(k+1));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny result = 0;
|
||||
Var i = 2;
|
||||
Var result = 0;
|
||||
session() << "{? = call storedFunction(?)}", out(result), in(i), now;
|
||||
assertTrue (4 == result);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Data/RecordSet.h"
|
||||
@ -38,7 +38,7 @@ using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::DateTime;
|
||||
|
||||
|
||||
@ -554,7 +554,7 @@ void ODBCSQLServerTest::testStoredProcedureAny()
|
||||
}
|
||||
|
||||
|
||||
void ODBCSQLServerTest::testStoredProcedureDynamicAny()
|
||||
void ODBCSQLServerTest::testStoredProcedureDynamicVar()
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -562,8 +562,8 @@ void ODBCSQLServerTest::testStoredProcedureDynamicAny()
|
||||
{
|
||||
session().setFeature("autoBind", bindValue(k));
|
||||
|
||||
DynamicAny i = 2;
|
||||
DynamicAny j = 0;
|
||||
Var i = 2;
|
||||
Var j = 0;
|
||||
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
session() << "CREATE PROCEDURE storedProcedure(@inParam int, @outParam int OUTPUT) AS "
|
||||
@ -590,8 +590,8 @@ void ODBCSQLServerTest::testStoredProcedureDynamicAny()
|
||||
}
|
||||
dropObject("PROCEDURE", "storedProcedure");
|
||||
}
|
||||
catch (ConnectionException& ce) { std::cout << ce.toString() << std::endl; fail("testStoredProcedureDynamicAny()"); }
|
||||
catch (StatementException& se) { std::cout << se.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("testStoredProcedureDynamicVar()"); }
|
||||
}
|
||||
|
||||
|
||||
@ -1033,7 +1033,7 @@ CppUnit::Test* ODBCSQLServerTest::suite()
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testCursorStoredProcedure);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureDynamicAny);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureDynamicVar);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredProcedureReturn);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testStoredFunction);
|
||||
CppUnit_addTest(pSuite, ODBCSQLServerTest, testInternalExtraction);
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
void testStoredProcedure();
|
||||
void testCursorStoredProcedure();
|
||||
void testStoredProcedureAny();
|
||||
void testStoredProcedureDynamicAny();
|
||||
void testStoredProcedureDynamicVar();
|
||||
|
||||
void testStoredProcedureReturn();
|
||||
void testStoredFunction();
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "Poco/String.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Exception.h"
|
||||
@ -43,7 +43,7 @@ using Poco::format;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::DateTime;
|
||||
using Poco::NotFoundException;
|
||||
|
||||
|
@ -132,7 +132,7 @@ public:
|
||||
|
||||
virtual void testStoredProcedure();
|
||||
virtual void testStoredProcedureAny();
|
||||
virtual void testStoredProcedureDynamicAny();
|
||||
virtual void testStoredProcedureDynamicVar();
|
||||
|
||||
virtual void testStoredFunction();
|
||||
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()");
|
||||
}
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
||||
addTest(pSuite, ODBCMySQLTest::suite());
|
||||
|
||||
addTest(pSuite, ODBCSQLServerTest::suite());
|
||||
addTest(pSuite, ODBCOracleTest::suite());
|
||||
addTest(pSuite, ODBCMySQLTest::suite());
|
||||
addTest(pSuite, ODBCPostgreSQLTest::suite());
|
||||
addTest(pSuite, ODBCSQLiteTest::suite());
|
||||
addTest(pSuite, ODBCSQLServerTest::suite());
|
||||
addTest(pSuite, ODBCDB2Test::suite());
|
||||
// MS Access driver does not support connection status detection
|
||||
// disabled for the time being
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Types.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Types.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
|
||||
|
||||
@ -325,7 +325,7 @@ private:
|
||||
|
||||
template <typename T>
|
||||
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);
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define SQLPARSER_SQLPARSER_H
|
||||
|
||||
#include "SQLParserResult.h"
|
||||
#include "sql/statements.h"
|
||||
|
||||
namespace hsql {
|
||||
|
||||
@ -18,12 +17,12 @@ class SQLParser_API SQLParser {
|
||||
// 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);
|
||||
|
||||
// Deprecated.
|
||||
// Old method to parse SQL strings. Replaced by parse().
|
||||
POCO_DEPRECATED("Use parse()")
|
||||
static bool parseSQLString(const char* sql, SQLParserResult* result);
|
||||
|
||||
// Deprecated.
|
||||
// Old method to parse SQL strings. Replaced by parse().
|
||||
POCO_DEPRECATED("Use parse()")
|
||||
static bool parseSQLString(const std::string& sql, SQLParserResult* result);
|
||||
|
||||
private:
|
||||
@ -32,4 +31,4 @@ class SQLParser_API SQLParser {
|
||||
|
||||
} // namespace hsql
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "Poco/Data/AbstractBinder.h"
|
||||
#include "Poco/Data/LOB.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "sqlite3.h"
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "Poco/Data/Date.h"
|
||||
#include "Poco/Data/Time.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "sqlite3.h"
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
@ -122,8 +122,8 @@ public:
|
||||
bool extract(std::size_t pos, Poco::Any& val);
|
||||
/// Extracts an Any.
|
||||
|
||||
bool extract(std::size_t pos, Poco::DynamicAny& val);
|
||||
/// Extracts a DynamicAny.
|
||||
bool extract(std::size_t pos, Poco::Dynamic::Var& val);
|
||||
/// Extracts a Dynamic::Var.
|
||||
|
||||
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.
|
||||
@ -147,7 +147,7 @@ public:
|
||||
private:
|
||||
template <typename T>
|
||||
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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/UUIDGenerator.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/Logger.h"
|
||||
#include "Poco/Message.h"
|
||||
@ -68,7 +68,7 @@ using Poco::Nullable;
|
||||
using Poco::Tuple;
|
||||
using Poco::Any;
|
||||
using Poco::AnyCast;
|
||||
using Poco::DynamicAny;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::DateTime;
|
||||
using Poco::Logger;
|
||||
using Poco::Message;
|
||||
@ -86,7 +86,6 @@ using Poco::Data::SQLite::ConstraintViolationException;
|
||||
using Poco::Data::SQLite::ParameterCountMismatchException;
|
||||
using Poco::Int32;
|
||||
using Poco::Int64;
|
||||
using Poco::Dynamic::Var;
|
||||
using Poco::Data::SQLite::Utility;
|
||||
using Poco::delegate;
|
||||
using Poco::Stopwatch;
|
||||
@ -2394,10 +2393,10 @@ void SQLiteTest::testDynamicAny()
|
||||
tmp << "DROP TABLE IF EXISTS Anys", now;
|
||||
tmp << "CREATE TABLE Anys (int0 INTEGER, flt0 REAL, str0 VARCHAR, empty INTEGER)", now;
|
||||
|
||||
DynamicAny i = Int32(42);
|
||||
DynamicAny f = double(42.5);
|
||||
DynamicAny s = std::string("42");
|
||||
DynamicAny e;
|
||||
Var i = Int32(42);
|
||||
Var f = double(42.5);
|
||||
Var s = std::string("42");
|
||||
Var e;
|
||||
assertTrue (e.isEmpty());
|
||||
|
||||
tmp << "INSERT INTO Anys VALUES (?, ?, ?, null)", use(i), use(f), use(s), now;
|
||||
|
@ -140,9 +140,8 @@ public:
|
||||
/// execution.
|
||||
/// The number of rows reported is independent of filtering.
|
||||
|
||||
POCO_DEPRECATED("Replaced with subTotalRowCount() and getTotalRowCount()")
|
||||
std::size_t totalRowCount() const;
|
||||
//@ deprecated
|
||||
/// Replaced with subTotalRowCount() and getTotalRowCount().
|
||||
|
||||
std::size_t getTotalRowCount() const;
|
||||
/// Returns the total number of rows in the RecordSet.
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
#include "Poco/Data/Data.h"
|
||||
#include "Poco/Data/Connector.h"
|
||||
#include "Poco/Data/Session.h"
|
||||
#include "Poco/Data/Statement.h"
|
||||
#include "Poco/Logger.h"
|
||||
@ -218,7 +217,7 @@ public:
|
||||
static const std::string PROP_TABLE;
|
||||
static const std::string PROP_ARCHIVE_TABLE;
|
||||
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_MIN_BATCH;
|
||||
static const std::string PROP_MAX_BATCH;
|
||||
|
@ -13,11 +13,8 @@
|
||||
|
||||
|
||||
#include "Poco/Data/SQLChannel.h"
|
||||
#include "Poco/Data/SessionFactory.h"
|
||||
#include "Poco/Data/BulkBinding.h"
|
||||
#include "Poco/DateTime.h"
|
||||
#include "Poco/DateTimeFormatter.h"
|
||||
#include "Poco/DateTimeFormat.h"
|
||||
#include "Poco/LoggingFactory.h"
|
||||
#include "Poco/Instantiator.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
@ -27,7 +24,7 @@
|
||||
#include "Poco/File.h"
|
||||
#include "Poco/UUID.h"
|
||||
#include "Poco/UUIDGenerator.h"
|
||||
#include <fstream>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
@ -259,6 +256,7 @@ void SQLChannel::run()
|
||||
{
|
||||
try
|
||||
{
|
||||
sleepTime = 100;
|
||||
if (_reconnect)
|
||||
{
|
||||
close();
|
||||
@ -267,7 +265,6 @@ void SQLChannel::run()
|
||||
if (_reconnect && sleepTime < 12800)
|
||||
sleepTime *= 2;
|
||||
}
|
||||
|
||||
if (!_reconnect)
|
||||
{
|
||||
if (_logQueue.size()) processBatch(_minBatch);
|
||||
|
@ -21,8 +21,7 @@
|
||||
#include "Poco/KeyValueArgs.h"
|
||||
#include "Poco/ValidArgs.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/FIFOEvent.h"
|
||||
#include "Poco/BasicEvent.h"
|
||||
#include "Poco/EventArgs.h"
|
||||
#include "Poco/Delegate.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
@ -39,16 +38,16 @@ class AbstractCache
|
||||
/// An AbstractCache is the interface of all caches.
|
||||
{
|
||||
public:
|
||||
FIFOEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Add;
|
||||
FIFOEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Update;
|
||||
FIFOEvent<const TKey, TEventMutex> Remove;
|
||||
FIFOEvent<const TKey, TEventMutex> Get;
|
||||
FIFOEvent<const EventArgs, TEventMutex> Clear;
|
||||
BasicEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Add;
|
||||
BasicEvent<const KeyValueArgs<TKey, TValue>, TEventMutex> Update;
|
||||
BasicEvent<const TKey, TEventMutex> Remove;
|
||||
BasicEvent<const TKey, TEventMutex> Get;
|
||||
BasicEvent<const EventArgs, TEventMutex> Clear;
|
||||
|
||||
typedef std::map<TKey, SharedPtr<TValue>> DataHolder;
|
||||
typedef typename DataHolder::iterator Iterator;
|
||||
typedef typename DataHolder::const_iterator ConstIterator;
|
||||
typedef std::set<TKey> KeySet;
|
||||
using DataHolder = std::map<TKey, SharedPtr<TValue>>;
|
||||
using Iterator = typename DataHolder::iterator;
|
||||
using ConstIterator = typename DataHolder::const_iterator;
|
||||
using KeySet = std::set<TKey>;
|
||||
|
||||
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)
|
||||
/// Adds the key value pair to the cache.
|
||||
/// If for the key already an entry exists, it will be overwritten.
|
||||
@ -194,8 +196,8 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
mutable FIFOEvent<ValidArgs<TKey>> IsValid;
|
||||
mutable FIFOEvent<KeySet> Replace;
|
||||
mutable BasicEvent<ValidArgs<TKey>> IsValid;
|
||||
mutable BasicEvent<KeySet> Replace;
|
||||
|
||||
void initialize()
|
||||
/// Sets up event registration.
|
||||
@ -371,9 +373,6 @@ protected:
|
||||
mutable DataHolder _data;
|
||||
mutable TMutex _mutex;
|
||||
|
||||
private:
|
||||
AbstractCache(const AbstractCache& aCache);
|
||||
AbstractCache& operator = (const AbstractCache& aCache);
|
||||
};
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
|
||||
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(const Notification::Ptr& pNf) const = 0;
|
||||
|
@ -67,13 +67,13 @@ extern "C" \
|
||||
#define POCO_BEGIN_MANIFEST_IMPL(fnName, base) \
|
||||
bool fnName(Poco::ManifestBase* pManifest_) \
|
||||
{ \
|
||||
typedef base _Base; \
|
||||
typedef Poco::Manifest<_Base> _Manifest; \
|
||||
std::string requiredType(typeid(_Manifest).name()); \
|
||||
std::string actualType(pManifest_->className()); \
|
||||
using BaseType = base; \
|
||||
using ManifestType = Poco::Manifest<BaseType>; \
|
||||
const std::string requiredType(typeid(ManifestType).name()); \
|
||||
const std::string actualType(pManifest_->className()); \
|
||||
if (requiredType == actualType) \
|
||||
{ \
|
||||
Poco::Manifest<_Base>* pManifest = static_cast<_Manifest*>(pManifest_);
|
||||
Poco::Manifest<BaseType>* pManifest = static_cast<ManifestType*>(pManifest_);
|
||||
|
||||
|
||||
#define POCO_BEGIN_MANIFEST(base) \
|
||||
@ -93,15 +93,15 @@ extern "C" \
|
||||
|
||||
|
||||
#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) \
|
||||
pManifest->insert(new Poco::MetaObject<cls, _Base>(itf));
|
||||
pManifest->insert(new Poco::MetaObject<cls, BaseType>(itf));
|
||||
|
||||
|
||||
#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
|
||||
|
@ -254,7 +254,7 @@ public:
|
||||
if (itm != pManif->end())
|
||||
return *itm;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Meta& classFor(const std::string& className) const
|
||||
|
@ -175,10 +175,6 @@
|
||||
// to "d.so", "d.dll", etc. for _DEBUG builds in Poco::SharedLibrary.
|
||||
// #define POCO_NO_SHARED_LIBRARY_DEBUG_SUFFIX
|
||||
|
||||
|
||||
// Disarm POCO_DEPRECATED macro.
|
||||
// #define POCO_NO_DEPRECATED
|
||||
|
||||
// Enable usage of Poco::Mutex and Poco::FastMutex
|
||||
// as wrappers for std::recursive_mutex and std::mutex
|
||||
#ifndef POCO_ENABLE_STD_MUTEX
|
||||
@ -187,6 +183,13 @@
|
||||
|
||||
#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
|
||||
// #define POCO_DATA_NO_SQL_PARSER
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
|
||||
virtual DirectoryIterator& operator ++ (); // prefix
|
||||
|
||||
//@ deprecated
|
||||
POCO_DEPRECATED("")
|
||||
DirectoryIterator operator ++ (int); // postfix
|
||||
/// Please use the prefix increment operator instead.
|
||||
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
|
||||
if (pHolder && pHolder->type() == typeid(T))
|
||||
{
|
||||
VarHolderImpl<T>* pHolderImpl = static_cast<VarHolderImpl<T>*>(pHolder);
|
||||
auto* pHolderImpl = static_cast<VarHolderImpl<T>*>(pHolder);
|
||||
return pHolderImpl->value();
|
||||
}
|
||||
else if (!pHolder)
|
||||
@ -480,7 +480,7 @@ public:
|
||||
/// If demangling is available and emangle is true,
|
||||
/// the returnsed string will be demangled.
|
||||
|
||||
//@ deprecated
|
||||
POCO_DEPRECATED("Use clear() instead")
|
||||
void empty();
|
||||
/// Empties Var.
|
||||
/// This function is deprecated and will be removed.
|
||||
@ -733,7 +733,7 @@ inline bool Var::operator ! () 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
|
||||
|
||||
|
||||
//@ deprecated
|
||||
typedef Dynamic::Var DynamicAny;
|
||||
using DynamicAny POCO_DEPRECATED("") = Dynamic::Var;
|
||||
|
||||
|
||||
} // namespace Poco
|
||||
|
@ -131,12 +131,12 @@ class Foundation_API VarHolder
|
||||
/// throw BadCastException.
|
||||
{
|
||||
public:
|
||||
typedef Var ArrayValueType;
|
||||
using ArrayValueType = Var;
|
||||
|
||||
virtual ~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
|
||||
/// deep-copy the VarHolder.
|
||||
/// If small object optimization is enabled (i.e. if
|
||||
@ -323,17 +323,17 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<(std::is_integral<F>::value && std::is_signed<F>::value) ||
|
||||
std::is_floating_point<F>::value, F>::type* = nullptr,
|
||||
typename std::enable_if<(std::is_integral<T>::value && std::is_signed<T>::value) ||
|
||||
std::is_floating_point<F>::value, T>::type* = nullptr>
|
||||
std::enable_if_t<(std::is_integral_v<F> && std::is_signed_v<F>) ||
|
||||
std::is_floating_point_v<F>, F>* = nullptr,
|
||||
std::enable_if_t<(std::is_integral_v<T> && std::is_signed_v<T>) ||
|
||||
std::is_floating_point_v<F>, T>* = nullptr>
|
||||
static void convertToSmaller(const F& from, T& to)
|
||||
/// Converts signed integral, as well as floating-point, values from
|
||||
/// 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),
|
||||
/// 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))
|
||||
POCO_VAR_RANGE_EXCEPTION ("Lost precision", from);
|
||||
@ -344,8 +344,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<std::is_integral<F>::value && std::is_signed<T>::value, F>::type* = nullptr,
|
||||
typename std::enable_if<std::is_floating_point<T>::value, T>::type* = nullptr>
|
||||
std::enable_if_t<std::is_integral_v<F> && std::is_signed_v<T>, F>* = nullptr,
|
||||
std::enable_if_t<std::is_floating_point_v<T>, T>* = nullptr>
|
||||
static void convertToSmaller(const F& from, T& to)
|
||||
/// 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),
|
||||
@ -357,8 +357,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<std::is_same<F, bool>::value>::type* = nullptr,
|
||||
typename std::enable_if<std::is_floating_point<T>::value, T>::type* = nullptr>
|
||||
std::enable_if_t<std::is_same_v<F, bool>>* = nullptr,
|
||||
std::enable_if_t<std::is_floating_point_v<T>, T>* = nullptr>
|
||||
static void convertToSmaller(const F& from, T& to)
|
||||
/// Converts boolean values to floating-point type.
|
||||
{
|
||||
@ -366,8 +366,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<std::is_integral<F>::value && !std::is_signed<F>::value, F>::type* = 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<F> && !std::is_signed_v<F>, F>* = 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)
|
||||
/// 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
|
||||
@ -380,8 +380,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<std::is_integral<F>::value && std::is_signed<F>::value, F>::type* = 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<F> && std::is_signed_v<F>, F>* = 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)
|
||||
/// Converts signed integral data types to unsigned data types.
|
||||
/// Negative values can not be converted and if one is encountered, RangeException is thrown.
|
||||
@ -393,8 +393,8 @@ protected:
|
||||
to = static_cast<T>(from);
|
||||
}
|
||||
|
||||
template <typename F, typename T, std::enable_if_t<std::is_floating_point<F>::value, bool> = true,
|
||||
typename std::enable_if<std::is_integral<T>::value && !std::is_signed<T>::value, T>::type* = nullptr>
|
||||
template <typename F, typename T, std::enable_if_t<std::is_floating_point_v<F>, bool> = true,
|
||||
std::enable_if_t<std::is_integral_v<T> && !std::is_signed_v<T>, T>* = nullptr>
|
||||
static void convertSignedFloatToUnsigned(const F& from, T& to)
|
||||
/// Converts floating point data types to unsigned integral data types. Negative values
|
||||
/// can not be converted and if one is encountered, RangeException is thrown.
|
||||
@ -407,8 +407,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
typename std::enable_if<std::is_integral<F>::value && !std::is_signed<F>::value, F>::type* = 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<F> && !std::is_signed_v<F>, F>* = 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)
|
||||
/// Converts unsigned integral data types to signed integral data types.
|
||||
/// If upper limit is within the target data type limits, the conversion is performed.
|
||||
@ -418,8 +418,8 @@ protected:
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
std::enable_if_t<std::is_integral<F>::value, bool> = true,
|
||||
std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
|
||||
std::enable_if_t<std::is_integral_v<F>, bool> = true,
|
||||
std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
|
||||
static void convertToFP(F& from, T& to)
|
||||
/// Converts unsigned integral data types to floating-point data types.
|
||||
/// If the number of significant digits used for the integer vaue exceeds the number
|
||||
@ -433,7 +433,7 @@ protected:
|
||||
|
||||
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)
|
||||
{
|
||||
using U = std::make_unsigned_t<T>;
|
||||
@ -444,58 +444,58 @@ private:
|
||||
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)
|
||||
{
|
||||
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()
|
||||
{
|
||||
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()
|
||||
{
|
||||
return numValDigits(std::numeric_limits<T>::max());
|
||||
}
|
||||
|
||||
template <typename F, typename T,
|
||||
std::enable_if_t<std::is_integral<F>::value, bool> = true,
|
||||
std::enable_if_t<std::is_floating_point<T>::value, bool> = true>
|
||||
std::enable_if_t<std::is_integral_v<F>, bool> = true,
|
||||
std::enable_if_t<std::is_floating_point_v<T>, bool> = true>
|
||||
static bool isPrecisionLost(const F& from)
|
||||
// Checks for loss of precision in integral -> floating point conversion.
|
||||
{
|
||||
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)
|
||||
{
|
||||
if (from > static_cast<F>(std::numeric_limits<T>::max()))
|
||||
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)
|
||||
{
|
||||
if (from < static_cast<F>(std::numeric_limits<T>::min()))
|
||||
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)
|
||||
{
|
||||
if ((from > static_cast<F>(std::numeric_limits<T>::max())))
|
||||
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)
|
||||
{
|
||||
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)
|
||||
POCO_VAR_RANGE_EXCEPTION ("Value too small", from);
|
||||
@ -4376,10 +4376,10 @@ private:
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<Var> Vector;
|
||||
typedef std::deque<Var> Deque;
|
||||
typedef std::list<Var> List;
|
||||
typedef Vector Array;
|
||||
using Vector = std::vector<Var>;
|
||||
using Deque = std::deque<Var>;
|
||||
using List = std::list<Var>;
|
||||
using Array = Vector;
|
||||
|
||||
|
||||
} } // namespace Poco::Dynamic
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
/// the event is automatically reset after
|
||||
/// a wait() successfully returns.
|
||||
|
||||
//@ deprecated
|
||||
POCO_DEPRECATED("")
|
||||
explicit Event(bool autoReset);
|
||||
/// Please use Event::Event(EventType) instead.
|
||||
|
||||
|
@ -26,9 +26,8 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//@ deprecated
|
||||
template <class TArgs, class TMutex = FastMutex>
|
||||
class FIFOEvent: public AbstractEvent <
|
||||
class POCO_DEPRECATED("use BasicEvent") FIFOEvent: public AbstractEvent <
|
||||
TArgs,
|
||||
FIFOStrategy<TArgs, AbstractDelegate<TArgs>>,
|
||||
AbstractDelegate<TArgs>,
|
||||
|
@ -24,9 +24,8 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//@ deprecated
|
||||
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
|
||||
/// implements FIFO behavior, so this class is provided
|
||||
/// for backwards compatibility only.
|
||||
|
@ -141,25 +141,6 @@ using namespace std::literals;
|
||||
#define POCO_DO_JOIN(X, Y) POCO_DO_JOIN2(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
|
||||
// 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/Types.h"
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
#endif // Foundation_Foundation_INCLUDED
|
||||
|
@ -25,9 +25,8 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//@ deprecated
|
||||
template <class T>
|
||||
struct HashFunction
|
||||
struct POCO_DEPRECATED("use Hash") HashFunction
|
||||
/// A generic hash function.
|
||||
{
|
||||
UInt32 operator () (T key, UInt32 maxValue) const
|
||||
@ -38,9 +37,8 @@ struct HashFunction
|
||||
};
|
||||
|
||||
|
||||
//@ deprecated
|
||||
template <>
|
||||
struct HashFunction<std::string>
|
||||
struct POCO_DEPRECATED("use Hash") HashFunction<std::string>
|
||||
/// A generic hash function.
|
||||
{
|
||||
UInt32 operator () (const std::string& key, UInt32 maxValue) const
|
||||
|
@ -85,26 +85,23 @@ class HashMap
|
||||
/// A HashMap can be used just like a std::map.
|
||||
{
|
||||
public:
|
||||
typedef Key KeyType;
|
||||
typedef Mapped MappedType;
|
||||
typedef Mapped& Reference;
|
||||
typedef const Mapped& ConstReference;
|
||||
typedef Mapped* Pointer;
|
||||
typedef const Mapped* ConstPointer;
|
||||
using KeyType = Key;
|
||||
using MappedType = Mapped;
|
||||
using Reference = Mapped &;
|
||||
using ConstReference = const Mapped &;
|
||||
using Pointer = Mapped *;
|
||||
using ConstPointer = const Mapped *;
|
||||
|
||||
typedef HashMapEntry<Key, Mapped> ValueType;
|
||||
typedef std::pair<KeyType, MappedType> PairType;
|
||||
using ValueType = HashMapEntry<Key, Mapped>;
|
||||
using PairType = std::pair<KeyType, MappedType>;
|
||||
|
||||
typedef HashMapEntryHash<ValueType, HashFunc> HashType;
|
||||
typedef LinearHashTable<ValueType, HashType> HashTable;
|
||||
using HashType = HashMapEntryHash<ValueType, HashFunc>;
|
||||
using HashTable = LinearHashTable<ValueType, HashType>;
|
||||
|
||||
typedef typename HashTable::Iterator Iterator;
|
||||
typedef typename HashTable::ConstIterator ConstIterator;
|
||||
using Iterator = typename HashTable::Iterator;
|
||||
using ConstIterator = typename HashTable::ConstIterator;
|
||||
|
||||
HashMap()
|
||||
/// Creates an empty HashMap.
|
||||
{
|
||||
}
|
||||
HashMap() = default;
|
||||
|
||||
HashMap(std::size_t initialReserve):
|
||||
_table(initialReserve)
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
namespace Poco {
|
||||
|
||||
class POCO_DEPRECATED("") HashStatistic;
|
||||
|
||||
//@ deprecated
|
||||
class Foundation_API HashStatistic
|
||||
/// HashStatistic class bundles statistical information on the current state of a HashTable
|
||||
{
|
||||
|
@ -31,9 +31,8 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//@ deprecated
|
||||
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.
|
||||
///
|
||||
/// Collision handling is done via overflow maps(!). With small hash tables performance of this
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Hash.h"
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
@ -55,16 +54,16 @@ class LinearHashTable
|
||||
/// elements in a bucket should not exceed 3.
|
||||
{
|
||||
public:
|
||||
typedef Value ValueType;
|
||||
typedef Value& Reference;
|
||||
typedef const Value& ConstReference;
|
||||
typedef Value* Pointer;
|
||||
typedef const Value* ConstPointer;
|
||||
typedef HashFunc Hash;
|
||||
typedef std::vector<Value> Bucket;
|
||||
typedef std::vector<Bucket> BucketVec;
|
||||
typedef typename Bucket::iterator BucketIterator;
|
||||
typedef typename BucketVec::iterator BucketVecIterator;
|
||||
using ValueType = Value;
|
||||
using Reference = Value &;
|
||||
using ConstReference = const Value &;
|
||||
using Pointer = Value *;
|
||||
using ConstPointer = const Value *;
|
||||
using Hash = HashFunc;
|
||||
using Bucket = std::vector<Value>;
|
||||
using BucketVec = std::vector<Bucket>;
|
||||
using BucketIterator = typename Bucket::iterator;
|
||||
using BucketVecIterator = typename BucketVec::iterator;
|
||||
|
||||
class ConstIterator
|
||||
{
|
||||
@ -176,9 +175,7 @@ public:
|
||||
class Iterator: public ConstIterator
|
||||
{
|
||||
public:
|
||||
Iterator()
|
||||
{
|
||||
}
|
||||
Iterator() = default;
|
||||
|
||||
Iterator(const BucketVecIterator& vecIt, const BucketVecIterator& endIt, const BucketIterator& buckIt):
|
||||
ConstIterator(vecIt, endIt, buckIt)
|
||||
@ -238,10 +235,7 @@ public:
|
||||
friend class LinearHashTable;
|
||||
};
|
||||
|
||||
LinearHashTable(std::size_t initialReserve = 64):
|
||||
_split(0),
|
||||
_front(1),
|
||||
_size(0)
|
||||
LinearHashTable(std::size_t initialReserve = 64)
|
||||
/// Creates the LinearHashTable, using the given initialReserve.
|
||||
{
|
||||
_buckets.reserve(calcSize(initialReserve));
|
||||
@ -257,10 +251,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~LinearHashTable()
|
||||
~LinearHashTable() = default;
|
||||
/// Destroys the LinearHashTable.
|
||||
{
|
||||
}
|
||||
|
||||
LinearHashTable& operator = (const LinearHashTable& table)
|
||||
/// Assigns another LinearHashTable.
|
||||
@ -495,9 +487,9 @@ private:
|
||||
// Evil hack: _buckets must be mutable because both ConstIterator and Iterator hold
|
||||
// ordinary iterator's (not const_iterator's).
|
||||
mutable BucketVec _buckets;
|
||||
std::size_t _split;
|
||||
std::size_t _front;
|
||||
std::size_t _size;
|
||||
std::size_t _split{0};
|
||||
std::size_t _front{1};
|
||||
std::size_t _size{0};
|
||||
HashFunc _hash;
|
||||
};
|
||||
|
||||
|
@ -67,7 +67,6 @@ public:
|
||||
/// * millisecond 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);
|
||||
/// Creates a LocalDateTime for the given Gregorian date and time in the
|
||||
/// 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,
|
||||
/// using the time zone differential of the current time zone.
|
||||
|
||||
//@ deprecated
|
||||
LocalDateTime(int tzd, const DateTime& dateTime);
|
||||
/// Creates a LocalDateTime from the UTC time given in dateTime,
|
||||
/// using the given time zone differential. Adjusts dateTime
|
||||
/// for the given time zone differential.
|
||||
|
||||
//@ deprecated
|
||||
LocalDateTime(int tzd, const DateTime& dateTime, bool adjust);
|
||||
/// Creates a LocalDateTime from the UTC time given in dateTime,
|
||||
/// using the given time zone differential. If adjust is true,
|
||||
@ -100,7 +97,6 @@ public:
|
||||
LocalDateTime(double julianDay);
|
||||
/// Creates a LocalDateTime for the given Julian day in the local time zone.
|
||||
|
||||
//@ deprecated
|
||||
LocalDateTime(int tzd, double julianDay);
|
||||
/// Creates a LocalDateTime for the given Julian day in the time zone
|
||||
/// denoted by the time zone differential in tzd.
|
||||
@ -131,7 +127,6 @@ public:
|
||||
/// * millisecond 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);
|
||||
/// Assigns a Gregorian local date and time in the time zone denoted by
|
||||
/// the time zone differential in tzd.
|
||||
@ -145,7 +140,6 @@ public:
|
||||
/// * millisecond is from 0 to 999.
|
||||
/// * microsecond is from 0 to 999.
|
||||
|
||||
//@ deprecated
|
||||
LocalDateTime& assign(int tzd, double julianDay);
|
||||
/// Assigns a Julian day in the time zone denoted by the
|
||||
/// time zone differential in tzd.
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
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
|
||||
{
|
||||
return (!pName || pNf->name() == pName) && dynamic_cast<N*>(pNf) != nullptr;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Tuple.h"
|
||||
#include "Poco/TypeList.h"
|
||||
#include "Poco/DynamicAny.h"
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
#include "Poco/SharedPtr.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",
|
||||
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),
|
||||
_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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 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);
|
||||
}
|
||||
|
||||
const DynamicAny operator [] (const std::string& name) const
|
||||
const Dynamic::Var operator [] (const std::string& name) const
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
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 itEnd = _pNames->end();
|
||||
@ -10800,7 +10800,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -10968,7 +10968,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -10994,7 +10994,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11155,7 +11155,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11180,7 +11180,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11336,7 +11336,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11360,7 +11360,7 @@ struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11508,7 +11508,7 @@ struct NamedTuple<T0,T1,T2,T3,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11531,7 +11531,7 @@ struct NamedTuple<T0,T1,T2,T3,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11673,7 +11673,7 @@ struct NamedTuple<T0,T1,T2,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11695,7 +11695,7 @@ struct NamedTuple<T0,T1,T2,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11830,7 +11830,7 @@ struct NamedTuple<T0,T1,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11851,7 +11851,7 @@ struct NamedTuple<T0,T1,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
@ -11978,7 +11978,7 @@ struct NamedTuple<T0,NullTypeList>:
|
||||
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 itEnd = _pNames->end();
|
||||
@ -11998,7 +11998,7 @@ struct NamedTuple<T0,NullTypeList>:
|
||||
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);
|
||||
}
|
||||
|
@ -517,14 +517,14 @@ public:
|
||||
// Deprecated functions
|
||||
//
|
||||
|
||||
[[deprecated("use formatHex with options instead")]]
|
||||
POCO_DEPRECATED("use formatHex with options instead")
|
||||
static std::string formatHex(int value, bool prefix);
|
||||
/// Formats an int value in hexadecimal notation.
|
||||
/// If prefix is true, "0x" prefix is prepended to the
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats an int value in hexadecimal notation,
|
||||
/// right justified and zero-padded in
|
||||
@ -533,13 +533,13 @@ public:
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats an unsigned int value in hexadecimal notation.
|
||||
/// 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 value, int width, bool prefix);
|
||||
/// Formats an unsigned value in hexadecimal notation,
|
||||
/// right justified and zero-padded in
|
||||
@ -547,14 +547,14 @@ public:
|
||||
/// 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(long value, bool prefix);
|
||||
/// Formats a long value in hexadecimal notation.
|
||||
/// If prefix is true, "0x" prefix is prepended to the
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats a long value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least the
|
||||
@ -563,13 +563,13 @@ public:
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats an unsigned long value in hexadecimal notation.
|
||||
/// 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 value, int width, bool prefix);
|
||||
/// Formats an unsigned long value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least the
|
||||
@ -580,14 +580,14 @@ public:
|
||||
#ifdef POCO_HAVE_INT64
|
||||
#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);
|
||||
/// Formats a 64-bit integer value in hexadecimal notation.
|
||||
/// If prefix is true, "0x" prefix is prepended to the
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats a 64-bit integer value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least
|
||||
@ -595,13 +595,13 @@ public:
|
||||
/// The value is treated as unsigned.
|
||||
/// 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);
|
||||
/// Formats an unsigned 64-bit integer value in hexadecimal notation.
|
||||
/// 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, int width, bool prefix);
|
||||
/// Formats an unsigned 64-bit integer value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least
|
||||
@ -610,14 +610,14 @@ public:
|
||||
|
||||
#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);
|
||||
/// Formats a 64-bit integer value in hexadecimal notation.
|
||||
/// If prefix is true, "0x" prefix is prepended to the
|
||||
/// resulting string.
|
||||
/// 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);
|
||||
/// Formats a 64-bit integer value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least
|
||||
@ -625,13 +625,13 @@ public:
|
||||
/// The value is treated as unsigned.
|
||||
/// 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);
|
||||
/// Formats an unsigned 64-bit integer value in hexadecimal notation.
|
||||
/// 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, int width, bool prefix);
|
||||
/// Formats an unsigned 64-bit integer value in hexadecimal notation,
|
||||
/// right justified and zero-padded in a field having at least
|
||||
|
@ -536,7 +536,7 @@ bool intToStr(T value,
|
||||
|
||||
|
||||
template <typename T>
|
||||
[[deprecated("use intToStr instead")]]
|
||||
POCO_DEPRECATED("use intToStr instead")
|
||||
bool uIntToStr(T value,
|
||||
unsigned short base,
|
||||
char* result,
|
||||
@ -581,7 +581,7 @@ bool intToStr (T number,
|
||||
|
||||
|
||||
template <typename T>
|
||||
[[deprecated("use intToStr instead")]]
|
||||
POCO_DEPRECATED("use intToStr instead")
|
||||
bool uIntToStr (T number,
|
||||
unsigned short base,
|
||||
std::string& result,
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
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
|
||||
{
|
||||
return (!pName || pNf->name() == pName) && (dynamic_cast<N*>(pNf) != nullptr);
|
||||
|
@ -31,9 +31,8 @@
|
||||
namespace Poco {
|
||||
|
||||
|
||||
//@ deprecated
|
||||
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.
|
||||
///
|
||||
/// In comparison to a HashTable, this class handles collisions by sequentially searching the next
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/Runnable.h"
|
||||
#include "Poco/SignalHandler.h"
|
||||
#include "Poco/Event.h"
|
||||
@ -31,7 +32,6 @@
|
||||
#if !defined(POCO_NO_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#if defined(POCO_VXWORKS)
|
||||
#include <cstring>
|
||||
#endif
|
||||
@ -41,8 +41,8 @@ namespace Poco {
|
||||
class Foundation_API ThreadImpl
|
||||
{
|
||||
public:
|
||||
typedef pthread_t TIDImpl;
|
||||
typedef void (*Callable)(void*);
|
||||
using TIDImpl = pthread_t;
|
||||
using Callable = void (*)(void *);
|
||||
|
||||
enum Priority
|
||||
{
|
||||
@ -99,7 +99,7 @@ private:
|
||||
public:
|
||||
CurrentThreadHolder()
|
||||
{
|
||||
if (pthread_key_create(&_key, NULL))
|
||||
if (pthread_key_create(&_key, nullptr))
|
||||
throw SystemException("cannot allocate thread context key");
|
||||
}
|
||||
~CurrentThreadHolder()
|
||||
@ -126,7 +126,7 @@ private:
|
||||
prio(PRIO_NORMAL_IMPL),
|
||||
osPrio(),
|
||||
policy(SCHED_OTHER),
|
||||
done(false),
|
||||
done(Event::EVENT_MANUALRESET),
|
||||
stackSize(POCO_THREAD_STACK_SIZE),
|
||||
started(false),
|
||||
joined(false)
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "Poco/ErrorHandler.h"
|
||||
#include "Poco/NotificationQueue.h"
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
#include <utility>
|
||||
|
||||
namespace Poco {
|
||||
@ -103,7 +102,7 @@ private:
|
||||
ActiveThread::ActiveThread(const std::string& name, int stackSize):
|
||||
_name(name),
|
||||
_thread(name),
|
||||
_targetCompleted(false)
|
||||
_targetCompleted(Event::EVENT_MANUALRESET)
|
||||
{
|
||||
poco_assert_dbg (stackSize >= 0);
|
||||
_thread.setStackSize(stackSize);
|
||||
|
@ -27,7 +27,7 @@
|
||||
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
|
||||
|
@ -66,11 +66,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
~CallableHolder()
|
||||
{
|
||||
}
|
||||
~CallableHolder() override = default;
|
||||
|
||||
void run()
|
||||
void run() override
|
||||
{
|
||||
_callable(_pData);
|
||||
}
|
||||
@ -86,8 +84,8 @@ private:
|
||||
|
||||
Thread::Thread(uint32_t sigMask):
|
||||
_id(uniqueId()),
|
||||
_pTLS(0),
|
||||
_event(true)
|
||||
_pTLS(nullptr),
|
||||
_event(Event::EVENT_AUTORESET)
|
||||
{
|
||||
setNameImpl(makeName());
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
@ -98,8 +96,8 @@ Thread::Thread(uint32_t sigMask):
|
||||
|
||||
Thread::Thread(const std::string& name, uint32_t sigMask):
|
||||
_id(uniqueId()),
|
||||
_pTLS(0),
|
||||
_event(true)
|
||||
_pTLS(nullptr),
|
||||
_event(Event::EVENT_AUTORESET)
|
||||
{
|
||||
setNameImpl(name);
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
@ -190,7 +188,7 @@ void Thread::clearTLS()
|
||||
if (_pTLS)
|
||||
{
|
||||
delete _pTLS;
|
||||
_pTLS = 0;
|
||||
_pTLS = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
void join();
|
||||
void activate();
|
||||
void release();
|
||||
void run();
|
||||
void run() override;
|
||||
|
||||
private:
|
||||
volatile bool _idle;
|
||||
@ -57,14 +57,14 @@ private:
|
||||
PooledThread::PooledThread(const std::string& name, int stackSize):
|
||||
_idle(true),
|
||||
_idleTime(0),
|
||||
_pTarget(0),
|
||||
_pTarget(nullptr),
|
||||
_name(name),
|
||||
_thread(name),
|
||||
_targetCompleted(false)
|
||||
_targetCompleted(Event::EVENT_MANUALRESET)
|
||||
{
|
||||
poco_assert_dbg (stackSize >= 0);
|
||||
_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);
|
||||
|
||||
poco_assert (_pTarget == 0);
|
||||
poco_assert (_pTarget == nullptr);
|
||||
|
||||
_pTarget = ⌖
|
||||
_thread.setPriority(priority);
|
||||
@ -110,7 +110,7 @@ void PooledThread::start(Thread::Priority priority, Runnable& target, const std:
|
||||
_thread.setName(fullName);
|
||||
_thread.setPriority(priority);
|
||||
|
||||
poco_assert (_pTarget == 0);
|
||||
poco_assert (_pTarget == nullptr);
|
||||
|
||||
_pTarget = ⌖
|
||||
_targetReady.set();
|
||||
@ -128,7 +128,7 @@ int PooledThread::idleTime()
|
||||
{
|
||||
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;
|
||||
|
||||
_mutex.lock();
|
||||
_pTarget = 0;
|
||||
_pTarget = nullptr;
|
||||
_mutex.unlock();
|
||||
// In case of a statically allocated thread pool (such
|
||||
// as the default thread pool), Windows may have already
|
||||
@ -200,8 +200,8 @@ void PooledThread::run()
|
||||
ErrorHandler::handle();
|
||||
}
|
||||
FastMutex::ScopedLock lock(_mutex);
|
||||
_pTarget = 0;
|
||||
_idleTime = time(NULL);
|
||||
_pTarget = nullptr;
|
||||
_idleTime = time(nullptr);
|
||||
_idle = true;
|
||||
_targetCompleted.set();
|
||||
ThreadLocalStorage::clear();
|
||||
@ -430,8 +430,8 @@ PooledThread* ThreadPool::getThread()
|
||||
if (++_age == 32)
|
||||
housekeep();
|
||||
|
||||
PooledThread* pThread = 0;
|
||||
for (ThreadVec::iterator it = _threads.begin(); !pThread && it != _threads.end(); ++it)
|
||||
PooledThread* pThread = nullptr;
|
||||
for (auto it = _threads.begin(); !pThread && it != _threads.end(); ++it)
|
||||
{
|
||||
if ((*it)->idle())
|
||||
pThread = *it;
|
||||
@ -472,7 +472,7 @@ class ThreadPoolSingletonHolder
|
||||
public:
|
||||
ThreadPoolSingletonHolder()
|
||||
{
|
||||
_pPool = 0;
|
||||
_pPool = nullptr;
|
||||
}
|
||||
~ThreadPoolSingletonHolder()
|
||||
{
|
||||
|
@ -17,8 +17,6 @@
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Error.h"
|
||||
#include "Poco/ErrorHandler.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include "Poco/Format.h"
|
||||
#include "Poco/Error.h"
|
||||
#include <signal.h>
|
||||
|
@ -39,6 +39,11 @@ ClassLoaderTest::~ClassLoaderTest()
|
||||
{
|
||||
}
|
||||
|
||||
namespace Poco {
|
||||
|
||||
template class ClassLoader<TestPlugin>;
|
||||
|
||||
}
|
||||
|
||||
void ClassLoaderTest::testClassLoader1()
|
||||
{
|
||||
@ -126,7 +131,7 @@ void ClassLoaderTest::testClassLoader2()
|
||||
TestPlugin& POCO_UNUSED plgB = cl.instance("PluginB");
|
||||
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");
|
||||
fail("cannot create a singleton - must throw");
|
||||
}
|
||||
catch (InvalidAccessException&)
|
||||
catch (const Poco::InvalidAccessException&)
|
||||
{
|
||||
}
|
||||
|
||||
@ -145,7 +150,7 @@ void ClassLoaderTest::testClassLoader2()
|
||||
meta.autoDelete(&(meta.instance()));
|
||||
fail("cannot take ownership of a singleton - must throw");
|
||||
}
|
||||
catch (InvalidAccessException&)
|
||||
catch (const Poco::InvalidAccessException&)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -9,17 +9,22 @@
|
||||
|
||||
|
||||
#include "EventTestSuite.h"
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
#include "FIFOEventTest.h"
|
||||
#endif
|
||||
#include "BasicEventTest.h"
|
||||
#include "PriorityEventTest.h"
|
||||
|
||||
CppUnit::Test* EventTestSuite::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("EventTestSuite");
|
||||
auto* pSuite = new CppUnit::TestSuite("EventTestSuite");
|
||||
|
||||
pSuite->addTest(BasicEventTest::suite());
|
||||
pSuite->addTest(PriorityEventTest::suite());
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
pSuite->addTest(FIFOEventTest::suite());
|
||||
#endif
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
#include "FIFOEventTest.h"
|
||||
#include "DummyDelegate.h"
|
||||
@ -495,3 +496,5 @@ CppUnit::Test* FIFOEventTest::suite()
|
||||
//CppUnit_addTest(pSuite, FIFOEventTest, testAsyncNotifyBenchmark);
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,7 @@
|
||||
#ifndef FIFOEventTest_INCLUDED
|
||||
#define FIFOEventTest_INCLUDED
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
@ -68,5 +69,6 @@ private:
|
||||
std::atomic<Poco::Int64> _count;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // FIFOEventTest_INCLUDED
|
||||
|
@ -7,6 +7,8 @@
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
|
||||
#include "HashTableTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
@ -200,3 +202,5 @@ CppUnit::Test* HashTableTest::suite()
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,8 @@
|
||||
#ifndef HashTableTest_INCLUDED
|
||||
#define HashTableTest_INCLUDED
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
@ -39,5 +41,6 @@ public:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // HashTableTest_INCLUDED
|
||||
|
@ -9,8 +9,10 @@
|
||||
|
||||
|
||||
#include "HashingTestSuite.h"
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
#include "HashTableTest.h"
|
||||
#include "SimpleHashTableTest.h"
|
||||
#endif
|
||||
#include "LinearHashTableTest.h"
|
||||
#include "HashSetTest.h"
|
||||
#include "HashMapTest.h"
|
||||
@ -20,8 +22,10 @@ CppUnit::Test* HashingTestSuite::suite()
|
||||
{
|
||||
CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("HashingTestSuite");
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
pSuite->addTest(HashTableTest::suite());
|
||||
pSuite->addTest(SimpleHashTableTest::suite());
|
||||
#endif
|
||||
pSuite->addTest(LinearHashTableTest::suite());
|
||||
pSuite->addTest(HashSetTest::suite());
|
||||
pSuite->addTest(HashMapTest::suite());
|
||||
|
@ -12,12 +12,14 @@
|
||||
#include "CppUnit/TestCaller.h"
|
||||
#include "CppUnit/TestSuite.h"
|
||||
#include "Poco/LinearHashTable.h"
|
||||
#include "Poco/HashTable.h"
|
||||
#include "Poco/Stopwatch.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
#include "Poco/HashTable.h"
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
#ifdef POCO_COMPILER_MSVC
|
||||
#pragma warning(push)
|
||||
@ -27,9 +29,11 @@
|
||||
|
||||
using Poco::LinearHashTable;
|
||||
using Poco::Hash;
|
||||
using Poco::HashTable;
|
||||
using Poco::Stopwatch;
|
||||
using Poco::NumberFormatter;
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
using Poco::HashTable;
|
||||
#endif
|
||||
|
||||
|
||||
LinearHashTableTest::LinearHashTableTest(const std::string& name): CppUnit::TestCase(name)
|
||||
@ -189,10 +193,11 @@ void LinearHashTableTest::testConstIterator()
|
||||
assertTrue (values.size() == N);
|
||||
}
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
void LinearHashTableTest::testPerformanceInt()
|
||||
{
|
||||
const int N = 5000000;
|
||||
const int N = 50000000;
|
||||
Stopwatch sw;
|
||||
|
||||
{
|
||||
@ -263,10 +268,11 @@ void LinearHashTableTest::testPerformanceInt()
|
||||
|
||||
void LinearHashTableTest::testPerformanceStr()
|
||||
{
|
||||
const int N = 5000000;
|
||||
const int N = 50000000;
|
||||
Stopwatch sw;
|
||||
|
||||
std::vector<std::string> values;
|
||||
values.reserve(N);
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
values.push_back(NumberFormatter::format0(i, 8));
|
||||
@ -336,6 +342,7 @@ void LinearHashTableTest::testPerformanceStr()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void LinearHashTableTest::setUp()
|
||||
{
|
||||
@ -355,8 +362,11 @@ CppUnit::Test* LinearHashTableTest::suite()
|
||||
CppUnit_addTest(pSuite, LinearHashTableTest, testErase);
|
||||
CppUnit_addTest(pSuite, LinearHashTableTest, testIterator);
|
||||
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;
|
||||
}
|
||||
|
@ -22,17 +22,20 @@ class LinearHashTableTest: public CppUnit::TestCase
|
||||
{
|
||||
public:
|
||||
LinearHashTableTest(const std::string& name);
|
||||
~LinearHashTableTest();
|
||||
~LinearHashTableTest() override;
|
||||
|
||||
void testInsert();
|
||||
void testErase();
|
||||
void testIterator();
|
||||
void testConstIterator();
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
void testPerformanceInt();
|
||||
void testPerformanceStr();
|
||||
#endif
|
||||
|
||||
void setUp();
|
||||
void tearDown();
|
||||
void setUp() override;
|
||||
void tearDown() override;
|
||||
|
||||
static CppUnit::Test* suite();
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
//
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
#include "SimpleHashTableTest.h"
|
||||
#include "CppUnit/TestCaller.h"
|
||||
@ -153,3 +154,5 @@ CppUnit::Test* SimpleHashTableTest::suite()
|
||||
|
||||
return pSuite;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -13,6 +13,8 @@
|
||||
#ifndef SimpleHashTableTest_INCLUDED
|
||||
#define SimpleHashTableTest_INCLUDED
|
||||
|
||||
#if defined(POCO_TEST_DEPRECATED)
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "CppUnit/TestCase.h"
|
||||
@ -39,5 +41,6 @@ public:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // SimpleHashTableTest_INCLUDED
|
||||
|
@ -23,7 +23,7 @@ using Poco::RunnableAdapter;
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -3002,7 +3002,7 @@ void VarTest::testEmpty()
|
||||
std::string s = da.extract<std::string>();
|
||||
assertTrue ("123" == s);
|
||||
assertTrue (!da.isEmpty());
|
||||
da.empty();
|
||||
da.clear();
|
||||
assertTrue (da.isEmpty());
|
||||
assertTrue (da.type() == typeid(void));
|
||||
assertTrue (!da.isArray());
|
||||
|
@ -79,7 +79,7 @@ int main(int argc, char** argv)
|
||||
Poco::JSON::Parser sparser;
|
||||
sw.restart();
|
||||
sparser.parse(jsonStr);
|
||||
Poco::DynamicAny result = sparser.result();
|
||||
Poco::Dynamic::Var result = sparser.result();
|
||||
sw.stop();
|
||||
std::cout << "-----------------------------------------" << std::endl;
|
||||
std::cout << "[std::string] parsed/handled in " << sw.elapsed() << " [us]" << std::endl;
|
||||
|
@ -37,7 +37,7 @@ void ParseHandler::reset()
|
||||
{
|
||||
while (!_stack.empty()) _stack.pop();
|
||||
_key = "";
|
||||
_result.empty();
|
||||
_result.clear();
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,7 +142,7 @@ Var Query::find(const std::string& path) const
|
||||
result = o.get(name);
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] Cursor;
|
||||
class Cursor;
|
||||
|
||||
class MongoDB_API Cursor: public Document
|
||||
/// Cursor is an helper class for querying multiple documents.
|
||||
|
@ -72,25 +72,31 @@ public:
|
||||
///
|
||||
/// If the command fails, -1 is returned.
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCommand() const;
|
||||
/// Creates a QueryRequest for a command. (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createCountRequest(const std::string& collectionName) const;
|
||||
/// Creates a QueryRequest to count the given collection.
|
||||
/// The collectionname must not contain the database name. (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::DeleteRequest> createDeleteRequest(const std::string& collectionName) const;
|
||||
/// Creates a DeleteRequest to delete documents in the given collection.
|
||||
/// The collectionname must not contain the database name. (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::InsertRequest> createInsertRequest(const std::string& collectionName) const;
|
||||
/// Creates an InsertRequest to insert new documents in the given collection.
|
||||
/// The collectionname must not contain the database name. (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::QueryRequest> createQueryRequest(const std::string& collectionName) const;
|
||||
/// Creates a QueryRequest. (old wire protocol)
|
||||
/// The collectionname must not contain the database name.
|
||||
|
||||
//[[deprecated]]
|
||||
Poco::SharedPtr<Poco::MongoDB::UpdateRequest> createUpdateRequest(const std::string& collectionName) const;
|
||||
/// Creates an UpdateRequest. (old wire protocol)
|
||||
/// 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.
|
||||
/// For more info look at the ensureIndex information on the MongoDB website. (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
Document::Ptr getLastErrorDoc(Connection& connection) const;
|
||||
/// Sends the getLastError command to the database and returns the error document.
|
||||
/// (old wire protocol)
|
||||
|
||||
//[[deprecated]]
|
||||
std::string getLastError(Connection& connection) const;
|
||||
/// 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.
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] DeleteRequest;
|
||||
class DeleteRequest;
|
||||
|
||||
class MongoDB_API DeleteRequest: public RequestMessage
|
||||
/// A DeleteRequest is used to delete one ore more documents from a database.
|
||||
|
@ -25,6 +25,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] GetMoreRequest;
|
||||
class GetMoreRequest;
|
||||
|
||||
class MongoDB_API GetMoreRequest: public RequestMessage
|
||||
/// A GetMoreRequest is used to query the database for more documents in a collection
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] InsertRequest;
|
||||
class InsertRequest;
|
||||
|
||||
class MongoDB_API InsertRequest: public RequestMessage
|
||||
/// A request for inserting one or more documents to the database
|
||||
|
@ -38,7 +38,16 @@ public:
|
||||
|
||||
enum OpCode
|
||||
{
|
||||
#if false
|
||||
// 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_UPDATE = 2001,
|
||||
OP_INSERT = 2002,
|
||||
@ -46,6 +55,7 @@ public:
|
||||
OP_GET_MORE = 2005,
|
||||
OP_DELETE = 2006,
|
||||
OP_KILL_CURSORS = 2007,
|
||||
#endif
|
||||
|
||||
/// Opcodes supported in MongoDB 5.1 and later
|
||||
OP_COMPRESSED = 2012,
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] QueryRequest;
|
||||
class QueryRequest;
|
||||
|
||||
class MongoDB_API QueryRequest: public RequestMessage
|
||||
/// A request to query documents in a MongoDB database
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] RequestMessage;
|
||||
class RequestMessage;
|
||||
|
||||
class MongoDB_API RequestMessage: public Message
|
||||
/// Base class for a request sent to the MongoDB server.
|
||||
|
@ -28,6 +28,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] ResponseMessage;
|
||||
class ResponseMessage;
|
||||
|
||||
class MongoDB_API ResponseMessage: public Message
|
||||
/// This class represents a response (OP_REPLY) from MongoDB.
|
||||
|
@ -26,6 +26,8 @@
|
||||
namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
//class [[deprecated]] UpdateRequest;
|
||||
class UpdateRequest;
|
||||
|
||||
class MongoDB_API UpdateRequest: public RequestMessage
|
||||
/// This request is used to update a document in a database
|
||||
|
@ -62,7 +62,7 @@ public:
|
||||
HTTP_SEE_OTHER = 303,
|
||||
HTTP_NOT_MODIFIED = 304,
|
||||
HTTP_USE_PROXY = 305,
|
||||
HTTP_USEPROXY = 305, /// @deprecated
|
||||
HTTP_USEPROXY POCO_DEPRECATED("use HTTP_USE_PROXY") = 305,
|
||||
// UNUSED: 306
|
||||
HTTP_TEMPORARY_REDIRECT = 307,
|
||||
HTTP_PERMANENT_REDIRECT = 308,
|
||||
@ -80,11 +80,11 @@ public:
|
||||
HTTP_LENGTH_REQUIRED = 411,
|
||||
HTTP_PRECONDITION_FAILED = 412,
|
||||
HTTP_REQUEST_ENTITY_TOO_LARGE = 413,
|
||||
HTTP_REQUESTENTITYTOOLARGE = 413, /// @deprecated
|
||||
HTTP_REQUESTENTITYTOOLARGE POCO_DEPRECATED("") = 413,
|
||||
HTTP_REQUEST_URI_TOO_LONG = 414,
|
||||
HTTP_REQUESTURITOOLONG = 414, /// @deprecated
|
||||
HTTP_REQUESTURITOOLONG POCO_DEPRECATED("") = 414,
|
||||
HTTP_UNSUPPORTED_MEDIA_TYPE = 415,
|
||||
HTTP_UNSUPPORTEDMEDIATYPE = 415, /// @deprecated
|
||||
HTTP_UNSUPPORTEDMEDIATYPE POCO_DEPRECATED("") = 415,
|
||||
HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
||||
HTTP_EXPECTATION_FAILED = 417,
|
||||
HTTP_IM_A_TEAPOT = 418,
|
||||
@ -134,7 +134,7 @@ public:
|
||||
HTTPResponse(const HTTPResponse& other);
|
||||
/// Creates the HTTPResponse by copying another one.
|
||||
|
||||
virtual ~HTTPResponse();
|
||||
~HTTPResponse() override;
|
||||
/// Destroys the HTTPResponse.
|
||||
|
||||
HTTPResponse& operator = (const HTTPResponse& other);
|
||||
@ -185,11 +185,11 @@ public:
|
||||
/// May throw an exception in case of a malformed
|
||||
/// Set-Cookie header.
|
||||
|
||||
void write(std::ostream& ostr) const;
|
||||
void write(std::ostream& ostr) const override;
|
||||
/// Writes the HTTP response to the given
|
||||
/// output stream.
|
||||
|
||||
void read(std::istream& istr);
|
||||
void read(std::istream& istr) override;
|
||||
/// Reads the HTTP response from the
|
||||
/// given input stream.
|
||||
///
|
||||
|
@ -60,14 +60,14 @@ class Net_API NetworkInterface
|
||||
/// and XP.
|
||||
{
|
||||
public:
|
||||
typedef std::vector<NetworkInterface> List;
|
||||
typedef List NetworkInterfaceList;//@deprecated
|
||||
typedef std::map<unsigned, NetworkInterface> Map;
|
||||
typedef Poco::Tuple<IPAddress, IPAddress, IPAddress> AddressTuple;
|
||||
typedef std::vector<AddressTuple> AddressList;
|
||||
typedef AddressList::iterator AddressIterator;
|
||||
typedef AddressList::const_iterator ConstAddressIterator;
|
||||
typedef std::vector<unsigned char> MACAddress;
|
||||
using List = std::vector<NetworkInterface>;
|
||||
using NetworkInterfaceList POCO_DEPRECATED("") = List;
|
||||
using Map = std::map<unsigned int, NetworkInterface>;
|
||||
using AddressTuple = Poco::Tuple<IPAddress, IPAddress, IPAddress>;
|
||||
using AddressList = std::vector<AddressTuple>;
|
||||
using AddressIterator = AddressList::iterator;
|
||||
using ConstAddressIterator = AddressList::const_iterator;
|
||||
using MACAddress = std::vector<unsigned char>;
|
||||
|
||||
enum AddressType
|
||||
{
|
||||
@ -281,13 +281,13 @@ public:
|
||||
/// member of the pair.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
NetworkInterface(const std::string& name,
|
||||
@ -297,7 +297,7 @@ protected:
|
||||
const IPAddress& subnetMask,
|
||||
const IPAddress& broadcastAddress,
|
||||
unsigned index,
|
||||
MACAddress* pMACAddress = 0);
|
||||
MACAddress* pMACAddress = nullptr);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
NetworkInterface(const std::string& name,
|
||||
@ -305,7 +305,7 @@ protected:
|
||||
const IPAddress& subnetMask,
|
||||
const IPAddress& broadcastAddress,
|
||||
unsigned index,
|
||||
MACAddress* pMACAddress = 0);
|
||||
MACAddress* pMACAddress = nullptr);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
IPAddress interfaceNameToAddress(const std::string& interfaceName) const;
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
void close();
|
||||
/// Closes the socket.
|
||||
|
||||
//@deprecated
|
||||
POCO_DEPRECATED("Use PollSet instead")
|
||||
static int select(SocketList& readList, SocketList& writeList, SocketList& exceptList, const Poco::Timespan& timeout);
|
||||
/// Determines the status of one or more sockets,
|
||||
/// using a call to select().
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user