mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-07 05:58:43 +01:00
merge develop into master
This commit is contained in:
27
.gitignore
vendored
27
.gitignore
vendored
@@ -14,6 +14,20 @@
|
|||||||
*.a
|
*.a
|
||||||
*.d
|
*.d
|
||||||
|
|
||||||
|
# Make #
|
||||||
|
########
|
||||||
|
config.build
|
||||||
|
config.make
|
||||||
|
|
||||||
|
# CMake #
|
||||||
|
########
|
||||||
|
cmake_install.cmake
|
||||||
|
cmake_uninstall.cmake
|
||||||
|
CMakeFiles
|
||||||
|
CMakeCache.txt
|
||||||
|
CPackConfig.cmake
|
||||||
|
CPackSourceConfig.cmake
|
||||||
|
|
||||||
# Packages #
|
# Packages #
|
||||||
############
|
############
|
||||||
# it's better to unpack these files and commit the raw source
|
# it's better to unpack these files and commit the raw source
|
||||||
@@ -29,9 +43,11 @@
|
|||||||
|
|
||||||
# Logs and databases #
|
# Logs and databases #
|
||||||
######################
|
######################
|
||||||
*.log
|
*.log*
|
||||||
*.sqlite
|
*.sqlite
|
||||||
*.db
|
*.db
|
||||||
|
test*.txt
|
||||||
|
XML/testsuite/rss.xml
|
||||||
|
|
||||||
# OS generated files #
|
# OS generated files #
|
||||||
######################
|
######################
|
||||||
@@ -43,6 +59,7 @@
|
|||||||
Icon?
|
Icon?
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
*~
|
||||||
|
|
||||||
# VS generated files #
|
# VS generated files #
|
||||||
######################
|
######################
|
||||||
@@ -70,10 +87,16 @@ Thumbs.db
|
|||||||
*.lastbuildstate
|
*.lastbuildstate
|
||||||
*.unsuccessfulbuild
|
*.unsuccessfulbuild
|
||||||
release_shared/
|
release_shared/
|
||||||
debug_share/
|
debug_shared/
|
||||||
release_static/
|
release_static/
|
||||||
debug_static/
|
debug_static/
|
||||||
|
release_static_md/
|
||||||
|
debug_static_md/
|
||||||
|
release_static_mt/
|
||||||
|
debug_static_mt/
|
||||||
bin/
|
bin/
|
||||||
bin64/
|
bin64/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
pocomsg.h
|
pocomsg.h
|
||||||
|
|
||||||
|
|||||||
6
.travis.yml
Normal file
6
.travis.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
language: cpp
|
||||||
|
compiler:
|
||||||
|
- gcc
|
||||||
|
- clang
|
||||||
|
script: ./configure --omit=Data & make -s
|
||||||
|
|
||||||
43
CHANGELOG
43
CHANGELOG
@@ -1,5 +1,48 @@
|
|||||||
This is the changelog file for the POCO C++ Libraries.
|
This is the changelog file for the POCO C++ Libraries.
|
||||||
|
|
||||||
|
Release 1.5.1 (2013-01-11)
|
||||||
|
==========================
|
||||||
|
- using double-conversion library for floating-point numeric/string conversions
|
||||||
|
- added Poco::istring (case-insensitive string) and Poco::isubstr
|
||||||
|
- added SQLite sys.dual (in-memory system table)
|
||||||
|
- applied SF Patch #120: The ExpireLRUCache does not compile with a tuple as key on Visual Studio 2010
|
||||||
|
- fixed SF Bug #599: JSON::Array and JSON::Object size() member can implicitly lose precision
|
||||||
|
- fixed SF Bug #602: iterating database table rows not correct if no data in table
|
||||||
|
- fixed SF Bug #603: count() is missing in HashMap
|
||||||
|
- fixed GH #23: JSON::Object::stringify throw BadCastException
|
||||||
|
- fixed GH #16: NetworkInterface::firstAddress() should not throw on unconfigured interfaces
|
||||||
|
- Android compile/build support (by Rangel Reale)
|
||||||
|
- TypeHandler::prepare() now takes const-reference
|
||||||
|
- fixed GH #27: Poco::URI::decode() doesn't properly handle '+'
|
||||||
|
- fixed GH #31: JSON implementation bug
|
||||||
|
- fixed SF #597: Configure script ignores cflags
|
||||||
|
- fixed SF #593: Poco 1.5.0 on FreeBSD: cannot find -ldl
|
||||||
|
- added SF #542: SocketAddress() needs port-only constructor
|
||||||
|
- fixed SF #215: Wrong return type in SocketConnector.h
|
||||||
|
- applied SF Patch #97: fix c++0x / clang++ bugs
|
||||||
|
- fixed GH32/SF596: Poco::JSON: Parsing long integer (int64) value fails.
|
||||||
|
- added Net ifconfig sample (contributed by Philip Prindeville)
|
||||||
|
- merged GH #34: add algorithm header (Roger Meier/Philip Prindeville)
|
||||||
|
- fixed GH #26: Cannot compile on gcc
|
||||||
|
- merged SF #111: FTP Client logging (Marian Krivos)
|
||||||
|
- fixed GH #30: Poco::Path::home() throws when called from Windows Service
|
||||||
|
- fixed GH #22: MySQL connection string lowercased
|
||||||
|
- added MySQL support for Date/Time
|
||||||
|
- upgraded SQLite to version 3.7.15.1 (2012-12-19)
|
||||||
|
- improved SQLite execute() return (affected rows) value and added tests
|
||||||
|
- added SQLite::Utility::isThreadSafe() function
|
||||||
|
- added SQLite::Utility::setThreadMode(int mode) function
|
||||||
|
- fixed GH #36: 'distclean' requires 3 traversals of project tree
|
||||||
|
- fixed GH #41: Buffer::resize crash
|
||||||
|
- fixed GH #42: Linux unbundled builds don't link
|
||||||
|
- fixed GH #44: Problems with win x64 build
|
||||||
|
- fixed GH #46: 1.5.1 build fails on OS X when using libc++
|
||||||
|
- fixed GH #48: Need getArgs() accessor to Util::Application to retrieve start-up arguments
|
||||||
|
- fixed GH #49: NetworkInterface::list doesn't return MAC addresses
|
||||||
|
- fixed GH #51: Android should use isfinite, isinf, isnan and signbit from the std namespace
|
||||||
|
- fixed GH #53: JSON unicode fixes and running tests on invalid unicode JSON
|
||||||
|
- added ParallelAcceptor and ParallelReactor classes
|
||||||
|
- added EOF and error to FIFOBuffer
|
||||||
|
|
||||||
Release 1.5.0 (2012-10-14)
|
Release 1.5.0 (2012-10-14)
|
||||||
==========================
|
==========================
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ SET(PROJECT_VERSION ${COMPLETE_VERSION})
|
|||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
# Append our module directory to CMake
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
# Setup C/C++ compiler options
|
# Setup C/C++ compiler options
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@@ -50,10 +53,10 @@ endif ()
|
|||||||
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
# * MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
message(STATUS "Debug output enabled")
|
message(STATUS "Debug output enabled")
|
||||||
set(LIB_EXT "d" CACHE STRING "Set debug library postfix" FORCE)
|
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
|
||||||
else ()
|
else ()
|
||||||
message(STATUS "Optimized output enabled")
|
message(STATUS "Optimized output enabled")
|
||||||
set(LIB_EXT "" CACHE STRING "Set debug library postfix" FORCE)
|
set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Set debug library postfix" FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
option(ENABLE_TESTS
|
option(ENABLE_TESTS
|
||||||
@@ -67,6 +70,7 @@ option(POCO_UNBUNDLED
|
|||||||
|
|
||||||
# Uncomment from next two lines to force statitc or dynamic library, default is autodetection
|
# Uncomment from next two lines to force statitc or dynamic library, default is autodetection
|
||||||
if(POCO_STATIC)
|
if(POCO_STATIC)
|
||||||
|
add_definitions( -DPOCO_STATIC -DPOCO_NO_AUTOMATIC_LIBS)
|
||||||
set( LIB_MODE STATIC )
|
set( LIB_MODE STATIC )
|
||||||
message(STATUS "Building static libraries")
|
message(STATUS "Building static libraries")
|
||||||
else(POCO_STATIC)
|
else(POCO_STATIC)
|
||||||
@@ -97,9 +101,9 @@ include(FindCygwin)
|
|||||||
include(FindOpenSSL)
|
include(FindOpenSSL)
|
||||||
#include(CMakeDetermineCompilerId)
|
#include(CMakeDetermineCompilerId)
|
||||||
|
|
||||||
include(contrib/cmake/FindMySQL.cmake)
|
include(FindMySQL)
|
||||||
include(contrib/cmake/FindAPR.cmake)
|
include(FindAPR)
|
||||||
include(contrib/cmake/FindApache2.cmake)
|
include(FindApache2)
|
||||||
|
|
||||||
# OS Detection
|
# OS Detection
|
||||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
@@ -143,6 +147,11 @@ if (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
|||||||
add_definitions( -D_BSD_SOURCE -library=stlport4)
|
add_definitions( -D_BSD_SOURCE -library=stlport4)
|
||||||
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
endif (${CMAKE_CXX_COMPILER_ID} MATCHES "SunPro")
|
||||||
|
|
||||||
|
# iOS
|
||||||
|
if (IOS)
|
||||||
|
add_definitions( -DPOCO_HAVE_IPv6 -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_STAT64 -DPOCO_NO_SHAREDLIBS -DPOCO_NO_NET_IFTYPES )
|
||||||
|
endif(IOS)
|
||||||
|
|
||||||
IF (ENABLE_TESTS)
|
IF (ENABLE_TESTS)
|
||||||
add_subdirectory(CppUnit)
|
add_subdirectory(CppUnit)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
@@ -173,7 +182,7 @@ endif(APRUTIL_FOUND AND APACHE_FOUND)
|
|||||||
#############################################################
|
#############################################################
|
||||||
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
# Uninstall stuff see: http://www.vtk.org/Wiki/CMake_FAQ
|
||||||
CONFIGURE_FILE(
|
CONFIGURE_FILE(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/contrib/cmake/cmake_uninstall.cmake.in"
|
"${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||||
IMMEDIATE @ONLY)
|
IMMEDIATE @ONLY)
|
||||||
|
|
||||||
|
|||||||
44
CONTRIBUTORS
44
CONTRIBUTORS
@@ -1,29 +1,35 @@
|
|||||||
Guenter Obiltschnig <guenter.obiltschnig@appinf.com>
|
Guenter Obiltschnig
|
||||||
Alex Fabijanic <alex@pocoproject.org>
|
Alex Fabijanic
|
||||||
Peter Schojer <peter.schojer@appinf.com>
|
Peter Schojer
|
||||||
Ferdinand Beyer <fbeyer@users.sourceforge.net>
|
Ferdinand Beyer
|
||||||
Krzysztof Burghardt <burghardt@users.sourceforge.net>
|
Krzysztof Burghardt
|
||||||
Claus Dabringer <claus.dabringer@appinf.com>
|
Claus Dabringer
|
||||||
Caleb Epstein <caleb.epstein@gmail.com>
|
Caleb Epstein
|
||||||
Eran Hammer-Lahav <therazorblade@users.sourceforge.net>
|
Eran Hammer-Lahav
|
||||||
Chris Johnson <devcjohnson@gmail.com>
|
Chris Johnson
|
||||||
Sergey Kholodilov <serghol@gmail.com>
|
Sergey Kholodilov
|
||||||
Ryan Kraay <rkraay@users.sourceforge.net>
|
Ryan Kraay
|
||||||
Larry Lewis <lewislp@users.sourceforge.net>
|
Larry Lewis
|
||||||
Andrew J. P. Maclean <a.maclean@optusnet.com.au>
|
Andrew J. P. Maclean
|
||||||
Andrew Marlow <public@marlowa.plus.com>
|
Andrew Marlow
|
||||||
Paschal Mushubi <mushubi@sympatico.ca>
|
Paschal Mushubi
|
||||||
Jiang Shan <pasorobo@users.sourceforge.net>
|
Jiang Shan
|
||||||
David Shawley <boredc0der@users.sourceforge.net>
|
David Shawley
|
||||||
Sergey Skorokhodov <ryppka@users.sourceforge.net>
|
Sergey Skorokhodov
|
||||||
Tom Tan
|
Tom Tan
|
||||||
Sergey N. Yatskevich <snc@begun.ru>
|
Sergey N. Yatskevich
|
||||||
Marc Chevrier
|
Marc Chevrier
|
||||||
Philippe Cuvillier
|
Philippe Cuvillier
|
||||||
Marian Krivos
|
Marian Krivos
|
||||||
Franky Braem
|
Franky Braem
|
||||||
Philip Prindeville
|
Philip Prindeville
|
||||||
Anton Yabchinskiy
|
Anton Yabchinskiy
|
||||||
|
Rangel Reale
|
||||||
|
Fabrizio Duhem
|
||||||
|
Patrick White
|
||||||
|
Mike Naquin
|
||||||
|
Roger Meier
|
||||||
|
Mathaus Mendel
|
||||||
|
|
||||||
--
|
--
|
||||||
$Id$
|
$Id$
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CppToken.h
|
// CppToken.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/CppToken.h#1 $
|
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/CppToken.h#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: CppParser
|
// Package: CppParser
|
||||||
@@ -134,7 +134,9 @@ class CppParser_API IdentifierToken: public CppToken
|
|||||||
public:
|
public:
|
||||||
enum Keywords
|
enum Keywords
|
||||||
{
|
{
|
||||||
KW_AND = 1,
|
KW_ALIGNAS = 1,
|
||||||
|
KW_ALIGNOF,
|
||||||
|
KW_AND,
|
||||||
KW_AND_EQ,
|
KW_AND_EQ,
|
||||||
KW_ASM,
|
KW_ASM,
|
||||||
KW_AUTO,
|
KW_AUTO,
|
||||||
@@ -145,11 +147,15 @@ public:
|
|||||||
KW_CASE,
|
KW_CASE,
|
||||||
KW_CATCH,
|
KW_CATCH,
|
||||||
KW_CHAR,
|
KW_CHAR,
|
||||||
|
KW_CHAR_16T,
|
||||||
|
KW_CHAR_32T,
|
||||||
KW_CLASS,
|
KW_CLASS,
|
||||||
KW_COMPL,
|
KW_COMPL,
|
||||||
KW_CONST,
|
KW_CONST,
|
||||||
|
KW_CONSTEXPR,
|
||||||
KW_CONST_CAST,
|
KW_CONST_CAST,
|
||||||
KW_CONTINUE,
|
KW_CONTINUE,
|
||||||
|
KW_DECLTYPE,
|
||||||
KW_DEFAULT,
|
KW_DEFAULT,
|
||||||
KW_DELETE,
|
KW_DELETE,
|
||||||
KW_DO,
|
KW_DO,
|
||||||
@@ -172,8 +178,10 @@ public:
|
|||||||
KW_MUTABLE,
|
KW_MUTABLE,
|
||||||
KW_NAMESPACE,
|
KW_NAMESPACE,
|
||||||
KW_NEW,
|
KW_NEW,
|
||||||
|
KW_NOEXCEPT,
|
||||||
KW_NOT,
|
KW_NOT,
|
||||||
KW_NOT_EQ,
|
KW_NOT_EQ,
|
||||||
|
KW_NULLPTR,
|
||||||
KW_OPERATOR,
|
KW_OPERATOR,
|
||||||
KW_OR,
|
KW_OR,
|
||||||
KW_OR_EQ,
|
KW_OR_EQ,
|
||||||
@@ -187,11 +195,13 @@ public:
|
|||||||
KW_SIGNED,
|
KW_SIGNED,
|
||||||
KW_SIZEOF,
|
KW_SIZEOF,
|
||||||
KW_STATIC,
|
KW_STATIC,
|
||||||
|
KW_STATIC_ASSERT,
|
||||||
KW_STATIC_CAST,
|
KW_STATIC_CAST,
|
||||||
KW_STRUCT,
|
KW_STRUCT,
|
||||||
KW_SWITCH,
|
KW_SWITCH,
|
||||||
KW_TEMPLATE,
|
KW_TEMPLATE,
|
||||||
KW_THIS,
|
KW_THIS,
|
||||||
|
KW_THREAD_LOCAL,
|
||||||
KW_THROW,
|
KW_THROW,
|
||||||
KW_TRUE,
|
KW_TRUE,
|
||||||
KW_TRY,
|
KW_TRY,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Function.h
|
// Function.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Function.h#1 $
|
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Function.h#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: SymbolTable
|
// Package: SymbolTable
|
||||||
@@ -58,12 +58,17 @@ class CppParser_API Function: public Decl
|
|||||||
public:
|
public:
|
||||||
enum Flags
|
enum Flags
|
||||||
{
|
{
|
||||||
FN_STATIC = 1, /// The function is static.
|
FN_STATIC = 1, /// The function is static.
|
||||||
FN_VIRTUAL = 2, /// The function is virtual.
|
FN_VIRTUAL = 2, /// The function is virtual.
|
||||||
FN_INLINE = 4, /// The function is inline.
|
FN_INLINE = 4, /// The function is inline.
|
||||||
FN_CONST = 8, /// The function is const.
|
FN_CONST = 8, /// The function is const.
|
||||||
FN_TEMPLATE = 16, /// The function is a template.
|
FN_TEMPLATE = 16, /// The function is a template.
|
||||||
FN_PURE_VIRTUAL = 32 /// The function is pure virtual.
|
FN_PURE_VIRTUAL = 32, /// The function is pure virtual.
|
||||||
|
FN_FINAL = 64, /// The function is final.
|
||||||
|
FN_OVERRIDE = 128, /// The function is override.
|
||||||
|
FN_NOEXCEPT = 256, /// The function is noexcept.
|
||||||
|
FN_DEFAULT = 512, /// The function is default.
|
||||||
|
FN_DELETE = 1024 /// The function has been deleted.
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<Parameter*> Parameters;
|
typedef std::vector<Parameter*> Parameters;
|
||||||
@@ -94,6 +99,21 @@ public:
|
|||||||
|
|
||||||
void makePureVirtual();
|
void makePureVirtual();
|
||||||
/// Sets the FN_PURE_VIRTUAL flag.
|
/// Sets the FN_PURE_VIRTUAL flag.
|
||||||
|
|
||||||
|
void makeFinal();
|
||||||
|
/// Sets the FN_FINAL flag.
|
||||||
|
|
||||||
|
void makeOverride();
|
||||||
|
/// Sets the FN_OVERRIDE flag.
|
||||||
|
|
||||||
|
void makeNoexcept();
|
||||||
|
/// Sets the FN_NOEXCEPT flag.
|
||||||
|
|
||||||
|
void makeDefault();
|
||||||
|
/// Sets the FN_DEFAULT flag.
|
||||||
|
|
||||||
|
void makeDelete();
|
||||||
|
/// Sets the FN_DELETE flag.
|
||||||
|
|
||||||
int flags() const;
|
int flags() const;
|
||||||
/// Returns the function's flags.
|
/// Returns the function's flags.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Struct.h
|
// Struct.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Struct.h#1 $
|
// $Id: //poco/1.4/CppParser/include/Poco/CppParser/Struct.h#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: SymbolTable
|
// Package: SymbolTable
|
||||||
@@ -61,7 +61,8 @@ public:
|
|||||||
{
|
{
|
||||||
FN_TEMPLATE = 1,
|
FN_TEMPLATE = 1,
|
||||||
FN_INLINE = 2, // when the whole class is inlined in a c++ file
|
FN_INLINE = 2, // when the whole class is inlined in a c++ file
|
||||||
FN_TEMPLATE_SPECIALIZATION = 4
|
FN_TEMPLATE_SPECIALIZATION = 4,
|
||||||
|
FN_FINAL = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Base
|
struct Base
|
||||||
@@ -115,10 +116,16 @@ public:
|
|||||||
|
|
||||||
void makeInline();
|
void makeInline();
|
||||||
/// Changes the class to a inline class, i.e. definition and implementation are hidden in a cpp file.
|
/// Changes the class to a inline class, i.e. definition and implementation are hidden in a cpp file.
|
||||||
|
|
||||||
|
void makeFinal();
|
||||||
|
/// Makes the class final.
|
||||||
|
|
||||||
bool isInline() const;
|
bool isInline() const;
|
||||||
/// Returns true if the complete class is inlined in a cpp file.
|
/// Returns true if the complete class is inlined in a cpp file.
|
||||||
|
|
||||||
|
bool isFinal() const;
|
||||||
|
/// Returns true if the class is final.
|
||||||
|
|
||||||
void constructors(Functions& functions) const;
|
void constructors(Functions& functions) const;
|
||||||
/// Returns all constructors, sorted by their parameter count.
|
/// Returns all constructors, sorted by their parameter count.
|
||||||
|
|
||||||
@@ -190,12 +197,24 @@ inline void Struct::makeInline()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Struct::makeFinal()
|
||||||
|
{
|
||||||
|
_flags |= FN_FINAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Struct::isInline() const
|
inline bool Struct::isInline() const
|
||||||
{
|
{
|
||||||
return (_flags & FN_INLINE) != 0;
|
return (_flags & FN_INLINE) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Struct::isFinal() const
|
||||||
|
{
|
||||||
|
return (_flags & FN_FINAL) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool Struct::isDerived() const
|
inline bool Struct::isDerived() const
|
||||||
{
|
{
|
||||||
return !_bases.empty();
|
return !_bases.empty();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CppToken.cpp
|
// CppToken.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/src/CppToken.cpp#2 $
|
// $Id: //poco/1.4/CppParser/src/CppToken.cpp#3 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: CppParser
|
// Package: CppParser
|
||||||
@@ -254,6 +254,8 @@ int OperatorToken::asInteger() const
|
|||||||
IdentifierToken::IdentifierToken()
|
IdentifierToken::IdentifierToken()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
_kwMap["alignas"] = i++;
|
||||||
|
_kwMap["alignof"] = i++;
|
||||||
_kwMap["and"] = i++;
|
_kwMap["and"] = i++;
|
||||||
_kwMap["and_eq"] = i++;
|
_kwMap["and_eq"] = i++;
|
||||||
_kwMap["asm"] = i++;
|
_kwMap["asm"] = i++;
|
||||||
@@ -265,11 +267,15 @@ IdentifierToken::IdentifierToken()
|
|||||||
_kwMap["case"] = i++;
|
_kwMap["case"] = i++;
|
||||||
_kwMap["catch"] = i++;
|
_kwMap["catch"] = i++;
|
||||||
_kwMap["char"] = i++;
|
_kwMap["char"] = i++;
|
||||||
|
_kwMap["char16_t"] = i++;
|
||||||
|
_kwMap["char32_t"] = i++;
|
||||||
_kwMap["class"] = i++;
|
_kwMap["class"] = i++;
|
||||||
_kwMap["compl"] = i++;
|
_kwMap["compl"] = i++;
|
||||||
_kwMap["const"] = i++;
|
_kwMap["const"] = i++;
|
||||||
|
_kwMap["constexpr"] = i++;
|
||||||
_kwMap["const_cast"] = i++;
|
_kwMap["const_cast"] = i++;
|
||||||
_kwMap["continue"] = i++;
|
_kwMap["continue"] = i++;
|
||||||
|
_kwMap["decltype"] = i++;
|
||||||
_kwMap["default"] = i++;
|
_kwMap["default"] = i++;
|
||||||
_kwMap["delete"] = i++;
|
_kwMap["delete"] = i++;
|
||||||
_kwMap["do"] = i++;
|
_kwMap["do"] = i++;
|
||||||
@@ -292,8 +298,10 @@ IdentifierToken::IdentifierToken()
|
|||||||
_kwMap["mutable"] = i++;
|
_kwMap["mutable"] = i++;
|
||||||
_kwMap["namespace"] = i++;
|
_kwMap["namespace"] = i++;
|
||||||
_kwMap["new"] = i++;
|
_kwMap["new"] = i++;
|
||||||
|
_kwMap["noexcept"] = i++;
|
||||||
_kwMap["not"] = i++;
|
_kwMap["not"] = i++;
|
||||||
_kwMap["not_eq"] = i++;
|
_kwMap["not_eq"] = i++;
|
||||||
|
_kwMap["nullptr"] = i++;
|
||||||
_kwMap["operator"] = i++;
|
_kwMap["operator"] = i++;
|
||||||
_kwMap["or"] = i++;
|
_kwMap["or"] = i++;
|
||||||
_kwMap["or_eq"] = i++;
|
_kwMap["or_eq"] = i++;
|
||||||
@@ -307,11 +315,13 @@ IdentifierToken::IdentifierToken()
|
|||||||
_kwMap["signed"] = i++;
|
_kwMap["signed"] = i++;
|
||||||
_kwMap["sizeof"] = i++;
|
_kwMap["sizeof"] = i++;
|
||||||
_kwMap["static"] = i++;
|
_kwMap["static"] = i++;
|
||||||
|
_kwMap["static_assert"] = i++;
|
||||||
_kwMap["static_cast"] = i++;
|
_kwMap["static_cast"] = i++;
|
||||||
_kwMap["struct"] = i++;
|
_kwMap["struct"] = i++;
|
||||||
_kwMap["switch"] = i++;
|
_kwMap["switch"] = i++;
|
||||||
_kwMap["template"] = i++;
|
_kwMap["template"] = i++;
|
||||||
_kwMap["this"] = i++;
|
_kwMap["this"] = i++;
|
||||||
|
_kwMap["thread_local"] = i++;
|
||||||
_kwMap["throw"] = i++;
|
_kwMap["throw"] = i++;
|
||||||
_kwMap["true"] = i++;
|
_kwMap["true"] = i++;
|
||||||
_kwMap["try"] = i++;
|
_kwMap["try"] = i++;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Function.cpp
|
// Function.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/src/Function.cpp#1 $
|
// $Id: //poco/1.4/CppParser/src/Function.cpp#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: SymbolTable
|
// Package: SymbolTable
|
||||||
@@ -128,6 +128,36 @@ void Function::makePureVirtual()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Function::makeFinal()
|
||||||
|
{
|
||||||
|
_flags |= FN_FINAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Function::makeOverride()
|
||||||
|
{
|
||||||
|
_flags |= FN_OVERRIDE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Function::makeNoexcept()
|
||||||
|
{
|
||||||
|
_flags |= FN_NOEXCEPT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Function::makeDefault()
|
||||||
|
{
|
||||||
|
_flags |= FN_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Function::makeDelete()
|
||||||
|
{
|
||||||
|
_flags |= FN_DELETE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Function::isConstructor() const
|
bool Function::isConstructor() const
|
||||||
{
|
{
|
||||||
return name() == nameSpace()->name();
|
return name() == nameSpace()->name();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Parser.cpp
|
// Parser.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/src/Parser.cpp#1 $
|
// $Id: //poco/1.4/CppParser/src/Parser.cpp#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: CppParser
|
// Package: CppParser
|
||||||
@@ -151,11 +151,13 @@ inline void Parser::append(std::string& decl, const std::string& token)
|
|||||||
}
|
}
|
||||||
decl.append(token);
|
decl.append(token);
|
||||||
if (token == "const"
|
if (token == "const"
|
||||||
|
|| token == "constexpr"
|
||||||
|| token == "static"
|
|| token == "static"
|
||||||
|| token == "mutable"
|
|| token == "mutable"
|
||||||
|| token == "inline"
|
|| token == "inline"
|
||||||
|| token == "volatile"
|
|| token == "volatile"
|
||||||
|| token == "register")
|
|| token == "register"
|
||||||
|
|| token == "thread_local")
|
||||||
decl.append(" ");
|
decl.append(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,6 +302,12 @@ const Token* Parser::parseClass(const Token* pNext, std::string& decl)
|
|||||||
else
|
else
|
||||||
syntaxError("class/struct name");
|
syntaxError("class/struct name");
|
||||||
pNext = next();
|
pNext = next();
|
||||||
|
bool isFinal = false;
|
||||||
|
if (isIdentifier(pNext) && pNext->asString() == "final")
|
||||||
|
{
|
||||||
|
pNext = next();
|
||||||
|
isFinal = true;
|
||||||
|
}
|
||||||
if (!isOperator(pNext, OperatorToken::OP_SEMICOLON))
|
if (!isOperator(pNext, OperatorToken::OP_SEMICOLON))
|
||||||
{
|
{
|
||||||
// if we have a template specialization the next token will be a <
|
// if we have a template specialization the next token will be a <
|
||||||
@@ -320,6 +328,7 @@ const Token* Parser::parseClass(const Token* pNext, std::string& decl)
|
|||||||
if (isOperator(pNext, OperatorToken::OP_COLON) || isOperator(pNext, OperatorToken::OP_OPENBRACE))
|
if (isOperator(pNext, OperatorToken::OP_COLON) || isOperator(pNext, OperatorToken::OP_OPENBRACE))
|
||||||
{
|
{
|
||||||
Struct* pClass = new Struct(decl, isClass, currentNameSpace());
|
Struct* pClass = new Struct(decl, isClass, currentNameSpace());
|
||||||
|
if (isFinal) pClass->makeFinal();
|
||||||
pushNameSpace(pClass, line);
|
pushNameSpace(pClass, line);
|
||||||
_access = access;
|
_access = access;
|
||||||
if (isOperator(pNext, OperatorToken::OP_COLON))
|
if (isOperator(pNext, OperatorToken::OP_COLON))
|
||||||
@@ -632,22 +641,44 @@ const Token* Parser::parseFunc(const Token* pNext, std::string& decl)
|
|||||||
pNext = parseParameters(pNext, pFunc);
|
pNext = parseParameters(pNext, pFunc);
|
||||||
expectOperator(pNext, OperatorToken::OP_CLOSPARENT, ")");
|
expectOperator(pNext, OperatorToken::OP_CLOSPARENT, ")");
|
||||||
pNext = next();
|
pNext = next();
|
||||||
if (isKeyword(pNext, IdentifierToken::KW_CONST))
|
while (pNext->is(Poco::Token::IDENTIFIER_TOKEN) || pNext->is(Poco::Token::KEYWORD_TOKEN))
|
||||||
{
|
{
|
||||||
if (pFunc) pFunc->makeConst();
|
if (isKeyword(pNext, IdentifierToken::KW_CONST))
|
||||||
pNext = next();
|
{
|
||||||
}
|
if (pFunc) pFunc->makeConst();
|
||||||
if (isKeyword(pNext, IdentifierToken::KW_THROW))
|
|
||||||
{
|
|
||||||
while (!isOperator(pNext, OperatorToken::OP_ASSIGN) && !isOperator(pNext, OperatorToken::OP_SEMICOLON) &&
|
|
||||||
!isOperator(pNext, OperatorToken::OP_OPENBRACE) && !isEOF(pNext))
|
|
||||||
pNext = next();
|
pNext = next();
|
||||||
|
}
|
||||||
|
if (isKeyword(pNext, IdentifierToken::KW_THROW))
|
||||||
|
{
|
||||||
|
while (!isOperator(pNext, OperatorToken::OP_ASSIGN) && !isOperator(pNext, OperatorToken::OP_SEMICOLON) &&
|
||||||
|
!isOperator(pNext, OperatorToken::OP_OPENBRACE) && !isEOF(pNext))
|
||||||
|
pNext = next();
|
||||||
|
}
|
||||||
|
else if (isKeyword(pNext, IdentifierToken::KW_NOEXCEPT))
|
||||||
|
{
|
||||||
|
if (pFunc) pFunc->makeNoexcept();
|
||||||
|
pNext = next();
|
||||||
|
}
|
||||||
|
else if (isIdentifier(pNext) && pNext->asString() == "override")
|
||||||
|
{
|
||||||
|
if (pFunc) pFunc->makeOverride();
|
||||||
|
pNext = next();
|
||||||
|
}
|
||||||
|
else if (isIdentifier(pNext) && pNext->asString() == "final")
|
||||||
|
{
|
||||||
|
if (pFunc) pFunc->makeFinal();
|
||||||
|
pNext = next();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isOperator(pNext, OperatorToken::OP_ASSIGN))
|
if (isOperator(pNext, OperatorToken::OP_ASSIGN))
|
||||||
{
|
{
|
||||||
pNext = next();
|
pNext = next();
|
||||||
if (!pNext->is(Token::INTEGER_LITERAL_TOKEN))
|
if (!pNext->is(Token::INTEGER_LITERAL_TOKEN) && !isKeyword(pNext, IdentifierToken::KW_DEFAULT) && !isKeyword(pNext, IdentifierToken::KW_DELETE))
|
||||||
syntaxError("0");
|
syntaxError("0, default or delete");
|
||||||
|
if (isKeyword(pNext, IdentifierToken::KW_DEFAULT))
|
||||||
|
pFunc->makeDefault();
|
||||||
|
else if (isKeyword(pNext, IdentifierToken::KW_DELETE))
|
||||||
|
pFunc->makeDelete();
|
||||||
pNext = next();
|
pNext = next();
|
||||||
if (pFunc) pFunc->makePureVirtual();
|
if (pFunc) pFunc->makePureVirtual();
|
||||||
expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
|
expectOperator(pNext, OperatorToken::OP_SEMICOLON, ";");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Symbol.cpp
|
// Symbol.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/src/Symbol.cpp#1 $
|
// $Id: //poco/1.4/CppParser/src/Symbol.cpp#2 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: SymbolTable
|
// Package: SymbolTable
|
||||||
@@ -160,8 +160,27 @@ std::string Symbol::extractName(const std::string& decl)
|
|||||||
if (pos == std::string::npos || (pos > 0 && decl[pos - 1] == '('))
|
if (pos == std::string::npos || (pos > 0 && decl[pos - 1] == '('))
|
||||||
pos = decl.size();
|
pos = decl.size();
|
||||||
--pos;
|
--pos;
|
||||||
// check for constant
|
// check for constant; start searching after template
|
||||||
std::string::size_type eqPos = decl.find('=');
|
std::string::size_type eqStart = 0;
|
||||||
|
if (decl.compare(0, 8, "template") == 0)
|
||||||
|
{
|
||||||
|
eqStart = 8;
|
||||||
|
while (std::isspace(decl[eqStart]) && eqStart < decl.size()) ++eqStart;
|
||||||
|
if (eqStart < decl.size() && decl[eqStart] == '<')
|
||||||
|
{
|
||||||
|
++eqStart;
|
||||||
|
int tc = 1;
|
||||||
|
while (tc > 0 && eqStart < decl.size())
|
||||||
|
{
|
||||||
|
if (decl[eqStart] == '<')
|
||||||
|
++tc;
|
||||||
|
else if (decl[eqStart] == '>')
|
||||||
|
--tc;
|
||||||
|
++eqStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::string::size_type eqPos = decl.find('=', eqStart);
|
||||||
if (eqPos != std::string::npos)
|
if (eqPos != std::string::npos)
|
||||||
{
|
{
|
||||||
// special case: default template parameter
|
// special case: default template parameter
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Utility.cpp
|
// Utility.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/CppParser/src/Utility.cpp#2 $
|
// $Id: //poco/1.4/CppParser/src/Utility.cpp#3 $
|
||||||
//
|
//
|
||||||
// Library: CppParser
|
// Library: CppParser
|
||||||
// Package: CppParser
|
// Package: CppParser
|
||||||
@@ -202,8 +202,14 @@ std::string Utility::preprocessFile(const std::string& file, const std::string&
|
|||||||
}
|
}
|
||||||
StringTokenizer tokenizer(popts, ",;\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
|
StringTokenizer tokenizer(popts, ",;\n", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
|
||||||
std::vector<std::string> args(tokenizer.begin(), tokenizer.end());
|
std::vector<std::string> args(tokenizer.begin(), tokenizer.end());
|
||||||
|
#ifdef _WIN32
|
||||||
|
std::string quotedFile("\"");
|
||||||
|
quotedFile += file;
|
||||||
|
quotedFile += "\"";
|
||||||
|
args.push_back(quotedFile);
|
||||||
|
#else
|
||||||
args.push_back(file);
|
args.push_back(file);
|
||||||
|
#endif
|
||||||
if (!path.empty())
|
if (!path.empty())
|
||||||
{
|
{
|
||||||
std::string newPath(Environment::get("PATH"));
|
std::string newPath(Environment::get("PATH"));
|
||||||
|
|||||||
@@ -4,6 +4,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
|||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs110.vcxproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppUnit", "CppUnit_vs110.vcxproj", "{138BB448-808A-4FE5-A66D-78D1F8770F59}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs110.vcxproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinTestRunner", "WinTestRunner\WinTestRunner_vs110.vcxproj", "{BA620CC4-0E7D-4B9D-88E2-6DBE5C51FCBD}"
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{138BB448-808A-4FE5-A66D-78D1F8770F59} = {138BB448-808A-4FE5-A66D-78D1F8770F59}
|
||||||
|
EndProjectSection
|
||||||
|
>>>>>>> develop
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|||||||
@@ -37,7 +37,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(CppUnit_API)
|
#if !defined(CppUnit_API)
|
||||||
#define CppUnit_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define CppUnit_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define CppUnit_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
set(LIBNAME "PocoCrypto")
|
set(LIBNAME "PocoCrypto")
|
||||||
|
<<<<<<< HEAD
|
||||||
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||||
|
=======
|
||||||
|
>>>>>>> develop
|
||||||
|
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
add_definitions(-D_USRDLL -DCrypto_EXPORTS)
|
add_definitions(-D_USRDLL -DCrypto_EXPORTS)
|
||||||
@@ -9,12 +12,21 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
set_target_properties( ${LIBNAME} PROPERTIES VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
|
|
||||||
#if(CMAKE_SYSTEM MATCHES "Windows")
|
#if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
|
<<<<<<< HEAD
|
||||||
# target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${LIB_EAY_RELEASE} ${OPENSSL_LIBRARIES} )
|
# target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${LIB_EAY_RELEASE} ${OPENSSL_LIBRARIES} )
|
||||||
#ELSE()
|
#ELSE()
|
||||||
# target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
# target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||||
#ENDIF()
|
#ENDIF()
|
||||||
|
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${OPENSSL_LIBRARIES} )
|
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} ${OPENSSL_LIBRARIES} )
|
||||||
|
=======
|
||||||
|
# target_link_libraries( ${LIBNAME} PocoFoundation ${LIB_EAY_RELEASE} ${OPENSSL_LIBRARIES} )
|
||||||
|
#ELSE()
|
||||||
|
# target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} )
|
||||||
|
#ENDIF()
|
||||||
|
|
||||||
|
target_link_libraries( ${LIBNAME} PocoFoundation ${OPENSSL_LIBRARIES} )
|
||||||
|
>>>>>>> develop
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
|||||||
60
Crypto/Crypto_vs110.sln
Normal file
60
Crypto/Crypto_vs110.sln
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2012
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto_vs110.vcxproj", "{EEEE7259-32E9-4D56-B023-C733940AB2A0}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0} = {EEEE7259-32E9-4D56-B023-C733940AB2A0}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|Win32 = debug_shared|Win32
|
||||||
|
release_shared|Win32 = release_shared|Win32
|
||||||
|
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||||
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
|
debug_static_md|Win32 = debug_static_md|Win32
|
||||||
|
release_static_md|Win32 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
=======
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
>>>>>>> develop
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|Win32">
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
@@ -32,37 +36,63 @@
|
|||||||
<RootNamespace>Crypto</RootNamespace>
|
<RootNamespace>Crypto</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
@@ -108,6 +138,82 @@
|
|||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoCryptomt</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoCryptomt</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
=======
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">..\bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">..\lib\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoCryptod</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoCryptomdd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoCryptomtd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoCrypto</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoCryptomd</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoCryptomt</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<ReferencePath>$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib</ReferencePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<ReferencePath>$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib</ReferencePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<ReferencePath>$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib</ReferencePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<ReferencePath>$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib</ReferencePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(IncludePath)</IncludePath>
|
||||||
|
<ReferencePath>$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib</ReferencePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib\VC;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);;C:\OpenSSL\lib</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -120,7 +226,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@@ -138,7 +248,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -153,9 +267,15 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -172,7 +292,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -185,7 +309,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<ProgramDataBaseFileName>..\lib\PocoCryptomtd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoCryptomtd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
@@ -196,7 +324,11 @@
|
|||||||
<OutputFile>..\lib\PocoCryptomtd.lib</OutputFile>
|
<OutputFile>..\lib\PocoCryptomtd.lib</OutputFile>
|
||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -211,9 +343,15 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -221,7 +359,11 @@
|
|||||||
<OutputFile>..\lib\PocoCryptomt.lib</OutputFile>
|
<OutputFile>..\lib\PocoCryptomt.lib</OutputFile>
|
||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -234,7 +376,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<ProgramDataBaseFileName>..\lib\PocoCryptomdd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoCryptomdd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
@@ -245,7 +391,11 @@
|
|||||||
<OutputFile>..\lib\PocoCryptomdd.lib</OutputFile>
|
<OutputFile>..\lib\PocoCryptomdd.lib</OutputFile>
|
||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -260,10 +410,17 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<ProgramDataBaseFileName>..\lib\PocoCryptomd.pdb</ProgramDataBaseFileName>
|
<ProgramDataBaseFileName>..\lib\PocoCryptomd.pdb</ProgramDataBaseFileName>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<ProgramDataBaseFileName>..\lib\PocoCryptomd.pdb</ProgramDataBaseFileName>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -273,6 +430,7 @@
|
|||||||
</Lib>
|
</Lib>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ClInclude Include="include\Poco\Crypto\Cipher.h"/>
|
<ClInclude Include="include\Poco\Crypto\Cipher.h"/>
|
||||||
<ClInclude Include="include\Poco\Crypto\CipherFactory.h"/>
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h"/>
|
||||||
<ClInclude Include="include\Poco\Crypto\CipherImpl.h"/>
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h"/>
|
||||||
@@ -311,3 +469,43 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
</Project>
|
</Project>
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Cipher.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherFactory.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKey.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CipherKeyImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoStream.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\CryptoTransform.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSACipherImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSADigestEngine.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKey.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\RSAKeyImpl.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\X509Certificate.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\Crypto.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\OpenSSLInitializer.h" />
|
||||||
|
<ClInclude Include="include\Poco\Crypto\DigestEngine.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\Cipher.cpp" />
|
||||||
|
<ClCompile Include="src\CipherFactory.cpp" />
|
||||||
|
<ClCompile Include="src\CipherImpl.cpp" />
|
||||||
|
<ClCompile Include="src\CipherKey.cpp" />
|
||||||
|
<ClCompile Include="src\CipherKeyImpl.cpp" />
|
||||||
|
<ClCompile Include="src\CryptoStream.cpp" />
|
||||||
|
<ClCompile Include="src\CryptoTransform.cpp" />
|
||||||
|
<ClCompile Include="src\RSACipherImpl.cpp" />
|
||||||
|
<ClCompile Include="src\RSADigestEngine.cpp" />
|
||||||
|
<ClCompile Include="src\RSAKey.cpp" />
|
||||||
|
<ClCompile Include="src\RSAKeyImpl.cpp" />
|
||||||
|
<ClCompile Include="src\X509Certificate.cpp" />
|
||||||
|
<ClCompile Include="src\OpenSSLInitializer.cpp" />
|
||||||
|
<ClCompile Include="src\DigestEngine.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="..\DLLVersion.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
||||||
|
>>>>>>> develop
|
||||||
|
|||||||
60
Crypto/Crypto_x64_vs110.sln
Normal file
60
Crypto/Crypto_x64_vs110.sln
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crypto", "Crypto_x64_vs110.vcxproj", "{EEEE7259-32E9-4D56-B023-C733940AB2A0}"
|
||||||
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs110.vcxproj", "{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0} = {EEEE7259-32E9-4D56-B023-C733940AB2A0}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
debug_shared|x64 = debug_shared|x64
|
||||||
|
release_shared|x64 = release_shared|x64
|
||||||
|
debug_static_mt|x64 = debug_static_mt|x64
|
||||||
|
release_static_mt|x64 = release_static_mt|x64
|
||||||
|
debug_static_md|x64 = debug_static_md|x64
|
||||||
|
release_static_md|x64 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{EEEE7259-32E9-4D56-B023-C733940AB2A0}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Build.0 = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||||
|
{C1B1BB96-5198-48EB-AB48-9A0A0B54FB15}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -90,7 +90,11 @@ enum RSAPaddingMode
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(Crypto_API)
|
#if !defined(Crypto_API)
|
||||||
#define Crypto_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define Crypto_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define Crypto_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ objects = genrsakey
|
|||||||
|
|
||||||
target = genrsakey
|
target = genrsakey
|
||||||
target_version = 1
|
target_version = 1
|
||||||
target_libs = PocoCrypto PocoUtil PocoXML PocoFoundation
|
target_libs = PocoCrypto PocoUtil PocoJSON PocoXML PocoFoundation
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/exec
|
include $(POCO_BASE)/build/rules/exec
|
||||||
|
|
||||||
|
ifdef POCO_UNBUNDLED
|
||||||
|
SYSLIBS += -lpcre -lexpat
|
||||||
|
endif
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ ifeq ($(POCO_CONFIG),FreeBSD)
|
|||||||
SYSLIBS += -lssl -lcrypto -lz
|
SYSLIBS += -lssl -lcrypto -lz
|
||||||
else
|
else
|
||||||
SYSLIBS += -lssl -lcrypto -lz -ldl
|
SYSLIBS += -lssl -lcrypto -lz -ldl
|
||||||
|
ifeq ($(POCO_CONFIG),Linux)
|
||||||
|
SYSLIBS += -lkrb5
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
objects = CryptoTestSuite Driver \
|
objects = CryptoTestSuite Driver \
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
=======
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
>>>>>>> develop
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="debug_shared|Win32">
|
<ProjectConfiguration Include="debug_shared|Win32">
|
||||||
@@ -32,43 +36,69 @@
|
|||||||
<RootNamespace>TestSuite</RootNamespace>
|
<RootNamespace>TestSuite</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Static</UseOfMfc>
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Static</UseOfMfc>
|
<UseOfMfc>Static</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
=======
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||||
|
>>>>>>> develop
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<UseOfMfc>Dynamic</UseOfMfc>
|
<UseOfMfc>Dynamic</UseOfMfc>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<PlatformToolset>v110</PlatformToolset>
|
<PlatformToolset>v110</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||||
<ImportGroup Label="ExtensionSettings"/>
|
<ImportGroup Label="ExtensionSettings"/>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
@@ -118,6 +148,87 @@
|
|||||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
=======
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings" />
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||||
|
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">bin\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">bin\static_mt\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">false</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</LinkIncremental>
|
||||||
|
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">bin\static_md\</OutDir>
|
||||||
|
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||||
|
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">false</LinkIncremental>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">TestSuited</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">TestSuite</TargetName>
|
||||||
|
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">TestSuite</TargetName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;C:\OpenSSL\lib\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;C:\OpenSSL\lib\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;C:\OpenSSL\lib\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;C:\OpenSSL\lib\static;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
<ExecutablePath>$(ExecutablePath)</ExecutablePath>
|
||||||
|
<IncludePath>C:\OpenSSL\include;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<LibraryPath>C:\OpenSSL\lib;$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSDK_LibraryPath_x86);</LibraryPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -130,7 +241,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@@ -147,7 +262,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -162,9 +281,15 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -179,7 +304,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -192,7 +321,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@@ -210,7 +343,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -225,9 +362,15 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -243,7 +386,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\include;..\..\CppUnit\include;..\..\CppUnit\WinTestRunner\include;..\..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
@@ -256,7 +403,11 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
>>>>>>> develop
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
@@ -273,7 +424,11 @@
|
|||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
=======
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
@@ -288,9 +443,15 @@
|
|||||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||||
|
<<<<<<< HEAD
|
||||||
<PrecompiledHeader/>
|
<PrecompiledHeader/>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat/>
|
<DebugInformationFormat/>
|
||||||
|
=======
|
||||||
|
<PrecompiledHeader />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<DebugInformationFormat />
|
||||||
|
>>>>>>> develop
|
||||||
<CompileAs>Default</CompileAs>
|
<CompileAs>Default</CompileAs>
|
||||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -306,6 +467,7 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<<<<<<< HEAD
|
||||||
<ClInclude Include="src\CryptoTest.h"/>
|
<ClInclude Include="src\CryptoTest.h"/>
|
||||||
<ClInclude Include="src\DigestEngineTest.h"/>
|
<ClInclude Include="src\DigestEngineTest.h"/>
|
||||||
<ClInclude Include="src\RSATest.h"/>
|
<ClInclude Include="src\RSATest.h"/>
|
||||||
@@ -321,3 +483,20 @@
|
|||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||||
<ImportGroup Label="ExtensionTargets"/>
|
<ImportGroup Label="ExtensionTargets"/>
|
||||||
</Project>
|
</Project>
|
||||||
|
=======
|
||||||
|
<ClInclude Include="src\CryptoTest.h" />
|
||||||
|
<ClInclude Include="src\DigestEngineTest.h" />
|
||||||
|
<ClInclude Include="src\RSATest.h" />
|
||||||
|
<ClInclude Include="src\CryptoTestSuite.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="src\DigestEngineTest.cpp" />
|
||||||
|
<ClCompile Include="src\CryptoTest.cpp" />
|
||||||
|
<ClCompile Include="src\RSATest.cpp" />
|
||||||
|
<ClCompile Include="src\CryptoTestSuite.cpp" />
|
||||||
|
<ClCompile Include="src\WinDriver.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
</Project>
|
||||||
|
>>>>>>> develop
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
#include "afxres.h"
|
#include "afxres.h"
|
||||||
|
|
||||||
#define POCO_VERSION 1,5,0,0
|
#define POCO_VERSION 1,5,1,0
|
||||||
#define POCO_VERSION_STR "1.5.0"
|
#define POCO_VERSION_STR "1.5.1"
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION POCO_VERSION
|
FILEVERSION POCO_VERSION
|
||||||
@@ -28,7 +28,7 @@ BEGIN
|
|||||||
VALUE "FileDescription", "This file is part of the POCO C++ Libraries."
|
VALUE "FileDescription", "This file is part of the POCO C++ Libraries."
|
||||||
VALUE "FileVersion", POCO_VERSION_STR
|
VALUE "FileVersion", POCO_VERSION_STR
|
||||||
VALUE "InternalName", "POCO"
|
VALUE "InternalName", "POCO"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2006-2012, Applied Informatics Software Engineering GmbH and Contributors."
|
VALUE "LegalCopyright", "Copyright (C) 2004-2013, Applied Informatics Software Engineering GmbH and Contributors."
|
||||||
VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org"
|
VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org"
|
||||||
VALUE "ProductVersion", POCO_VERSION_STR
|
VALUE "ProductVersion", POCO_VERSION_STR
|
||||||
END
|
END
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
set(LIBNAME "PocoData")
|
set(LIBNAME "PocoData")
|
||||||
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
@@ -13,7 +12,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoFoundation${LIB_EXT} )
|
target_link_libraries( ${LIBNAME} PocoFoundation)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
@@ -32,7 +31,7 @@ if(MYSQL_FOUND)
|
|||||||
add_subdirectory( MySQL )
|
add_subdirectory( MySQL )
|
||||||
endif(MYSQL_FOUND)
|
endif(MYSQL_FOUND)
|
||||||
|
|
||||||
include(../contrib/cmake/FindODBC.cmake)
|
include(FindODBC)
|
||||||
|
|
||||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||||
message(STATUS "Windows native ODBC Support Enabled")
|
message(STATUS "Windows native ODBC Support Enabled")
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
set(LIBNAME "PocoDataMySQL")
|
set(LIBNAME "PocoDataMySQL")
|
||||||
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
|
||||||
|
|
||||||
set(SRCS "")
|
set(SRCS "")
|
||||||
aux_source_directory(src SRCS)
|
aux_source_directory(src SRCS)
|
||||||
@@ -13,7 +12,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT} ${MYSQL_LIB})
|
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${MYSQL_LIB})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
|||||||
@@ -39,13 +39,25 @@
|
|||||||
#ifndef Data_MySQL_Connector_INCLUDED
|
#ifndef Data_MySQL_Connector_INCLUDED
|
||||||
#define Data_MySQL_Connector_INCLUDED
|
#define Data_MySQL_Connector_INCLUDED
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
#include "MySQL.h"
|
#include "MySQL.h"
|
||||||
#include "Poco/Data/Connector.h"
|
#include "Poco/Data/Connector.h"
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
#include "MySQL.h"
|
||||||
|
#include "Poco/Data/Connector.h"
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace Data {
|
namespace Data {
|
||||||
namespace MySQL {
|
namespace MySQL {
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
class MySQL_API Connector: public Poco::Data::Connector
|
class MySQL_API Connector: public Poco::Data::Connector
|
||||||
/// Connector instantiates MySQL SessionImpl objects.
|
/// Connector instantiates MySQL SessionImpl objects.
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,7 +61,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(MySQL_API)
|
#if !defined(MySQL_API)
|
||||||
#define MySQL_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define MySQL_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define MySQL_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,16 @@ namespace
|
|||||||
case MYSQL_TYPE_LONGLONG:
|
case MYSQL_TYPE_LONGLONG:
|
||||||
if (unsig) return Poco::Data::MetaColumn::FDT_UINT64;
|
if (unsig) return Poco::Data::MetaColumn::FDT_UINT64;
|
||||||
return Poco::Data::MetaColumn::FDT_INT64;
|
return Poco::Data::MetaColumn::FDT_INT64;
|
||||||
|
|
||||||
|
case MYSQL_TYPE_DATE:
|
||||||
|
return Poco::Data::MetaColumn::FDT_DATE;
|
||||||
|
|
||||||
|
case MYSQL_TYPE_TIME:
|
||||||
|
return Poco::Data::MetaColumn::FDT_TIME;
|
||||||
|
|
||||||
|
case MYSQL_TYPE_DATETIME:
|
||||||
|
return Poco::Data::MetaColumn::FDT_TIMESTAMP;
|
||||||
|
|
||||||
case MYSQL_TYPE_STRING:
|
case MYSQL_TYPE_STRING:
|
||||||
case MYSQL_TYPE_VAR_STRING:
|
case MYSQL_TYPE_VAR_STRING:
|
||||||
return Poco::Data::MetaColumn::FDT_STRING;
|
return Poco::Data::MetaColumn::FDT_STRING;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// MySQLException.cpp
|
// SessionImpl.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.4/Data/MySQL/src/SessionImpl.cpp#1 $
|
// $Id: //poco/1.4/Data/MySQL/src/SessionImpl.cpp#1 $
|
||||||
//
|
//
|
||||||
@@ -67,7 +67,7 @@ const std::string SessionImpl::MYSQL_SERIALIZABLE = "SERIALIZABLE";
|
|||||||
|
|
||||||
|
|
||||||
SessionImpl::SessionImpl(const std::string& connectionString, std::size_t loginTimeout) :
|
SessionImpl::SessionImpl(const std::string& connectionString, std::size_t loginTimeout) :
|
||||||
Poco::Data::AbstractSessionImpl<SessionImpl>(toLower(connectionString), loginTimeout),
|
Poco::Data::AbstractSessionImpl<SessionImpl>(connectionString, loginTimeout),
|
||||||
_handle(0),
|
_handle(0),
|
||||||
_connected(false),
|
_connected(false),
|
||||||
_inTransaction(false)
|
_inTransaction(false)
|
||||||
|
|||||||
@@ -417,6 +417,19 @@ void MySQLTest::testEmptyDB()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MySQLTest::testDateTime()
|
||||||
|
{
|
||||||
|
if (!_pSession) fail ("Test not available.");
|
||||||
|
|
||||||
|
recreatePersonDateTimeTable();
|
||||||
|
_pExecutor->dateTime();
|
||||||
|
recreatePersonDateTable();
|
||||||
|
_pExecutor->date();
|
||||||
|
recreatePersonTimeTable();
|
||||||
|
_pExecutor->time();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MySQLTest::testBLOB()
|
void MySQLTest::testBLOB()
|
||||||
{
|
{
|
||||||
if (!_pSession) fail ("Test not available.");
|
if (!_pSession) fail ("Test not available.");
|
||||||
@@ -697,6 +710,33 @@ void MySQLTest::recreatePersonBLOBTable()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MySQLTest::recreatePersonDateTimeTable()
|
||||||
|
{
|
||||||
|
dropTable("Person");
|
||||||
|
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday DATETIME)", now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonDateTimeTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MySQLTest::recreatePersonDateTable()
|
||||||
|
{
|
||||||
|
dropTable("Person");
|
||||||
|
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday DATE)", now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonDateTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MySQLTest::recreatePersonTimeTable()
|
||||||
|
{
|
||||||
|
dropTable("Person");
|
||||||
|
try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday TIME)", now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonTimeTable()"); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void MySQLTest::recreateIntsTable()
|
void MySQLTest::recreateIntsTable()
|
||||||
{
|
{
|
||||||
dropTable("Strings");
|
dropTable("Strings");
|
||||||
@@ -833,6 +873,7 @@ CppUnit::Test* MySQLTest::suite()
|
|||||||
CppUnit_addTest(pSuite, MySQLTest, testIllegalRange);
|
CppUnit_addTest(pSuite, MySQLTest, testIllegalRange);
|
||||||
CppUnit_addTest(pSuite, MySQLTest, testSingleSelect);
|
CppUnit_addTest(pSuite, MySQLTest, testSingleSelect);
|
||||||
CppUnit_addTest(pSuite, MySQLTest, testEmptyDB);
|
CppUnit_addTest(pSuite, MySQLTest, testEmptyDB);
|
||||||
|
CppUnit_addTest(pSuite, MySQLTest, testDateTime);
|
||||||
//CppUnit_addTest(pSuite, MySQLTest, testBLOB);
|
//CppUnit_addTest(pSuite, MySQLTest, testBLOB);
|
||||||
CppUnit_addTest(pSuite, MySQLTest, testBLOBStmt);
|
CppUnit_addTest(pSuite, MySQLTest, testBLOBStmt);
|
||||||
CppUnit_addTest(pSuite, MySQLTest, testFloat);
|
CppUnit_addTest(pSuite, MySQLTest, testFloat);
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
void testIllegalRange();
|
void testIllegalRange();
|
||||||
void testSingleSelect();
|
void testSingleSelect();
|
||||||
void testEmptyDB();
|
void testEmptyDB();
|
||||||
|
void testDateTime();
|
||||||
void testBLOB();
|
void testBLOB();
|
||||||
void testBLOBStmt();
|
void testBLOBStmt();
|
||||||
|
|
||||||
@@ -129,6 +129,9 @@ private:
|
|||||||
void dropTable(const std::string& tableName);
|
void dropTable(const std::string& tableName);
|
||||||
void recreatePersonTable();
|
void recreatePersonTable();
|
||||||
void recreatePersonBLOBTable();
|
void recreatePersonBLOBTable();
|
||||||
|
void recreatePersonDateTimeTable();
|
||||||
|
void recreatePersonDateTable();
|
||||||
|
void recreatePersonTimeTable();
|
||||||
void recreateStringsTable();
|
void recreateStringsTable();
|
||||||
void recreateIntsTable();
|
void recreateIntsTable();
|
||||||
void recreateFloatsTable();
|
void recreateFloatsTable();
|
||||||
|
|||||||
@@ -35,9 +35,12 @@
|
|||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
#include "Poco/Tuple.h"
|
#include "Poco/Tuple.h"
|
||||||
|
#include "Poco/DateTime.h"
|
||||||
#include "Poco/Any.h"
|
#include "Poco/Any.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Poco/Data/LOB.h"
|
#include "Poco/Data/LOB.h"
|
||||||
|
#include "Poco/Data/Date.h"
|
||||||
|
#include "Poco/Data/Time.h"
|
||||||
#include "Poco/Data/StatementImpl.h"
|
#include "Poco/Data/StatementImpl.h"
|
||||||
#include "Poco/Data/RecordSet.h"
|
#include "Poco/Data/RecordSet.h"
|
||||||
#include "Poco/Data/Transaction.h"
|
#include "Poco/Data/Transaction.h"
|
||||||
@@ -58,6 +61,7 @@ using Poco::Data::MySQL::ConnectionException;
|
|||||||
using Poco::Data::MySQL::StatementException;
|
using Poco::Data::MySQL::StatementException;
|
||||||
using Poco::format;
|
using Poco::format;
|
||||||
using Poco::Tuple;
|
using Poco::Tuple;
|
||||||
|
using Poco::DateTime;
|
||||||
using Poco::Any;
|
using Poco::Any;
|
||||||
using Poco::AnyCast;
|
using Poco::AnyCast;
|
||||||
using Poco::NotFoundException;
|
using Poco::NotFoundException;
|
||||||
@@ -119,7 +123,7 @@ public:
|
|||||||
pBinder->bind(pos++, obj.age, dir);
|
pBinder->bind(pos++, obj.age, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Person& obj, AbstractPreparator* pPrepare)
|
static void prepare(std::size_t pos, const Person& obj, AbstractPreparator* pPrepare)
|
||||||
{
|
{
|
||||||
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
||||||
poco_assert_dbg (pPrepare != 0);
|
poco_assert_dbg (pPrepare != 0);
|
||||||
@@ -1251,6 +1255,90 @@ void SQLExecutor::emptyDB()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SQLExecutor::dateTime()
|
||||||
|
{
|
||||||
|
std::string funct = "dateTime()";
|
||||||
|
std::string lastName("Bart");
|
||||||
|
std::string firstName("Simpson");
|
||||||
|
std::string address("Springfield");
|
||||||
|
DateTime birthday(1980, 4, 1, 5, 45, 12);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (count == 1);
|
||||||
|
|
||||||
|
DateTime bd;
|
||||||
|
assert (bd != birthday);
|
||||||
|
try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (bd == birthday);
|
||||||
|
|
||||||
|
std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SQLExecutor::date()
|
||||||
|
{
|
||||||
|
std::string funct = "date()";
|
||||||
|
std::string lastName("Bart");
|
||||||
|
std::string firstName("Simpson");
|
||||||
|
std::string address("Springfield");
|
||||||
|
Date birthday(1980, 4, 1);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (count == 1);
|
||||||
|
|
||||||
|
Date bd;
|
||||||
|
assert (bd != birthday);
|
||||||
|
try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (bd == birthday);
|
||||||
|
|
||||||
|
std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SQLExecutor::time()
|
||||||
|
{
|
||||||
|
std::string funct = "date()";
|
||||||
|
std::string lastName("Bart");
|
||||||
|
std::string firstName("Simpson");
|
||||||
|
std::string address("Springfield");
|
||||||
|
Time birthday(1, 2, 3);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (count == 1);
|
||||||
|
|
||||||
|
Time bd;
|
||||||
|
assert (bd != birthday);
|
||||||
|
try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; }
|
||||||
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
assert (bd == birthday);
|
||||||
|
|
||||||
|
std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLExecutor::blob(int bigSize)
|
void SQLExecutor::blob(int bigSize)
|
||||||
{
|
{
|
||||||
std::string funct = "blob()";
|
std::string funct = "blob()";
|
||||||
@@ -1295,6 +1383,7 @@ void SQLExecutor::blob(int bigSize)
|
|||||||
assert (res == big);
|
assert (res == big);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLExecutor::blobStmt()
|
void SQLExecutor::blobStmt()
|
||||||
{
|
{
|
||||||
std::string funct = "blobStmt()";
|
std::string funct = "blobStmt()";
|
||||||
@@ -1320,6 +1409,7 @@ void SQLExecutor::blobStmt()
|
|||||||
poco_assert (res == blob);
|
poco_assert (res == blob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLExecutor::tuples()
|
void SQLExecutor::tuples()
|
||||||
{
|
{
|
||||||
typedef Tuple<int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int> TupleType;
|
typedef Tuple<int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int> TupleType;
|
||||||
@@ -1338,6 +1428,7 @@ void SQLExecutor::tuples()
|
|||||||
assert (ret == t);
|
assert (ret == t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLExecutor::tupleVector()
|
void SQLExecutor::tupleVector()
|
||||||
{
|
{
|
||||||
typedef Tuple<int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int> TupleType;
|
typedef Tuple<int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int> TupleType;
|
||||||
@@ -1604,15 +1695,15 @@ void SQLExecutor::sessionTransaction(const std::string& connect)
|
|||||||
|
|
||||||
_pSession->begin();
|
_pSession->begin();
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
try { (*_pSession) << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { (*_pSession) << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -1620,31 +1711,31 @@ void SQLExecutor::sessionTransaction(const std::string& connect)
|
|||||||
_pSession->rollback();
|
_pSession->rollback();
|
||||||
assert (!_pSession->isTransaction());
|
assert (!_pSession->isTransaction());
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
assert (!_pSession->isTransaction());
|
assert (!_pSession->isTransaction());
|
||||||
|
|
||||||
_pSession->begin();
|
_pSession->begin();
|
||||||
try { (*_pSession) << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { (*_pSession) << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
_pSession->commit();
|
_pSession->commit();
|
||||||
assert (!_pSession->isTransaction());
|
assert (!_pSession->isTransaction());
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -1697,14 +1788,14 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
assert (trans.isActive());
|
assert (trans.isActive());
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
|
|
||||||
try { (*_pSession) << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { (*_pSession) << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
assert (trans.isActive());
|
assert (trans.isActive());
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -1713,7 +1804,7 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
}
|
}
|
||||||
assert (!_pSession->isTransaction());
|
assert (!_pSession->isTransaction());
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -1721,11 +1812,11 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
|
|
||||||
{
|
{
|
||||||
Transaction trans((*_pSession));
|
Transaction trans((*_pSession));
|
||||||
try { (*_pSession) << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { (*_pSession) << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
assert (_pSession->isTransaction());
|
assert (_pSession->isTransaction());
|
||||||
@@ -1733,34 +1824,34 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
trans.commit();
|
trans.commit();
|
||||||
assert (!_pSession->isTransaction());
|
assert (!_pSession->isTransaction());
|
||||||
assert (!trans.isActive());
|
assert (!trans.isActive());
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
|
|
||||||
_pSession->begin();
|
_pSession->begin();
|
||||||
try { (*_pSession) << "DELETE FROM PERSON", now; }
|
try { (*_pSession) << "DELETE FROM Person", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
_pSession->commit();
|
_pSession->commit();
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
std::string sql1 = format("INSERT INTO PERSON VALUES ('%s','%s','%s',%d)", lastNames[0], firstNames[0], addresses[0], ages[0]);
|
std::string sql1 = format("INSERT INTO Person VALUES ('%s','%s','%s',%d)", lastNames[0], firstNames[0], addresses[0], ages[0]);
|
||||||
std::string sql2 = format("INSERT INTO PERSON VALUES ('%s','%s','%s',%d)", lastNames[1], firstNames[1], addresses[1], ages[1]);
|
std::string sql2 = format("INSERT INTO Person VALUES ('%s','%s','%s',%d)", lastNames[1], firstNames[1], addresses[1], ages[1]);
|
||||||
std::vector<std::string> sql;
|
std::vector<std::string> sql;
|
||||||
sql.push_back(sql1);
|
sql.push_back(sql1);
|
||||||
sql.push_back(sql2);
|
sql.push_back(sql2);
|
||||||
@@ -1768,35 +1859,35 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
Transaction trans((*_pSession));
|
Transaction trans((*_pSession));
|
||||||
|
|
||||||
trans.execute(sql1, false);
|
trans.execute(sql1, false);
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (1 == count);
|
assert (1 == count);
|
||||||
trans.execute(sql2, false);
|
trans.execute(sql2, false);
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
trans.rollback();
|
trans.rollback();
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
|
|
||||||
trans.execute(sql);
|
trans.execute(sql);
|
||||||
|
|
||||||
local << "SELECT COUNT(*) FROM PERSON", into(locCount), now;
|
local << "SELECT COUNT(*) FROM Person", into(locCount), now;
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
|
|
||||||
try { (*_pSession) << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -1815,12 +1906,12 @@ void SQLExecutor::reconnect()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { (*_pSession) << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
try { (*_pSession) << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
try { (*_pSession) << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -1830,7 +1921,7 @@ void SQLExecutor::reconnect()
|
|||||||
assert (!_pSession->isConnected());
|
assert (!_pSession->isConnected());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
(*_pSession) << "SELECT LastName FROM PERSON", into(result), now;
|
(*_pSession) << "SELECT LastName FROM Person", into(result), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(NotConnectedException&){ }
|
catch(NotConnectedException&){ }
|
||||||
@@ -1838,7 +1929,7 @@ void SQLExecutor::reconnect()
|
|||||||
|
|
||||||
_pSession->open();
|
_pSession->open();
|
||||||
assert (_pSession->isConnected());
|
assert (_pSession->isConnected());
|
||||||
try { (*_pSession) << "SELECT Age FROM PERSON", into(count), now; }
|
try { (*_pSession) << "SELECT Age FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); }
|
||||||
assert (count == age);
|
assert (count == age);
|
||||||
|
|||||||
@@ -39,6 +39,10 @@
|
|||||||
#include "Poco/Data/MySQL/MySQL.h"
|
#include "Poco/Data/MySQL/MySQL.h"
|
||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
class SQLExecutor: public CppUnit::TestCase
|
class SQLExecutor: public CppUnit::TestCase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -101,7 +105,13 @@ public:
|
|||||||
|
|
||||||
void blob(int bigSize = 1024);
|
void blob(int bigSize = 1024);
|
||||||
void blobStmt();
|
void blobStmt();
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
|
=======
|
||||||
|
void dateTime();
|
||||||
|
void date();
|
||||||
|
void time();
|
||||||
|
>>>>>>> develop
|
||||||
void floats();
|
void floats();
|
||||||
void doubles();
|
void doubles();
|
||||||
void tuples();
|
void tuples();
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
set(LIBNAME "PocoDataODBC")
|
set(LIBNAME "PocoDataODBC")
|
||||||
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
src/Binder.cpp
|
src/Binder.cpp
|
||||||
@@ -26,7 +25,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
|||||||
set_target_properties( ${LIBNAME}
|
set_target_properties( ${LIBNAME}
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||||
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT} ${ODBC_LINK_FLAGS})
|
target_link_libraries( ${LIBNAME} PocoData PocoFoundation ${ODBC_LINK_FLAGS})
|
||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY include/Poco
|
DIRECTORY include/Poco
|
||||||
|
|||||||
@@ -61,6 +61,10 @@ else ifeq (0, $(shell test -e $(POCO_ODBC_LIB)/libiodbc$(LIBLINKEXT); echo $$?))
|
|||||||
SYSLIBS += -liodbc -liodbcinst
|
SYSLIBS += -liodbc -liodbcinst
|
||||||
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
COMMONFLAGS += -DPOCO_IODBC -I/usr/include/iodbc
|
||||||
|
|
||||||
|
# TODO: OSX >= 10.8 deprecated non-Unicode ODBC API functions, silence warnings until iODBC Unicode support
|
||||||
|
COMMONFLAGS += -Wno-deprecated-declarations
|
||||||
|
|
||||||
else
|
else
|
||||||
$(error No ODBC library found. Please install unixODBC or iODBC or specify POCO_ODBC_LIB and try again)
|
$(error No ODBC library found. Please install unixODBC or iODBC or specify POCO_ODBC_LIB and try again)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(ODBC_API)
|
#if !defined(ODBC_API)
|
||||||
#define ODBC_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define ODBC_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define ODBC_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ inline void makeUTF16(SQLCHAR* pSQLChar, SQLSMALLINT length, std::string& target
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength);
|
void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength);
|
||||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
/// Utility function for conversion from UTF-16 to UTF-8.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace Data {
|
namespace Data {
|
||||||
namespace ODBC {
|
namespace ODBC {
|
||||||
|
|
||||||
|
|
||||||
inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target)
|
inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target)
|
||||||
@@ -56,16 +56,15 @@ inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void makeUTF16(SQLCHAR* pSQLChar, SQLSMALLINT length, std::wstring& target)
|
inline void makeUTF8(Poco::Buffer<wchar_t>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
||||||
/// Utility function for conversion from UTF-8 to UTF-16.
|
/// Utility function for conversion from UTF-16 to UTF-8. Length is in bytes.
|
||||||
{
|
{
|
||||||
makeUTF16(pSQLChar, (SQLINTEGER) length, target);
|
if (buffer.sizeBytes() < length)
|
||||||
}
|
throw InvalidArgumentException("Specified length exceeds available length.");
|
||||||
|
else if ((length % 2) != 0)
|
||||||
|
throw InvalidArgumentException("Length must be an even number.");
|
||||||
|
|
||||||
|
length /= sizeof(wchar_t);
|
||||||
inline void makeUTF8(Poco::Buffer<wchar_t>& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
|
||||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
|
||||||
{
|
|
||||||
std::string result;
|
std::string result;
|
||||||
UnicodeConverter::toUTF8(buffer.begin(), length, result);
|
UnicodeConverter::toUTF8(buffer.begin(), length, result);
|
||||||
|
|
||||||
@@ -74,13 +73,6 @@ inline void makeUTF8(Poco::Buffer<wchar_t>& buffer, int length, SQLPOINTER pTarg
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void makeUTF8(Poco::Buffer<wchar_t>& buffer, int length, SQLPOINTER pTarget, SQLSMALLINT targetLength)
|
|
||||||
/// Utility function for conversion from UTF-16 to UTF-8.
|
|
||||||
{
|
|
||||||
makeUTF8(buffer, length, pTarget, (SQLINTEGER) targetLength);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::ODBC
|
} } } // namespace Poco::Data::ODBC
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ SessionImpl::SessionImpl(const std::string& connect,
|
|||||||
bool autoBind,
|
bool autoBind,
|
||||||
bool autoExtract):
|
bool autoExtract):
|
||||||
Poco::Data::AbstractSessionImpl<SessionImpl>(connect, loginTimeout),
|
Poco::Data::AbstractSessionImpl<SessionImpl>(connect, loginTimeout),
|
||||||
_connector(toLower(Connector::KEY)),
|
_connector(Connector::KEY),
|
||||||
_maxFieldSize(maxFieldSize),
|
_maxFieldSize(maxFieldSize),
|
||||||
_autoBind(autoBind),
|
_autoBind(autoBind),
|
||||||
_autoExtract(autoExtract),
|
_autoExtract(autoExtract),
|
||||||
@@ -73,7 +73,7 @@ SessionImpl::SessionImpl(const std::string& connect,
|
|||||||
bool enforceCapability,
|
bool enforceCapability,
|
||||||
bool autoBind,
|
bool autoBind,
|
||||||
bool autoExtract): Poco::Data::AbstractSessionImpl<SessionImpl>(connect),
|
bool autoExtract): Poco::Data::AbstractSessionImpl<SessionImpl>(connect),
|
||||||
_connector(toLower(Connector::KEY)),
|
_connector(Connector::KEY),
|
||||||
_maxFieldSize(maxFieldSize),
|
_maxFieldSize(maxFieldSize),
|
||||||
_autoBind(autoBind),
|
_autoBind(autoBind),
|
||||||
_autoExtract(autoExtract),
|
_autoExtract(autoExtract),
|
||||||
|
|||||||
@@ -72,14 +72,14 @@ void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::string& target)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
void makeUTF8(Poco::Buffer<SQLWCHAR>& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength)
|
||||||
{
|
{
|
||||||
UTF8Encoding utf8Encoding;
|
UTF8Encoding utf8Encoding;
|
||||||
UTF16Encoding utf16Encoding;
|
UTF16Encoding utf16Encoding;
|
||||||
TextConverter converter(utf16Encoding, utf8Encoding);
|
TextConverter converter(utf16Encoding, utf8Encoding);
|
||||||
|
|
||||||
std::string result;
|
std::string result;
|
||||||
if (0 != converter.convert(buffer.begin(), length * sizeof(SQLWCHAR), result))
|
if (0 != converter.convert(buffer.begin(), length, result))
|
||||||
throw DataFormatException("Error converting UTF-16 to UTF-8");
|
throw DataFormatException("Error converting UTF-16 to UTF-8");
|
||||||
|
|
||||||
std::memset(pTarget, 0, targetLength);
|
std::memset(pTarget, 0, targetLength);
|
||||||
@@ -103,7 +103,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
|||||||
iCol,
|
iCol,
|
||||||
iField,
|
iField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbCharAttr,
|
pcbCharAttr,
|
||||||
pNumAttr);
|
pNumAttr);
|
||||||
|
|
||||||
@@ -157,8 +157,8 @@ SQLRETURN SQLConnect(SQLHDBC hdbc,
|
|||||||
makeUTF16(szAuthStr, cbAuthStr, sqlPWD);
|
makeUTF16(szAuthStr, cbAuthStr, sqlPWD);
|
||||||
|
|
||||||
return SQLConnectW(hdbc,
|
return SQLConnectW(hdbc,
|
||||||
(SQLWCHAR*) sqlDSN.c_str(), cbDSN,
|
(SQLWCHAR*) sqlDSN.c_str(), cbDSN,
|
||||||
(SQLWCHAR*) sqlUID.c_str(), cbUID,
|
(SQLWCHAR*) sqlUID.c_str(), cbUID,
|
||||||
(SQLWCHAR*) sqlPWD.c_str(), cbAuthStr);
|
(SQLWCHAR*) sqlPWD.c_str(), cbAuthStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ SQLRETURN SQLDescribeCol(SQLHSTMT hstmt,
|
|||||||
pibScale,
|
pibScale,
|
||||||
pfNullable);
|
pfNullable);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbColName, szColName, cbColNameMax);
|
makeUTF8(buffer, *pcbColName * sizeof(SQLWCHAR), szColName, cbColNameMax);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@ SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc,
|
|||||||
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
||||||
fAttribute,
|
fAttribute,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(SQLWCHAR),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||||
@@ -293,7 +293,7 @@ SQLRETURN SQLGetDescField(SQLHDESC hdesc,
|
|||||||
iRecord,
|
iRecord,
|
||||||
iField,
|
iField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(SQLWCHAR),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||||
@@ -343,7 +343,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType,
|
|||||||
iRecord,
|
iRecord,
|
||||||
fDiagField,
|
fDiagField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbDiagInfo);
|
pcbDiagInfo);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
||||||
@@ -383,8 +383,8 @@ SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType,
|
|||||||
(SQLSMALLINT) bufErr.size(),
|
(SQLSMALLINT) bufErr.size(),
|
||||||
pcbErrorMsg);
|
pcbErrorMsg);
|
||||||
|
|
||||||
makeUTF8(bufState, stateLen, szSqlState, stateLen);
|
makeUTF8(bufState, stateLen * sizeof(SQLWCHAR), szSqlState, stateLen);
|
||||||
makeUTF8(bufErr, *pcbErrorMsg, szErrorMsg, cbErrorMsgMax);
|
makeUTF8(bufErr, *pcbErrorMsg * sizeof(SQLWCHAR), szErrorMsg, cbErrorMsgMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -462,11 +462,11 @@ SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt,
|
|||||||
return SQLGetStmtAttrW(hstmt,
|
return SQLGetStmtAttrW(hstmt,
|
||||||
fAttribute,
|
fAttribute,
|
||||||
(SQLPOINTER) buffer.begin(),
|
(SQLPOINTER) buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(SQLWCHAR),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
return SQLGetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax, pcbValue);
|
return SQLGetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax, pcbValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -505,7 +505,7 @@ SQLRETURN SQLGetInfo(SQLHDBC hdbc,
|
|||||||
SQLRETURN rc = SQLGetInfoW(hdbc,
|
SQLRETURN rc = SQLGetInfoW(hdbc,
|
||||||
fInfoType,
|
fInfoType,
|
||||||
(SQLPOINTER) buffer.begin(),
|
(SQLPOINTER) buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbInfoValue);
|
pcbInfoValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
||||||
@@ -595,8 +595,8 @@ SQLRETURN SQLDataSources(SQLHENV henv,
|
|||||||
(SQLSMALLINT) bufDesc.size(),
|
(SQLSMALLINT) bufDesc.size(),
|
||||||
pcbDesc);
|
pcbDesc);
|
||||||
|
|
||||||
makeUTF8(bufDSN, *pcbDSN, szDSN, cbDSNMax);
|
makeUTF8(bufDSN, *pcbDSN * sizeof(SQLWCHAR), szDSN, cbDSNMax);
|
||||||
makeUTF8(bufDesc, *pcbDesc, szDesc, cbDescMax);
|
makeUTF8(bufDesc, *pcbDesc * sizeof(SQLWCHAR), szDesc, cbDescMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -628,7 +628,7 @@ SQLRETURN SQLDriverConnect(SQLHDBC hdbc,
|
|||||||
pcbConnStrOut,
|
pcbConnStrOut,
|
||||||
fDriverCompletion);
|
fDriverCompletion);
|
||||||
|
|
||||||
makeUTF8(out, *pcbConnStrOut, pcbConnStrOut, cbConnStrOutMax);
|
makeUTF8(out, *pcbConnStrOut * sizeof(SQLWCHAR), pcbConnStrOut, cbConnStrOutMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -653,7 +653,7 @@ SQLRETURN SQLBrowseConnect(SQLHDBC hdbc,
|
|||||||
(SQLSMALLINT) bufConnStrOut.size(),
|
(SQLSMALLINT) bufConnStrOut.size(),
|
||||||
pcbConnStrOut);
|
pcbConnStrOut);
|
||||||
|
|
||||||
makeUTF8(bufConnStrOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax);
|
makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(SQLWCHAR), szConnStrOut, cbConnStrOutMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -710,7 +710,7 @@ SQLRETURN SQLNativeSql(SQLHDBC hdbc,
|
|||||||
(SQLINTEGER) bufSQLOut.size(),
|
(SQLINTEGER) bufSQLOut.size(),
|
||||||
pcbSqlStr);
|
pcbSqlStr);
|
||||||
|
|
||||||
makeUTF8(bufSQLOut, *pcbSqlStr, szSqlStr, cbSqlStrMax);
|
makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(SQLWCHAR), szSqlStr, cbSqlStrMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -787,8 +787,8 @@ SQLRETURN SQLDrivers(SQLHENV henv,
|
|||||||
(SQLSMALLINT) bufDriverAttr.size(),
|
(SQLSMALLINT) bufDriverAttr.size(),
|
||||||
pcbDrvrAttr);
|
pcbDrvrAttr);
|
||||||
|
|
||||||
makeUTF8(bufDriverDesc, *pcbDriverDesc, szDriverDesc, cbDriverDescMax);
|
makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(SQLWCHAR), szDriverDesc, cbDriverDescMax);
|
||||||
makeUTF8(bufDriverAttr, *pcbDrvrAttr, szDriverAttributes, cbDrvrAttrMax);
|
makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(SQLWCHAR), szDriverAttributes, cbDrvrAttrMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
|||||||
SQLUSMALLINT iCol,
|
SQLUSMALLINT iCol,
|
||||||
SQLUSMALLINT iField,
|
SQLUSMALLINT iField,
|
||||||
SQLPOINTER pCharAttr,
|
SQLPOINTER pCharAttr,
|
||||||
SQLSMALLINT cbCharAttrMax,
|
SQLSMALLINT cbCharAttrMax,
|
||||||
SQLSMALLINT* pcbCharAttr,
|
SQLSMALLINT* pcbCharAttr,
|
||||||
NumAttrPtrType pNumAttr)
|
NumAttrPtrType pNumAttr)
|
||||||
{
|
{
|
||||||
@@ -66,7 +66,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
|||||||
iCol,
|
iCol,
|
||||||
iField,
|
iField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(wchar_t),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbCharAttr,
|
pcbCharAttr,
|
||||||
pNumAttr);
|
pNumAttr);
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt,
|
|||||||
iCol,
|
iCol,
|
||||||
iField,
|
iField,
|
||||||
pCharAttr,
|
pCharAttr,
|
||||||
cbCharAttrMax,
|
cbCharAttrMax,
|
||||||
pcbCharAttr,
|
pcbCharAttr,
|
||||||
pNumAttr);
|
pNumAttr);
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ SQLRETURN SQLDescribeCol(SQLHSTMT hstmt,
|
|||||||
pibScale,
|
pibScale,
|
||||||
pfNullable);
|
pfNullable);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbColName, szColName, cbColNameMax);
|
makeUTF8(buffer, *pcbColName * sizeof(wchar_t), szColName, cbColNameMax);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc,
|
|||||||
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
SQLRETURN rc = SQLGetConnectAttrW(hdbc,
|
||||||
fAttribute,
|
fAttribute,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(wchar_t),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||||
@@ -263,7 +263,7 @@ SQLRETURN SQLGetDescField(SQLHDESC hdesc,
|
|||||||
iRecord,
|
iRecord,
|
||||||
iField,
|
iField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(wchar_t),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax);
|
||||||
@@ -312,7 +312,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType,
|
|||||||
iRecord,
|
iRecord,
|
||||||
fDiagField,
|
fDiagField,
|
||||||
buffer.begin(),
|
buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(wchar_t),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbDiagInfo);
|
pcbDiagInfo);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax);
|
||||||
@@ -351,8 +351,8 @@ SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType,
|
|||||||
(SQLSMALLINT) bufErr.size(),
|
(SQLSMALLINT) bufErr.size(),
|
||||||
pcbErrorMsg);
|
pcbErrorMsg);
|
||||||
|
|
||||||
makeUTF8(bufState, stateLen, szSqlState, stateLen);
|
makeUTF8(bufState, stateLen * sizeof(wchar_t), szSqlState, stateLen);
|
||||||
makeUTF8(bufErr, *pcbErrorMsg, szErrorMsg, cbErrorMsgMax);
|
makeUTF8(bufErr, *pcbErrorMsg * sizeof(wchar_t), szErrorMsg, cbErrorMsgMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -438,7 +438,7 @@ SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt,
|
|||||||
return SQLGetStmtAttrW(hstmt,
|
return SQLGetStmtAttrW(hstmt,
|
||||||
fAttribute,
|
fAttribute,
|
||||||
(SQLPOINTER) buffer.begin(),
|
(SQLPOINTER) buffer.begin(),
|
||||||
(SQLINTEGER) buffer.size() * sizeof(wchar_t),
|
(SQLINTEGER) buffer.sizeBytes(),
|
||||||
pcbValue);
|
pcbValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,7 +485,7 @@ SQLRETURN SQLGetInfo(SQLHDBC hdbc,
|
|||||||
SQLRETURN rc = SQLGetInfoW(hdbc,
|
SQLRETURN rc = SQLGetInfoW(hdbc,
|
||||||
fInfoType,
|
fInfoType,
|
||||||
(SQLPOINTER) buffer.begin(),
|
(SQLPOINTER) buffer.begin(),
|
||||||
(SQLSMALLINT) buffer.size() * sizeof(wchar_t),
|
(SQLSMALLINT) buffer.sizeBytes(),
|
||||||
pcbInfoValue);
|
pcbInfoValue);
|
||||||
|
|
||||||
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax);
|
||||||
@@ -579,8 +579,8 @@ SQLRETURN SQLDataSources(SQLHENV henv,
|
|||||||
(SQLSMALLINT) bufDesc.size(),
|
(SQLSMALLINT) bufDesc.size(),
|
||||||
pcbDesc);
|
pcbDesc);
|
||||||
|
|
||||||
makeUTF8(bufDSN, *pcbDSN, szDSN, cbDSNMax);
|
makeUTF8(bufDSN, *pcbDSN * sizeof(wchar_t), szDSN, cbDSNMax);
|
||||||
makeUTF8(bufDesc, *pcbDesc, szDesc, cbDescMax);
|
makeUTF8(bufDesc, *pcbDesc * sizeof(wchar_t), szDesc, cbDescMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -612,7 +612,7 @@ SQLRETURN SQLDriverConnect(SQLHDBC hdbc,
|
|||||||
pcbConnStrOut,
|
pcbConnStrOut,
|
||||||
fDriverCompletion);
|
fDriverCompletion);
|
||||||
|
|
||||||
makeUTF8(bufOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax);
|
makeUTF8(bufOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -637,7 +637,7 @@ SQLRETURN SQLBrowseConnect(SQLHDBC hdbc,
|
|||||||
(SQLSMALLINT) bufConnStrOut.size(),
|
(SQLSMALLINT) bufConnStrOut.size(),
|
||||||
pcbConnStrOut);
|
pcbConnStrOut);
|
||||||
|
|
||||||
makeUTF8(bufConnStrOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax);
|
makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -694,7 +694,7 @@ SQLRETURN SQLNativeSql(SQLHDBC hdbc,
|
|||||||
(SQLINTEGER) bufSQLOut.size(),
|
(SQLINTEGER) bufSQLOut.size(),
|
||||||
pcbSqlStr);
|
pcbSqlStr);
|
||||||
|
|
||||||
makeUTF8(bufSQLOut, *pcbSqlStr, szSqlStr, cbSqlStrMax);
|
makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(wchar_t), szSqlStr, cbSqlStrMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
@@ -771,8 +771,8 @@ SQLRETURN SQLDrivers(SQLHENV henv,
|
|||||||
(SQLSMALLINT) bufDriverAttr.size(),
|
(SQLSMALLINT) bufDriverAttr.size(),
|
||||||
pcbDrvrAttr);
|
pcbDrvrAttr);
|
||||||
|
|
||||||
makeUTF8(bufDriverDesc, *pcbDriverDesc, szDriverDesc, cbDriverDescMax);
|
makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(wchar_t), szDriverDesc, cbDriverDescMax);
|
||||||
makeUTF8(bufDriverAttr, *pcbDrvrAttr, szDriverAttributes, cbDrvrAttrMax);
|
makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(wchar_t), szDriverAttributes, cbDrvrAttrMax);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,14 +20,17 @@ include $(POCO_BASE)/Data/ODBC/ODBC.make
|
|||||||
# Note: #
|
# Note: #
|
||||||
# Do not change linking order or move this line up, these libs have to be linked in this order. #
|
# Do not change linking order or move this line up, these libs have to be linked in this order. #
|
||||||
##################################################################################################
|
##################################################################################################
|
||||||
SYSLIBS += -lltdl -ldl
|
SYSLIBS += -lltdl
|
||||||
|
ifneq ($(POCO_CONFIG),FreeBSD)
|
||||||
|
SYSLIBS += -ldl
|
||||||
|
endif
|
||||||
|
|
||||||
objects = ODBCTestSuite Driver \
|
objects = ODBCTestSuite Driver \
|
||||||
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \
|
||||||
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
ODBCSQLiteTest ODBCSQLServerTest ODBCTest SQLExecutor
|
||||||
|
|
||||||
ifeq ($(POCO_CONFIG),MinGW)
|
ifeq ($(POCO_CONFIG),MinGW)
|
||||||
objects += ODBCAccessTest
|
objects += ODBCAccessTest
|
||||||
endif
|
endif
|
||||||
|
|
||||||
target = testrunner
|
target = testrunner
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
pBinder->bind(pos++, obj.age, dir);
|
pBinder->bind(pos++, obj.age, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Person& obj, AbstractPreparator* pPrepare)
|
static void prepare(std::size_t pos, const Person& obj, AbstractPreparator* pPrepare)
|
||||||
{
|
{
|
||||||
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
||||||
poco_assert_dbg (pPrepare != 0);
|
poco_assert_dbg (pPrepare != 0);
|
||||||
@@ -968,22 +968,22 @@ void SQLExecutor::simpleAccess()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
|
|
||||||
try { session() << "SELECT LastName FROM PERSON", into(result), now; }
|
try { session() << "SELECT LastName FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (lastName == result);
|
assert (lastName == result);
|
||||||
|
|
||||||
try { session() << "SELECT Age FROM PERSON", into(count), now; }
|
try { session() << "SELECT Age FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == age);
|
assert (count == age);
|
||||||
@@ -996,22 +996,22 @@ void SQLExecutor::complexType()
|
|||||||
Person p1("LN1", "FN1", "ADDR1", 1);
|
Person p1("LN1", "FN1", "ADDR1", 1);
|
||||||
Person p2("LN2", "FN2", "ADDR2", 2);
|
Person p2("LN2", "FN2", "ADDR2", 2);
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(p1), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(p1), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(p2), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(p2), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
Person c1;
|
Person c1;
|
||||||
try { session() << "SELECT * FROM PERSON WHERE LastName = 'LN1'", into(c1), now; }
|
try { session() << "SELECT * FROM Person WHERE LastName = 'LN1'", into(c1), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (c1 == p1);
|
assert (c1 == p1);
|
||||||
@@ -1025,13 +1025,13 @@ void SQLExecutor::complexTypeTuple()
|
|||||||
Person p2("LN2", "FN2", "ADDR2", 2);
|
Person p2("LN2", "FN2", "ADDR2", 2);
|
||||||
|
|
||||||
Tuple<Person,Person> t(p1,p2);
|
Tuple<Person,Person> t(p1,p2);
|
||||||
try { *_pSession << "INSERT INTO PERSON VALUES(?,?,?,?,?,?,?,?)", use(t), now; }
|
try { *_pSession << "INSERT INTO Person VALUES(?,?,?,?,?,?,?,?)", use(t), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
Tuple<Person,Person> ret;
|
Tuple<Person,Person> ret;
|
||||||
assert (ret != t);
|
assert (ret != t);
|
||||||
try { *_pSession << "SELECT * FROM PERSON", into(ret), now; }
|
try { *_pSession << "SELECT * FROM Person", into(ret), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ret == t);
|
assert (ret == t);
|
||||||
@@ -1057,11 +1057,11 @@ void SQLExecutor::simpleAccessVector()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -1070,7 +1070,7 @@ void SQLExecutor::simpleAccessVector()
|
|||||||
std::vector<std::string> firstNamesR;
|
std::vector<std::string> firstNamesR;
|
||||||
std::vector<std::string> addressesR;
|
std::vector<std::string> addressesR;
|
||||||
std::vector<int> agesR;
|
std::vector<int> agesR;
|
||||||
try { session() << "SELECT * FROM PERSON", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
try { session() << "SELECT * FROM Person", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ages == agesR);
|
assert (ages == agesR);
|
||||||
@@ -1087,18 +1087,18 @@ void SQLExecutor::complexTypeVector()
|
|||||||
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
||||||
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::vector<Person> result;
|
std::vector<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == people);
|
assert (result == people);
|
||||||
@@ -1112,18 +1112,18 @@ void SQLExecutor::sharedPtrComplexTypeVector()
|
|||||||
people.push_back(new Person("LN1", "FN1", "ADDR1", 1));
|
people.push_back(new Person("LN1", "FN1", "ADDR1", 1));
|
||||||
people.push_back(new Person("LN2", "FN2", "ADDR2", 2));
|
people.push_back(new Person("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::vector<Person> result;
|
std::vector<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == result.size());
|
assert (2 == result.size());
|
||||||
@@ -1139,18 +1139,18 @@ void SQLExecutor::autoPtrComplexTypeVector()
|
|||||||
people.push_back(new RefCountedPerson("LN1", "FN1", "ADDR1", 1));
|
people.push_back(new RefCountedPerson("LN1", "FN1", "ADDR1", 1));
|
||||||
people.push_back(new RefCountedPerson("LN2", "FN2", "ADDR2", 2));
|
people.push_back(new RefCountedPerson("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::vector<Person> result;
|
std::vector<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == result.size());
|
assert (2 == result.size());
|
||||||
@@ -1233,11 +1233,11 @@ void SQLExecutor::simpleAccessList()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -1246,7 +1246,7 @@ void SQLExecutor::simpleAccessList()
|
|||||||
std::list<std::string> firstNamesR;
|
std::list<std::string> firstNamesR;
|
||||||
std::list<std::string> addressesR;
|
std::list<std::string> addressesR;
|
||||||
std::list<int> agesR;
|
std::list<int> agesR;
|
||||||
try { session() << "SELECT * FROM PERSON", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
try { session() << "SELECT * FROM Person", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ages == agesR);
|
assert (ages == agesR);
|
||||||
@@ -1263,18 +1263,18 @@ void SQLExecutor::complexTypeList()
|
|||||||
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
||||||
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::list<Person> result;
|
std::list<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == people);
|
assert (result == people);
|
||||||
@@ -1349,11 +1349,11 @@ void SQLExecutor::simpleAccessDeque()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -1362,7 +1362,7 @@ void SQLExecutor::simpleAccessDeque()
|
|||||||
std::deque<std::string> firstNamesR;
|
std::deque<std::string> firstNamesR;
|
||||||
std::deque<std::string> addressesR;
|
std::deque<std::string> addressesR;
|
||||||
std::deque<int> agesR;
|
std::deque<int> agesR;
|
||||||
try { session() << "SELECT * FROM PERSON", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
try { session() << "SELECT * FROM Person", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ages == agesR);
|
assert (ages == agesR);
|
||||||
@@ -1379,18 +1379,18 @@ void SQLExecutor::complexTypeDeque()
|
|||||||
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
people.push_back(Person("LN1", "FN1", "ADDR1", 1));
|
||||||
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
people.push_back(Person("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::deque<Person> result;
|
std::deque<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == people);
|
assert (result == people);
|
||||||
@@ -1847,10 +1847,10 @@ void SQLExecutor::setSimple()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -1859,7 +1859,7 @@ void SQLExecutor::setSimple()
|
|||||||
std::set<std::string> firstNamesR;
|
std::set<std::string> firstNamesR;
|
||||||
std::set<std::string> addressesR;
|
std::set<std::string> addressesR;
|
||||||
std::set<int> agesR;
|
std::set<int> agesR;
|
||||||
try { session() << "SELECT * FROM PERSON", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
try { session() << "SELECT * FROM Person", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ages == agesR);
|
assert (ages == agesR);
|
||||||
@@ -1876,17 +1876,17 @@ void SQLExecutor::setComplex()
|
|||||||
people.insert(Person("LN1", "FN1", "ADDR1", 1));
|
people.insert(Person("LN1", "FN1", "ADDR1", 1));
|
||||||
people.insert(Person("LN2", "FN2", "ADDR2", 2));
|
people.insert(Person("LN2", "FN2", "ADDR2", 2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::set<Person> result;
|
std::set<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == people);
|
assert (result == people);
|
||||||
@@ -1905,17 +1905,17 @@ void SQLExecutor::setComplexUnique()
|
|||||||
Person p2("LN2", "FN2", "ADDR2", 2);
|
Person p2("LN2", "FN2", "ADDR2", 2);
|
||||||
people.push_back(p2);
|
people.push_back(p2);
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 5);
|
assert (count == 5);
|
||||||
|
|
||||||
std::set<Person> result;
|
std::set<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == 2);
|
assert (result.size() == 2);
|
||||||
@@ -1942,10 +1942,10 @@ void SQLExecutor::multiSetSimple()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -1954,7 +1954,7 @@ void SQLExecutor::multiSetSimple()
|
|||||||
std::multiset<std::string> firstNamesR;
|
std::multiset<std::string> firstNamesR;
|
||||||
std::multiset<std::string> addressesR;
|
std::multiset<std::string> addressesR;
|
||||||
std::multiset<int> agesR;
|
std::multiset<int> agesR;
|
||||||
try { session() << "SELECT * FROM PERSON", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
try { session() << "SELECT * FROM Person", into(lastNamesR), into(firstNamesR), into(addressesR), into(agesR), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (ages.size() == agesR.size());
|
assert (ages.size() == agesR.size());
|
||||||
@@ -1976,17 +1976,17 @@ void SQLExecutor::multiSetComplex()
|
|||||||
Person p2("LN2", "FN2", "ADDR2", 2);
|
Person p2("LN2", "FN2", "ADDR2", 2);
|
||||||
people.insert(p2);
|
people.insert(p2);
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 5);
|
assert (count == 5);
|
||||||
|
|
||||||
std::multiset<Person> result;
|
std::multiset<Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == people.size());
|
assert (result.size() == people.size());
|
||||||
@@ -2002,17 +2002,17 @@ void SQLExecutor::mapComplex()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
|
|
||||||
std::map<std::string, Person> result;
|
std::map<std::string, Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == people);
|
assert (result == people);
|
||||||
@@ -2031,17 +2031,17 @@ void SQLExecutor::mapComplexUnique()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 5);
|
assert (count == 5);
|
||||||
|
|
||||||
std::map<std::string, Person> result;
|
std::map<std::string, Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == 2);
|
assert (result.size() == 2);
|
||||||
@@ -2060,17 +2060,17 @@ void SQLExecutor::multiMapComplex()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 5);
|
assert (count == 5);
|
||||||
|
|
||||||
std::multimap<std::string, Person> result;
|
std::multimap<std::string, Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), now; }
|
try { session() << "SELECT * FROM Person", into(result), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == people.size());
|
assert (result.size() == people.size());
|
||||||
@@ -2086,16 +2086,16 @@ void SQLExecutor::selectIntoSingle()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try { session() << "SELECT * FROM PERSON ORDER BY LastName", into(result), limit(1), now; }// will return 1 object into one single result
|
try { session() << "SELECT * FROM Person ORDER BY LastName", into(result), limit(1), now; }// will return 1 object into one single result
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result == p1);
|
assert (result == p1);
|
||||||
@@ -2111,17 +2111,17 @@ void SQLExecutor::selectIntoSingleStep()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
Statement stmt = (session() << "SELECT * FROM PERSON", into(result), limit(1));
|
Statement stmt = (session() << "SELECT * FROM Person", into(result), limit(1));
|
||||||
stmt.execute();
|
stmt.execute();
|
||||||
assert (result == p1);
|
assert (result == p1);
|
||||||
assert (!stmt.done());
|
assert (!stmt.done());
|
||||||
@@ -2140,18 +2140,18 @@ void SQLExecutor::selectIntoSingleFail()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN2", p2));
|
people.insert(std::make_pair("LN2", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), limit(2, true), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), limit(2, true), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM PERSON", into(result), limit(1, true), now; // will fail now
|
session() << "SELECT * FROM Person", into(result), limit(1, true), now; // will fail now
|
||||||
fail("hardLimit is set: must fail");
|
fail("hardLimit is set: must fail");
|
||||||
}
|
}
|
||||||
catch(Poco::Data::LimitException&)
|
catch(Poco::Data::LimitException&)
|
||||||
@@ -2169,19 +2169,19 @@ void SQLExecutor::lowerLimitOk()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM PERSON", into(result), lowerLimit(2), now; // will return 2 objects into one single result but only room for one!
|
session() << "SELECT * FROM Person", into(result), lowerLimit(2), now; // will return 2 objects into one single result but only room for one!
|
||||||
fail("Not enough space for results");
|
fail("Not enough space for results");
|
||||||
}
|
}
|
||||||
catch(Poco::Exception&)
|
catch(Poco::Exception&)
|
||||||
@@ -2199,17 +2199,17 @@ void SQLExecutor::singleSelect()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
Statement stmt = (session() << "SELECT * FROM PERSON", into(result), limit(1));
|
Statement stmt = (session() << "SELECT * FROM Person", into(result), limit(1));
|
||||||
stmt.execute();
|
stmt.execute();
|
||||||
assert (result == p1);
|
assert (result == p1);
|
||||||
assert (!stmt.done());
|
assert (!stmt.done());
|
||||||
@@ -2228,18 +2228,18 @@ void SQLExecutor::lowerLimitFail()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM PERSON", into(result), lowerLimit(3), now; // will fail
|
session() << "SELECT * FROM Person", into(result), lowerLimit(3), now; // will fail
|
||||||
fail("should fail. not enough data");
|
fail("should fail. not enough data");
|
||||||
}
|
}
|
||||||
catch(Poco::Exception&)
|
catch(Poco::Exception&)
|
||||||
@@ -2257,16 +2257,16 @@ void SQLExecutor::combinedLimits()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
std::vector <Person> result;
|
std::vector <Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), lowerLimit(2), upperLimit(2), now; }// will return 2 objects
|
try { session() << "SELECT * FROM Person", into(result), lowerLimit(2), upperLimit(2), now; }// will return 2 objects
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == 2);
|
assert (result.size() == 2);
|
||||||
@@ -2285,16 +2285,16 @@ void SQLExecutor::ranges()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
std::vector <Person> result;
|
std::vector <Person> result;
|
||||||
try { session() << "SELECT * FROM PERSON", into(result), range(2, 2), now; }// will return 2 objects
|
try { session() << "SELECT * FROM Person", into(result), range(2, 2), now; }// will return 2 objects
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (result.size() == 2);
|
assert (result.size() == 2);
|
||||||
@@ -2312,18 +2312,18 @@ void SQLExecutor::combinedIllegalLimits()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM PERSON", into(result), lowerLimit(3), upperLimit(2), now;
|
session() << "SELECT * FROM Person", into(result), lowerLimit(3), upperLimit(2), now;
|
||||||
fail("lower > upper is not allowed");
|
fail("lower > upper is not allowed");
|
||||||
}
|
}
|
||||||
catch(LimitException&)
|
catch(LimitException&)
|
||||||
@@ -2341,18 +2341,18 @@ void SQLExecutor::illegalRange()
|
|||||||
people.insert(std::make_pair("LN1", p1));
|
people.insert(std::make_pair("LN1", p1));
|
||||||
people.insert(std::make_pair("LN1", p2));
|
people.insert(std::make_pair("LN1", p2));
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(people), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(people), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
Person result;
|
Person result;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT * FROM PERSON", into(result), range(3, 2), now;
|
session() << "SELECT * FROM Person", into(result), range(3, 2), now;
|
||||||
fail("lower > upper is not allowed");
|
fail("lower > upper is not allowed");
|
||||||
}
|
}
|
||||||
catch(LimitException&)
|
catch(LimitException&)
|
||||||
@@ -2365,13 +2365,13 @@ void SQLExecutor::emptyDB()
|
|||||||
{
|
{
|
||||||
std::string funct = "emptyDB()";
|
std::string funct = "emptyDB()";
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 0);
|
assert (count == 0);
|
||||||
|
|
||||||
Person result;
|
Person result;
|
||||||
Statement stmt = (session() << "SELECT * FROM PERSON", into(result), limit(1));
|
Statement stmt = (session() << "SELECT * FROM Person", into(result), limit(1));
|
||||||
stmt.execute();
|
stmt.execute();
|
||||||
assert (result.firstName.empty());
|
assert (result.firstName.empty());
|
||||||
assert (stmt.done());
|
assert (stmt.done());
|
||||||
@@ -2391,7 +2391,7 @@ void SQLExecutor::blob(int bigSize, const std::string& blobPlaceholder)
|
|||||||
use(lastName), use(firstName), use(address), use(img), now; }
|
use(lastName), use(firstName), use(address), use(img), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -2409,7 +2409,7 @@ void SQLExecutor::blob(int bigSize, const std::string& blobPlaceholder)
|
|||||||
|
|
||||||
assert (big.size() == bigSize);
|
assert (big.size() == bigSize);
|
||||||
|
|
||||||
try { session() << "DELETE FROM PERSON", now; }
|
try { session() << "DELETE FROM Person", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
@@ -2434,9 +2434,9 @@ void SQLExecutor::blobStmt()
|
|||||||
CLOB blob("0123456789", 10);
|
CLOB blob("0123456789", 10);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
Statement ins = (session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(blob));
|
Statement ins = (session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(blob));
|
||||||
ins.execute();
|
ins.execute();
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -2460,10 +2460,10 @@ void SQLExecutor::dateTime()
|
|||||||
|
|
||||||
DateTime born(1965, 6, 18, 5, 35, 1);
|
DateTime born(1965, 6, 18, 5, 35, 1);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(born), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(born), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -2491,7 +2491,7 @@ void SQLExecutor::date()
|
|||||||
|
|
||||||
Date bornDate(1965, 6, 18);
|
Date bornDate(1965, 6, 18);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)",
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)",
|
||||||
use(lastName),
|
use(lastName),
|
||||||
use(firstName),
|
use(firstName),
|
||||||
use(address),
|
use(address),
|
||||||
@@ -2499,7 +2499,7 @@ void SQLExecutor::date()
|
|||||||
now; }
|
now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -2530,7 +2530,7 @@ void SQLExecutor::time()
|
|||||||
|
|
||||||
Time bornTime (5, 35, 1);
|
Time bornTime (5, 35, 1);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)",
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)",
|
||||||
use(lastName),
|
use(lastName),
|
||||||
use(firstName),
|
use(firstName),
|
||||||
use(address),
|
use(address),
|
||||||
@@ -2538,7 +2538,7 @@ void SQLExecutor::time()
|
|||||||
now; }
|
now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -3510,14 +3510,14 @@ void SQLExecutor::sessionTransaction(const std::string& connect)
|
|||||||
|
|
||||||
session().begin();
|
session().begin();
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
|
|
||||||
Statement stmt = (local << "SELECT COUNT(*) FROM PERSON", into(locCount), async, now);
|
Statement stmt = (local << "SELECT COUNT(*) FROM Person", into(locCount), async, now);
|
||||||
|
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -3528,19 +3528,19 @@ void SQLExecutor::sessionTransaction(const std::string& connect)
|
|||||||
stmt.wait();
|
stmt.wait();
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
assert (!session().isTransaction());
|
assert (!session().isTransaction());
|
||||||
|
|
||||||
session().begin();
|
session().begin();
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
|
|
||||||
Statement stmt1 = (local << "SELECT COUNT(*) FROM PERSON", into(locCount), async, now);
|
Statement stmt1 = (local << "SELECT COUNT(*) FROM Person", into(locCount), async, now);
|
||||||
|
|
||||||
session().commit();
|
session().commit();
|
||||||
assert (!session().isTransaction());
|
assert (!session().isTransaction());
|
||||||
@@ -3548,7 +3548,7 @@ void SQLExecutor::sessionTransaction(const std::string& connect)
|
|||||||
stmt1.wait();
|
stmt1.wait();
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -3604,14 +3604,14 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
assert (trans.isActive());
|
assert (trans.isActive());
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
assert (trans.isActive());
|
assert (trans.isActive());
|
||||||
|
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -3620,7 +3620,7 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
}
|
}
|
||||||
assert (!session().isTransaction());
|
assert (!session().isTransaction());
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3628,11 +3628,11 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
|
|
||||||
{
|
{
|
||||||
Transaction trans(session());
|
Transaction trans(session());
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastNames), use(firstNames), use(addresses), use(ages), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
Statement stmt1 = (local << "SELECT COUNT(*) FROM PERSON", into(locCount), async, now);
|
Statement stmt1 = (local << "SELECT COUNT(*) FROM Person", into(locCount), async, now);
|
||||||
|
|
||||||
assert (session().isTransaction());
|
assert (session().isTransaction());
|
||||||
assert (trans.isActive());
|
assert (trans.isActive());
|
||||||
@@ -3644,18 +3644,18 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
|
|
||||||
try { session() << "DELETE FROM PERSON", now; }
|
try { session() << "DELETE FROM Person", now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
Statement stmt1 = (local << "SELECT count(*) FROM PERSON", into(locCount), async, now);
|
Statement stmt1 = (local << "SELECT count(*) FROM Person", into(locCount), async, now);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3671,12 +3671,12 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
if (local.getTransactionIsolation() == Session::TRANSACTION_READ_COMMITTED)
|
if (local.getTransactionIsolation() == Session::TRANSACTION_READ_COMMITTED)
|
||||||
{
|
{
|
||||||
stmt1.wait();
|
stmt1.wait();
|
||||||
local << "SELECT count(*) FROM PERSON", into(locCount), now;
|
local << "SELECT count(*) FROM Person", into(locCount), now;
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string sql1 = format("INSERT INTO PERSON VALUES ('%s','%s','%s',%d)", lastNames[0], firstNames[0], addresses[0], ages[0]);
|
std::string sql1 = format("INSERT INTO Person VALUES ('%s','%s','%s',%d)", lastNames[0], firstNames[0], addresses[0], ages[0]);
|
||||||
std::string sql2 = format("INSERT INTO PERSON VALUES ('%s','%s','%s',%d)", lastNames[1], firstNames[1], addresses[1], ages[1]);
|
std::string sql2 = format("INSERT INTO Person VALUES ('%s','%s','%s',%d)", lastNames[1], firstNames[1], addresses[1], ages[1]);
|
||||||
std::vector<std::string> sql;
|
std::vector<std::string> sql;
|
||||||
sql.push_back(sql1);
|
sql.push_back(sql1);
|
||||||
sql.push_back(sql2);
|
sql.push_back(sql2);
|
||||||
@@ -3684,34 +3684,34 @@ void SQLExecutor::transaction(const std::string& connect)
|
|||||||
Transaction trans(session());
|
Transaction trans(session());
|
||||||
|
|
||||||
trans.execute(sql1, false);
|
trans.execute(sql1, false);
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (1 == count);
|
assert (1 == count);
|
||||||
trans.execute(sql2, false);
|
trans.execute(sql2, false);
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
|
|
||||||
Statement stmt2 = (local << "SELECT COUNT(*) FROM PERSON", into(locCount), async, now);
|
Statement stmt2 = (local << "SELECT COUNT(*) FROM Person", into(locCount), async, now);
|
||||||
|
|
||||||
trans.rollback();
|
trans.rollback();
|
||||||
|
|
||||||
stmt2.wait();
|
stmt2.wait();
|
||||||
assert (0 == locCount);
|
assert (0 == locCount);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
|
|
||||||
trans.execute(sql);
|
trans.execute(sql);
|
||||||
|
|
||||||
Statement stmt3 = (local << "SELECT COUNT(*) FROM PERSON", into(locCount), now);
|
Statement stmt3 = (local << "SELECT COUNT(*) FROM Person", into(locCount), now);
|
||||||
assert (2 == locCount);
|
assert (2 == locCount);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (2 == count);
|
assert (2 == count);
|
||||||
@@ -3724,7 +3724,7 @@ struct TestCommitTransactor
|
|||||||
{
|
{
|
||||||
void operator () (Session& session) const
|
void operator () (Session& session) const
|
||||||
{
|
{
|
||||||
session << "INSERT INTO PERSON VALUES ('lastName','firstName','address',10)", now;
|
session << "INSERT INTO Person VALUES ('lastName','firstName','address',10)", now;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -3733,7 +3733,7 @@ struct TestRollbackTransactor
|
|||||||
{
|
{
|
||||||
void operator () (Session& session) const
|
void operator () (Session& session) const
|
||||||
{
|
{
|
||||||
session << "INSERT INTO PERSON VALUES ('lastName','firstName','address',10)", now;
|
session << "INSERT INTO Person VALUES ('lastName','firstName','address',10)", now;
|
||||||
throw Poco::Exception("test");
|
throw Poco::Exception("test");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -3751,16 +3751,16 @@ void SQLExecutor::transactor()
|
|||||||
TestCommitTransactor ct;
|
TestCommitTransactor ct;
|
||||||
Transaction t1(session(), ct);
|
Transaction t1(session(), ct);
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (1 == count);
|
assert (1 == count);
|
||||||
|
|
||||||
try { session() << "DELETE FROM PERSON", now; session().commit();}
|
try { session() << "DELETE FROM Person", now; session().commit();}
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3772,7 +3772,7 @@ void SQLExecutor::transactor()
|
|||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
} catch (Poco::Exception&) { }
|
} catch (Poco::Exception&) { }
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3785,7 +3785,7 @@ void SQLExecutor::transactor()
|
|||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
} catch (Poco::Exception&) { }
|
} catch (Poco::Exception&) { }
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3798,7 +3798,7 @@ void SQLExecutor::transactor()
|
|||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
} catch (Poco::Exception&) { }
|
} catch (Poco::Exception&) { }
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3811,7 +3811,7 @@ void SQLExecutor::transactor()
|
|||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
} catch (Poco::Exception&) { }
|
} catch (Poco::Exception&) { }
|
||||||
|
|
||||||
try { session() << "SELECT count(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT count(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (0 == count);
|
assert (0 == count);
|
||||||
@@ -3880,12 +3880,12 @@ void SQLExecutor::reconnect()
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == 1);
|
assert (count == 1);
|
||||||
@@ -3895,7 +3895,7 @@ void SQLExecutor::reconnect()
|
|||||||
assert (!session().isConnected());
|
assert (!session().isConnected());
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
session() << "SELECT LastName FROM PERSON", into(result), now;
|
session() << "SELECT LastName FROM Person", into(result), now;
|
||||||
fail ("must fail");
|
fail ("must fail");
|
||||||
}
|
}
|
||||||
catch(NotConnectedException&){ }
|
catch(NotConnectedException&){ }
|
||||||
@@ -3903,7 +3903,7 @@ void SQLExecutor::reconnect()
|
|||||||
|
|
||||||
session().open();
|
session().open();
|
||||||
assert (session().isConnected());
|
assert (session().isConnected());
|
||||||
try { session() << "SELECT Age FROM PERSON", into(count), now; }
|
try { session() << "SELECT Age FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == age);
|
assert (count == age);
|
||||||
|
|||||||
@@ -467,10 +467,10 @@ public:
|
|||||||
C1 address(size, "Address");
|
C1 address(size, "Address");
|
||||||
C2 img(size, CLOB("0123456789", 10));
|
C2 img(size, CLOB("0123456789", 10));
|
||||||
int count = 0;
|
int count = 0;
|
||||||
try { session() << "INSERT INTO PERSON VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(img), now; }
|
try { session() << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(img), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
try { session() << "SELECT COUNT(*) FROM PERSON", into(count), now; }
|
try { session() << "SELECT COUNT(*) FROM Person", into(count), now; }
|
||||||
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
catch(ConnectionException& ce){ std::cout << ce.toString() << std::endl; fail (funct); }
|
||||||
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
catch(StatementException& se){ std::cout << se.toString() << std::endl; fail (funct); }
|
||||||
assert (count == size);
|
assert (count == size);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
set(LIBNAME "PocoDataSQLite")
|
set(LIBNAME "PocoDataSQLite")
|
||||||
set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
|
||||||
|
|
||||||
include_directories( include src )
|
include_directories( include src )
|
||||||
|
|
||||||
@@ -17,10 +16,10 @@ set(SRCS
|
|||||||
|
|
||||||
|
|
||||||
if (POCO_UNBUNDLED)
|
if (POCO_UNBUNDLED)
|
||||||
set(DATASQLITELIBS PocoData${LIB_EXT} PocoFoundatio ${LIB_EXT} sqlite3)
|
set(DATASQLITELIBS PocoData PocoFoundation sqlite3)
|
||||||
else()
|
else()
|
||||||
set(SRCS ${SRCS} src/sqlite3.c)
|
set(SRCS ${SRCS} src/sqlite3.c)
|
||||||
set(DATASQLITELIBS PocoData${LIB_EXT} PocoFoundation${LIB_EXT})
|
set(DATASQLITELIBS PocoData PocoFoundation)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED)
|
add_definitions(-DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED)
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
#include "Poco/Data/Constants.h"
|
#include "Poco/Data/Constants.h"
|
||||||
#include "Poco/Data/Date.h"
|
#include "Poco/Data/Date.h"
|
||||||
#include "Poco/Data/Time.h"
|
#include "Poco/Data/Time.h"
|
||||||
|
#include "Poco/Data/Date.h"
|
||||||
|
#include "Poco/Data/Time.h"
|
||||||
#include "Poco/Any.h"
|
#include "Poco/Any.h"
|
||||||
#include "Poco/DynamicAny.h"
|
#include "Poco/DynamicAny.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
|||||||
@@ -63,7 +63,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(SQLite_API)
|
#if !defined(SQLite_API)
|
||||||
#define SQLite_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define SQLite_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define SQLite_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -76,4 +80,16 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Thread safety mode defaults to "serialized".
|
||||||
|
// See http://www.sqlite.org/threadsafe.html for details.
|
||||||
|
// Threading mode significantly affects performance
|
||||||
|
// (see TestSuite::benchmarkThreadModesTiming)
|
||||||
|
//
|
||||||
|
#ifndef SQLITE_THREADSAFE
|
||||||
|
#define SQLITE_THREADSAFE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // SQLite_SQLite_INCLUDED
|
#endif // SQLite_SQLite_INCLUDED
|
||||||
|
|||||||
@@ -141,6 +141,8 @@ private:
|
|||||||
bool _canBind;
|
bool _canBind;
|
||||||
bool _isExtracted;
|
bool _isExtracted;
|
||||||
bool _canCompile;
|
bool _canCompile;
|
||||||
|
|
||||||
|
static const std::size_t POCO_SQLITE_INV_ROW_CNT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,17 @@ public:
|
|||||||
|
|
||||||
void open(const std::string& connect = "");
|
void open(const std::string& connect = "");
|
||||||
/// Opens a connection to the Database.
|
/// Opens a connection to the Database.
|
||||||
|
///
|
||||||
|
/// An in-memory system database (sys), with a single table (dual)
|
||||||
|
/// containing single field (dummy) is attached to the database.
|
||||||
|
/// The in-memory system database is used to force change count
|
||||||
|
/// to be reset to zero on every new query (or batch of queries)
|
||||||
|
/// execution. Without this functionality, select statements
|
||||||
|
/// executions that do not return any rows return the count of
|
||||||
|
/// changes effected by the most recent insert, update or delete.
|
||||||
|
/// In-memory system database can be queried and updated but can not
|
||||||
|
/// be dropped. It may be used for other purposes
|
||||||
|
/// in the future.
|
||||||
|
|
||||||
void close();
|
void close();
|
||||||
/// Closes the session.
|
/// Closes the session.
|
||||||
|
|||||||
@@ -63,6 +63,10 @@ public:
|
|||||||
static const std::string SQLITE_TIME_FORMAT;
|
static const std::string SQLITE_TIME_FORMAT;
|
||||||
typedef std::map<std::string, MetaColumn::ColumnDataType> TypeMap;
|
typedef std::map<std::string, MetaColumn::ColumnDataType> TypeMap;
|
||||||
|
|
||||||
|
static const int THREAD_MODE_SINGLE;
|
||||||
|
static const int THREAD_MODE_MULTI;
|
||||||
|
static const int THREAD_MODE_SERIAL;
|
||||||
|
|
||||||
Utility();
|
Utility();
|
||||||
/// Maps SQLite column declared types to Poco::Data types through
|
/// Maps SQLite column declared types to Poco::Data types through
|
||||||
/// static TypeMap member.
|
/// static TypeMap member.
|
||||||
@@ -92,9 +96,25 @@ public:
|
|||||||
///
|
///
|
||||||
/// Returns true if succesful
|
/// Returns true if succesful
|
||||||
|
|
||||||
|
static bool isThreadSafe();
|
||||||
|
/// Returns true if SQLite was compiled in multi-thread or serialized mode.
|
||||||
|
/// See http://www.sqlite.org/c3ref/threadsafe.html for details.
|
||||||
|
///
|
||||||
|
/// Returns true if succesful
|
||||||
|
|
||||||
|
static bool setThreadMode(int mode);
|
||||||
|
/// Sets the threading mode to single, multi or serialized.
|
||||||
|
/// See http://www.sqlite.org/threadsafe.html for details.
|
||||||
|
///
|
||||||
|
/// Returns true if succesful
|
||||||
|
|
||||||
|
static int getThreadMode();
|
||||||
|
/// Returns the thread mode.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TypeMap _types;
|
static TypeMap _types;
|
||||||
Poco::FastMutex _mutex;
|
Poco::FastMutex _mutex;
|
||||||
|
static int _threadMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,13 +52,23 @@ namespace Data {
|
|||||||
namespace SQLite {
|
namespace SQLite {
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
const std::size_t SQLiteStatementImpl::POCO_SQLITE_INV_ROW_CNT = std::numeric_limits<std::size_t>::max();
|
||||||
|
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
SQLiteStatementImpl::SQLiteStatementImpl(Poco::Data::SessionImpl& rSession, sqlite3* pDB):
|
SQLiteStatementImpl::SQLiteStatementImpl(Poco::Data::SessionImpl& rSession, sqlite3* pDB):
|
||||||
StatementImpl(rSession),
|
StatementImpl(rSession),
|
||||||
_pDB(pDB),
|
_pDB(pDB),
|
||||||
_pStmt(0),
|
_pStmt(0),
|
||||||
_stepCalled(false),
|
_stepCalled(false),
|
||||||
_nextResponse(0),
|
_nextResponse(0),
|
||||||
|
<<<<<<< HEAD
|
||||||
_affectedRowCount(0),
|
_affectedRowCount(0),
|
||||||
|
=======
|
||||||
|
_affectedRowCount(POCO_SQLITE_INV_ROW_CNT),
|
||||||
|
>>>>>>> develop
|
||||||
_canBind(false),
|
_canBind(false),
|
||||||
_isExtracted(false),
|
_isExtracted(false),
|
||||||
_canCompile(true)
|
_canCompile(true)
|
||||||
@@ -75,9 +85,34 @@ SQLiteStatementImpl::~SQLiteStatementImpl()
|
|||||||
|
|
||||||
void SQLiteStatementImpl::compileImpl()
|
void SQLiteStatementImpl::compileImpl()
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
if (!_pLeftover) _bindBegin = bindings().begin();
|
if (!_pLeftover) _bindBegin = bindings().begin();
|
||||||
|
|
||||||
std::string statement(toString());
|
std::string statement(toString());
|
||||||
|
=======
|
||||||
|
if (!_pLeftover)
|
||||||
|
{
|
||||||
|
// Executed to force reset of previous changes count to zero.
|
||||||
|
// Without this, execute() will not return accurate (zero) count if select
|
||||||
|
// statement returns no results previous [insert|update|delete] affected rows.
|
||||||
|
if (sqlite3_changes(_pDB))
|
||||||
|
{
|
||||||
|
if (SQLITE_OK != sqlite3_exec(_pDB, "delete from sys.dual where 1 <> 1;", 0, 0, 0))
|
||||||
|
throw ExecutionException("Error updating system database.");
|
||||||
|
}
|
||||||
|
_bindBegin = bindings().begin();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string statement(toString());
|
||||||
|
|
||||||
|
if (isubstr(statement, std::string("drop")) != istring::npos &&
|
||||||
|
isubstr(statement, std::string("table")) != istring::npos &&
|
||||||
|
isubstr(statement, std::string("dual")) != istring::npos)
|
||||||
|
{
|
||||||
|
throw InvalidAccessException("Cannot drop system table!");
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
sqlite3_stmt* pStmt = 0;
|
sqlite3_stmt* pStmt = 0;
|
||||||
const char* pSql = _pLeftover ? _pLeftover->c_str() : statement.c_str();
|
const char* pSql = _pLeftover ? _pLeftover->c_str() : statement.c_str();
|
||||||
|
|
||||||
@@ -192,14 +227,25 @@ void SQLiteStatementImpl::bindImpl()
|
|||||||
else if (bindCount > remainingBindCount)
|
else if (bindCount > remainingBindCount)
|
||||||
throw ParameterCountMismatchException();
|
throw ParameterCountMismatchException();
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
if (_bindBegin != bindings().end())
|
if (_bindBegin != bindings().end())
|
||||||
{
|
{
|
||||||
_affectedRowCount = (*_bindBegin)->numOfRowsHandled();
|
_affectedRowCount = (*_bindBegin)->numOfRowsHandled();
|
||||||
|
=======
|
||||||
|
std::size_t boundRowCount;
|
||||||
|
if (_bindBegin != bindings().end())
|
||||||
|
{
|
||||||
|
boundRowCount = (*_bindBegin)->numOfRowsHandled();
|
||||||
|
>>>>>>> develop
|
||||||
|
|
||||||
Bindings::iterator oldBegin = _bindBegin;
|
Bindings::iterator oldBegin = _bindBegin;
|
||||||
for (std::size_t pos = 1; _bindBegin != bindEnd && (*_bindBegin)->canBind(); ++_bindBegin)
|
for (std::size_t pos = 1; _bindBegin != bindEnd && (*_bindBegin)->canBind(); ++_bindBegin)
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
if (_affectedRowCount != (*_bindBegin)->numOfRowsHandled())
|
if (_affectedRowCount != (*_bindBegin)->numOfRowsHandled())
|
||||||
|
=======
|
||||||
|
if (boundRowCount != (*_bindBegin)->numOfRowsHandled())
|
||||||
|
>>>>>>> develop
|
||||||
throw BindingException("Size mismatch in Bindings. All Bindings MUST have the same size");
|
throw BindingException("Size mismatch in Bindings. All Bindings MUST have the same size");
|
||||||
|
|
||||||
(*_bindBegin)->bind(pos);
|
(*_bindBegin)->bind(pos);
|
||||||
@@ -220,7 +266,11 @@ void SQLiteStatementImpl::bindImpl()
|
|||||||
void SQLiteStatementImpl::clear()
|
void SQLiteStatementImpl::clear()
|
||||||
{
|
{
|
||||||
_columns[currentDataSet()].clear();
|
_columns[currentDataSet()].clear();
|
||||||
|
<<<<<<< HEAD
|
||||||
_affectedRowCount = 0;
|
_affectedRowCount = 0;
|
||||||
|
=======
|
||||||
|
_affectedRowCount = POCO_SQLITE_INV_ROW_CNT;
|
||||||
|
>>>>>>> develop
|
||||||
|
|
||||||
if (_pStmt)
|
if (_pStmt)
|
||||||
{
|
{
|
||||||
@@ -247,6 +297,12 @@ bool SQLiteStatementImpl::hasNext()
|
|||||||
_stepCalled = true;
|
_stepCalled = true;
|
||||||
_nextResponse = sqlite3_step(_pStmt);
|
_nextResponse = sqlite3_step(_pStmt);
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
if (_affectedRowCount == POCO_SQLITE_INV_ROW_CNT) _affectedRowCount = 0;
|
||||||
|
_affectedRowCount += sqlite3_changes(_pDB);
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
if (_nextResponse != SQLITE_ROW && _nextResponse != SQLITE_OK && _nextResponse != SQLITE_DONE)
|
if (_nextResponse != SQLITE_ROW && _nextResponse != SQLITE_OK && _nextResponse != SQLITE_DONE)
|
||||||
Utility::throwException(_nextResponse);
|
Utility::throwException(_nextResponse);
|
||||||
|
|
||||||
@@ -273,6 +329,11 @@ std::size_t SQLiteStatementImpl::next()
|
|||||||
_isExtracted = true;
|
_isExtracted = true;
|
||||||
}
|
}
|
||||||
_stepCalled = false;
|
_stepCalled = false;
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
if (_affectedRowCount == POCO_SQLITE_INV_ROW_CNT) _affectedRowCount = 0;
|
||||||
|
_affectedRowCount += (*extracts.begin())->numOfRowsHandled();
|
||||||
|
>>>>>>> develop
|
||||||
}
|
}
|
||||||
else if (SQLITE_DONE == _nextResponse)
|
else if (SQLITE_DONE == _nextResponse)
|
||||||
{
|
{
|
||||||
@@ -280,8 +341,12 @@ std::size_t SQLiteStatementImpl::next()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
int rc = _nextResponse;
|
int rc = _nextResponse;
|
||||||
Utility::throwException(rc, std::string("Iterator Error: trying to access the next value"));
|
Utility::throwException(rc, std::string("Iterator Error: trying to access the next value"));
|
||||||
|
=======
|
||||||
|
Utility::throwException(_nextResponse, std::string("Iterator Error: trying to access the next value"));
|
||||||
|
>>>>>>> develop
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1u;
|
return 1u;
|
||||||
@@ -304,7 +369,11 @@ const MetaColumn& SQLiteStatementImpl::metaColumn(std::size_t pos) const
|
|||||||
|
|
||||||
std::size_t SQLiteStatementImpl::affectedRowCount() const
|
std::size_t SQLiteStatementImpl::affectedRowCount() const
|
||||||
{
|
{
|
||||||
|
<<<<<<< HEAD
|
||||||
return _affectedRowCount ? _affectedRowCount : sqlite3_changes(_pDB);
|
return _affectedRowCount ? _affectedRowCount : sqlite3_changes(_pDB);
|
||||||
|
=======
|
||||||
|
return _affectedRowCount != POCO_SQLITE_INV_ROW_CNT ? _affectedRowCount : sqlite3_changes(_pDB);
|
||||||
|
>>>>>>> develop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
#include "Poco/ActiveMethod.h"
|
#include "Poco/ActiveMethod.h"
|
||||||
#include "Poco/ActiveResult.h"
|
#include "Poco/ActiveResult.h"
|
||||||
#include "Poco/String.h"
|
#include "Poco/String.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Data/DataException.h"
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ const std::string SessionImpl::ABORT_TRANSACTION("ROLLBACK");
|
|||||||
|
|
||||||
SessionImpl::SessionImpl(const std::string& fileName, std::size_t loginTimeout):
|
SessionImpl::SessionImpl(const std::string& fileName, std::size_t loginTimeout):
|
||||||
Poco::Data::AbstractSessionImpl<SessionImpl>(fileName, loginTimeout),
|
Poco::Data::AbstractSessionImpl<SessionImpl>(fileName, loginTimeout),
|
||||||
_connector(toLower(Connector::KEY)),
|
_connector(Connector::KEY),
|
||||||
_pDB(0),
|
_pDB(0),
|
||||||
_connected(false),
|
_connected(false),
|
||||||
_isTransaction(false)
|
_isTransaction(false)
|
||||||
@@ -195,6 +195,14 @@ void SessionImpl::open(const std::string& connect)
|
|||||||
throw ConnectionFailedException(ex.displayText());
|
throw ConnectionFailedException(ex.displayText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (SQLITE_OK != sqlite3_exec(_pDB,
|
||||||
|
"attach database ':memory:' as sys;"
|
||||||
|
"create table sys.dual (dummy);",
|
||||||
|
0, 0, 0))
|
||||||
|
{
|
||||||
|
throw ExecutionException("Cannot create system database.");
|
||||||
|
}
|
||||||
|
|
||||||
_connected = true;
|
_connected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,18 @@ namespace Data {
|
|||||||
namespace SQLite {
|
namespace SQLite {
|
||||||
|
|
||||||
|
|
||||||
|
const int Utility::THREAD_MODE_SINGLE = SQLITE_CONFIG_SINGLETHREAD;
|
||||||
|
const int Utility::THREAD_MODE_MULTI = SQLITE_CONFIG_MULTITHREAD;
|
||||||
|
const int Utility::THREAD_MODE_SERIAL = SQLITE_CONFIG_SERIALIZED;
|
||||||
|
int Utility::_threadMode =
|
||||||
|
#if (SQLITE_THREADSAFE == 0)
|
||||||
|
SQLITE_CONFIG_SINGLETHREAD;
|
||||||
|
#elif (SQLITE_THREADSAFE == 1)
|
||||||
|
SQLITE_CONFIG_SERIALIZED;
|
||||||
|
#elif (SQLITE_THREADSAFE == 2)
|
||||||
|
SQLITE_CONFIG_MULTITHREAD;
|
||||||
|
#endif
|
||||||
|
|
||||||
const std::string Utility::SQLITE_DATE_FORMAT = "%Y-%m-%d";
|
const std::string Utility::SQLITE_DATE_FORMAT = "%Y-%m-%d";
|
||||||
const std::string Utility::SQLITE_TIME_FORMAT = "%H:%M:%S";
|
const std::string Utility::SQLITE_TIME_FORMAT = "%H:%M:%S";
|
||||||
Utility::TypeMap Utility::_types;
|
Utility::TypeMap Utility::_types;
|
||||||
@@ -255,4 +267,36 @@ bool Utility::memoryToFile(const std::string& fileName, sqlite3* pInMemory)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Utility::isThreadSafe()
|
||||||
|
{
|
||||||
|
return 0 != sqlite3_threadsafe();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int Utility::getThreadMode()
|
||||||
|
{
|
||||||
|
return _threadMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Utility::setThreadMode(int mode)
|
||||||
|
{
|
||||||
|
#if (SQLITE_THREADSAFE != 0)
|
||||||
|
if (SQLITE_OK == sqlite3_shutdown())
|
||||||
|
{
|
||||||
|
if (SQLITE_OK == sqlite3_config(mode))
|
||||||
|
{
|
||||||
|
_threadMode = mode;
|
||||||
|
if (SQLITE_OK == sqlite3_initialize())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
sqlite3_initialize();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } } // namespace Poco::Data::SQLite
|
} } } // namespace Poco::Data::SQLite
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -107,9 +107,9 @@ extern "C" {
|
|||||||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||||
** [sqlite_version()] and [sqlite_source_id()].
|
** [sqlite_version()] and [sqlite_source_id()].
|
||||||
*/
|
*/
|
||||||
#define SQLITE_VERSION "3.7.14.1"
|
#define SQLITE_VERSION "3.7.15.1"
|
||||||
#define SQLITE_VERSION_NUMBER 3007014
|
#define SQLITE_VERSION_NUMBER 3007015
|
||||||
#define SQLITE_SOURCE_ID "2012-10-04 19:37:12 091570e46d04e84b67228e0bdbcd6e1fb60c6bdb"
|
#define SQLITE_SOURCE_ID "2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Run-Time Library Version Numbers
|
** CAPI3REF: Run-Time Library Version Numbers
|
||||||
@@ -474,10 +474,12 @@ SQLITE_API int sqlite3_exec(
|
|||||||
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
|
#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8))
|
||||||
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
|
#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8))
|
||||||
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
|
#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8))
|
||||||
|
#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8))
|
||||||
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
|
||||||
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
|
||||||
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
|
#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8))
|
||||||
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
|
#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8))
|
||||||
|
#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8))
|
||||||
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8))
|
||||||
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8))
|
||||||
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8))
|
||||||
@@ -855,6 +857,26 @@ struct sqlite3_io_methods {
|
|||||||
** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA]
|
** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA]
|
||||||
** file control occurs at the beginning of pragma statement analysis and so
|
** file control occurs at the beginning of pragma statement analysis and so
|
||||||
** it is able to override built-in [PRAGMA] statements.
|
** it is able to override built-in [PRAGMA] statements.
|
||||||
|
**
|
||||||
|
** <li>[[SQLITE_FCNTL_BUSYHANDLER]]
|
||||||
|
** ^This file-control may be invoked by SQLite on the database file handle
|
||||||
|
** shortly after it is opened in order to provide a custom VFS with access
|
||||||
|
** to the connections busy-handler callback. The argument is of type (void **)
|
||||||
|
** - an array of two (void *) values. The first (void *) actually points
|
||||||
|
** to a function of type (int (*)(void *)). In order to invoke the connections
|
||||||
|
** busy-handler, this function should be invoked with the second (void *) in
|
||||||
|
** the array as the only argument. If it returns non-zero, then the operation
|
||||||
|
** should be retried. If it returns zero, the custom VFS should abandon the
|
||||||
|
** current operation.
|
||||||
|
**
|
||||||
|
** <li>[[SQLITE_FCNTL_TEMPFILENAME]]
|
||||||
|
** ^Application can invoke this file-control to have SQLite generate a
|
||||||
|
** temporary filename using the same algorithm that is followed to generate
|
||||||
|
** temporary filenames for TEMP tables and other internal uses. The
|
||||||
|
** argument should be a char** which will be filled with the filename
|
||||||
|
** written into memory obtained from [sqlite3_malloc()]. The caller should
|
||||||
|
** invoke [sqlite3_free()] on the result to avoid a memory leak.
|
||||||
|
**
|
||||||
** </ul>
|
** </ul>
|
||||||
*/
|
*/
|
||||||
#define SQLITE_FCNTL_LOCKSTATE 1
|
#define SQLITE_FCNTL_LOCKSTATE 1
|
||||||
@@ -871,6 +893,8 @@ struct sqlite3_io_methods {
|
|||||||
#define SQLITE_FCNTL_VFSNAME 12
|
#define SQLITE_FCNTL_VFSNAME 12
|
||||||
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
|
#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13
|
||||||
#define SQLITE_FCNTL_PRAGMA 14
|
#define SQLITE_FCNTL_PRAGMA 14
|
||||||
|
#define SQLITE_FCNTL_BUSYHANDLER 15
|
||||||
|
#define SQLITE_FCNTL_TEMPFILENAME 16
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Mutex Handle
|
** CAPI3REF: Mutex Handle
|
||||||
@@ -1567,11 +1591,39 @@ struct sqlite3_mem_methods {
|
|||||||
** disabled. The default value may be changed by compiling with the
|
** disabled. The default value may be changed by compiling with the
|
||||||
** [SQLITE_USE_URI] symbol defined.
|
** [SQLITE_USE_URI] symbol defined.
|
||||||
**
|
**
|
||||||
|
** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]] <dt>SQLITE_CONFIG_COVERING_INDEX_SCAN
|
||||||
|
** <dd> This option takes a single integer argument which is interpreted as
|
||||||
|
** a boolean in order to enable or disable the use of covering indices for
|
||||||
|
** full table scans in the query optimizer. The default setting is determined
|
||||||
|
** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on"
|
||||||
|
** if that compile-time option is omitted.
|
||||||
|
** The ability to disable the use of covering indices for full table scans
|
||||||
|
** is because some incorrectly coded legacy applications might malfunction
|
||||||
|
** malfunction when the optimization is enabled. Providing the ability to
|
||||||
|
** disable the optimization allows the older, buggy application code to work
|
||||||
|
** without change even with newer versions of SQLite.
|
||||||
|
**
|
||||||
** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]]
|
** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]]
|
||||||
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
|
** <dt>SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE
|
||||||
** <dd> These options are obsolete and should not be used by new code.
|
** <dd> These options are obsolete and should not be used by new code.
|
||||||
** They are retained for backwards compatibility but are now no-ops.
|
** They are retained for backwards compatibility but are now no-ops.
|
||||||
** </dl>
|
** </dl>
|
||||||
|
**
|
||||||
|
** [[SQLITE_CONFIG_SQLLOG]]
|
||||||
|
** <dt>SQLITE_CONFIG_SQLLOG
|
||||||
|
** <dd>This option is only available if sqlite is compiled with the
|
||||||
|
** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should
|
||||||
|
** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int).
|
||||||
|
** The second should be of type (void*). The callback is invoked by the library
|
||||||
|
** in three separate circumstances, identified by the value passed as the
|
||||||
|
** fourth parameter. If the fourth parameter is 0, then the database connection
|
||||||
|
** passed as the second argument has just been opened. The third argument
|
||||||
|
** points to a buffer containing the name of the main database file. If the
|
||||||
|
** fourth parameter is 1, then the SQL statement that the third parameter
|
||||||
|
** points to has just been executed. Or, if the fourth parameter is 2, then
|
||||||
|
** the connection being passed as the second parameter is being closed. The
|
||||||
|
** third parameter is passed NULL In this case.
|
||||||
|
** </dl>
|
||||||
*/
|
*/
|
||||||
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */
|
||||||
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
|
#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */
|
||||||
@@ -1592,6 +1644,8 @@ struct sqlite3_mem_methods {
|
|||||||
#define SQLITE_CONFIG_URI 17 /* int */
|
#define SQLITE_CONFIG_URI 17 /* int */
|
||||||
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
|
#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */
|
||||||
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
|
#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */
|
||||||
|
#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */
|
||||||
|
#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: Database Connection Configuration Options
|
** CAPI3REF: Database Connection Configuration Options
|
||||||
@@ -2600,7 +2654,7 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
|
|||||||
** an error)^.
|
** an error)^.
|
||||||
** ^If "ro" is specified, then the database is opened for read-only
|
** ^If "ro" is specified, then the database is opened for read-only
|
||||||
** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the
|
** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the
|
||||||
** third argument to sqlite3_prepare_v2(). ^If the mode option is set to
|
** third argument to sqlite3_open_v2(). ^If the mode option is set to
|
||||||
** "rw", then the database is opened for read-write (but not create)
|
** "rw", then the database is opened for read-write (but not create)
|
||||||
** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had
|
** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had
|
||||||
** been set. ^Value "rwc" is equivalent to setting both
|
** been set. ^Value "rwc" is equivalent to setting both
|
||||||
@@ -2752,6 +2806,11 @@ SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int
|
|||||||
** However, the error string might be overwritten or deallocated by
|
** However, the error string might be overwritten or deallocated by
|
||||||
** subsequent calls to other SQLite interface functions.)^
|
** subsequent calls to other SQLite interface functions.)^
|
||||||
**
|
**
|
||||||
|
** ^The sqlite3_errstr() interface returns the English-language text
|
||||||
|
** that describes the [result code], as UTF-8.
|
||||||
|
** ^(Memory to hold the error message string is managed internally
|
||||||
|
** and must not be freed by the application)^.
|
||||||
|
**
|
||||||
** When the serialized [threading mode] is in use, it might be the
|
** When the serialized [threading mode] is in use, it might be the
|
||||||
** case that a second error occurs on a separate thread in between
|
** case that a second error occurs on a separate thread in between
|
||||||
** the time of the first error and the call to these interfaces.
|
** the time of the first error and the call to these interfaces.
|
||||||
@@ -2770,6 +2829,7 @@ SQLITE_API int sqlite3_errcode(sqlite3 *db);
|
|||||||
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
|
||||||
SQLITE_API const char *sqlite3_errmsg(sqlite3*);
|
SQLITE_API const char *sqlite3_errmsg(sqlite3*);
|
||||||
SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
|
SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
|
||||||
|
SQLITE_API const char *sqlite3_errstr(int);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** CAPI3REF: SQL Statement Object
|
** CAPI3REF: SQL Statement Object
|
||||||
@@ -4732,6 +4792,9 @@ SQLITE_API void *sqlite3_update_hook(
|
|||||||
** future releases of SQLite. Applications that care about shared
|
** future releases of SQLite. Applications that care about shared
|
||||||
** cache setting should set it explicitly.
|
** cache setting should set it explicitly.
|
||||||
**
|
**
|
||||||
|
** This interface is threadsafe on processors where writing a
|
||||||
|
** 32-bit integer is atomic.
|
||||||
|
**
|
||||||
** See Also: [SQLite Shared-Cache Mode]
|
** See Also: [SQLite Shared-Cache Mode]
|
||||||
*/
|
*/
|
||||||
SQLITE_API int sqlite3_enable_shared_cache(int);
|
SQLITE_API int sqlite3_enable_shared_cache(int);
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
#include "Poco/AutoPtr.h"
|
#include "Poco/AutoPtr.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Poco/RefCountedObject.h"
|
#include "Poco/RefCountedObject.h"
|
||||||
|
#include "Poco/Stopwatch.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
@@ -193,7 +194,7 @@ public:
|
|||||||
pBinder->bind(pos++, obj.getAge(), dir);
|
pBinder->bind(pos++, obj.getAge(), dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Person& obj, AbstractPreparator* pPrepare)
|
static void prepare(std::size_t pos, const Person& obj, AbstractPreparator* pPrepare)
|
||||||
{
|
{
|
||||||
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
// the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))
|
||||||
poco_assert_dbg (pPrepare != 0);
|
poco_assert_dbg (pPrepare != 0);
|
||||||
@@ -618,7 +619,6 @@ void SQLiteTest::testSharedPtrComplexTypeVector()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SQLiteTest::testInsertVector()
|
void SQLiteTest::testInsertVector()
|
||||||
{
|
{
|
||||||
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
||||||
@@ -674,7 +674,13 @@ void SQLiteTest::testAffectedRows()
|
|||||||
tmp << "DROP TABLE IF EXISTS Strings", now;
|
tmp << "DROP TABLE IF EXISTS Strings", now;
|
||||||
tmp << "CREATE TABLE IF NOT EXISTS Strings (str VARCHAR(30))", now;
|
tmp << "CREATE TABLE IF NOT EXISTS Strings (str VARCHAR(30))", now;
|
||||||
|
|
||||||
|
Statement stmt((tmp << "SELECT * FROM Strings"));
|
||||||
|
tmp << "SELECT COUNT(*) FROM Strings", into(count), now;
|
||||||
|
assert (count == 0);
|
||||||
|
assert (0 == stmt.execute());
|
||||||
|
|
||||||
Statement stmt1((tmp << "INSERT INTO Strings VALUES(:str)", use(str)));
|
Statement stmt1((tmp << "INSERT INTO Strings VALUES(:str)", use(str)));
|
||||||
|
count = -1;
|
||||||
tmp << "SELECT COUNT(*) FROM Strings", into(count), now;
|
tmp << "SELECT COUNT(*) FROM Strings", into(count), now;
|
||||||
assert (count == 0);
|
assert (count == 0);
|
||||||
assert (4 == stmt1.execute());
|
assert (4 == stmt1.execute());
|
||||||
@@ -687,10 +693,13 @@ void SQLiteTest::testAffectedRows()
|
|||||||
Statement stmt3(tmp << "DELETE FROM Strings WHERE str = 's1'");
|
Statement stmt3(tmp << "DELETE FROM Strings WHERE str = 's1'");
|
||||||
assert (1 == stmt3.execute());
|
assert (1 == stmt3.execute());
|
||||||
|
|
||||||
|
Statement stmt4(tmp << "DELETE FROM Strings WHERE str = 'bad value'");
|
||||||
|
assert (0 == stmt4.execute());
|
||||||
|
|
||||||
// see SQLiteStatementImpl::affectedRows() documentation for explanation
|
// see SQLiteStatementImpl::affectedRows() documentation for explanation
|
||||||
// why "WHERE 1" is necessary here
|
// why "WHERE 1" is necessary here
|
||||||
Statement stmt4(tmp << "DELETE FROM Strings WHERE 1");
|
Statement stmt5(tmp << "DELETE FROM Strings WHERE 1");
|
||||||
assert (3 == stmt4.execute());
|
assert (3 == stmt5.execute());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1242,6 +1251,12 @@ void SQLiteTest::testCombinedLimits()
|
|||||||
tmp << "DROP TABLE IF EXISTS Person", now;
|
tmp << "DROP TABLE IF EXISTS Person", now;
|
||||||
tmp << "CREATE TABLE IF NOT EXISTS Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))", now;
|
tmp << "CREATE TABLE IF NOT EXISTS Person (LastName VARCHAR(30), FirstName VARCHAR, Address VARCHAR, Age INTEGER(3))", now;
|
||||||
tmp << "INSERT INTO PERSON VALUES(:ln, :fn, :ad, :age)", use(people), now;
|
tmp << "INSERT INTO PERSON VALUES(:ln, :fn, :ad, :age)", use(people), now;
|
||||||
|
|
||||||
|
std::string a, b, c;
|
||||||
|
Statement stmt = (tmp << "SELECT LastName, FirstName, Address FROM Person WHERE Address = 'invalid value'",
|
||||||
|
into(a), into(b), into(c), limit(1));
|
||||||
|
assert (!stmt.done() && stmt.execute() == 0);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
tmp << "SELECT COUNT(*) FROM PERSON", into(count), now;
|
tmp << "SELECT COUNT(*) FROM PERSON", into(count), now;
|
||||||
assert (count == 2);
|
assert (count == 2);
|
||||||
@@ -2252,8 +2267,6 @@ void SQLiteTest::testDynamicAny()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SQLiteTest::testPair()
|
void SQLiteTest::testPair()
|
||||||
{
|
{
|
||||||
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
||||||
@@ -2288,6 +2301,7 @@ void SQLiteTest::testPair()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLiteTest::testSQLChannel()
|
void SQLiteTest::testSQLChannel()
|
||||||
{
|
{
|
||||||
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
Session tmp (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
||||||
@@ -2543,6 +2557,106 @@ void SQLiteTest::testReconnect()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SQLiteTest::testSystemTable()
|
||||||
|
{
|
||||||
|
Session session (Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
||||||
|
int cntFile = 0;
|
||||||
|
session << "DROP TABLE IF EXISTS Test", now;
|
||||||
|
session << "CREATE TABLE Test (Test INTEGER)", now;
|
||||||
|
session << "INSERT INTO Test VALUES (1)", now;
|
||||||
|
session << "SELECT count(*) FROM Test", into(cntFile), now;
|
||||||
|
assert (1 == cntFile);
|
||||||
|
|
||||||
|
int cntMem = -1;
|
||||||
|
session << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (0 == cntMem);
|
||||||
|
|
||||||
|
session << "INSERT INTO sys.dual VALUES ('test')", now;
|
||||||
|
session << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (1 == cntMem);
|
||||||
|
|
||||||
|
// connect another session
|
||||||
|
Session session2(Poco::Data::SQLite::Connector::KEY, "dummy.db");
|
||||||
|
// verify it has it's own sys table
|
||||||
|
session2 << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (0 == cntMem);
|
||||||
|
// verify it shares the file table
|
||||||
|
session2 << "SELECT count(*) FROM Test", into(cntFile), now;
|
||||||
|
assert (1 == cntFile);
|
||||||
|
session2 << "INSERT INTO sys.dual VALUES ('test')", now;
|
||||||
|
session2 << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (1 == cntMem);
|
||||||
|
|
||||||
|
session << "DELETE FROM sys.dual", now;
|
||||||
|
session << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (0 == cntMem);
|
||||||
|
session2 << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (1 == cntMem);
|
||||||
|
session2 << "DELETE FROM sys.dual", now;
|
||||||
|
session2 << "SELECT count(*) FROM sys.dual", into(cntMem), now;
|
||||||
|
assert (0 == cntMem);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
session << "DROP TABLE sys.dual", now;
|
||||||
|
fail ("must throw");
|
||||||
|
}
|
||||||
|
catch (InvalidAccessException&) { }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SQLiteTest::testThreadModes()
|
||||||
|
{
|
||||||
|
using namespace Poco::Data::SQLite;
|
||||||
|
typedef std::vector<int> ModeVec;
|
||||||
|
|
||||||
|
assert (Utility::isThreadSafe());
|
||||||
|
assert (Utility::getThreadMode() == Utility::THREAD_MODE_SERIAL);
|
||||||
|
|
||||||
|
const int datasize = 1000;
|
||||||
|
ModeVec mode;
|
||||||
|
mode.push_back(Utility::THREAD_MODE_SINGLE);
|
||||||
|
mode.push_back(Utility::THREAD_MODE_MULTI);
|
||||||
|
mode.push_back(Utility::THREAD_MODE_SERIAL);
|
||||||
|
|
||||||
|
Poco::Stopwatch sw;
|
||||||
|
ModeVec::iterator it = mode.begin();
|
||||||
|
ModeVec::iterator end = mode.end();
|
||||||
|
for (; it != end; ++it)
|
||||||
|
{
|
||||||
|
sw.restart();
|
||||||
|
assert (Utility::setThreadMode(*it));
|
||||||
|
{
|
||||||
|
Session tmp (Connector::KEY, "dummy.db");
|
||||||
|
std::vector<int> iv(datasize);
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
tmp << "DROP TABLE IF EXISTS Ints", now;
|
||||||
|
tmp << "CREATE TABLE IF NOT EXISTS Ints (theInt INTEGER)", now;
|
||||||
|
Statement stmt((tmp << "INSERT INTO Ints VALUES(?)", use(iv)));
|
||||||
|
tmp << "SELECT COUNT(*) FROM Ints", into(count), now;
|
||||||
|
assert (count == 0);
|
||||||
|
stmt.execute();
|
||||||
|
tmp << "SELECT COUNT(*) FROM Ints", into(count), now;
|
||||||
|
assert (count == datasize);
|
||||||
|
count = 0;
|
||||||
|
tmp << "SELECT COUNT(*) FROM Ints", into(count), now;
|
||||||
|
assert (count == datasize);
|
||||||
|
}
|
||||||
|
sw.stop();
|
||||||
|
std::cout << "Mode: " << ((*it == Utility::THREAD_MODE_SINGLE) ? "single,"
|
||||||
|
:(*it == Utility::THREAD_MODE_MULTI) ? "multi,"
|
||||||
|
:(*it == Utility::THREAD_MODE_SERIAL) ? "serial,"
|
||||||
|
: "unknown,") << " Time: " << sw.elapsed() / 1000.0 << " [ms]" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
assert (Utility::setThreadMode(Utility::THREAD_MODE_SERIAL));
|
||||||
|
assert (Utility::isThreadSafe());
|
||||||
|
assert (Utility::getThreadMode() == Utility::THREAD_MODE_SERIAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SQLiteTest::setUp()
|
void SQLiteTest::setUp()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -2633,6 +2747,8 @@ CppUnit::Test* SQLiteTest::suite()
|
|||||||
CppUnit_addTest(pSuite, SQLiteTest, testMultipleResults);
|
CppUnit_addTest(pSuite, SQLiteTest, testMultipleResults);
|
||||||
CppUnit_addTest(pSuite, SQLiteTest, testPair);
|
CppUnit_addTest(pSuite, SQLiteTest, testPair);
|
||||||
CppUnit_addTest(pSuite, SQLiteTest, testReconnect);
|
CppUnit_addTest(pSuite, SQLiteTest, testReconnect);
|
||||||
|
CppUnit_addTest(pSuite, SQLiteTest, testSystemTable);
|
||||||
|
CppUnit_addTest(pSuite, SQLiteTest, testThreadModes);
|
||||||
|
|
||||||
return pSuite;
|
return pSuite;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,6 +132,9 @@ public:
|
|||||||
void testMultipleResults();
|
void testMultipleResults();
|
||||||
|
|
||||||
void testReconnect();
|
void testReconnect();
|
||||||
|
void testSystemTable();
|
||||||
|
|
||||||
|
void testThreadModes();
|
||||||
|
|
||||||
void setUp();
|
void setUp();
|
||||||
void tearDown();
|
void tearDown();
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
|
|
||||||
std::size_t numOfRowsHandled() const
|
std::size_t numOfRowsHandled() const
|
||||||
{
|
{
|
||||||
return 1;
|
return 1u;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool canBind() const
|
bool canBind() const
|
||||||
@@ -120,8 +120,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const T& _val;
|
const T& _val;
|
||||||
bool _bound;
|
bool _bound;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(Data_API)
|
#if !defined(Data_API)
|
||||||
#define Data_API
|
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define Data_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define Data_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public:
|
|||||||
|
|
||||||
std::size_t numOfRowsHandled() const
|
std::size_t numOfRowsHandled() const
|
||||||
{
|
{
|
||||||
return 1u;
|
return _extracted ? 1u : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t numOfRowsAllowed() const
|
std::size_t numOfRowsAllowed() const
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "Poco/Dynamic/VarHolder.h"
|
#include "Poco/Dynamic/VarHolder.h"
|
||||||
#include "Poco/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -221,6 +222,7 @@ inline void swap(LOB<T>& b1, LOB<T>& b2)
|
|||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
using std::swap;
|
||||||
template<>
|
template<>
|
||||||
inline void swap<Poco::Data::BLOB>(Poco::Data::BLOB& b1,
|
inline void swap<Poco::Data::BLOB>(Poco::Data::BLOB& b1,
|
||||||
Poco::Data::BLOB& b2)
|
Poco::Data::BLOB& b2)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include "Poco/Data/Row.h"
|
#include "Poco/Data/Row.h"
|
||||||
#include "Poco/Dynamic/Var.h"
|
#include "Poco/Dynamic/Var.h"
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -158,6 +159,7 @@ inline bool RowIterator::operator != (const RowIterator& other) const
|
|||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
using std::swap;
|
||||||
template<>
|
template<>
|
||||||
inline void swap<Poco::Data::RowIterator>(Poco::Data::RowIterator& s1,
|
inline void swap<Poco::Data::RowIterator>(Poco::Data::RowIterator& s1,
|
||||||
Poco::Data::RowIterator& s2)
|
Poco::Data::RowIterator& s2)
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
#include "Poco/Data/Binding.h"
|
#include "Poco/Data/Binding.h"
|
||||||
#include "Poco/AutoPtr.h"
|
#include "Poco/AutoPtr.h"
|
||||||
#include "Poco/Any.h"
|
#include "Poco/Any.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -502,6 +503,7 @@ inline void swap(Session& s1, Session& s2)
|
|||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
using std::swap;
|
||||||
template<>
|
template<>
|
||||||
inline void swap<Poco::Data::Session>(Poco::Data::Session& s1,
|
inline void swap<Poco::Data::Session>(Poco::Data::Session& s1,
|
||||||
Poco::Data::Session& s2)
|
Poco::Data::Session& s2)
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
#include "Poco/Mutex.h"
|
#include "Poco/Mutex.h"
|
||||||
#include "Poco/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include "Poco/String.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
@@ -71,6 +72,7 @@ class Data_API SessionFactory
|
|||||||
/// Session ses("SQLite", "dummy.db");
|
/// Session ses("SQLite", "dummy.db");
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
static SessionFactory& instance();
|
static SessionFactory& instance();
|
||||||
/// returns the static instance of the singleton.
|
/// returns the static instance of the singleton.
|
||||||
|
|
||||||
@@ -92,7 +94,7 @@ public:
|
|||||||
Session create(const std::string& uri,
|
Session create(const std::string& uri,
|
||||||
std::size_t timeout = Session::LOGIN_TIMEOUT_DEFAULT);
|
std::size_t timeout = Session::LOGIN_TIMEOUT_DEFAULT);
|
||||||
/// Creates a Session for the given URI (must be in key:///connectionString format).
|
/// Creates a Session for the given URI (must be in key:///connectionString format).
|
||||||
/// Throws an Poco:Data::UnknownDataBaseException if no Connector is registered for the key.
|
/// Throws a Poco:Data::UnknownDataBaseException if no Connector is registered for the key.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SessionFactory();
|
SessionFactory();
|
||||||
@@ -107,7 +109,15 @@ private:
|
|||||||
SessionInfo(Connector* pSI);
|
SessionInfo(Connector* pSI);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, SessionInfo> Connectors;
|
struct ILT
|
||||||
|
{
|
||||||
|
bool operator() (const std::string& s1, const std::string& s2) const
|
||||||
|
{
|
||||||
|
return Poco::icompare(s1, s2) < 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::map<std::string, SessionInfo, ILT> Connectors;
|
||||||
Connectors _connectors;
|
Connectors _connectors;
|
||||||
Poco::FastMutex _mutex;
|
Poco::FastMutex _mutex;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ inline std::size_t SessionImpl::getLoginTimeout() const
|
|||||||
inline std::string SessionImpl::uri(const std::string& connector,
|
inline std::string SessionImpl::uri(const std::string& connector,
|
||||||
const std::string& connectionString)
|
const std::string& connectionString)
|
||||||
{
|
{
|
||||||
return format("%s:///%s", toLower(connector), connectionString);
|
return format("%s:///%s", connector, connectionString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
#include "Poco/ActiveMethod.h"
|
#include "Poco/ActiveMethod.h"
|
||||||
#include "Poco/ActiveResult.h"
|
#include "Poco/ActiveResult.h"
|
||||||
#include "Poco/Format.h"
|
#include "Poco/Format.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -834,6 +835,7 @@ inline void swap(Statement& s1, Statement& s2)
|
|||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
{
|
{
|
||||||
|
using std::swap;
|
||||||
template<>
|
template<>
|
||||||
inline void swap<Poco::Data::Statement>(Poco::Data::Statement& s1,
|
inline void swap<Poco::Data::Statement>(Poco::Data::Statement& s1,
|
||||||
Poco::Data::Statement& s2)
|
Poco::Data::Statement& s2)
|
||||||
|
|||||||
@@ -103,10 +103,10 @@ class TypeHandler: public AbstractTypeHandler
|
|||||||
/// poco_assert_dbg (pBinder != 0);
|
/// poco_assert_dbg (pBinder != 0);
|
||||||
/// TypeHandler<std::string>::bind(pos++, obj.getLastName(), pBinder, dir);
|
/// TypeHandler<std::string>::bind(pos++, obj.getLastName(), pBinder, dir);
|
||||||
/// TypeHandler<std::string>::bind(pos++, obj.getFirstName(), pBinder, dir);
|
/// TypeHandler<std::string>::bind(pos++, obj.getFirstName(), pBinder, dir);
|
||||||
/// TypeHandler<int>::bind(pos++, obj.getAge(), pBinder);
|
/// TypeHandler<int>::bind(pos++, obj.getAge(), pBinder, dir);
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// static void prepare(std::size_t pos, Person& obj, AbstractPreparator* pPreparator)
|
/// static void prepare(std::size_t pos, const Person& obj, AbstractPreparator* pPreparator)
|
||||||
/// {
|
/// {
|
||||||
/// // the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Age INTEGER(3))
|
/// // the table is defined as Person (LastName VARCHAR(30), FirstName VARCHAR, Age INTEGER(3))
|
||||||
/// poco_assert_dbg (pPreparator != 0);
|
/// poco_assert_dbg (pPreparator != 0);
|
||||||
@@ -154,7 +154,7 @@ public:
|
|||||||
if (!pExt->extract(pos, obj)) obj = defVal;
|
if (!pExt->extract(pos, obj)) obj = defVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, T& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const T& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
pPreparator->prepare(pos, obj);
|
pPreparator->prepare(pos, obj);
|
||||||
@@ -189,7 +189,7 @@ public:
|
|||||||
obj.assign(obj.size(), defVal);
|
obj.assign(obj.size(), defVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, std::deque<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const std::deque<T>& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
pPreparator->prepare(pos, obj);
|
pPreparator->prepare(pos, obj);
|
||||||
@@ -224,7 +224,7 @@ public:
|
|||||||
obj.assign(obj.size(), defVal);
|
obj.assign(obj.size(), defVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, std::vector<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const std::vector<T>& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
pPreparator->prepare(pos, obj);
|
pPreparator->prepare(pos, obj);
|
||||||
@@ -259,7 +259,7 @@ public:
|
|||||||
obj.assign(obj.size(), defVal);
|
obj.assign(obj.size(), defVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, std::list<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const std::list<T>& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
pPreparator->prepare(pos, obj);
|
pPreparator->prepare(pos, obj);
|
||||||
@@ -281,7 +281,7 @@ public:
|
|||||||
poco_assert_dbg (pBinder != 0);
|
poco_assert_dbg (pBinder != 0);
|
||||||
if (obj.isNull())
|
if (obj.isNull())
|
||||||
{
|
{
|
||||||
pBinder->bind(pos++, Poco::Data::Keywords::null, dir);
|
pBinder->bind(pos++, Poco::Data::Keywords::null, dir);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -289,16 +289,16 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Nullable<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const Nullable<T>& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
if (obj.isNull())
|
if (obj.isNull())
|
||||||
{
|
{
|
||||||
pPreparator->prepare(pos++, (Poco::Any&)Poco::Data::Keywords::null);
|
pPreparator->prepare(pos++, Poco::Data::Keywords::null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPreparator->prepare(pos++, (T&)obj.value());
|
pPreparator->prepare(pos++, obj.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,29 +416,29 @@ public:
|
|||||||
tupleBind<TupleConstRef, T19, 19>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T19, 19>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T13, 13>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T14, 14>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T15, 15>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T15, 15>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T16, 16>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T16, 16>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T17, 17>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T17, 17>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T18, 18>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T18, 18>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T19, 19>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T19, 19>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -545,28 +545,28 @@ public:
|
|||||||
tupleBind<TupleConstRef, T18, 18>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T18, 18>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T13, 13>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T14, 14>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T15, 15>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T15, 15>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T16, 16>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T16, 16>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T17, 17>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T17, 17>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T18, 18>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T18, 18>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -669,27 +669,27 @@ public:
|
|||||||
tupleBind<TupleConstRef, T17, 17>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T17, 17>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
TypeHandler<T0>::prepare(pos++, tuple.template get<0>(), pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T1>::prepare(pos++, tuple.template get<1>(), pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T2>::prepare(pos++, tuple.template get<2>(), pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T3>::prepare(pos++, tuple.template get<3>(), pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T4>::prepare(pos++, tuple.template get<4>(), pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T5>::prepare(pos++, tuple.template get<5>(), pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T6>::prepare(pos++, tuple.template get<6>(), pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T7>::prepare(pos++, tuple.template get<7>(), pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T8>::prepare(pos++, tuple.template get<8>(), pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T9>::prepare(pos++, tuple.template get<9>(), pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T10>::prepare(pos++, tuple.template get<10>(), pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T11>::prepare(pos++, tuple.template get<11>(), pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T12>::prepare(pos++, tuple.template get<12>(), pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T13>::prepare(pos++, tuple.template get<13>(), pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T14>::prepare(pos++, tuple.template get<14>(), pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T15>::prepare(pos++, tuple.template get<15>(), pPreparator);
|
tuplePrepare<TupleConstRef, T15, 15>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T16>::prepare(pos++, tuple.template get<16>(), pPreparator);
|
tuplePrepare<TupleConstRef, T16, 16>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T17>::prepare(pos++, tuple.template get<17>(), pPreparator);
|
tuplePrepare<TupleConstRef, T17, 17>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -791,23 +791,23 @@ public:
|
|||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T13, 13>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T14, 14>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T15, 15>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T15, 15>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T16, 16>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T16, 16>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -902,25 +902,25 @@ public:
|
|||||||
tupleBind<TupleConstRef, T15, 15>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T15, 15>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T13, 13>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T14, 14>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T15, 15>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T15, 15>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1011,24 +1011,24 @@ public:
|
|||||||
tupleBind<TupleConstRef, T14, 14>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T14, 14>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
TypeHandler<T0>::prepare(pos++, tuple.template get<0>(), pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T1>::prepare(pos++, tuple.template get<1>(), pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T2>::prepare(pos++, tuple.template get<2>(), pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T3>::prepare(pos++, tuple.template get<3>(), pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T4>::prepare(pos++, tuple.template get<4>(), pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T5>::prepare(pos++, tuple.template get<5>(), pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T6>::prepare(pos++, tuple.template get<6>(), pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T7>::prepare(pos++, tuple.template get<7>(), pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T8>::prepare(pos++, tuple.template get<8>(), pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T9>::prepare(pos++, tuple.template get<9>(), pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T10>::prepare(pos++, tuple.template get<10>(), pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T11>::prepare(pos++, tuple.template get<11>(), pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T12>::prepare(pos++, tuple.template get<12>(), pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T13>::prepare(pos++, tuple.template get<13>(), pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
TypeHandler<T14>::prepare(pos++, tuple.template get<14>(), pPreparator);
|
tuplePrepare<TupleConstRef, T14, 14>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1115,23 +1115,23 @@ public:
|
|||||||
tupleBind<TupleConstRef, T13, 13>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T13, 13>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T13, 13>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T13, 13>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1214,22 +1214,22 @@ public:
|
|||||||
tupleBind<TupleConstRef, T12, 12>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T12, 12>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T12, 12>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T12, 12>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1308,21 +1308,21 @@ public:
|
|||||||
tupleBind<TupleConstRef, T11, 11>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T11, 11>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T11, 11>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T11, 11>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1397,20 +1397,20 @@ public:
|
|||||||
tupleBind<TupleConstRef, T10, 10>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T10, 10>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T10, 10>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T10, 10>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1472,19 +1472,19 @@ public:
|
|||||||
tupleBind<TupleConstRef, T9, 9>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T9, 9>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T9, 9>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T9, 9>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1543,18 +1543,18 @@ public:
|
|||||||
tupleBind<TupleConstRef, T8, 8>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T8, 8>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T8, 8>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T8, 8>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1610,17 +1610,17 @@ public:
|
|||||||
tupleBind<TupleConstRef, T7, 7>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T7, 7>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T7, 7>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T7, 7>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1673,16 +1673,16 @@ public:
|
|||||||
tupleBind<TupleConstRef, T6, 6>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T6, 6>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T6, 6>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T6, 6>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1732,15 +1732,15 @@ public:
|
|||||||
tupleBind<TupleConstRef, T5, 5>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T5, 5>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T5, 5>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T5, 5>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1787,14 +1787,14 @@ public:
|
|||||||
tupleBind<TupleConstRef, T4, 4>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T4, 4>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T4, 4>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T4, 4>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1838,13 +1838,13 @@ public:
|
|||||||
tupleBind<TupleConstRef, T3, 3>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T3, 3>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T3, 3>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T3, 3>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1885,12 +1885,12 @@ public:
|
|||||||
tupleBind<TupleConstRef, T2, 2>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T2, 2>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T2, 2>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T2, 2>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1928,11 +1928,11 @@ public:
|
|||||||
tupleBind<TupleConstRef, T1, 1>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T1, 1>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
tuplePrepare<TupleRef, T1, 1>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T1, 1>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1967,10 +1967,10 @@ public:
|
|||||||
tupleBind<TupleConstRef, T0, 0>(pos, tuple, pBinder, dir);
|
tupleBind<TupleConstRef, T0, 0>(pos, tuple, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, TupleRef tuple, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, TupleConstRef tuple, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert (pPreparator != 0);
|
poco_assert (pPreparator != 0);
|
||||||
tuplePrepare<TupleRef, T0, 0>(pos, tuple, pPreparator);
|
tuplePrepare<TupleConstRef, T0, 0>(pos, tuple, pPreparator);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::size_t size()
|
static std::size_t size()
|
||||||
@@ -1991,7 +1991,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class K, class V>
|
template <class K, class V>
|
||||||
class TypeHandler<std::pair<K, V> >: public AbstractTypeHandler
|
class TypeHandler<std::pair<K, V> >: public AbstractTypeHandler
|
||||||
{
|
{
|
||||||
@@ -2015,7 +2014,7 @@ public:
|
|||||||
TypeHandler<V>::extract(pos, obj.second, defVal.second, pExt);
|
TypeHandler<V>::extract(pos, obj.second, defVal.second, pExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, std::pair<K, V>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const std::pair<K, V>& obj, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
TypeHandler<K>::prepare(pos, obj.first, pPreparator);
|
TypeHandler<K>::prepare(pos, obj.first, pPreparator);
|
||||||
pos += TypeHandler<K>::size();
|
pos += TypeHandler<K>::size();
|
||||||
@@ -2055,12 +2054,10 @@ public:
|
|||||||
TypeHandler<T>::extract(pos, *obj, *obj, pExt);
|
TypeHandler<T>::extract(pos, *obj, *obj, pExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Poco::AutoPtr<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const Poco::AutoPtr<T>&, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
if (!obj)
|
TypeHandler<T>::prepare(pos, T(), pPreparator);
|
||||||
obj = new T();
|
|
||||||
TypeHandler<T>::prepare(pos, *obj, pPreparator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -2077,7 +2074,7 @@ class TypeHandler<Poco::SharedPtr<T> >: public AbstractTypeHandler
|
|||||||
public:
|
public:
|
||||||
static void bind(std::size_t pos, const Poco::SharedPtr<T>& obj, AbstractBinder* pBinder, AbstractBinder::Direction dir)
|
static void bind(std::size_t pos, const Poco::SharedPtr<T>& obj, AbstractBinder* pBinder, AbstractBinder::Direction dir)
|
||||||
{
|
{
|
||||||
// *obj will trigger a nullpointer exception if empty: this is on purpose
|
// *obj will trigger a nullpointer exception if empty
|
||||||
TypeHandler<T>::bind(pos, *obj, pBinder, dir);
|
TypeHandler<T>::bind(pos, *obj, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2097,12 +2094,10 @@ public:
|
|||||||
TypeHandler<T>::extract(pos, *obj, *obj, pExt);
|
TypeHandler<T>::extract(pos, *obj, *obj, pExt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Poco::SharedPtr<T>& obj, AbstractPreparator* pPreparator)
|
static void prepare(std::size_t pos, const Poco::SharedPtr<T>&, AbstractPreparator* pPreparator)
|
||||||
{
|
{
|
||||||
poco_assert_dbg (pPreparator != 0);
|
poco_assert_dbg (pPreparator != 0);
|
||||||
if (!obj)
|
TypeHandler<T>::prepare(pos, T(), pPreparator);
|
||||||
obj = new T();
|
|
||||||
TypeHandler<T>::prepare(pos, *obj, pPreparator);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include "Poco/DateTime.h"
|
||||||
#include "Poco/Data/SessionFactory.h"
|
#include "Poco/Data/SessionFactory.h"
|
||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
#include "Poco/Data/RecordSet.h"
|
#include "Poco/Data/RecordSet.h"
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace Poco::Data::Keywords;
|
using namespace Poco::Data::Keywords;
|
||||||
|
using Poco::DateTime;
|
||||||
using Poco::Data::Session;
|
using Poco::Data::Session;
|
||||||
using Poco::Data::Statement;
|
using Poco::Data::Statement;
|
||||||
using Poco::Data::RecordSet;
|
using Poco::Data::RecordSet;
|
||||||
@@ -66,11 +68,13 @@ int main(int argc, char** argv)
|
|||||||
session << "DROP TABLE IF EXISTS Person", now;
|
session << "DROP TABLE IF EXISTS Person", now;
|
||||||
|
|
||||||
// (re)create table
|
// (re)create table
|
||||||
session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3))", now;
|
session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3), Birthday DATE)", now;
|
||||||
|
|
||||||
// insert some rows
|
// insert some rows
|
||||||
session << "INSERT INTO Person VALUES('Bart Simpson', 'Springfield', 12)", now;
|
DateTime bd(1980, 4, 1);
|
||||||
session << "INSERT INTO Person VALUES('Lisa Simpson', 'Springfield', 10)", now;
|
DateTime ld(1982, 5, 9);
|
||||||
|
session << "INSERT INTO Person VALUES('Bart Simpson', 'Springfield', 12, ?)", use(bd), now;
|
||||||
|
session << "INSERT INTO Person VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(ld), now;
|
||||||
|
|
||||||
// a simple query
|
// a simple query
|
||||||
Statement select(session);
|
Statement select(session);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include "Poco/DateTime.h"
|
||||||
#include "Poco/Data/SessionFactory.h"
|
#include "Poco/Data/SessionFactory.h"
|
||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
#include "Poco/Data/Statement.h"
|
#include "Poco/Data/Statement.h"
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace Poco::Data::Keywords;
|
using namespace Poco::Data::Keywords;
|
||||||
|
using Poco::DateTime;
|
||||||
using Poco::Data::Session;
|
using Poco::Data::Session;
|
||||||
using Poco::Data::Statement;
|
using Poco::Data::Statement;
|
||||||
using Poco::Data::RecordSet;
|
using Poco::Data::RecordSet;
|
||||||
@@ -111,13 +113,17 @@ int main(int argc, char** argv)
|
|||||||
session << "DROP TABLE IF EXISTS Simpsons", now;
|
session << "DROP TABLE IF EXISTS Simpsons", now;
|
||||||
|
|
||||||
// (re)create table
|
// (re)create table
|
||||||
session << "CREATE TABLE Simpsons (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3))", now;
|
session << "CREATE TABLE Simpsons (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3), Birthday DATE)", now;
|
||||||
|
|
||||||
// insert some rows
|
// insert some rows
|
||||||
session << "INSERT INTO Simpsons VALUES('Homer Simpson', 'Springfield', 42)", now;
|
DateTime hd(1956, 3, 1);
|
||||||
session << "INSERT INTO Simpsons VALUES('Marge Simpson', 'Springfield', 38)", now;
|
session << "INSERT INTO Simpsons VALUES('Homer Simpson', 'Springfield', 42, ?)", use(hd), now;
|
||||||
session << "INSERT INTO Simpsons VALUES('Bart Simpson', 'Springfield', 12)", now;
|
hd.assign(1954, 10, 1);
|
||||||
session << "INSERT INTO Simpsons VALUES('Lisa Simpson', 'Springfield', 10)", now;
|
session << "INSERT INTO Simpsons VALUES('Marge Simpson', 'Springfield', 38, ?)", use(hd), now;
|
||||||
|
hd.assign(1980, 4, 1);
|
||||||
|
session << "INSERT INTO Simpsons VALUES('Bart Simpson', 'Springfield', 12, ?)", use(hd), now;
|
||||||
|
hd.assign(1982, 5, 9);
|
||||||
|
session << "INSERT INTO Simpsons VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(hd), now;
|
||||||
|
|
||||||
// create a statement and print the column names and data as HTML table
|
// create a statement and print the column names and data as HTML table
|
||||||
HTMLTableFormatter tf;
|
HTMLTableFormatter tf;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
|
#include "Poco/DateTimeFormatter.h"
|
||||||
#include "Poco/Data/SessionFactory.h"
|
#include "Poco/Data/SessionFactory.h"
|
||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
#include "Poco/Data/TypeHandler.h"
|
#include "Poco/Data/TypeHandler.h"
|
||||||
@@ -41,15 +42,18 @@
|
|||||||
|
|
||||||
|
|
||||||
using namespace Poco::Data::Keywords;
|
using namespace Poco::Data::Keywords;
|
||||||
|
using Poco::DateTime;
|
||||||
|
using Poco::DateTimeFormatter;
|
||||||
using Poco::Data::Session;
|
using Poco::Data::Session;
|
||||||
using Poco::Data::Statement;
|
using Poco::Data::Statement;
|
||||||
|
|
||||||
|
|
||||||
struct Person
|
struct Person
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string address;
|
std::string address;
|
||||||
int age;
|
int age;
|
||||||
|
DateTime birthday;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -73,6 +77,7 @@ public:
|
|||||||
TypeHandler<std::string>::bind(pos++, person.name, pBinder, dir);
|
TypeHandler<std::string>::bind(pos++, person.name, pBinder, dir);
|
||||||
TypeHandler<std::string>::bind(pos++, person.address, pBinder, dir);
|
TypeHandler<std::string>::bind(pos++, person.address, pBinder, dir);
|
||||||
TypeHandler<int>::bind(pos++, person.age, pBinder, dir);
|
TypeHandler<int>::bind(pos++, person.age, pBinder, dir);
|
||||||
|
TypeHandler<DateTime>::bind(pos++, person.birthday, pBinder, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void extract(std::size_t pos, Person& person, const Person& deflt, AbstractExtractor* pExtr)
|
static void extract(std::size_t pos, Person& person, const Person& deflt, AbstractExtractor* pExtr)
|
||||||
@@ -80,13 +85,15 @@ public:
|
|||||||
TypeHandler<std::string>::extract(pos++, person.name, deflt.name, pExtr);
|
TypeHandler<std::string>::extract(pos++, person.name, deflt.name, pExtr);
|
||||||
TypeHandler<std::string>::extract(pos++, person.address, deflt.address, pExtr);
|
TypeHandler<std::string>::extract(pos++, person.address, deflt.address, pExtr);
|
||||||
TypeHandler<int>::extract(pos++, person.age, deflt.age, pExtr);
|
TypeHandler<int>::extract(pos++, person.age, deflt.age, pExtr);
|
||||||
|
TypeHandler<DateTime>::extract(pos++, person.birthday, deflt.birthday, pExtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepare(std::size_t pos, Person& person, AbstractPreparator* pPrep)
|
static void prepare(std::size_t pos, const Person& person, AbstractPreparator* pPrep)
|
||||||
{
|
{
|
||||||
TypeHandler<std::string>::prepare(pos++, person.name, pPrep);
|
TypeHandler<std::string>::prepare(pos++, person.name, pPrep);
|
||||||
TypeHandler<std::string>::prepare(pos++, person.address, pPrep);
|
TypeHandler<std::string>::prepare(pos++, person.address, pPrep);
|
||||||
TypeHandler<int>::prepare(pos++, person.age, pPrep);
|
TypeHandler<int>::prepare(pos++, person.age, pPrep);
|
||||||
|
TypeHandler<DateTime>::prepare(pos++, person.birthday, pPrep);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -106,49 +113,59 @@ int main(int argc, char** argv)
|
|||||||
session << "DROP TABLE IF EXISTS Person", now;
|
session << "DROP TABLE IF EXISTS Person", now;
|
||||||
|
|
||||||
// (re)create table
|
// (re)create table
|
||||||
session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3))", now;
|
session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3), Birthday DATE)", now;
|
||||||
|
|
||||||
// insert some rows
|
// insert some rows
|
||||||
Person person =
|
Person person =
|
||||||
{
|
{
|
||||||
"Bart Simpson",
|
"Bart Simpson",
|
||||||
"Springfield",
|
"Springfield",
|
||||||
12
|
10,
|
||||||
|
DateTime(1980, 4, 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
Statement insert(session);
|
Statement insert(session);
|
||||||
insert << "INSERT INTO Person VALUES(?, ?, ?)",
|
insert << "INSERT INTO Person VALUES(?, ?, ?, ?)",
|
||||||
use(person);
|
use(person);
|
||||||
|
|
||||||
insert.execute();
|
insert.execute();
|
||||||
|
|
||||||
person.name = "Lisa Simpson";
|
person.name = "Lisa Simpson";
|
||||||
person.address = "Springfield";
|
person.address = "Springfield";
|
||||||
person.age = 10;
|
person.age = 8;
|
||||||
|
person.birthday = DateTime(1982, 5, 9);
|
||||||
|
|
||||||
insert.execute();
|
insert.execute();
|
||||||
|
|
||||||
// a simple query
|
// a simple query
|
||||||
Statement select(session);
|
Statement select(session);
|
||||||
select << "SELECT Name, Address, Age FROM Person",
|
select << "SELECT Name, Address, Age, Birthday FROM Person",
|
||||||
into(person),
|
into(person),
|
||||||
range(0, 1); // iterate over result set one row at a time
|
range(0, 1); // iterate over result set one row at a time
|
||||||
|
|
||||||
while (!select.done())
|
while (!select.done())
|
||||||
{
|
{
|
||||||
select.execute();
|
select.execute();
|
||||||
std::cout << person.name << " " << person.address << " " << person.age << std::endl;
|
std::cout << person.name << "\t"
|
||||||
|
<< person.address << "\t"
|
||||||
|
<< person.age << "\t"
|
||||||
|
<< DateTimeFormatter::format(person.birthday, "%b %d %Y")
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// another query - store the result in a container
|
// another query - store the result in a container
|
||||||
std::vector<Person> persons;
|
std::vector<Person> persons;
|
||||||
session << "SELECT Name, Address, Age FROM Person",
|
session << "SELECT Name, Address, Age, Birthday FROM Person",
|
||||||
into(persons),
|
into(persons),
|
||||||
now;
|
now;
|
||||||
|
|
||||||
for (std::vector<Person>::const_iterator it = persons.begin(); it != persons.end(); ++it)
|
for (std::vector<Person>::const_iterator it = persons.begin(); it != persons.end(); ++it)
|
||||||
{
|
{
|
||||||
std::cout << it->name << " " << it->address << " " << it->age << std::endl;
|
std::cout << it->name << "\t"
|
||||||
|
<< it->address << "\t"
|
||||||
|
<< it->age << "\t"
|
||||||
|
<< DateTimeFormatter::format(it->birthday, "%b %d %Y")
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -458,6 +458,8 @@ void AbstractBinder::bind(std::size_t pos, const Any& val, Direction dir)
|
|||||||
bind(pos, RefAnyCast<Time>(val), dir);
|
bind(pos, RefAnyCast<Time>(val), dir);
|
||||||
else if(type == typeid(BLOB))
|
else if(type == typeid(BLOB))
|
||||||
bind(pos, RefAnyCast<BLOB>(val), dir);
|
bind(pos, RefAnyCast<BLOB>(val), dir);
|
||||||
|
else if(type == typeid(void))
|
||||||
|
bind(pos, Keywords::null, dir);
|
||||||
#ifndef POCO_LONG_IS_64_BIT
|
#ifndef POCO_LONG_IS_64_BIT
|
||||||
else if(type == typeid(long))
|
else if(type == typeid(long))
|
||||||
bind(pos, RefAnyCast<long>(val), dir);
|
bind(pos, RefAnyCast<long>(val), dir);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ void SessionFactory::add(Connector* pIn)
|
|||||||
Poco::FastMutex::ScopedLock lock(_mutex);
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
SessionInfo info(pIn);
|
SessionInfo info(pIn);
|
||||||
std::pair<Connectors::iterator, bool> res =
|
std::pair<Connectors::iterator, bool> res =
|
||||||
_connectors.insert(std::make_pair(toLower(pIn->name()), info));
|
_connectors.insert(std::make_pair(pIn->name(), info));
|
||||||
if (!res.second) res.first->second.cnt++;
|
if (!res.second) res.first->second.cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ void SessionFactory::add(Connector* pIn)
|
|||||||
void SessionFactory::remove(const std::string& key)
|
void SessionFactory::remove(const std::string& key)
|
||||||
{
|
{
|
||||||
Poco::FastMutex::ScopedLock lock(_mutex);
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
Connectors::iterator it = _connectors.find(toLower(key));
|
Connectors::iterator it = _connectors.find(key);
|
||||||
poco_assert (_connectors.end() != it);
|
poco_assert (_connectors.end() != it);
|
||||||
|
|
||||||
--(it->second.cnt);
|
--(it->second.cnt);
|
||||||
@@ -86,7 +86,7 @@ Session SessionFactory::create(const std::string& key,
|
|||||||
std::size_t timeout)
|
std::size_t timeout)
|
||||||
{
|
{
|
||||||
Poco::FastMutex::ScopedLock lock(_mutex);
|
Poco::FastMutex::ScopedLock lock(_mutex);
|
||||||
Connectors::iterator it = _connectors.find(toLower(key));
|
Connectors::iterator it = _connectors.find(key);
|
||||||
poco_assert (_connectors.end() != it);
|
poco_assert (_connectors.end() != it);
|
||||||
|
|
||||||
return Session(it->second.ptrSI->createSession(connectionString, timeout));
|
return Session(it->second.ptrSI->createSession(connectionString, timeout));
|
||||||
|
|||||||
@@ -1,9 +1,34 @@
|
|||||||
set(LIBNAME "PocoFoundation")
|
set(LIBNAME "PocoFoundation")
|
||||||
|
<<<<<<< HEAD
|
||||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
set(LIBNAME "${LIBNAME}d")
|
set(LIBNAME "${LIBNAME}d")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
# cmake has CMAKE_RC_COMPILER, but no message compiler
|
||||||
|
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
|
||||||
|
# this path is only present for 2008+, but we currently require PATH to
|
||||||
|
# be set up anyway
|
||||||
|
get_filename_component(sdk_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" REALPATH)
|
||||||
|
if (X64)
|
||||||
|
set(sdk_bindir "${sdk_dir}/bin/x64")
|
||||||
|
else (X64)
|
||||||
|
set(sdk_bindir "${sdk_dir}/bin")
|
||||||
|
endif (X64)
|
||||||
|
endif ()
|
||||||
|
find_program(CMAKE_MC_COMPILER mc.exe HINTS "${sdk_bindir}"
|
||||||
|
DOC "path to message compiler")
|
||||||
|
if (NOT CMAKE_MC_COMPILER)
|
||||||
|
message(FATAL_ERROR "message compiler not found: required to build")
|
||||||
|
endif (NOT CMAKE_MC_COMPILER)
|
||||||
|
message(STATUS "Found message compiler: ${CMAKE_MC_COMPILER}")
|
||||||
|
mark_as_advanced(CMAKE_MC_COMPILER)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
set( BASE_SRCS
|
set( BASE_SRCS
|
||||||
src/ASCIIEncoding.cpp
|
src/ASCIIEncoding.cpp
|
||||||
src/Ascii.cpp
|
src/Ascii.cpp
|
||||||
@@ -34,6 +59,10 @@ set( BASE_SRCS
|
|||||||
src/DigestStream.cpp
|
src/DigestStream.cpp
|
||||||
src/DirectoryIterator.cpp
|
src/DirectoryIterator.cpp
|
||||||
src/Environment.cpp
|
src/Environment.cpp
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
src/Error.cpp
|
||||||
|
>>>>>>> develop
|
||||||
src/ErrorHandler.cpp
|
src/ErrorHandler.cpp
|
||||||
src/Event.cpp
|
src/Event.cpp
|
||||||
src/EventArgs.cpp
|
src/EventArgs.cpp
|
||||||
@@ -110,6 +139,10 @@ set( BASE_SRCS
|
|||||||
src/StreamCopier.cpp
|
src/StreamCopier.cpp
|
||||||
src/StreamTokenizer.cpp
|
src/StreamTokenizer.cpp
|
||||||
src/String.cpp
|
src/String.cpp
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
src/NumericString.cpp
|
||||||
|
>>>>>>> develop
|
||||||
src/StringTokenizer.cpp
|
src/StringTokenizer.cpp
|
||||||
src/SynchronizedObject.cpp
|
src/SynchronizedObject.cpp
|
||||||
src/Task.cpp
|
src/Task.cpp
|
||||||
@@ -184,6 +217,25 @@ set(WIN_SRCS
|
|||||||
src/WindowsConsoleChannel.cpp
|
src/WindowsConsoleChannel.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
if (WIN32)
|
||||||
|
set(RES_SRCS ${CMAKE_SOURCE_DIR}/Foundation/include/Poco/pocomsg.h)
|
||||||
|
set_source_files_properties(${RES_SRCS} PROPERTIES GENERATED true)
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT ${RES_SRCS}
|
||||||
|
DEPENDS ${CMAKE_SOURCE_DIR}/Foundation/src/pocomsg.mc
|
||||||
|
COMMAND ${CMAKE_MC_COMPILER}
|
||||||
|
ARGS
|
||||||
|
-h ${CMAKE_SOURCE_DIR}/Foundation/src
|
||||||
|
-r ${CMAKE_SOURCE_DIR}/Foundation/src
|
||||||
|
${CMAKE_SOURCE_DIR}/Foundation/src/pocomsg.mc
|
||||||
|
VERBATIM # recommended: p260
|
||||||
|
)
|
||||||
|
list(APPEND WIN_SRCS ${RES_SRCS})
|
||||||
|
endif (WIN32)
|
||||||
|
|
||||||
|
>>>>>>> develop
|
||||||
set(LIN_SRCS
|
set(LIN_SRCS
|
||||||
src/SyslogChannel.cpp
|
src/SyslogChannel.cpp
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -553,6 +553,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Decoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Encoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Base64Decoder.cpp"
|
RelativePath=".\src\Base64Decoder.cpp"
|
||||||
>
|
>
|
||||||
@@ -733,6 +741,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Decoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Encoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Base64Decoder.h"
|
RelativePath=".\include\Poco\Base64Decoder.h"
|
||||||
>
|
>
|
||||||
@@ -6201,6 +6217,10 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Error.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Exception.cpp"
|
RelativePath=".\src\Exception.cpp"
|
||||||
>
|
>
|
||||||
@@ -6497,6 +6517,10 @@
|
|||||||
RelativePath=".\src\String.cpp"
|
RelativePath=".\src\String.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumericString.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\StringTokenizer.cpp"
|
RelativePath=".\src\StringTokenizer.cpp"
|
||||||
>
|
>
|
||||||
@@ -6581,6 +6605,10 @@
|
|||||||
RelativePath=".\include\Poco\Environment_WINCE.h"
|
RelativePath=".\include\Poco\Environment_WINCE.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Error.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Exception.h"
|
RelativePath=".\include\Poco\Exception.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -290,6 +290,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="src\Ascii.cpp" />
|
<ClCompile Include="src\Ascii.cpp" />
|
||||||
<ClCompile Include="src\AtomicCounter.cpp" />
|
<ClCompile Include="src\AtomicCounter.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp" />
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Bugcheck.cpp" />
|
<ClCompile Include="src\Bugcheck.cpp" />
|
||||||
<ClCompile Include="src\ByteOrder.cpp" />
|
<ClCompile Include="src\ByteOrder.cpp" />
|
||||||
<ClCompile Include="src\Checksum.cpp" />
|
<ClCompile Include="src\Checksum.cpp" />
|
||||||
@@ -328,6 +333,10 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Error.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Exception.cpp" />
|
<ClCompile Include="src\Exception.cpp" />
|
||||||
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
||||||
<ClCompile Include="src\Format.cpp" />
|
<ClCompile Include="src\Format.cpp" />
|
||||||
@@ -377,6 +386,10 @@
|
|||||||
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
|
<ClCompile Include="src\NestedDiagnosticContext.cpp" />
|
||||||
<ClCompile Include="src\NumberFormatter.cpp" />
|
<ClCompile Include="src\NumberFormatter.cpp" />
|
||||||
<ClCompile Include="src\NumberParser.cpp" />
|
<ClCompile Include="src\NumberParser.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\NumericString.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\RefCountedObject.cpp" />
|
<ClCompile Include="src\RefCountedObject.cpp" />
|
||||||
<ClCompile Include="src\String.cpp" />
|
<ClCompile Include="src\String.cpp" />
|
||||||
<ClCompile Include="src\StringTokenizer.cpp" />
|
<ClCompile Include="src\StringTokenizer.cpp" />
|
||||||
@@ -976,6 +989,11 @@
|
|||||||
<ClInclude Include="include\Poco\AtomicCounter.h" />
|
<ClInclude Include="include\Poco\AtomicCounter.h" />
|
||||||
<ClInclude Include="include\Poco\AutoPtr.h" />
|
<ClInclude Include="include\Poco\AutoPtr.h" />
|
||||||
<ClInclude Include="include\Poco\AutoReleasePool.h" />
|
<ClInclude Include="include\Poco\AutoReleasePool.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Buffer.h" />
|
<ClInclude Include="include\Poco\Buffer.h" />
|
||||||
<ClInclude Include="include\Poco\Bugcheck.h" />
|
<ClInclude Include="include\Poco\Bugcheck.h" />
|
||||||
<ClInclude Include="include\Poco\ByteOrder.h" />
|
<ClInclude Include="include\Poco\ByteOrder.h" />
|
||||||
@@ -995,6 +1013,10 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Error.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Exception.h" />
|
<ClInclude Include="include\Poco\Exception.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBuffer.h" />
|
<ClInclude Include="include\Poco\FIFOBuffer.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
||||||
|
|||||||
@@ -885,6 +885,18 @@
|
|||||||
<ClCompile Include="src\UTF32Encoding.cpp">
|
<ClCompile Include="src\UTF32Encoding.cpp">
|
||||||
<Filter>Text\Source Files</Filter>
|
<Filter>Text\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Error.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\NumericString.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="include\Poco\Any.h">
|
<ClInclude Include="include\Poco\Any.h">
|
||||||
@@ -1832,6 +1844,15 @@
|
|||||||
<ClInclude Include="include\Poco\NumericString.h">
|
<ClInclude Include="include\Poco\NumericString.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Error.h">
|
||||||
|
<Filter>Core\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="src\pocomsg.rc">
|
<ResourceCompile Include="src\pocomsg.rc">
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLibrary", "testsuite\Te
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{F1EE93DF-347F-4CB3-B191-C4E63F38E972}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{F1EE93DF-347F-4CB3-B191-C4E63F38E972}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
<<<<<<< HEAD
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176} = {8164D41D-B053-405B-826C-CF37AC0EF176}
|
{8164D41D-B053-405B-826C-CF37AC0EF176} = {8164D41D-B053-405B-826C-CF37AC0EF176}
|
||||||
|
=======
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F} = {0955EB03-544B-4BD4-9C10-89CF38078F5F}
|
||||||
|
{8164D41D-B053-405B-826C-CF37AC0EF176} = {8164D41D-B053-405B-826C-CF37AC0EF176}
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A} = {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}
|
||||||
|
>>>>>>> develop
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
@@ -28,6 +34,7 @@ Global
|
|||||||
release_static_mt|Win32 = release_static_mt|Win32
|
release_static_mt|Win32 = release_static_mt|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
<<<<<<< HEAD
|
||||||
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.ActiveCfg = debug_shared|Win32
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.ActiveCfg = debug_shared|Win32
|
||||||
@@ -52,6 +59,8 @@ Global
|
|||||||
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
=======
|
||||||
|
>>>>>>> develop
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
@@ -64,6 +73,33 @@ Global
|
|||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
{8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||||
|
{6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.ActiveCfg = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.Build.0 = debug_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.Build.0 = release_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.ActiveCfg = release_shared|Win32
|
||||||
|
{0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.Build.0 = release_shared|Win32
|
||||||
|
>>>>>>> develop
|
||||||
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||||
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||||
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
{F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||||
|
|||||||
@@ -334,6 +334,10 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Error.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Exception.cpp" />
|
<ClCompile Include="src\Exception.cpp" />
|
||||||
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
||||||
<ClCompile Include="src\Format.cpp" />
|
<ClCompile Include="src\Format.cpp" />
|
||||||
@@ -385,11 +389,20 @@
|
|||||||
<ClCompile Include="src\NumberParser.cpp" />
|
<ClCompile Include="src\NumberParser.cpp" />
|
||||||
<ClCompile Include="src\RefCountedObject.cpp" />
|
<ClCompile Include="src\RefCountedObject.cpp" />
|
||||||
<ClCompile Include="src\String.cpp" />
|
<ClCompile Include="src\String.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\NumericString.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\StringTokenizer.cpp" />
|
<ClCompile Include="src\StringTokenizer.cpp" />
|
||||||
<ClCompile Include="src\UTF32Encoding.cpp" />
|
<ClCompile Include="src\UTF32Encoding.cpp" />
|
||||||
<ClCompile Include="src\Var.cpp" />
|
<ClCompile Include="src\Var.cpp" />
|
||||||
<ClCompile Include="src\VarHolder.cpp" />
|
<ClCompile Include="src\VarHolder.cpp" />
|
||||||
<ClCompile Include="src\Void.cpp" />
|
<ClCompile Include="src\Void.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp" />
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Base64Decoder.cpp" />
|
<ClCompile Include="src\Base64Decoder.cpp" />
|
||||||
<ClCompile Include="src\Base64Encoder.cpp" />
|
<ClCompile Include="src\Base64Encoder.cpp" />
|
||||||
<ClCompile Include="src\BinaryReader.cpp" />
|
<ClCompile Include="src\BinaryReader.cpp" />
|
||||||
@@ -1001,6 +1014,10 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Error.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Exception.h" />
|
<ClInclude Include="include\Poco\Exception.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBuffer.h" />
|
<ClInclude Include="include\Poco\FIFOBuffer.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
||||||
@@ -1041,6 +1058,11 @@
|
|||||||
<ClInclude Include="include\Poco\UTFString.h" />
|
<ClInclude Include="include\Poco\UTFString.h" />
|
||||||
<ClInclude Include="include\Poco\Version.h" />
|
<ClInclude Include="include\Poco\Version.h" />
|
||||||
<ClInclude Include="include\Poco\Void.h" />
|
<ClInclude Include="include\Poco\Void.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
||||||
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
||||||
<ClInclude Include="include\Poco\BinaryReader.h" />
|
<ClInclude Include="include\Poco\BinaryReader.h" />
|
||||||
|
|||||||
@@ -222,6 +222,12 @@
|
|||||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Error.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Exception.cpp">
|
<ClCompile Include="src\Exception.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -264,12 +270,27 @@
|
|||||||
<ClCompile Include="src\String.cpp">
|
<ClCompile Include="src\String.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\NumericString.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\StringTokenizer.cpp">
|
<ClCompile Include="src\StringTokenizer.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\Void.cpp">
|
<ClCompile Include="src\Void.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Base64Decoder.cpp">
|
<ClCompile Include="src\Base64Decoder.cpp">
|
||||||
<Filter>Streams\Source Files</Filter>
|
<Filter>Streams\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -944,6 +965,12 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Error.h">
|
||||||
|
<Filter>Core\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Exception.h">
|
<ClInclude Include="include\Poco\Exception.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -1046,6 +1073,15 @@
|
|||||||
<ClInclude Include="include\Poco\Void.h">
|
<ClInclude Include="include\Poco\Void.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h">
|
<ClInclude Include="include\Poco\Base64Decoder.h">
|
||||||
<Filter>Streams\Header Files</Filter>
|
<Filter>Streams\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
@@ -543,6 +543,9 @@
|
|||||||
Name="VCCLCompilerTool"/>
|
Name="VCCLCompilerTool"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Error.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Exception.cpp">
|
RelativePath=".\src\Exception.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -762,6 +765,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\src\NumberParser.cpp">
|
RelativePath=".\src\NumberParser.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumericString.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\RefCountedObject.cpp">
|
RelativePath=".\src\RefCountedObject.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -835,6 +841,9 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Environment_WIN32U.h">
|
RelativePath=".\include\Poco\Environment_WIN32U.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Error.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Exception.h">
|
RelativePath=".\include\Poco\Exception.h">
|
||||||
</File>
|
</File>
|
||||||
@@ -951,6 +960,12 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="">
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Decoder.cpp">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Encoder.cpp">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Base64Decoder.cpp">
|
RelativePath=".\src\Base64Decoder.cpp">
|
||||||
</File>
|
</File>
|
||||||
@@ -1084,6 +1099,12 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="">
|
Filter="">
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Decoder.h">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Encoder.h">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Base64Decoder.h">
|
RelativePath=".\include\Poco\Base64Decoder.h">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -735,6 +735,10 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Error.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Exception.cpp"
|
RelativePath=".\src\Exception.cpp"
|
||||||
>
|
>
|
||||||
@@ -1031,6 +1035,10 @@
|
|||||||
RelativePath=".\src\String.cpp"
|
RelativePath=".\src\String.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumericString.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\StringTokenizer.cpp"
|
RelativePath=".\src\StringTokenizer.cpp"
|
||||||
>
|
>
|
||||||
@@ -1119,6 +1127,10 @@
|
|||||||
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Error.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Exception.h"
|
RelativePath=".\include\Poco\Exception.h"
|
||||||
>
|
>
|
||||||
@@ -1267,6 +1279,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Decoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Encoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Base64Decoder.cpp"
|
RelativePath=".\src\Base64Decoder.cpp"
|
||||||
>
|
>
|
||||||
@@ -1447,6 +1467,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Decoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Encoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Base64Decoder.h"
|
RelativePath=".\include\Poco\Base64Decoder.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -732,6 +732,10 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Error.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Exception.cpp"
|
RelativePath=".\src\Exception.cpp"
|
||||||
>
|
>
|
||||||
@@ -1028,6 +1032,10 @@
|
|||||||
RelativePath=".\src\String.cpp"
|
RelativePath=".\src\String.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumericString.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\StringTokenizer.cpp"
|
RelativePath=".\src\StringTokenizer.cpp"
|
||||||
>
|
>
|
||||||
@@ -1116,6 +1124,10 @@
|
|||||||
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Error.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Exception.h"
|
RelativePath=".\include\Poco\Exception.h"
|
||||||
>
|
>
|
||||||
@@ -1264,6 +1276,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Decoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Encoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Base64Decoder.cpp"
|
RelativePath=".\src\Base64Decoder.cpp"
|
||||||
>
|
>
|
||||||
@@ -1444,6 +1464,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Decoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Encoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Base64Decoder.h"
|
RelativePath=".\include\Poco\Base64Decoder.h"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -334,6 +334,7 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Error.cpp" />
|
||||||
<ClCompile Include="src\Exception.cpp" />
|
<ClCompile Include="src\Exception.cpp" />
|
||||||
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
||||||
<ClCompile Include="src\Format.cpp" />
|
<ClCompile Include="src\Format.cpp" />
|
||||||
@@ -385,11 +386,14 @@
|
|||||||
<ClCompile Include="src\NumberParser.cpp" />
|
<ClCompile Include="src\NumberParser.cpp" />
|
||||||
<ClCompile Include="src\RefCountedObject.cpp" />
|
<ClCompile Include="src\RefCountedObject.cpp" />
|
||||||
<ClCompile Include="src\String.cpp" />
|
<ClCompile Include="src\String.cpp" />
|
||||||
|
<ClCompile Include="src\NumericString.cpp" />
|
||||||
<ClCompile Include="src\StringTokenizer.cpp" />
|
<ClCompile Include="src\StringTokenizer.cpp" />
|
||||||
<ClCompile Include="src\UTF32Encoding.cpp" />
|
<ClCompile Include="src\UTF32Encoding.cpp" />
|
||||||
<ClCompile Include="src\Var.cpp" />
|
<ClCompile Include="src\Var.cpp" />
|
||||||
<ClCompile Include="src\VarHolder.cpp" />
|
<ClCompile Include="src\VarHolder.cpp" />
|
||||||
<ClCompile Include="src\Void.cpp" />
|
<ClCompile Include="src\Void.cpp" />
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp" />
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp" />
|
||||||
<ClCompile Include="src\Base64Decoder.cpp" />
|
<ClCompile Include="src\Base64Decoder.cpp" />
|
||||||
<ClCompile Include="src\Base64Encoder.cpp" />
|
<ClCompile Include="src\Base64Encoder.cpp" />
|
||||||
<ClCompile Include="src\BinaryReader.cpp" />
|
<ClCompile Include="src\BinaryReader.cpp" />
|
||||||
@@ -1000,6 +1004,7 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||||
|
<ClInclude Include="include\Poco\Error.h" />
|
||||||
<ClInclude Include="include\Poco\Exception.h" />
|
<ClInclude Include="include\Poco\Exception.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
||||||
<ClInclude Include="include\Poco\Format.h" />
|
<ClInclude Include="include\Poco\Format.h" />
|
||||||
@@ -1038,6 +1043,8 @@
|
|||||||
<ClInclude Include="include\Poco\UTF32Encoding.h" />
|
<ClInclude Include="include\Poco\UTF32Encoding.h" />
|
||||||
<ClInclude Include="include\Poco\Version.h" />
|
<ClInclude Include="include\Poco\Version.h" />
|
||||||
<ClInclude Include="include\Poco\Void.h" />
|
<ClInclude Include="include\Poco\Void.h" />
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h" />
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
||||||
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
||||||
<ClInclude Include="include\Poco\BinaryReader.h" />
|
<ClInclude Include="include\Poco\BinaryReader.h" />
|
||||||
|
|||||||
@@ -222,6 +222,9 @@
|
|||||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Error.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\Exception.cpp">
|
<ClCompile Include="src\Exception.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -264,12 +267,21 @@
|
|||||||
<ClCompile Include="src\String.cpp">
|
<ClCompile Include="src\String.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\NumericString.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\StringTokenizer.cpp">
|
<ClCompile Include="src\StringTokenizer.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\Void.cpp">
|
<ClCompile Include="src\Void.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="src\Base64Decoder.cpp">
|
<ClCompile Include="src\Base64Decoder.cpp">
|
||||||
<Filter>Streams\Source Files</Filter>
|
<Filter>Streams\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -944,6 +956,9 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Error.h">
|
||||||
|
<Filter>Core\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="include\Poco\Exception.h">
|
<ClInclude Include="include\Poco\Exception.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -1046,6 +1061,12 @@
|
|||||||
<ClInclude Include="include\Poco\Void.h">
|
<ClInclude Include="include\Poco\Void.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h">
|
<ClInclude Include="include\Poco\Base64Decoder.h">
|
||||||
<Filter>Streams\Header Files</Filter>
|
<Filter>Streams\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
@@ -340,6 +340,10 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Error.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Exception.cpp" />
|
<ClCompile Include="src\Exception.cpp" />
|
||||||
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
<ClCompile Include="src\FIFOBufferStream.cpp" />
|
||||||
<ClCompile Include="src\Format.cpp" />
|
<ClCompile Include="src\Format.cpp" />
|
||||||
@@ -391,11 +395,20 @@
|
|||||||
<ClCompile Include="src\NumberParser.cpp" />
|
<ClCompile Include="src\NumberParser.cpp" />
|
||||||
<ClCompile Include="src\RefCountedObject.cpp" />
|
<ClCompile Include="src\RefCountedObject.cpp" />
|
||||||
<ClCompile Include="src\String.cpp" />
|
<ClCompile Include="src\String.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\NumericString.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\StringTokenizer.cpp" />
|
<ClCompile Include="src\StringTokenizer.cpp" />
|
||||||
<ClCompile Include="src\UTF32Encoding.cpp" />
|
<ClCompile Include="src\UTF32Encoding.cpp" />
|
||||||
<ClCompile Include="src\Var.cpp" />
|
<ClCompile Include="src\Var.cpp" />
|
||||||
<ClCompile Include="src\VarHolder.cpp" />
|
<ClCompile Include="src\VarHolder.cpp" />
|
||||||
<ClCompile Include="src\Void.cpp" />
|
<ClCompile Include="src\Void.cpp" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp" />
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Base64Decoder.cpp" />
|
<ClCompile Include="src\Base64Decoder.cpp" />
|
||||||
<ClCompile Include="src\Base64Encoder.cpp" />
|
<ClCompile Include="src\Base64Encoder.cpp" />
|
||||||
<ClCompile Include="src\BinaryReader.cpp" />
|
<ClCompile Include="src\BinaryReader.cpp" />
|
||||||
@@ -1006,6 +1019,10 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
<ClInclude Include="include\Poco\Environment_VMS.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32.h" />
|
||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
<ClInclude Include="include\Poco\Environment_WIN32U.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Error.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Exception.h" />
|
<ClInclude Include="include\Poco\Exception.h" />
|
||||||
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
<ClInclude Include="include\Poco\FIFOBufferStream.h" />
|
||||||
<ClInclude Include="include\Poco\Format.h" />
|
<ClInclude Include="include\Poco\Format.h" />
|
||||||
@@ -1044,6 +1061,11 @@
|
|||||||
<ClInclude Include="include\Poco\UTF32Encoding.h" />
|
<ClInclude Include="include\Poco\UTF32Encoding.h" />
|
||||||
<ClInclude Include="include\Poco\Version.h" />
|
<ClInclude Include="include\Poco\Version.h" />
|
||||||
<ClInclude Include="include\Poco\Void.h" />
|
<ClInclude Include="include\Poco\Void.h" />
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h" />
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h" />
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
<ClInclude Include="include\Poco\Base64Decoder.h" />
|
||||||
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
<ClInclude Include="include\Poco\Base64Encoder.h" />
|
||||||
<ClInclude Include="include\Poco\BinaryReader.h" />
|
<ClInclude Include="include\Poco\BinaryReader.h" />
|
||||||
|
|||||||
@@ -222,6 +222,12 @@
|
|||||||
<ClCompile Include="src\Environment_WIN32U.cpp">
|
<ClCompile Include="src\Environment_WIN32U.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Error.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Exception.cpp">
|
<ClCompile Include="src\Exception.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -264,12 +270,27 @@
|
|||||||
<ClCompile Include="src\String.cpp">
|
<ClCompile Include="src\String.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\NumericString.cpp">
|
||||||
|
<Filter>Core\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\StringTokenizer.cpp">
|
<ClCompile Include="src\StringTokenizer.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="src\Void.cpp">
|
<ClCompile Include="src\Void.cpp">
|
||||||
<Filter>Core\Source Files</Filter>
|
<Filter>Core\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClCompile Include="src\Base32Decoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="src\Base32Encoder.cpp">
|
||||||
|
<Filter>Streams\Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
>>>>>>> develop
|
||||||
<ClCompile Include="src\Base64Decoder.cpp">
|
<ClCompile Include="src\Base64Decoder.cpp">
|
||||||
<Filter>Streams\Source Files</Filter>
|
<Filter>Streams\Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
@@ -944,6 +965,12 @@
|
|||||||
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
<ClInclude Include="include\Poco\Environment_WIN32U.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Error.h">
|
||||||
|
<Filter>Core\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Exception.h">
|
<ClInclude Include="include\Poco\Exception.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
@@ -1046,6 +1073,15 @@
|
|||||||
<ClInclude Include="include\Poco\Void.h">
|
<ClInclude Include="include\Poco\Void.h">
|
||||||
<Filter>Core\Header Files</Filter>
|
<Filter>Core\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
<ClInclude Include="include\Poco\Base32Decoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\Poco\Base32Encoder.h">
|
||||||
|
<Filter>Streams\Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
>>>>>>> develop
|
||||||
<ClInclude Include="include\Poco\Base64Decoder.h">
|
<ClInclude Include="include\Poco\Base64Decoder.h">
|
||||||
<Filter>Streams\Header Files</Filter>
|
<Filter>Streams\Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9,00"
|
Version="9.00"
|
||||||
Name="Foundation"
|
Name="Foundation"
|
||||||
ProjectGUID="{8164D41D-B053-405B-826C-CF37AC0EF176}"
|
ProjectGUID="{8164D41D-B053-405B-826C-CF37AC0EF176}"
|
||||||
RootNamespace="Foundation"
|
RootNamespace="Foundation"
|
||||||
@@ -518,14 +518,6 @@
|
|||||||
RelativePath=".\src\Debugger.cpp"
|
RelativePath=".\src\Debugger.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\src\DynamicAny.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\src\DynamicAnyHolder.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Environment.cpp"
|
RelativePath=".\src\Environment.cpp"
|
||||||
>
|
>
|
||||||
@@ -738,6 +730,10 @@
|
|||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Error.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Exception.cpp"
|
RelativePath=".\src\Exception.cpp"
|
||||||
>
|
>
|
||||||
@@ -1026,6 +1022,10 @@
|
|||||||
RelativePath=".\src\NumberParser.cpp"
|
RelativePath=".\src\NumberParser.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\NumericString.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\RefCountedObject.cpp"
|
RelativePath=".\src\RefCountedObject.cpp"
|
||||||
>
|
>
|
||||||
@@ -1122,10 +1122,18 @@
|
|||||||
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
RelativePath=".\include\Poco\Environment_WIN32U.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Error.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Exception.h"
|
RelativePath=".\include\Poco\Exception.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\FIFOBuffer.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Format.h"
|
RelativePath=".\include\Poco\Format.h"
|
||||||
>
|
>
|
||||||
@@ -1266,6 +1274,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Decoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Base32Encoder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Base64Decoder.cpp"
|
RelativePath=".\src\Base64Decoder.cpp"
|
||||||
>
|
>
|
||||||
@@ -1290,6 +1306,10 @@
|
|||||||
RelativePath=".\src\DeflatingStream.cpp"
|
RelativePath=".\src\DeflatingStream.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\FIFOBufferStream.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\FileStream.cpp"
|
RelativePath=".\src\FileStream.cpp"
|
||||||
>
|
>
|
||||||
@@ -1442,6 +1462,14 @@
|
|||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
>
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Decoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Base32Encoder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Base64Decoder.h"
|
RelativePath=".\include\Poco\Base64Decoder.h"
|
||||||
>
|
>
|
||||||
@@ -1478,6 +1506,10 @@
|
|||||||
RelativePath=".\include\Poco\DeflatingStream.h"
|
RelativePath=".\include\Poco\DeflatingStream.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\FIFOBufferStream.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\FileStream.h"
|
RelativePath=".\include\Poco\FileStream.h"
|
||||||
>
|
>
|
||||||
@@ -5552,6 +5584,10 @@
|
|||||||
RelativePath=".\src\Latin1Encoding.cpp"
|
RelativePath=".\src\Latin1Encoding.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Latin2Encoding.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Latin9Encoding.cpp"
|
RelativePath=".\src\Latin9Encoding.cpp"
|
||||||
>
|
>
|
||||||
@@ -5588,6 +5624,10 @@
|
|||||||
RelativePath=".\src\UTF16Encoding.cpp"
|
RelativePath=".\src\UTF16Encoding.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\UTF32Encoding.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\UTF8Encoding.cpp"
|
RelativePath=".\src\UTF8Encoding.cpp"
|
||||||
>
|
>
|
||||||
@@ -5596,6 +5636,14 @@
|
|||||||
RelativePath=".\src\UTF8String.cpp"
|
RelativePath=".\src\UTF8String.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Windows1250Encoding.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Windows1251Encoding.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\src\Windows1252Encoding.cpp"
|
RelativePath=".\src\Windows1252Encoding.cpp"
|
||||||
>
|
>
|
||||||
@@ -5612,6 +5660,10 @@
|
|||||||
RelativePath=".\include\Poco\Latin1Encoding.h"
|
RelativePath=".\include\Poco\Latin1Encoding.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Latin2Encoding.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Latin9Encoding.h"
|
RelativePath=".\include\Poco\Latin9Encoding.h"
|
||||||
>
|
>
|
||||||
@@ -5648,6 +5700,10 @@
|
|||||||
RelativePath=".\include\Poco\UTF16Encoding.h"
|
RelativePath=".\include\Poco\UTF16Encoding.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\UTF32Encoding.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\UTF8Encoding.h"
|
RelativePath=".\include\Poco\UTF8Encoding.h"
|
||||||
>
|
>
|
||||||
@@ -5656,6 +5712,14 @@
|
|||||||
RelativePath=".\include\Poco\UTF8String.h"
|
RelativePath=".\include\Poco\UTF8String.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Windows1250Encoding.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Windows1251Encoding.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\include\Poco\Windows1252Encoding.h"
|
RelativePath=".\include\Poco\Windows1252Encoding.h"
|
||||||
>
|
>
|
||||||
@@ -5974,6 +6038,42 @@
|
|||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Dynamic"
|
||||||
|
>
|
||||||
|
<Filter
|
||||||
|
Name="Header Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Dynamic\Pair.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Dynamic\Struct.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Dynamic\Var.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\include\Poco\Dynamic\VarHolder.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Source Files"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\Var.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\VarHolder.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
</Filter>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\DLLVersion.rc"
|
RelativePath="..\DLLVersion.rc"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
include $(POCO_BASE)/build/rules/global
|
include $(POCO_BASE)/build/rules/global
|
||||||
|
|
||||||
objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder \
|
objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel \
|
||||||
|
Base32Decoder Base32Encoder Base64Decoder Base64Encoder \
|
||||||
BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \
|
BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \
|
||||||
CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \
|
CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \
|
||||||
Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \
|
Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \
|
||||||
@@ -19,7 +20,7 @@ objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel Base64Decoder Base64E
|
|||||||
MemoryPool MD4Engine MD5Engine Manifest Message Mutex \
|
MemoryPool MD4Engine MD5Engine Manifest Message Mutex \
|
||||||
NestedDiagnosticContext Notification NotificationCenter \
|
NestedDiagnosticContext Notification NotificationCenter \
|
||||||
NotificationQueue PriorityNotificationQueue TimedNotificationQueue \
|
NotificationQueue PriorityNotificationQueue TimedNotificationQueue \
|
||||||
NullStream NumberFormatter NumberParser AbstractObserver \
|
NullStream NumberFormatter NumberParser NumericString AbstractObserver \
|
||||||
Path PatternFormatter Process PurgeStrategy RWLock Random RandomStream \
|
Path PatternFormatter Process PurgeStrategy RWLock Random RandomStream \
|
||||||
RegularExpression RefCountedObject Runnable RotateStrategy Condition \
|
RegularExpression RefCountedObject Runnable RotateStrategy Condition \
|
||||||
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
||||||
|
|||||||
126
Foundation/include/Poco/Base32Decoder.h
Normal file
126
Foundation/include/Poco/Base32Decoder.h
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
//
|
||||||
|
// Base32Decoder.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Foundation/include/Poco/Base32Decoder.h#2 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Streams
|
||||||
|
// Module: Base32
|
||||||
|
//
|
||||||
|
// Definition of class Base32Decoder.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_Base32Decoder_INCLUDED
|
||||||
|
#define Foundation_Base32Decoder_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
#include "Poco/UnbufferedStreamBuf.h"
|
||||||
|
#include <istream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32DecoderBuf: public UnbufferedStreamBuf
|
||||||
|
/// This streambuf base32-decodes all data read
|
||||||
|
/// from the istream connected to it.
|
||||||
|
///
|
||||||
|
/// Note: For performance reasons, the characters
|
||||||
|
/// are read directly from the given istream's
|
||||||
|
/// underlying streambuf, so the state
|
||||||
|
/// of the istream will not reflect that of
|
||||||
|
/// its streambuf.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32DecoderBuf(std::istream& istr);
|
||||||
|
~Base32DecoderBuf();
|
||||||
|
|
||||||
|
private:
|
||||||
|
int readFromDevice();
|
||||||
|
int readOne();
|
||||||
|
|
||||||
|
unsigned char _group[8];
|
||||||
|
int _groupLength;
|
||||||
|
int _groupIndex;
|
||||||
|
std::streambuf& _buf;
|
||||||
|
|
||||||
|
static unsigned char IN_ENCODING[256];
|
||||||
|
static bool IN_ENCODING_INIT;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Base32DecoderBuf(const Base32DecoderBuf&);
|
||||||
|
Base32DecoderBuf& operator = (const Base32DecoderBuf&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32DecoderIOS: public virtual std::ios
|
||||||
|
/// The base class for Base32Decoder.
|
||||||
|
///
|
||||||
|
/// This class is needed to ensure the correct initialization
|
||||||
|
/// order of the stream buffer and base classes.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32DecoderIOS(std::istream& istr);
|
||||||
|
~Base32DecoderIOS();
|
||||||
|
Base32DecoderBuf* rdbuf();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Base32DecoderBuf _buf;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Base32DecoderIOS(const Base32DecoderIOS&);
|
||||||
|
Base32DecoderIOS& operator = (const Base32DecoderIOS&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32Decoder: public Base32DecoderIOS, public std::istream
|
||||||
|
/// This istream base32-decodes all data
|
||||||
|
/// read from the istream connected to it.
|
||||||
|
///
|
||||||
|
/// Note: For performance reasons, the characters
|
||||||
|
/// are read directly from the given istream's
|
||||||
|
/// underlying streambuf, so the state
|
||||||
|
/// of the istream will not reflect that of
|
||||||
|
/// its streambuf.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32Decoder(std::istream& istr);
|
||||||
|
~Base32Decoder();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Base32Decoder(const Base32Decoder&);
|
||||||
|
Base32Decoder& operator = (const Base32Decoder&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_Base32Decoder_INCLUDED
|
||||||
132
Foundation/include/Poco/Base32Encoder.h
Normal file
132
Foundation/include/Poco/Base32Encoder.h
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
//
|
||||||
|
// Base32Encoder.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Foundation/include/Poco/Base32Encoder.h#2 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Streams
|
||||||
|
// Module: Base32
|
||||||
|
//
|
||||||
|
// Definition of class Base32Encoder.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_Base32Encoder_INCLUDED
|
||||||
|
#define Foundation_Base32Encoder_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
#include "Poco/UnbufferedStreamBuf.h"
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32EncoderBuf: public UnbufferedStreamBuf
|
||||||
|
/// This streambuf base32-encodes all data written
|
||||||
|
/// to it and forwards it to a connected
|
||||||
|
/// ostream.
|
||||||
|
///
|
||||||
|
/// Note: The characters are directly written
|
||||||
|
/// to the ostream's streambuf, thus bypassing
|
||||||
|
/// the ostream. The ostream's state is therefore
|
||||||
|
/// not updated to match the buffer's state.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32EncoderBuf(std::ostream& ostr, bool padding = true);
|
||||||
|
~Base32EncoderBuf();
|
||||||
|
|
||||||
|
int close();
|
||||||
|
/// Closes the stream buffer.
|
||||||
|
|
||||||
|
private:
|
||||||
|
int writeToDevice(char c);
|
||||||
|
|
||||||
|
unsigned char _group[5];
|
||||||
|
int _groupLength;
|
||||||
|
std::streambuf& _buf;
|
||||||
|
bool _doPadding;
|
||||||
|
|
||||||
|
static const unsigned char OUT_ENCODING[32];
|
||||||
|
|
||||||
|
friend class Base32DecoderBuf;
|
||||||
|
|
||||||
|
Base32EncoderBuf(const Base32EncoderBuf&);
|
||||||
|
Base32EncoderBuf& operator = (const Base32EncoderBuf&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32EncoderIOS: public virtual std::ios
|
||||||
|
/// The base class for Base32Encoder.
|
||||||
|
///
|
||||||
|
/// This class is needed to ensure the correct initialization
|
||||||
|
/// order of the stream buffer and base classes.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32EncoderIOS(std::ostream& ostr, bool padding = true);
|
||||||
|
~Base32EncoderIOS();
|
||||||
|
int close();
|
||||||
|
Base32EncoderBuf* rdbuf();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Base32EncoderBuf _buf;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Base32EncoderIOS(const Base32EncoderIOS&);
|
||||||
|
Base32EncoderIOS& operator = (const Base32EncoderIOS&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Base32Encoder: public Base32EncoderIOS, public std::ostream
|
||||||
|
/// This ostream base32-encodes all data
|
||||||
|
/// written to it and forwards it to
|
||||||
|
/// a connected ostream.
|
||||||
|
/// Always call close() when done
|
||||||
|
/// writing data, to ensure proper
|
||||||
|
/// completion of the encoding operation.
|
||||||
|
///
|
||||||
|
/// Note: The characters are directly written
|
||||||
|
/// to the ostream's streambuf, thus bypassing
|
||||||
|
/// the ostream. The ostream's state is therefore
|
||||||
|
/// not updated to match the buffer's state.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Base32Encoder(std::ostream& ostr, bool padding = true);
|
||||||
|
~Base32Encoder();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Base32Encoder(const Base32Encoder&);
|
||||||
|
Base32Encoder& operator = (const Base32Encoder&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_Base32Encoder_INCLUDED
|
||||||
@@ -51,9 +51,8 @@ namespace Poco {
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
class Buffer
|
class Buffer
|
||||||
/// A very simple buffer class that allocates a buffer of
|
/// A buffer class that allocates a buffer of a given type and size
|
||||||
/// a given type and size in the constructor and
|
/// in the constructor and deallocates the buffer in the destructor.
|
||||||
/// deallocates the buffer in the destructor.
|
|
||||||
///
|
///
|
||||||
/// This class is useful everywhere where a temporary buffer
|
/// This class is useful everywhere where a temporary buffer
|
||||||
/// is needed.
|
/// is needed.
|
||||||
@@ -143,10 +142,10 @@ public:
|
|||||||
{
|
{
|
||||||
T* ptr = new T[newCapacity];
|
T* ptr = new T[newCapacity];
|
||||||
if (preserveContent)
|
if (preserveContent)
|
||||||
std::memcpy(ptr, _ptr, newCapacity);
|
std::memcpy(ptr, _ptr, _capacity);
|
||||||
|
|
||||||
delete [] _ptr;
|
delete [] _ptr;
|
||||||
_ptr = ptr;
|
_ptr = ptr;
|
||||||
_capacity = newCapacity;
|
_capacity = newCapacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,11 +178,17 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::size_t capacity() const
|
std::size_t capacity() const
|
||||||
/// Returns the allocated memory size.
|
/// Returns the allocated memory size in elements.
|
||||||
{
|
{
|
||||||
return _capacity;
|
return _capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t capacityBytes() const
|
||||||
|
/// Returns the allocated memory size in bytes.
|
||||||
|
{
|
||||||
|
return _capacity * sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
void swap(Buffer& other)
|
void swap(Buffer& other)
|
||||||
/// Swaps the buffer with another one.
|
/// Swaps the buffer with another one.
|
||||||
{
|
{
|
||||||
@@ -225,10 +230,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::size_t size() const
|
std::size_t size() const
|
||||||
/// Returns the used size of the buffer.
|
/// Returns the used size of the buffer in elements.
|
||||||
{
|
{
|
||||||
return _used;
|
return _used;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::size_t sizeBytes() const
|
||||||
|
/// Returns the used size of the buffer in bytes.
|
||||||
|
{
|
||||||
|
return _used * sizeof(T);
|
||||||
|
}
|
||||||
|
|
||||||
T* begin()
|
T* begin()
|
||||||
/// Returns a pointer to the beginning of the buffer.
|
/// Returns a pointer to the beginning of the buffer.
|
||||||
|
|||||||
@@ -120,6 +120,12 @@
|
|||||||
// #define POCO_UTIL_NO_INIFILECONFIGURATION
|
// #define POCO_UTIL_NO_INIFILECONFIGURATION
|
||||||
|
|
||||||
|
|
||||||
|
// No support for JSON configuration in
|
||||||
|
// Poco::Util::Application. Avoids linking of JSON
|
||||||
|
// library and saves a few 100 Kbytes.
|
||||||
|
// #define POCO_UTIL_NO_JSONCONFIGURATION
|
||||||
|
|
||||||
|
|
||||||
// No support for XML configuration in
|
// No support for XML configuration in
|
||||||
// Poco::Util::Application. Avoids linking of XML
|
// Poco::Util::Application. Avoids linking of XML
|
||||||
// library and saves a few 100 Kbytes.
|
// library and saves a few 100 Kbytes.
|
||||||
@@ -133,7 +139,7 @@
|
|||||||
|
|
||||||
// Windows CE has no locale support
|
// Windows CE has no locale support
|
||||||
#if defined(_WIN32_WCE)
|
#if defined(_WIN32_WCE)
|
||||||
#define POCO_NO_LOCALE
|
#define POCO_NO_LOCALE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,15 +82,15 @@ public:
|
|||||||
/// The returned reference is valid until the next
|
/// The returned reference is valid until the next
|
||||||
/// time digest() is called, or the engine object is destroyed.
|
/// time digest() is called, or the engine object is destroyed.
|
||||||
|
|
||||||
static std::string digestToHex(const Digest& bytes);
|
static std::string digestToHex(const Digest& bytes);
|
||||||
/// Converts a message digest into a string of hexadecimal numbers.
|
/// Converts a message digest into a string of hexadecimal numbers.
|
||||||
|
|
||||||
static Digest digestFromHex(const std::string& digest);
|
static Digest digestFromHex(const std::string& digest);
|
||||||
/// Converts a string created by digestToHex back to its Digest presentation
|
/// Converts a string created by digestToHex back to its Digest presentation
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void updateImpl(const void* data, std::size_t length) = 0;
|
virtual void updateImpl(const void* data, std::size_t length) = 0;
|
||||||
/// Updates the digest with the given data. Must be implemented
|
/// Updates the digest with the given data. Must be implemented
|
||||||
/// by subclasses.
|
/// by subclasses.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -349,67 +349,67 @@ inline const std::type_info& VarHolder::type() const
|
|||||||
throw NotImplementedException("Not implemented: VarHolder::type()");
|
throw NotImplementedException("Not implemented: VarHolder::type()");
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void VarHolder::convert(Int8& val) const
|
inline void VarHolder::convert(Int8& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to Int8");
|
throw BadCastException("Can not convert to Int8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(Int16& val) const
|
inline void VarHolder::convert(Int16& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to Int16");
|
throw BadCastException("Can not convert to Int16");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(Int32& val) const
|
inline void VarHolder::convert(Int32& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to Int32");
|
throw BadCastException("Can not convert to Int32");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(Int64& val) const
|
inline void VarHolder::convert(Int64& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to Int64");
|
throw BadCastException("Can not convert to Int64");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(UInt8& val) const
|
inline void VarHolder::convert(UInt8& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to UInt8");
|
throw BadCastException("Can not convert to UInt8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(UInt16& val) const
|
inline void VarHolder::convert(UInt16& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to UInt16");
|
throw BadCastException("Can not convert to UInt16");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(UInt32& val) const
|
inline void VarHolder::convert(UInt32& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to UInt32");
|
throw BadCastException("Can not convert to UInt32");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(UInt64& val) const
|
inline void VarHolder::convert(UInt64& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to UInt64");
|
throw BadCastException("Can not convert to UInt64");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(DateTime& val) const
|
inline void VarHolder::convert(DateTime& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to DateTime");
|
throw BadCastException("Can not convert to DateTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(LocalDateTime& val) const
|
inline void VarHolder::convert(LocalDateTime& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to LocalDateTime");
|
throw BadCastException("Can not convert to LocalDateTime");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(Timestamp& val) const
|
inline void VarHolder::convert(Timestamp& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to Timestamp");
|
throw BadCastException("Can not convert to Timestamp");
|
||||||
}
|
}
|
||||||
@@ -433,31 +433,31 @@ inline void VarHolder::convert(unsigned long& val) const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(bool& val) const
|
inline void VarHolder::convert(bool& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to bool");
|
throw BadCastException("Can not convert to bool");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(float& val) const
|
inline void VarHolder::convert(float& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to float");
|
throw BadCastException("Can not convert to float");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(double& val) const
|
inline void VarHolder::convert(double& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to double");
|
throw BadCastException("Can not convert to double");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(char& val) const
|
inline void VarHolder::convert(char& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to char");
|
throw BadCastException("Can not convert to char");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void VarHolder::convert(std::string& val) const
|
inline void VarHolder::convert(std::string& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException("Can not convert to std::string");
|
throw BadCastException("Can not convert to std::string");
|
||||||
}
|
}
|
||||||
@@ -2754,17 +2754,17 @@ public:
|
|||||||
return typeid(DateTime);
|
return typeid(DateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
void convert(Int8& val) const
|
void convert(Int8& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException();
|
throw BadCastException();
|
||||||
}
|
}
|
||||||
|
|
||||||
void convert(Int16& val) const
|
void convert(Int16& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException();
|
throw BadCastException();
|
||||||
}
|
}
|
||||||
|
|
||||||
void convert(Int32& val) const
|
void convert(Int32& /*val*/) const
|
||||||
{
|
{
|
||||||
throw BadCastException();
|
throw BadCastException();
|
||||||
}
|
}
|
||||||
|
|||||||
68
Foundation/include/Poco/Error.h
Normal file
68
Foundation/include/Poco/Error.h
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
//
|
||||||
|
// Error.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.4/Foundation/include/Poco/Error.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Core
|
||||||
|
// Module: Error
|
||||||
|
//
|
||||||
|
// Definition of the Error class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_Error_INCLUDED
|
||||||
|
#define Foundation_Error_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API Error
|
||||||
|
/// The Error class provides utility functions
|
||||||
|
/// for error reporting.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
#ifdef POCO_OS_FAMILY_WINDOWS
|
||||||
|
static std::string getMessage(DWORD errorCode);
|
||||||
|
/// Utility function translating numeric error code to string.
|
||||||
|
#else
|
||||||
|
static std::string getMessage(int errorCode);
|
||||||
|
/// Utility function translating numeric error code to string.
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_Error_INCLUDED
|
||||||
@@ -82,8 +82,10 @@ public:
|
|||||||
void onAdd(const void*, const KeyValueArgs <TKey, TValue>& args)
|
void onAdd(const void*, const KeyValueArgs <TKey, TValue>& args)
|
||||||
{
|
{
|
||||||
Timestamp now;
|
Timestamp now;
|
||||||
IndexIterator it = _keyIndex.insert(typename TimeIndex::value_type(now, args.key()));
|
typename TimeIndex::value_type tiValue(now, args.key());
|
||||||
std::pair<Iterator, bool> stat = _keys.insert(typename Keys::value_type(args.key(), it));
|
IndexIterator it = _keyIndex.insert(tiValue);
|
||||||
|
typename Keys::value_type kValue(args.key(), it);
|
||||||
|
std::pair<Iterator, bool> stat = _keys.insert(kValue);
|
||||||
if (!stat.second)
|
if (!stat.second)
|
||||||
{
|
{
|
||||||
_keyIndex.erase(stat.first->second);
|
_keyIndex.erase(stat.first->second);
|
||||||
|
|||||||
@@ -56,8 +56,11 @@ class BasicFIFOBuffer
|
|||||||
/// A simple buffer class with support for re-entrant,
|
/// A simple buffer class with support for re-entrant,
|
||||||
/// FIFO-style read/write operations, as well as (optional)
|
/// FIFO-style read/write operations, as well as (optional)
|
||||||
/// empty/non-empty/full (i.e. writable/readable) transition
|
/// empty/non-empty/full (i.e. writable/readable) transition
|
||||||
/// notifications. Buffer size, as well as amount of unread data
|
/// notifications. Buffer can be flagged with end-of-file and
|
||||||
/// and available space introspections are supported as well.
|
/// error flags, which renders it un-readable/writable.
|
||||||
|
///
|
||||||
|
/// Buffer size, as well as amount of unread data and
|
||||||
|
/// available space introspections are supported as well.
|
||||||
///
|
///
|
||||||
/// This class is useful anywhere where a FIFO functionality
|
/// This class is useful anywhere where a FIFO functionality
|
||||||
/// is needed.
|
/// is needed.
|
||||||
@@ -93,7 +96,9 @@ public:
|
|||||||
_buffer(size),
|
_buffer(size),
|
||||||
_begin(0),
|
_begin(0),
|
||||||
_used(0),
|
_used(0),
|
||||||
_notify(notify)
|
_notify(notify),
|
||||||
|
_eof(false),
|
||||||
|
_error(false)
|
||||||
/// Creates the FIFOBuffer.
|
/// Creates the FIFOBuffer.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -102,7 +107,9 @@ public:
|
|||||||
_buffer(pBuffer, size),
|
_buffer(pBuffer, size),
|
||||||
_begin(0),
|
_begin(0),
|
||||||
_used(0),
|
_used(0),
|
||||||
_notify(notify)
|
_notify(notify),
|
||||||
|
_eof(false),
|
||||||
|
_error(false)
|
||||||
/// Creates the FIFOBuffer.
|
/// Creates the FIFOBuffer.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -111,7 +118,9 @@ public:
|
|||||||
_buffer(pBuffer, size),
|
_buffer(pBuffer, size),
|
||||||
_begin(0),
|
_begin(0),
|
||||||
_used(size),
|
_used(size),
|
||||||
_notify(notify)
|
_notify(notify),
|
||||||
|
_eof(false),
|
||||||
|
_error(false)
|
||||||
/// Creates the FIFOBuffer.
|
/// Creates the FIFOBuffer.
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -154,6 +163,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (0 == length) return 0;
|
if (0 == length) return 0;
|
||||||
Mutex::ScopedLock lock(_mutex);
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
if (!isReadable()) return 0;
|
||||||
if (length > _used) length = _used;
|
if (length > _used) length = _used;
|
||||||
std::memcpy(pBuffer, _buffer.begin() + _begin, length * sizeof(T));
|
std::memcpy(pBuffer, _buffer.begin() + _begin, length * sizeof(T));
|
||||||
return length;
|
return length;
|
||||||
@@ -172,6 +182,7 @@ public:
|
|||||||
/// supplied buffer.
|
/// supplied buffer.
|
||||||
{
|
{
|
||||||
Mutex::ScopedLock lock(_mutex);
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
if (!isReadable()) return 0;
|
||||||
if (0 == length || length > _used) length = _used;
|
if (0 == length || length > _used) length = _used;
|
||||||
buffer.resize(length);
|
buffer.resize(length);
|
||||||
return peek(buffer.begin(), length);
|
return peek(buffer.begin(), length);
|
||||||
@@ -185,10 +196,9 @@ public:
|
|||||||
///
|
///
|
||||||
/// Returns the reference to the buffer.
|
/// Returns the reference to the buffer.
|
||||||
{
|
{
|
||||||
|
if (0 == length) return 0;
|
||||||
Mutex::ScopedLock lock(_mutex);
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
if (!isReadable()) return 0;
|
||||||
if (0 == _used) return 0;
|
|
||||||
|
|
||||||
std::size_t usedBefore = _used;
|
std::size_t usedBefore = _used;
|
||||||
std::size_t readLen = peek(pBuffer, length);
|
std::size_t readLen = peek(pBuffer, length);
|
||||||
poco_assert (_used >= readLen);
|
poco_assert (_used >= readLen);
|
||||||
@@ -210,9 +220,7 @@ public:
|
|||||||
/// Returns the reference to the buffer.
|
/// Returns the reference to the buffer.
|
||||||
{
|
{
|
||||||
Mutex::ScopedLock lock(_mutex);
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
if (!isReadable()) return 0;
|
||||||
if (0 == _used) return 0;
|
|
||||||
|
|
||||||
std::size_t usedBefore = _used;
|
std::size_t usedBefore = _used;
|
||||||
std::size_t readLen = peek(buffer, length);
|
std::size_t readLen = peek(buffer, length);
|
||||||
poco_assert (_used >= readLen);
|
poco_assert (_used >= readLen);
|
||||||
@@ -236,10 +244,12 @@ public:
|
|||||||
///
|
///
|
||||||
/// Returns the length of data written.
|
/// Returns the length of data written.
|
||||||
{
|
{
|
||||||
if (0 == length || isFull()) return 0;
|
if (0 == length) return 0;
|
||||||
|
|
||||||
Mutex::ScopedLock lock(_mutex);
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
|
if (!isWritable()) return 0;
|
||||||
|
|
||||||
if (_buffer.size() - (_begin + _used) < length)
|
if (_buffer.size() - (_begin + _used) < length)
|
||||||
{
|
{
|
||||||
std::memmove(_buffer.begin(), _buffer.begin() + _begin, _used);
|
std::memmove(_buffer.begin(), _buffer.begin() + _begin, _used);
|
||||||
@@ -268,11 +278,14 @@ public:
|
|||||||
///
|
///
|
||||||
/// Returns the length of data written.
|
/// Returns the length of data written.
|
||||||
{
|
{
|
||||||
if (isFull()) return 0;
|
std::size_t len = length;
|
||||||
|
|
||||||
if (0 == length || length > buffer.size()) length = buffer.size();
|
if (len == 0)
|
||||||
|
len = buffer.size();
|
||||||
|
else if (len > buffer.size())
|
||||||
|
len = buffer.size();
|
||||||
|
|
||||||
return write(buffer.begin(), length);
|
return write(buffer.begin(), len);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t size() const
|
std::size_t size() const
|
||||||
@@ -298,6 +311,8 @@ public:
|
|||||||
/// If length is zero or greater than buffer current
|
/// If length is zero or greater than buffer current
|
||||||
/// content length, buffer is emptied.
|
/// content length, buffer is emptied.
|
||||||
{
|
{
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
std::size_t usedBefore = _used;
|
std::size_t usedBefore = _used;
|
||||||
|
|
||||||
if (0 == length || length >= _used)
|
if (0 == length || length >= _used)
|
||||||
@@ -317,11 +332,19 @@ public:
|
|||||||
{
|
{
|
||||||
poco_check_ptr(ptr);
|
poco_check_ptr(ptr);
|
||||||
if (0 == length) return;
|
if (0 == length) return;
|
||||||
|
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
if (length > available())
|
if (length > available())
|
||||||
throw Poco::InvalidAccessException("Cannot extend buffer.");
|
throw Poco::InvalidAccessException("Cannot extend buffer.");
|
||||||
|
|
||||||
|
if (!isWritable())
|
||||||
|
throw Poco::InvalidAccessException("Buffer not writable.");
|
||||||
|
|
||||||
std::memcpy(&_buffer[_used], ptr, length);
|
std::memcpy(&_buffer[_used], ptr, length);
|
||||||
advance(length);
|
std::size_t usedBefore = _used;
|
||||||
|
_used += length;
|
||||||
|
if (_notify) notify(usedBefore);
|
||||||
}
|
}
|
||||||
|
|
||||||
void advance(std::size_t length)
|
void advance(std::size_t length)
|
||||||
@@ -329,8 +352,13 @@ public:
|
|||||||
/// Should be called AFTER the data
|
/// Should be called AFTER the data
|
||||||
/// was copied into the buffer.
|
/// was copied into the buffer.
|
||||||
{
|
{
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
if (length > available())
|
if (length > available())
|
||||||
throw Poco::InvalidAccessException("Cannot extend buffer.");
|
throw Poco::InvalidAccessException("Cannot extend buffer.");
|
||||||
|
|
||||||
|
if (!isWritable())
|
||||||
|
throw Poco::InvalidAccessException("Buffer not writable.");
|
||||||
|
|
||||||
std::size_t usedBefore = _used;
|
std::size_t usedBefore = _used;
|
||||||
_used += length;
|
_used += length;
|
||||||
@@ -357,6 +385,7 @@ public:
|
|||||||
/// Throws InvalidAccessException if index is larger than
|
/// Throws InvalidAccessException if index is larger than
|
||||||
/// the last valid (used) buffer position.
|
/// the last valid (used) buffer position.
|
||||||
{
|
{
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
if (index >= _used)
|
if (index >= _used)
|
||||||
throw InvalidAccessException(format("Index out of bounds: %z (max index allowed: %z)", index, _used - 1));
|
throw InvalidAccessException(format("Index out of bounds: %z (max index allowed: %z)", index, _used - 1));
|
||||||
|
|
||||||
@@ -368,6 +397,7 @@ public:
|
|||||||
/// Throws InvalidAccessException if index is larger than
|
/// Throws InvalidAccessException if index is larger than
|
||||||
/// the last valid (used) buffer position.
|
/// the last valid (used) buffer position.
|
||||||
{
|
{
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
if (index >= _used)
|
if (index >= _used)
|
||||||
throw InvalidAccessException(format("Index out of bounds: %z (max index allowed: %z)", index, _used - 1));
|
throw InvalidAccessException(format("Index out of bounds: %z (max index allowed: %z)", index, _used - 1));
|
||||||
|
|
||||||
@@ -379,9 +409,75 @@ public:
|
|||||||
{
|
{
|
||||||
return _buffer;
|
return _buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setError(bool error = true)
|
||||||
|
/// Sets the error flag on the buffer and empties it.
|
||||||
|
/// If notifications are enabled, they will be triggered
|
||||||
|
/// if appropriate.
|
||||||
|
///
|
||||||
|
/// Setting error flag to true prevents reading and writing
|
||||||
|
/// to the buffer; to re-enable FIFOBuffer for reading/writing,
|
||||||
|
/// the error flag must be set to false.
|
||||||
|
{
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
bool f = false;
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
if (error && isReadable() && _notify) readable.notify(this, f);
|
||||||
|
if (error && isWritable() && _notify) writable.notify(this, f);
|
||||||
|
_error = error;
|
||||||
|
_used = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool t = true;
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
_error = false;
|
||||||
|
if (_notify && !_eof) writable.notify(this, t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isValid() const
|
||||||
|
/// Returns true if error flag is not set on the buffer,
|
||||||
|
/// otherwise returns false.
|
||||||
|
{
|
||||||
|
return !_error;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setEOF(bool eof = true)
|
||||||
|
/// Sets end-of-file flag on the buffer.
|
||||||
|
///
|
||||||
|
/// Setting EOF flag to true prevents writing to the
|
||||||
|
/// buffer; reading from the buffer will still be
|
||||||
|
/// allowed until all data present in the buffer at the
|
||||||
|
/// EOF set time is drained. After that, to re-enable
|
||||||
|
/// FIFOBuffer for reading/writing, EOF must be
|
||||||
|
/// set to false.
|
||||||
|
///
|
||||||
|
/// Setting EOF flag to false clears EOF state if it
|
||||||
|
/// was previously set. If EOF was not set, it has no
|
||||||
|
/// effect.
|
||||||
|
{
|
||||||
|
Mutex::ScopedLock lock(_mutex);
|
||||||
|
bool flag = !eof;
|
||||||
|
if (_notify) writable.notify(this, flag);
|
||||||
|
_eof = eof;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hasEOF() const
|
||||||
|
/// Returns true if EOF flag has been set.
|
||||||
|
{
|
||||||
|
return _eof;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isEOF() const
|
||||||
|
/// Returns true if EOF flag has been set and buffer is empty.
|
||||||
|
{
|
||||||
|
return isEmpty() && _eof;
|
||||||
|
}
|
||||||
|
|
||||||
bool isEmpty() const
|
bool isEmpty() const
|
||||||
/// Returns true is buffer is empty, flase otherwise.
|
/// Returns true is buffer is empty, false otherwise.
|
||||||
{
|
{
|
||||||
return 0 == _used;
|
return 0 == _used;
|
||||||
}
|
}
|
||||||
@@ -392,6 +488,20 @@ public:
|
|||||||
return size() == _used;
|
return size() == _used;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isReadable() const
|
||||||
|
/// Returns true if buffer contains data and is not
|
||||||
|
/// in error state.
|
||||||
|
{
|
||||||
|
return !isEmpty() && isValid();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isWritable() const
|
||||||
|
/// Returns true if buffer is not full and is not
|
||||||
|
/// in error state.
|
||||||
|
{
|
||||||
|
return !isFull() && isValid() && !_eof;
|
||||||
|
}
|
||||||
|
|
||||||
void setNotify(bool notify = true)
|
void setNotify(bool notify = true)
|
||||||
/// Enables/disables notifications.
|
/// Enables/disables notifications.
|
||||||
{
|
{
|
||||||
@@ -428,6 +538,8 @@ private:
|
|||||||
std::size_t _used;
|
std::size_t _used;
|
||||||
bool _notify;
|
bool _notify;
|
||||||
mutable Mutex _mutex;
|
mutable Mutex _mutex;
|
||||||
|
bool _eof;
|
||||||
|
bool _error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,11 @@ class Foundation_API FIFOBufferStream: public FIFOIOS, public std::iostream
|
|||||||
/// An output stream for writing to a FIFO.
|
/// An output stream for writing to a FIFO.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
<<<<<<< HEAD
|
||||||
Poco::BasicEvent<bool>& readable;
|
Poco::BasicEvent<bool>& readable;
|
||||||
|
=======
|
||||||
|
Poco::BasicEvent<bool>& readable;
|
||||||
|
>>>>>>> develop
|
||||||
Poco::BasicEvent<bool>& writable;
|
Poco::BasicEvent<bool>& writable;
|
||||||
|
|
||||||
explicit FIFOBufferStream(FIFOBuffer& buffer);
|
explicit FIFOBufferStream(FIFOBuffer& buffer);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include <math.h>
|
#include <cmath>
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
@@ -95,49 +95,49 @@ private:
|
|||||||
//
|
//
|
||||||
inline bool FPEnvironmentImpl::isInfiniteImpl(float value)
|
inline bool FPEnvironmentImpl::isInfiniteImpl(float value)
|
||||||
{
|
{
|
||||||
return isinf(value) != 0;
|
return std::isinf(value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
|
inline bool FPEnvironmentImpl::isInfiniteImpl(double value)
|
||||||
{
|
{
|
||||||
return isinf(value) != 0;
|
return std::isinf(value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
|
inline bool FPEnvironmentImpl::isInfiniteImpl(long double value)
|
||||||
{
|
{
|
||||||
return isinf((double) value) != 0;
|
return std::isinf((double) value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool FPEnvironmentImpl::isNaNImpl(float value)
|
inline bool FPEnvironmentImpl::isNaNImpl(float value)
|
||||||
{
|
{
|
||||||
return isnan(value) != 0;
|
return std::isnan(value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool FPEnvironmentImpl::isNaNImpl(double value)
|
inline bool FPEnvironmentImpl::isNaNImpl(double value)
|
||||||
{
|
{
|
||||||
return isnan(value) != 0;
|
return std::isnan(value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool FPEnvironmentImpl::isNaNImpl(long double value)
|
inline bool FPEnvironmentImpl::isNaNImpl(long double value)
|
||||||
{
|
{
|
||||||
return isnan((double) value) != 0;
|
return std::isnan((double) value) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline float FPEnvironmentImpl::copySignImpl(float target, float source)
|
inline float FPEnvironmentImpl::copySignImpl(float target, float source)
|
||||||
{
|
{
|
||||||
return copysignf(target, source);
|
return std::copysignf(target, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline double FPEnvironmentImpl::copySignImpl(double target, double source)
|
inline double FPEnvironmentImpl::copySignImpl(double target, double source)
|
||||||
{
|
{
|
||||||
return copysign(target, source);
|
return std::copysign(target, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user