mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-07 00:44:17 +01:00
chore(deprecated): Describe deprecation reasons and alternatives.
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
||||
/// Creates the SessionImpl. Opens a connection to the database.
|
||||
/// Throws NotConnectedException if connection was not succesful.
|
||||
|
||||
POCO_DEPRECATED("") SessionImpl(const std::string& connect,
|
||||
POCO_DEPRECATED("Use other constructors.") SessionImpl(const std::string& connect,
|
||||
Poco::Any maxFieldSize = ODBC_MAX_FIELD_SIZE,
|
||||
bool enforceCapability=false,
|
||||
bool autoBind = true,
|
||||
|
||||
@@ -198,9 +198,6 @@ bool SessionImpl::isConnected() const
|
||||
|
||||
inline void SessionImpl::setCursorUse(const std::string&, const Poco::Any& value)
|
||||
{
|
||||
#if POCO_OS == POCO_OS_WINDOWS_NT
|
||||
#pragma warning (disable : 4995) // ignore marked as deprecated
|
||||
#endif
|
||||
int cursorUse = static_cast<int>(Poco::AnyCast<CursorUse>(value));
|
||||
int rc = 0;
|
||||
switch (cursorUse)
|
||||
@@ -217,9 +214,6 @@ inline void SessionImpl::setCursorUse(const std::string&, const Poco::Any& value
|
||||
default:
|
||||
throw Poco::InvalidArgumentException(Poco::format("SessionImpl::setCursorUse(%d)", cursorUse));
|
||||
}
|
||||
#if POCO_OS == POCO_OS_WINDOWS_NT
|
||||
#pragma warning (default : 4995)
|
||||
#endif
|
||||
if (Utility::isError(rc))
|
||||
{
|
||||
throw Poco::Data::ODBC::HandleException<SQLHDBC, SQL_HANDLE_DBC>(_db, Poco::format("SessionImpl::setCursorUse(%d)", cursorUse));
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
static const std::string PROP_TABLE;
|
||||
static const std::string PROP_ARCHIVE_TABLE;
|
||||
static const std::string PROP_MAX_AGE;
|
||||
POCO_DEPRECATED("") static const std::string PROP_ASYNC;
|
||||
POCO_DEPRECATED("Not used, pending removal.") 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;
|
||||
|
||||
@@ -482,7 +482,6 @@ public:
|
||||
POCO_DEPRECATED("Use clear() instead")
|
||||
void empty();
|
||||
/// Empties Var.
|
||||
/// This function is deprecated and will be removed.
|
||||
/// Please use clear().
|
||||
|
||||
void clear();
|
||||
|
||||
@@ -17,8 +17,13 @@
|
||||
#ifndef Foundation_DynamicAny_INCLUDED
|
||||
#define Foundation_DynamicAny_INCLUDED
|
||||
|
||||
//@ deprecated
|
||||
#include "Poco/Dynamic/Var.h"
|
||||
|
||||
namespace {
|
||||
POCO_DEPRECATED("Deprecated header: include Poco/Dynamic/Var.h instead")
|
||||
constexpr static int dynamicany_hpp_is_deprecated {0xBAD};
|
||||
constexpr static int please_dont_use_badheader_hpp = dynamicany_hpp_is_deprecated;
|
||||
}
|
||||
|
||||
|
||||
#endif // Foundation_DynamicAny_INCLUDED
|
||||
|
||||
@@ -17,8 +17,13 @@
|
||||
#ifndef Foundation_DynamicAnyHolder_INCLUDED
|
||||
#define Foundation_DynamicAnyHolder_INCLUDED
|
||||
|
||||
//@ deprecated
|
||||
#include "Poco/Dynamic/VarHolder.h"
|
||||
|
||||
namespace {
|
||||
POCO_DEPRECATED("Deprecated header: include Poco/Dynamic/VarHolder.h instead")
|
||||
constexpr static int dynamicanyholder_hpp_is_deprecated {0xBAD};
|
||||
constexpr static int please_dont_use_badheader_hpp = dynamicanyholder_hpp_is_deprecated;
|
||||
}
|
||||
|
||||
|
||||
#endif // Foundation_DynamicAnyHolder_INCLUDED
|
||||
|
||||
@@ -17,8 +17,12 @@
|
||||
#ifndef Foundation_DynamicStruct_INCLUDED
|
||||
#define Foundation_DynamicStruct_INCLUDED
|
||||
|
||||
//@ deprecated
|
||||
#include "Poco/Dynamic/Struct.h"
|
||||
|
||||
namespace {
|
||||
POCO_DEPRECATED("Deprecated header: include Poco/Dynamic/Struct.h instead")
|
||||
constexpr static int dynamicstruct_hpp_is_deprecated {0xBAD};
|
||||
constexpr static int please_dont_use_badheader_hpp = dynamicstruct_hpp_is_deprecated;
|
||||
}
|
||||
|
||||
#endif // Foundation_DynamicStruct_INCLUDED
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
namespace Poco {
|
||||
|
||||
class POCO_DEPRECATED("") HashStatistic;
|
||||
class POCO_DEPRECATED("Not supported since 2006, use Hash.") HashStatistic;
|
||||
|
||||
class Foundation_API HashStatistic
|
||||
/// HashStatistic class bundles statistical information on the current state of a HashTable
|
||||
|
||||
@@ -80,11 +80,11 @@ public:
|
||||
HTTP_LENGTH_REQUIRED = 411,
|
||||
HTTP_PRECONDITION_FAILED = 412,
|
||||
HTTP_REQUEST_ENTITY_TOO_LARGE = 413,
|
||||
HTTP_REQUESTENTITYTOOLARGE POCO_DEPRECATED("") = 413,
|
||||
HTTP_REQUESTENTITYTOOLARGE POCO_DEPRECATED("Use HTTP_REQUEST_ENTITY_TOO_LARGE") = 413,
|
||||
HTTP_REQUEST_URI_TOO_LONG = 414,
|
||||
HTTP_REQUESTURITOOLONG POCO_DEPRECATED("") = 414,
|
||||
HTTP_REQUESTURITOOLONG POCO_DEPRECATED("Use HTTP_REQUEST_URI_TOO_LONG") = 414,
|
||||
HTTP_UNSUPPORTED_MEDIA_TYPE = 415,
|
||||
HTTP_UNSUPPORTEDMEDIATYPE POCO_DEPRECATED("") = 415,
|
||||
HTTP_UNSUPPORTEDMEDIATYPE POCO_DEPRECATED("Use HTTP_UNSUPPORTED_MEDIA_TYPE") = 415,
|
||||
HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
||||
HTTP_EXPECTATION_FAILED = 417,
|
||||
HTTP_IM_A_TEAPOT = 418,
|
||||
|
||||
@@ -61,7 +61,7 @@ class Net_API NetworkInterface
|
||||
{
|
||||
public:
|
||||
using List = std::vector<NetworkInterface>;
|
||||
using NetworkInterfaceList POCO_DEPRECATED("") = List;
|
||||
using NetworkInterfaceList POCO_DEPRECATED("Use NetworkInterface::List") = List;
|
||||
using Map = std::map<unsigned int, NetworkInterface>;
|
||||
using AddressTuple = Poco::Tuple<IPAddress, IPAddress, IPAddress>;
|
||||
using AddressList = std::vector<AddressTuple>;
|
||||
|
||||
@@ -96,7 +96,6 @@ public:
|
||||
std::size_t size() const;
|
||||
/// Returns the number of sockets monitored.
|
||||
|
||||
//@ deprecated
|
||||
POCO_DEPRECATED("Use size() instead") int count() const;
|
||||
/// Returns the number of sockets monitored.
|
||||
/// This method is deprecated. Use size() instead.
|
||||
|
||||
Reference in New Issue
Block a user