diff --git a/Data/include/Poco/Data/AbstractBinder.h b/Data/include/Poco/Data/AbstractBinder.h index 12a46da4b..2eca13135 100644 --- a/Data/include/Poco/Data/AbstractBinder.h +++ b/Data/include/Poco/Data/AbstractBinder.h @@ -247,17 +247,17 @@ public: virtual void bind(std::size_t pos, const std::list& val, Direction dir = PD_IN); /// Binds a string list. - virtual void bind(std::size_t pos, const UTF16String& val, Direction dir = PD_IN) = 0; - /// Binds a string. + virtual void bind(std::size_t pos, const UTF16String& val, Direction dir = PD_IN); + /// Binds a UTF-16 Unicode string. virtual void bind(std::size_t pos, const std::vector& val, Direction dir = PD_IN); - /// Binds a string vector. + /// Binds a UTF-16 Unicode string vector. virtual void bind(std::size_t pos, const std::deque& val, Direction dir = PD_IN); - /// Binds a string deque. + /// Binds a UTF-16 Unicode string deque. virtual void bind(std::size_t pos, const std::list& val, Direction dir = PD_IN); - /// Binds a string list. + /// Binds a UTF-16 Unicode string list. virtual void bind(std::size_t pos, const BLOB& val, Direction dir = PD_IN) = 0; /// Binds a BLOB. diff --git a/Data/include/Poco/Data/AbstractExtractor.h b/Data/include/Poco/Data/AbstractExtractor.h index 877a2caab..875a049d7 100644 --- a/Data/include/Poco/Data/AbstractExtractor.h +++ b/Data/include/Poco/Data/AbstractExtractor.h @@ -234,17 +234,17 @@ public: virtual bool extract(std::size_t pos, std::list& val); /// Extracts a string list. - virtual bool extract(std::size_t pos, UTF16String& val) = 0; - /// Extracts a string. Returns false if null was received. + virtual bool extract(std::size_t pos, UTF16String& val); + /// Extracts a UTF16String. Returns false if null was received. virtual bool extract(std::size_t pos, std::vector& val); - /// Extracts a string vector. + /// Extracts a UTF16String vector. virtual bool extract(std::size_t pos, std::deque& val); - /// Extracts a string deque. + /// Extracts a UTF16String deque. virtual bool extract(std::size_t pos, std::list& val); - /// Extracts a string list. + /// Extracts a UTF16String list. virtual bool extract(std::size_t pos, BLOB& val) = 0; /// Extracts a BLOB. Returns false if null was received. diff --git a/Data/include/Poco/Data/AbstractPreparator.h b/Data/include/Poco/Data/AbstractPreparator.h index cc42b917d..e32129624 100644 --- a/Data/include/Poco/Data/AbstractPreparator.h +++ b/Data/include/Poco/Data/AbstractPreparator.h @@ -238,19 +238,19 @@ public: /// Prepares a string deque. virtual void prepare(std::size_t pos, const std::list& val); - /// Prepares a character list. + /// Prepares a character list. - virtual void prepare(std::size_t pos, const UTF16String&) = 0; - /// Prepares a string. + virtual void prepare(std::size_t pos, const UTF16String&); + /// Prepares a UTF16String. virtual void prepare(std::size_t pos, const std::vector& val); - /// Prepares a string vector. + /// Prepares a UTF16String vector. virtual void prepare(std::size_t pos, const std::deque& val); - /// Prepares a string deque. + /// Prepares a UTF16String deque. virtual void prepare(std::size_t pos, const std::list& val); - /// Prepares a string list. + /// Prepares a UTF16String list. virtual void prepare(std::size_t pos, const BLOB&) = 0; /// Prepares a BLOB. diff --git a/Data/src/AbstractBinder.cpp b/Data/src/AbstractBinder.cpp index 4b4c29515..465338e4d 100644 --- a/Data/src/AbstractBinder.cpp +++ b/Data/src/AbstractBinder.cpp @@ -292,6 +292,12 @@ void AbstractBinder::bind(std::size_t pos, const std::list& val, Di } +void AbstractBinder::bind(std::size_t pos, const UTF16String& val, Direction dir) +{ + throw NotImplementedException("UTF16String binder must be implemented."); +} + + void AbstractBinder::bind(std::size_t pos, const std::vector& val, Direction dir) { throw NotImplementedException("std::vector binder must be implemented."); diff --git a/Data/src/AbstractExtractor.cpp b/Data/src/AbstractExtractor.cpp index 932712299..1b75382d0 100644 --- a/Data/src/AbstractExtractor.cpp +++ b/Data/src/AbstractExtractor.cpp @@ -286,21 +286,27 @@ bool AbstractExtractor::extract(std::size_t pos, std::list& val) } +bool AbstractExtractor::extract(std::size_t pos, UTF16String& val) +{ + throw NotImplementedException("UTF16String extractor must be implemented."); +} + + bool AbstractExtractor::extract(std::size_t pos, std::vector& val) { - throw NotImplementedException("std::vector extractor must be implemented."); + throw NotImplementedException("std::vector extractor must be implemented."); } bool AbstractExtractor::extract(std::size_t pos, std::deque& val) { - throw NotImplementedException("std::deque extractor must be implemented."); + throw NotImplementedException("std::deque extractor must be implemented."); } bool AbstractExtractor::extract(std::size_t pos, std::list& val) { - throw NotImplementedException("std::list extractor must be implemented."); + throw NotImplementedException("std::list extractor must be implemented."); } diff --git a/Data/src/AbstractPreparator.cpp b/Data/src/AbstractPreparator.cpp index 5f97aa5df..e257c7529 100644 --- a/Data/src/AbstractPreparator.cpp +++ b/Data/src/AbstractPreparator.cpp @@ -287,21 +287,27 @@ void AbstractPreparator::prepare(std::size_t pos, const std::list& } +void AbstractPreparator::prepare(std::size_t pos, const UTF16String& val) +{ + throw NotImplementedException("UTF16String preparator must be implemented."); +} + + void AbstractPreparator::prepare(std::size_t pos, const std::vector& val) { - throw NotImplementedException("std::vector preparator must be implemented."); + throw NotImplementedException("std::vector preparator must be implemented."); } void AbstractPreparator::prepare(std::size_t pos, const std::deque& val) { - throw NotImplementedException("std::deque preparator must be implemented."); + throw NotImplementedException("std::deque preparator must be implemented."); } void AbstractPreparator::prepare(std::size_t pos, const std::list& val) { - throw NotImplementedException("std::list preparator must be implemented."); + throw NotImplementedException("std::list preparator must be implemented."); } diff --git a/Foundation/include/Poco/Platform_WIN32.h b/Foundation/include/Poco/Platform_WIN32.h index 4b6e6356b..cc35eff9b 100644 --- a/Foundation/include/Poco/Platform_WIN32.h +++ b/Foundation/include/Poco/Platform_WIN32.h @@ -24,110 +24,111 @@ #include "Poco/UnWindows.h" -// Determine the real version. -// This setting can be forced from UnWindows.h -#if defined (_WIN32_WINNT_WINBLUE) - //Windows 8.1 _WIN32_WINNT_WINBLUE (0x0602) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT +#ifndef POCO_FORCE_MIN_WINDOWS_OS_SUPPORT + // Determine the real version. + // This setting can be forced from UnWindows.h + #if defined (_WIN32_WINNT_WINBLUE) + //Windows 8.1 _WIN32_WINNT_WINBLUE (0x0602) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WINBLUE + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WINBLUE + #elif defined (_WIN32_WINNT_WIN8) + //Windows 8 _WIN32_WINNT_WIN8 (0x0602) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WIN8 + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WIN8 + #elif defined (_WIN32_WINNT_WIN7) + //Windows 7 _WIN32_WINNT_WIN7 (0x0601) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WIN7 + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WIN7 + #elif defined (_WIN32_WINNT_WS08) + //Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WS08 + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WS08 + #elif defined (_WIN32_WINNT_VISTA) + //Windows Vista _WIN32_WINNT_VISTA (0x0600) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_VISTA + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_VISTA + #elif defined (_WIN32_WINNT_LONGHORN) + //Windows Vista and server 2008 Development _WIN32_WINNT_LONGHORN (0x0600) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_LONGHORN + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION 0x06000000 // hardcoded, VS90 can't find NTDDI_* macros + #elif defined (_WIN32_WINNT_WS03) + //Windows Server 2003 with SP1, + //Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WS03 + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WS03 + #elif defined (_WIN32_WINNT_WINXP) + //Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WINXP + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION NTDDI_WINXP + #elif defined (_WIN32_WINNT_WIN2K) + //Windows 2000 _WIN32_WINNT_WIN2K (0x0500) + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT _WIN32_WINNT_WIN2K + #elif defined (WINVER) + // fail back on WINVER + #ifdef _WIN32_WINNT + #undef _WIN32_WINNT + #endif + #define _WIN32_WINNT WINVER + #elif !defined(_WIN32_WINNT) + // last resort = Win XP, SP1 is minimum supported + #define _WIN32_WINNT 0x0501 + #ifdef NTDDI_VERSION + #undef NTDDI_VERSION + #endif + #define NTDDI_VERSION 0x05010100 #endif - #define _WIN32_WINNT _WIN32_WINNT_WINBLUE - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WINBLUE -#elif defined (_WIN32_WINNT_WIN8) - //Windows 8 _WIN32_WINNT_WIN8 (0x0602) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WIN8 - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WIN8 -#elif defined (_WIN32_WINNT_WIN7) - //Windows 7 _WIN32_WINNT_WIN7 (0x0601) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WIN7 - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WIN7 -#elif defined (_WIN32_WINNT_WS08) - //Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WS08 - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WS08 -#elif defined (_WIN32_WINNT_VISTA) - //Windows Vista _WIN32_WINNT_VISTA (0x0600) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_VISTA - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_VISTA -#elif defined (_WIN32_WINNT_LONGHORN) - //Windows Vista and server 2008 Development _WIN32_WINNT_LONGHORN (0x0600) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_LONGHORN - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION 0x06000000 // hardcoded, VS90 can't find NTDDI_* macros -#elif defined (_WIN32_WINNT_WS03) - //Windows Server 2003 with SP1, - //Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WS03 - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WS03 -#elif defined (_WIN32_WINNT_WINXP) - //Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WINXP - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION NTDDI_WINXP -#elif defined (_WIN32_WINNT_WIN2K) - //Windows 2000 _WIN32_WINNT_WIN2K (0x0500) - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT _WIN32_WINNT_WIN2K -#elif defined (WINVER) - // fail back on WINVER - #ifdef _WIN32_WINNT - #undef _WIN32_WINNT - #endif - #define _WIN32_WINNT WINVER -#elif !defined(_WIN32_WINNT) - // last resort = Win XP, SP1 is minimum supported - #define _WIN32_WINNT 0x0501 - #ifdef NTDDI_VERSION - #undef NTDDI_VERSION - #endif - #define NTDDI_VERSION 0x05010100 -#endif - +#endif // POCO_FORCE_MIN_WINDOWS_OS_SUPPORT #if defined(_MSC_VER) && !defined(POCO_MSVC_SECURE_WARNINGS) && !defined(_CRT_SECURE_NO_DEPRECATE) #define _CRT_SECURE_NO_DEPRECATE diff --git a/Foundation/include/Poco/UnWindows.h b/Foundation/include/Poco/UnWindows.h index 4818f8f28..722265bf6 100644 --- a/Foundation/include/Poco/UnWindows.h +++ b/Foundation/include/Poco/UnWindows.h @@ -57,6 +57,7 @@ // the header file that contains the definition for conditional // definitions.) For more information, see SdkDdkVer.h. + #if defined(_WIN32_WINNT) #if (_WIN32_WINNT < 0x0501) #error Unsupported Windows version. @@ -68,8 +69,9 @@ #elif !defined(_WIN32_WINNT) // Define minimum supported version. // This can be changed, if needed. - // Otherwise, the Platform_WIN32.h will do - // its best to determine the appropriate values + // If allowed (see POCO_MIN_WINDOWS_OS_SUPPORT + // below), Platform_WIN32.h will do its + // best to determine the appropriate values // and may redefine these. See Platform_WIN32.h // for details. #define _WIN32_WINNT 0x0501 @@ -77,6 +79,12 @@ #endif +// To prevent Platform_WIN32.h to modify version defines, +// uncomment this, otherwise versions will be automatically +// discovered in Platform_WIN32.h. +// #define POCO_FORCE_MIN_WINDOWS_OS_SUPPORT + + #include