mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-31 16:04:27 +02:00
gcc/clang (-fvisibility=hidden): corrections to compile and work properly (#4394)
* fix(ActiveRecord): missing ActiveRecordLib_API definitions for clang/gcc. * fix(FPEnvironment): export FPEnvironmentImpl classes (#4393, #3331) * fix(Crypto): export *Impl classes used from inlines (#4393, #3331) * fix(Dynamic): explicitly instantiate and export Dynamic::Struct for string and int (-fvisibility=hidden) (#4393, #3331) * fix(JSON): explicitly instantiate and export SharedPtr for JSON::Array and JSON::Object (-fvisibility=hidden) (#4393, #3331) * enh(CMake): Set symbol visibility to hidden (#4393, #3331) * enh(configure): user c++17 standard for iphone, Darwin and ARM-Linux. * fix(UTF): explicitly instantiate and export 16 and 32-bit strings (-fvisibility=hidden) (#4393, #3331) * fix(RecordSet): make Extraction.h internal and instantiate RecordsSet::column template functions only for supported types. (-fvisibility=hidden) (#4393, #3331) * fix(UTF): fix explicitly instantiation on Windows (-fvisibility=hidden) (#4393, #3331) * enh(CMake): Add github jobs for macOS with visibility set to hidden (#4393, #3331) * fix(CppParser): Add missing declarations for CppParser_API (#4393, #3331) * enh(CMake): Enable more options in github jobs for macOS with visibility set to hidden (#4393, #3331) * fix(MongoDB): Add missing MongoDB_API (#4393, #3331)
This commit is contained in:
parent
b0dc9c5a82
commit
843ed4345e
55
.github/workflows/ci.yml
vendored
55
.github/workflows/ci.yml
vendored
@ -220,6 +220,36 @@ jobs:
|
|||||||
EXCLUDE_TESTS="Redis Data/MySQL Data/ODBC Data/PostgreSQL MongoDB PDF"
|
EXCLUDE_TESTS="Redis Data/MySQL Data/ODBC Data/PostgreSQL MongoDB PDF"
|
||||||
./ci/runtests.sh
|
./ci/runtests.sh
|
||||||
|
|
||||||
|
macos-clang-make-visibility-hidden:
|
||||||
|
runs-on: macos-12
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: brew install openssl@1.1 mysql-client unixodbc libpq
|
||||||
|
- run: >-
|
||||||
|
./configure --everything --no-prefix --cflags="-fvisibility=hidden" --omit=PDF
|
||||||
|
--odbc-include=/usr/local/opt/unixodbc/include --odbc-lib=/usr/local/opt/unixodbc/lib
|
||||||
|
--mysql-include=/usr/local/opt/mysql-client/include --mysql-lib=/usr/local/opt/mysql-client/lib
|
||||||
|
--include-path="/usr/local/opt/openssl@1.1/include" --library-path="/usr/local/opt/openssl@1.1/lib" &&
|
||||||
|
make all -s -j4
|
||||||
|
- uses: ./.github/actions/retry-action
|
||||||
|
with:
|
||||||
|
timeout_minutes: 90
|
||||||
|
max_attempts: 3
|
||||||
|
retry_on: any
|
||||||
|
command: >-
|
||||||
|
sudo -s
|
||||||
|
CPPUNIT_IGNORE="
|
||||||
|
CppUnit::TestCaller<ThreadTest>.testTrySleep,
|
||||||
|
CppUnit::TestCaller<TimestampTest>.testTimestamp,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testExpireN,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testAccessExpireN,
|
||||||
|
CppUnit::TestCaller<UniqueExpireLRUCacheTest>.testExpireN,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testAccessExpireN,
|
||||||
|
CppUnit::TestCaller<SyslogTest>.testOldBSD,
|
||||||
|
CppUnit::TestCaller<PollSetTest>.testPollClosedServer"
|
||||||
|
EXCLUDE_TESTS="Redis Data/MySQL Data/ODBC Data/PostgreSQL MongoDB PDF"
|
||||||
|
./ci/runtests.sh
|
||||||
|
|
||||||
macos-clang-cmake-openssl:
|
macos-clang-cmake-openssl:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
@ -270,6 +300,31 @@ jobs:
|
|||||||
PWD=`pwd`
|
PWD=`pwd`
|
||||||
ctest --output-on-failure -E "(DataMySQL)|(DataODBC)|(PostgreSQL)|(MongoDB)|(Redis)"
|
ctest --output-on-failure -E "(DataMySQL)|(DataODBC)|(PostgreSQL)|(MongoDB)|(Redis)"
|
||||||
|
|
||||||
|
macos-clang-cmake-openssl3-visibility-hidden:
|
||||||
|
runs-on: macos-12
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- run: brew install openssl@3 mysql-client unixodbc libpq
|
||||||
|
- run: cmake -S. -Bcmake-build -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DENABLE_ENCODINGS_COMPILER=ON -DENABLE_PDF=ON -DENABLE_SEVENZIP=ON -DENABLE_CPPPARSER=ON -DENABLE_TESTS=ON -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 -DMYSQL_ROOT_DIR=/usr/local/opt/mysql-client && cmake --build cmake-build --target all
|
||||||
|
- uses: ./.github/actions/retry-action
|
||||||
|
with:
|
||||||
|
timeout_minutes: 90
|
||||||
|
max_attempts: 3
|
||||||
|
retry_on: any
|
||||||
|
command: >-
|
||||||
|
cd cmake-build &&
|
||||||
|
sudo -s
|
||||||
|
CPPUNIT_IGNORE="
|
||||||
|
CppUnit::TestCaller<ThreadTest>.testTrySleep,
|
||||||
|
CppUnit::TestCaller<TimestampTest>.testTimestamp,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testExpireN,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testAccessExpireN,
|
||||||
|
CppUnit::TestCaller<UniqueExpireLRUCacheTest>.testExpireN,
|
||||||
|
CppUnit::TestCaller<ExpireLRUCacheTest>.testAccessExpireN,
|
||||||
|
CppUnit::TestCaller<PollSetTest>.testPollClosedServer"
|
||||||
|
PWD=`pwd`
|
||||||
|
ctest --output-on-failure -E "(DataMySQL)|(DataODBC)|(PostgreSQL)|(MongoDB)|(Redis)"
|
||||||
|
|
||||||
macos-clang-make-openssl3-tsan:
|
macos-clang-make-openssl3-tsan:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
|
@ -41,7 +41,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(ActiveRecordLib_API)
|
#if !defined(ActiveRecordLib_API)
|
||||||
#define ActiveRecordLib_API
|
#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define ActiveRecordLib_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define ActiveRecordLib_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -557,6 +557,7 @@ message(STATUS "[cmake] Build type: ${CMAKE_BUILD_TYPE}")
|
|||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||||
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
message(STATUS "[cmake] Build with cxx flags: ${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
|
||||||
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
message(STATUS "[cmake] Build with c flags: ${CMAKE_C_FLAGS_${BUILD_TYPE}} ${CMAKE_C_FLAGS}")
|
||||||
|
message(STATUS "[cmake] C++ symbol visibility: ${CMAKE_CXX_VISIBILITY_PRESET}")
|
||||||
|
|
||||||
foreach(component ${Poco_COMPONENTS})
|
foreach(component ${Poco_COMPONENTS})
|
||||||
message(STATUS "Building: ${component}")
|
message(STATUS "Building: ${component}")
|
||||||
|
@ -41,7 +41,11 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(CppParser_API)
|
#if !defined(CppParser_API)
|
||||||
#define CppParser_API
|
#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4)
|
||||||
|
#define CppParser_API __attribute__ ((visibility ("default")))
|
||||||
|
#else
|
||||||
|
#define CppParser_API
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace Poco {
|
|||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
class CipherKeyImpl: public RefCountedObject
|
class Crypto_API CipherKeyImpl: public RefCountedObject
|
||||||
/// An implementation of the CipherKey class for OpenSSL's crypto library.
|
/// An implementation of the CipherKey class for OpenSSL's crypto library.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -40,7 +40,7 @@ class X509Certificate;
|
|||||||
class PKCS12Container;
|
class PKCS12Container;
|
||||||
|
|
||||||
|
|
||||||
class ECKeyImpl: public KeyPairImpl
|
class Crypto_API ECKeyImpl: public KeyPairImpl
|
||||||
/// Elliptic Curve key clas implementation.
|
/// Elliptic Curve key clas implementation.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -31,7 +31,7 @@ namespace Poco {
|
|||||||
namespace Crypto {
|
namespace Crypto {
|
||||||
|
|
||||||
|
|
||||||
class KeyPairImpl: public Poco::RefCountedObject
|
class Crypto_API KeyPairImpl: public Poco::RefCountedObject
|
||||||
/// Class KeyPairImpl
|
/// Class KeyPairImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -43,7 +43,7 @@ class X509Certificate;
|
|||||||
class PKCS12Container;
|
class PKCS12Container;
|
||||||
|
|
||||||
|
|
||||||
class RSAKeyImpl: public KeyPairImpl
|
class Crypto_API RSAKeyImpl: public KeyPairImpl
|
||||||
/// class RSAKeyImpl
|
/// class RSAKeyImpl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
#include "Poco/Data/Data.h"
|
#include "Poco/Data/Data.h"
|
||||||
#include "Poco/Data/Session.h"
|
#include "Poco/Data/Session.h"
|
||||||
#include "Poco/Data/Extraction.h"
|
|
||||||
#include "Poco/Data/BulkExtraction.h"
|
#include "Poco/Data/BulkExtraction.h"
|
||||||
#include "Poco/Data/Statement.h"
|
#include "Poco/Data/Statement.h"
|
||||||
#include "Poco/Data/RowIterator.h"
|
#include "Poco/Data/RowIterator.h"
|
||||||
@ -166,100 +165,23 @@ public:
|
|||||||
/// Returns the number of columns in the recordset.
|
/// Returns the number of columns in the recordset.
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
const Column<C>& column(const std::string& name) const
|
const Column<C>& column(const std::string& name) const;
|
||||||
/// Returns the reference to the first Column with the specified name.
|
/// Returns the reference to the first Column with the specified name.
|
||||||
{
|
|
||||||
if (isBulkExtraction())
|
|
||||||
{
|
|
||||||
using E = InternalBulkExtraction<C>;
|
|
||||||
return columnImpl<C,E>(name);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
using E = InternalExtraction<C>;
|
|
||||||
return columnImpl<C,E>(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
const Column<C>& column(std::size_t pos) const
|
const Column<C>& column(std::size_t pos) const;
|
||||||
/// Returns the reference to column at specified position.
|
|
||||||
{
|
|
||||||
if (isBulkExtraction())
|
|
||||||
{
|
|
||||||
using E = InternalBulkExtraction<C>;
|
|
||||||
return columnImpl<C,E>(pos);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
using E = InternalExtraction<C>;
|
|
||||||
return columnImpl<C,E>(pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Row& row(std::size_t pos);
|
Row& row(std::size_t pos);
|
||||||
/// Returns reference to row at position pos.
|
/// Returns reference to row at position pos.
|
||||||
/// Rows are lazy-created and cached.
|
/// Rows are lazy-created and cached.
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
const T& value(std::size_t col, std::size_t row, bool useFilter = true) const
|
const T& value(std::size_t col, std::size_t row, bool useFilter = true) const;
|
||||||
/// Returns the reference to data value at [col, row] location.
|
/// Returns the reference to data value at [col, row] location.
|
||||||
{
|
|
||||||
if (useFilter && isFiltered() && !isAllowed(row))
|
|
||||||
throw InvalidAccessException("Row not allowed");
|
|
||||||
|
|
||||||
switch (storage())
|
|
||||||
{
|
|
||||||
case STORAGE_VECTOR:
|
|
||||||
{
|
|
||||||
using C = typename std::vector<T>;
|
|
||||||
return column<C>(col).value(row);
|
|
||||||
}
|
|
||||||
case STORAGE_LIST:
|
|
||||||
{
|
|
||||||
using C = typename std::list<T>;
|
|
||||||
return column<C>(col).value(row);
|
|
||||||
}
|
|
||||||
case STORAGE_DEQUE:
|
|
||||||
case STORAGE_UNKNOWN:
|
|
||||||
{
|
|
||||||
using C = typename std::deque<T>;
|
|
||||||
return column<C>(col).value(row);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
throw IllegalStateException("Invalid storage setting.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
const T& value(const std::string& name, std::size_t row, bool useFilter = true) const
|
const T& value(const std::string& name, std::size_t row, bool useFilter = true) const;
|
||||||
/// Returns the reference to data value at named column, row location.
|
/// Returns the reference to data value at named column, row location.
|
||||||
{
|
|
||||||
if (useFilter && isFiltered() && !isAllowed(row))
|
|
||||||
throw InvalidAccessException("Row not allowed");
|
|
||||||
|
|
||||||
switch (storage())
|
|
||||||
{
|
|
||||||
case STORAGE_VECTOR:
|
|
||||||
{
|
|
||||||
using C = typename std::vector<T>;
|
|
||||||
return column<C>(name).value(row);
|
|
||||||
}
|
|
||||||
case STORAGE_LIST:
|
|
||||||
{
|
|
||||||
using C = typename std::list<T>;
|
|
||||||
return column<C>(name).value(row);
|
|
||||||
}
|
|
||||||
case STORAGE_DEQUE:
|
|
||||||
case STORAGE_UNKNOWN:
|
|
||||||
{
|
|
||||||
using C = typename std::deque<T>;
|
|
||||||
return column<C>(name).value(row);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
throw IllegalStateException("Invalid storage setting.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Poco::Dynamic::Var value(std::size_t col, std::size_t row, bool checkFiltering = true) const;
|
Poco::Dynamic::Var value(std::size_t col, std::size_t row, bool checkFiltering = true) const;
|
||||||
/// Returns the data value at column, row location.
|
/// Returns the data value at column, row location.
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/Data/RecordSet.h"
|
#include "Poco/Data/RecordSet.h"
|
||||||
|
#include "Poco/Data/Extraction.h"
|
||||||
#include "Poco/Data/RowFilter.h"
|
#include "Poco/Data/RowFilter.h"
|
||||||
#include "Poco/Data/Date.h"
|
#include "Poco/Data/Date.h"
|
||||||
#include "Poco/Data/Time.h"
|
#include "Poco/Data/Time.h"
|
||||||
@ -132,6 +133,258 @@ void RecordSet::reset(const Statement& stmt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template <class C>
|
||||||
|
const Column<C>& RecordSet::column(const std::string& name) const
|
||||||
|
/// Returns the reference to the first Column with the specified name.
|
||||||
|
{
|
||||||
|
if (isBulkExtraction())
|
||||||
|
{
|
||||||
|
using E = InternalBulkExtraction<C>;
|
||||||
|
return columnImpl<C,E>(name);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using E = InternalExtraction<C>;
|
||||||
|
return columnImpl<C,E>(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template Data_API const Column<std::vector<bool>>& RecordSet::column<std::vector<bool>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UInt8>>& RecordSet::column<std::vector<UInt8>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<Int16>>& RecordSet::column<std::vector<Int16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UInt16>>& RecordSet::column<std::vector<UInt16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<Int32>>& RecordSet::column<std::vector<Int32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UInt32>>& RecordSet::column<std::vector<UInt32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<Int64>>& RecordSet::column<std::vector<Int64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UInt64>>& RecordSet::column<std::vector<UInt64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<float>>& RecordSet::column<std::vector<float>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<double>>& RecordSet::column<std::vector<double>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<std::string>>& RecordSet::column<std::vector<std::string>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UTF16String>>& RecordSet::column<std::vector<UTF16String>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<BLOB>>& RecordSet::column<std::vector<BLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<CLOB>>& RecordSet::column<std::vector<CLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<Date>>& RecordSet::column<std::vector<Date>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<Time>>& RecordSet::column<std::vector<Time>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<DateTime>>& RecordSet::column<std::vector<DateTime>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::vector<UUID>>& RecordSet::column<std::vector<UUID>>(const std::string& name) const;
|
||||||
|
|
||||||
|
template Data_API const Column<std::list<bool>>& RecordSet::column<std::list<bool>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UInt8>>& RecordSet::column<std::list<UInt8>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<Int16>>& RecordSet::column<std::list<Int16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UInt16>>& RecordSet::column<std::list<UInt16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<Int32>>& RecordSet::column<std::list<Int32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UInt32>>& RecordSet::column<std::list<UInt32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<Int64>>& RecordSet::column<std::list<Int64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UInt64>>& RecordSet::column<std::list<UInt64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<float>>& RecordSet::column<std::list<float>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<double>>& RecordSet::column<std::list<double>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<std::string>>& RecordSet::column<std::list<std::string>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UTF16String>>& RecordSet::column<std::list<UTF16String>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<BLOB>>& RecordSet::column<std::list<BLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<CLOB>>& RecordSet::column<std::list<CLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<Date>>& RecordSet::column<std::list<Date>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<Time>>& RecordSet::column<std::list<Time>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<DateTime>>& RecordSet::column<std::list<DateTime>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::list<UUID>>& RecordSet::column<std::list<UUID>>(const std::string& name) const;
|
||||||
|
|
||||||
|
template Data_API const Column<std::deque<bool>>& RecordSet::column<std::deque<bool>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UInt8>>& RecordSet::column<std::deque<UInt8>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<Int16>>& RecordSet::column<std::deque<Int16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UInt16>>& RecordSet::column<std::deque<UInt16>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<Int32>>& RecordSet::column<std::deque<Int32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UInt32>>& RecordSet::column<std::deque<UInt32>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<Int64>>& RecordSet::column<std::deque<Int64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UInt64>>& RecordSet::column<std::deque<UInt64>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<float>>& RecordSet::column<std::deque<float>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<double>>& RecordSet::column<std::deque<double>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<std::string>>& RecordSet::column<std::deque<std::string>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UTF16String>>& RecordSet::column<std::deque<UTF16String>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<BLOB>>& RecordSet::column<std::deque<BLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<CLOB>>& RecordSet::column<std::deque<CLOB>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<Date>>& RecordSet::column<std::deque<Date>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<Time>>& RecordSet::column<std::deque<Time>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<DateTime>>& RecordSet::column<std::deque<DateTime>>(const std::string& name) const;
|
||||||
|
template Data_API const Column<std::deque<UUID>>& RecordSet::column<std::deque<UUID>>(const std::string& name) const;
|
||||||
|
|
||||||
|
|
||||||
|
template <class C>
|
||||||
|
const Column<C>& RecordSet::column(std::size_t pos) const
|
||||||
|
/// Returns the reference to column at specified position.
|
||||||
|
{
|
||||||
|
if (isBulkExtraction())
|
||||||
|
{
|
||||||
|
using E = InternalBulkExtraction<C>;
|
||||||
|
return columnImpl<C,E>(pos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using E = InternalExtraction<C>;
|
||||||
|
return columnImpl<C,E>(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template Data_API const Column<std::vector<bool>>& RecordSet::column<std::vector<bool>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UInt8>>& RecordSet::column<std::vector<UInt8>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<Int16>>& RecordSet::column<std::vector<Int16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UInt16>>& RecordSet::column<std::vector<UInt16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<Int32>>& RecordSet::column<std::vector<Int32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UInt32>>& RecordSet::column<std::vector<UInt32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<Int64>>& RecordSet::column<std::vector<Int64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UInt64>>& RecordSet::column<std::vector<UInt64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<float>>& RecordSet::column<std::vector<float>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<double>>& RecordSet::column<std::vector<double>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<std::string>>& RecordSet::column<std::vector<std::string>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UTF16String>>& RecordSet::column<std::vector<UTF16String>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<BLOB>>& RecordSet::column<std::vector<BLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<CLOB>>& RecordSet::column<std::vector<CLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<Date>>& RecordSet::column<std::vector<Date>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<Time>>& RecordSet::column<std::vector<Time>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<DateTime>>& RecordSet::column<std::vector<DateTime>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::vector<UUID>>& RecordSet::column<std::vector<UUID>>(std::size_t pos) const;
|
||||||
|
|
||||||
|
template Data_API const Column<std::list<bool>>& RecordSet::column<std::list<bool>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UInt8>>& RecordSet::column<std::list<UInt8>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<Int16>>& RecordSet::column<std::list<Int16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UInt16>>& RecordSet::column<std::list<UInt16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<Int32>>& RecordSet::column<std::list<Int32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UInt32>>& RecordSet::column<std::list<UInt32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<Int64>>& RecordSet::column<std::list<Int64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UInt64>>& RecordSet::column<std::list<UInt64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<float>>& RecordSet::column<std::list<float>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<double>>& RecordSet::column<std::list<double>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<std::string>>& RecordSet::column<std::list<std::string>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UTF16String>>& RecordSet::column<std::list<UTF16String>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<BLOB>>& RecordSet::column<std::list<BLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<CLOB>>& RecordSet::column<std::list<CLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<Date>>& RecordSet::column<std::list<Date>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<Time>>& RecordSet::column<std::list<Time>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<DateTime>>& RecordSet::column<std::list<DateTime>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::list<UUID>>& RecordSet::column<std::list<UUID>>(std::size_t pos) const;
|
||||||
|
|
||||||
|
template Data_API const Column<std::deque<bool>>& RecordSet::column<std::deque<bool>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UInt8>>& RecordSet::column<std::deque<UInt8>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<Int16>>& RecordSet::column<std::deque<Int16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UInt16>>& RecordSet::column<std::deque<UInt16>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<Int32>>& RecordSet::column<std::deque<Int32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UInt32>>& RecordSet::column<std::deque<UInt32>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<Int64>>& RecordSet::column<std::deque<Int64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UInt64>>& RecordSet::column<std::deque<UInt64>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<float>>& RecordSet::column<std::deque<float>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<double>>& RecordSet::column<std::deque<double>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<std::string>>& RecordSet::column<std::deque<std::string>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UTF16String>>& RecordSet::column<std::deque<UTF16String>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<BLOB>>& RecordSet::column<std::deque<BLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<CLOB>>& RecordSet::column<std::deque<CLOB>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<Date>>& RecordSet::column<std::deque<Date>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<Time>>& RecordSet::column<std::deque<Time>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<DateTime>>& RecordSet::column<std::deque<DateTime>>(std::size_t pos) const;
|
||||||
|
template Data_API const Column<std::deque<UUID>>& RecordSet::column<std::deque<UUID>>(std::size_t pos) const;
|
||||||
|
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
const T& RecordSet::value(std::size_t col, std::size_t row, bool useFilter) const
|
||||||
|
/// Returns the reference to data value at [col, row] location.
|
||||||
|
{
|
||||||
|
if (useFilter && isFiltered() && !isAllowed(row))
|
||||||
|
throw InvalidAccessException("Row not allowed");
|
||||||
|
|
||||||
|
switch (storage())
|
||||||
|
{
|
||||||
|
case STORAGE_VECTOR:
|
||||||
|
{
|
||||||
|
using C = typename std::vector<T>;
|
||||||
|
return column<C>(col).value(row);
|
||||||
|
}
|
||||||
|
case STORAGE_LIST:
|
||||||
|
{
|
||||||
|
using C = typename std::list<T>;
|
||||||
|
return column<C>(col).value(row);
|
||||||
|
}
|
||||||
|
case STORAGE_DEQUE:
|
||||||
|
case STORAGE_UNKNOWN:
|
||||||
|
{
|
||||||
|
using C = typename std::deque<T>;
|
||||||
|
return column<C>(col).value(row);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw IllegalStateException("Invalid storage setting.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template Data_API const bool& RecordSet::value<bool>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt8& RecordSet::value<UInt8>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int16& RecordSet::value<Int16>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt16& RecordSet::value<UInt16>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int32& RecordSet::value<Int32>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt32& RecordSet::value<UInt32>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int64& RecordSet::value<Int64>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt64& RecordSet::value<UInt64>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const float& RecordSet::value<float>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const double& RecordSet::value<double>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const std::string& RecordSet::value<std::string>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UTF16String& RecordSet::value<UTF16String>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const BLOB& RecordSet::value<BLOB>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const CLOB& RecordSet::value<CLOB>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Date& RecordSet::value<Date>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Time& RecordSet::value<Time>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const DateTime& RecordSet::value<DateTime>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UUID& RecordSet::value<UUID>(std::size_t col, std::size_t row, bool useFilter) const;
|
||||||
|
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
const T& RecordSet::value(const std::string& name, std::size_t row, bool useFilter) const
|
||||||
|
/// Returns the reference to data value at named column, row location.
|
||||||
|
{
|
||||||
|
if (useFilter && isFiltered() && !isAllowed(row))
|
||||||
|
throw InvalidAccessException("Row not allowed");
|
||||||
|
|
||||||
|
switch (storage())
|
||||||
|
{
|
||||||
|
case STORAGE_VECTOR:
|
||||||
|
{
|
||||||
|
using C = typename std::vector<T>;
|
||||||
|
return column<C>(name).value(row);
|
||||||
|
}
|
||||||
|
case STORAGE_LIST:
|
||||||
|
{
|
||||||
|
using C = typename std::list<T>;
|
||||||
|
return column<C>(name).value(row);
|
||||||
|
}
|
||||||
|
case STORAGE_DEQUE:
|
||||||
|
case STORAGE_UNKNOWN:
|
||||||
|
{
|
||||||
|
using C = typename std::deque<T>;
|
||||||
|
return column<C>(name).value(row);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw IllegalStateException("Invalid storage setting.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template Data_API const bool& RecordSet::value<bool>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt8& RecordSet::value<UInt8>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int16& RecordSet::value<Int16>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt16& RecordSet::value<UInt16>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int32& RecordSet::value<Int32>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt32& RecordSet::value<UInt32>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Int64& RecordSet::value<Int64>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UInt64& RecordSet::value<UInt64>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const float& RecordSet::value<float>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const double& RecordSet::value<double>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const std::string& RecordSet::value<std::string>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UTF16String& RecordSet::value<UTF16String>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const BLOB& RecordSet::value<BLOB>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const CLOB& RecordSet::value<CLOB>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Date& RecordSet::value<Date>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const Time& RecordSet::value<Time>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const DateTime& RecordSet::value<DateTime>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
template Data_API const UUID& RecordSet::value<UUID>(const std::string& name, std::size_t row, bool useFilter) const;
|
||||||
|
|
||||||
|
|
||||||
Poco::Dynamic::Var RecordSet::value(std::size_t col, std::size_t row, bool useFilter) const
|
Poco::Dynamic::Var RecordSet::value(std::size_t col, std::size_t row, bool useFilter) const
|
||||||
{
|
{
|
||||||
if (useFilter && isFiltered() && !isAllowed(row))
|
if (useFilter && isFiltered() && !isAllowed(row))
|
||||||
|
@ -288,6 +288,25 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
|
||||||
|
extern template class Struct<std::string>;
|
||||||
|
extern template class Struct<int>;
|
||||||
|
|
||||||
|
extern template class Struct<std::string, Poco::OrderedMap<std::string, Var>, Poco::OrderedSet<std::string>>;
|
||||||
|
extern template class Struct<int, OrderedMap<int, Var>, OrderedSet<int>>;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
extern template class Foundation_API Struct<std::string>;
|
||||||
|
extern template class Foundation_API Struct<int>;
|
||||||
|
|
||||||
|
extern template class Foundation_API Struct<std::string, Poco::OrderedMap<std::string, Var>, Poco::OrderedSet<std::string>>;
|
||||||
|
extern template class Foundation_API Struct<int, OrderedMap<int, Var>, OrderedSet<int>>;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
class VarHolderImpl<Struct<std::string, std::map<std::string, Var>, std::set<std::string>>>: public VarHolder
|
class VarHolderImpl<Struct<std::string, std::map<std::string, Var>, std::set<std::string>>>: public VarHolder
|
||||||
{
|
{
|
||||||
@ -959,8 +978,8 @@ private:
|
|||||||
} // namespace Dynamic
|
} // namespace Dynamic
|
||||||
|
|
||||||
|
|
||||||
typedef Dynamic::Struct<std::string> DynamicStruct;
|
using DynamicStruct = Dynamic::Struct<std::string>;
|
||||||
typedef Dynamic::Struct<std::string, Poco::OrderedMap<std::string, Dynamic::Var>, Poco::OrderedSet<std::string>> OrderedDynamicStruct;
|
using OrderedDynamicStruct = Dynamic::Struct<std::string, Poco::OrderedMap<std::string, Dynamic::Var>, Poco::OrderedSet<std::string>>;
|
||||||
|
|
||||||
|
|
||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class FPEnvironmentImpl
|
class Foundation_API FPEnvironmentImpl
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum RoundingModeImpl
|
enum RoundingModeImpl
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class FPEnvironmentImpl
|
class Foundation_API FPEnvironmentImpl
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum RoundingModeImpl
|
enum RoundingModeImpl
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class FPEnvironmentImpl
|
class Foundation_API FPEnvironmentImpl
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum RoundingModeImpl
|
enum RoundingModeImpl
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class FPEnvironmentImpl
|
class Foundation_API FPEnvironmentImpl
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
enum RoundingModeImpl
|
enum RoundingModeImpl
|
||||||
|
@ -271,6 +271,8 @@ struct UTF32CharTraits
|
|||||||
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
||||||
typedef UInt32 UTF32Char;
|
typedef UInt32 UTF32Char;
|
||||||
typedef std::basic_string<UTF32Char, UTF32CharTraits> UTF32String;
|
typedef std::basic_string<UTF32Char, UTF32CharTraits> UTF32String;
|
||||||
|
#define POCO_USE_STRING16
|
||||||
|
#define POCO_USE_STRING32
|
||||||
#else // POCO_NO_WSTRING
|
#else // POCO_NO_WSTRING
|
||||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
typedef wchar_t UTF16Char;
|
typedef wchar_t UTF16Char;
|
||||||
@ -283,17 +285,20 @@ struct UTF32CharTraits
|
|||||||
typedef std::wstring UTF16String;
|
typedef std::wstring UTF16String;
|
||||||
typedef UInt32 UTF32Char;
|
typedef UInt32 UTF32Char;
|
||||||
typedef std::basic_string<UTF32Char, UTF32CharTraits> UTF32String;
|
typedef std::basic_string<UTF32Char, UTF32CharTraits> UTF32String;
|
||||||
|
#define POCO_USE_STRING32
|
||||||
#elif (__SIZEOF_WCHAR_T__ == 4)
|
#elif (__SIZEOF_WCHAR_T__ == 4)
|
||||||
typedef Poco::UInt16 UTF16Char;
|
typedef Poco::UInt16 UTF16Char;
|
||||||
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
||||||
typedef wchar_t UTF32Char;
|
typedef wchar_t UTF32Char;
|
||||||
typedef std::wstring UTF32String;
|
typedef std::wstring UTF32String;
|
||||||
|
#define POCO_USE_STRING16
|
||||||
#endif
|
#endif
|
||||||
#else // default to 32-bit wchar_t
|
#else // default to 32-bit wchar_t
|
||||||
typedef Poco::UInt16 UTF16Char;
|
typedef Poco::UInt16 UTF16Char;
|
||||||
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16String;
|
||||||
typedef wchar_t UTF32Char;
|
typedef wchar_t UTF32Char;
|
||||||
typedef std::wstring UTF32String;
|
typedef std::wstring UTF32String;
|
||||||
|
#define POCO_USE_STRING16
|
||||||
#endif //POCO_OS_FAMILY_WINDOWS
|
#endif //POCO_OS_FAMILY_WINDOWS
|
||||||
#endif //POCO_NO_WSTRING
|
#endif //POCO_NO_WSTRING
|
||||||
//#endif // POCO_ENABLE_CPP11
|
//#endif // POCO_ENABLE_CPP11
|
||||||
@ -302,4 +307,13 @@ struct UTF32CharTraits
|
|||||||
} // namespace Poco
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_USE_STRING16)
|
||||||
|
extern template class Foundation_API std::basic_string<Poco::UTF16Char, Poco::UTF16CharTraits>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(POCO_USE_STRING32)
|
||||||
|
extern template class Foundation_API std::basic_string<Poco::UTF32Char, Poco::UTF32CharTraits>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_UTFString_INCLUDED
|
#endif // Foundation_UTFString_INCLUDED
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "Poco/UTF8String.h"
|
#include "Poco/UTF8String.h"
|
||||||
|
#include "Poco/UTFString.h"
|
||||||
#include "Poco/Unicode.h"
|
#include "Poco/Unicode.h"
|
||||||
#include "Poco/TextIterator.h"
|
#include "Poco/TextIterator.h"
|
||||||
#include "Poco/TextConverter.h"
|
#include "Poco/TextConverter.h"
|
||||||
@ -22,6 +23,18 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
|
||||||
|
#if defined(POCO_USE_STRING16)
|
||||||
|
template class std::basic_string<Poco::UTF16Char, Poco::UTF16CharTraits>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(POCO_USE_STRING32)
|
||||||
|
template class std::basic_string<Poco::UTF32Char, Poco::UTF32CharTraits>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "Poco/Dynamic/VarHolder.h"
|
#include "Poco/Dynamic/VarHolder.h"
|
||||||
#include "Poco/Dynamic/Var.h"
|
#include "Poco/Dynamic/Var.h"
|
||||||
|
#include "Poco/Dynamic/Struct.h"
|
||||||
#include "Poco/JSONString.h"
|
#include "Poco/JSONString.h"
|
||||||
|
|
||||||
|
|
||||||
@ -21,6 +22,25 @@ namespace Poco {
|
|||||||
namespace Dynamic {
|
namespace Dynamic {
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
|
||||||
|
template class Foundation_API Struct<std::string>;
|
||||||
|
template class Foundation_API Struct<int>;
|
||||||
|
|
||||||
|
template class Foundation_API Struct<std::string, Poco::OrderedMap<std::string, Var>, Poco::OrderedSet<std::string>>;
|
||||||
|
template class Foundation_API Struct<int, OrderedMap<int, Var>, OrderedSet<int>>;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
template class Struct<std::string>;
|
||||||
|
template class Struct<int>;
|
||||||
|
|
||||||
|
template class Struct<std::string, Poco::OrderedMap<std::string, Var>, Poco::OrderedSet<std::string>>;
|
||||||
|
template class Struct<int, OrderedMap<int, Var>, OrderedSet<int>>;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
VarHolder::VarHolder()
|
VarHolder::VarHolder()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -2356,7 +2356,7 @@ void VarTest::testOrderedDynamicStructString()
|
|||||||
assertTrue(a1["First Name"] == "Senior");
|
assertTrue(a1["First Name"] == "Senior");
|
||||||
testGetIdxMustThrow(a1, 0);
|
testGetIdxMustThrow(a1, 0);
|
||||||
|
|
||||||
typedef Struct<std::string, OrderedMap<std::string, Var>, OrderedSet<std::string> > OrderedStruct;
|
using OrderedStruct = OrderedDynamicStruct;
|
||||||
OrderedStruct s1;
|
OrderedStruct s1;
|
||||||
s1["1"] = 1;
|
s1["1"] = 1;
|
||||||
s1["2"] = 2;
|
s1["2"] = 2;
|
||||||
|
@ -26,8 +26,23 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
namespace JSON {
|
namespace JSON {
|
||||||
|
|
||||||
|
class JSON_API Array;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
// Explicitly instantiated shared pointer in JSON library
|
||||||
|
extern template class Poco::SharedPtr<Poco::JSON::Array>;
|
||||||
|
#else
|
||||||
|
// Explicitly instantiated shared pointer in JSON library
|
||||||
|
extern template class JSON_API Poco::SharedPtr<Poco::JSON::Array>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace JSON {
|
||||||
|
|
||||||
class Object;
|
class Object;
|
||||||
|
|
||||||
|
@ -34,8 +34,22 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
namespace JSON {
|
namespace JSON {
|
||||||
|
|
||||||
|
class JSON_API Object;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
// Explicitly instatiated shared pointer in JSON library
|
||||||
|
extern template class Poco::SharedPtr<Poco::JSON::Object>;
|
||||||
|
#else
|
||||||
|
// Explicitly instatiated shared pointer in JSON library
|
||||||
|
extern template class JSON_API Poco::SharedPtr<Poco::JSON::Object>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace JSON {
|
||||||
|
|
||||||
class JSON_API Object
|
class JSON_API Object
|
||||||
/// Represents a JSON object. Object provides a representation based on
|
/// Represents a JSON object. Object provides a representation based on
|
||||||
|
@ -20,6 +20,15 @@
|
|||||||
|
|
||||||
using Poco::Dynamic::Var;
|
using Poco::Dynamic::Var;
|
||||||
|
|
||||||
|
// Explicitly instatiated shared pointer in JSON library is required to
|
||||||
|
// have known instance of the pointer to be used with VarHolder when
|
||||||
|
// compiling with -fvisibility=hidden
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
template class JSON_API Poco::SharedPtr<Poco::JSON::Array>;
|
||||||
|
#else
|
||||||
|
template class Poco::SharedPtr<Poco::JSON::Array>;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
namespace JSON {
|
namespace JSON {
|
||||||
|
@ -19,8 +19,18 @@
|
|||||||
|
|
||||||
using Poco::Dynamic::Var;
|
using Poco::Dynamic::Var;
|
||||||
|
|
||||||
|
// Explicitly instatiated shared pointer in JSON library is required to
|
||||||
|
// have known instance of the pointer to be used with VarHolder when
|
||||||
|
// compiling with -fvisibility=hidden
|
||||||
|
|
||||||
|
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||||
|
template class JSON_API Poco::SharedPtr<Poco::JSON::Object>;
|
||||||
|
#else
|
||||||
|
template class Poco::SharedPtr<Poco::JSON::Object>;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Poco {
|
namespace Poco {
|
||||||
|
|
||||||
namespace JSON {
|
namespace JSON {
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ namespace MongoDB {
|
|||||||
|
|
||||||
class Array;
|
class Array;
|
||||||
|
|
||||||
class ElementFindByName
|
class MongoDB_API ElementFindByName
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ElementFindByName(const std::string& name):
|
ElementFindByName(const std::string& name):
|
||||||
|
@ -27,7 +27,7 @@ namespace Poco {
|
|||||||
namespace MongoDB {
|
namespace MongoDB {
|
||||||
|
|
||||||
|
|
||||||
class UpdateRequest: public RequestMessage
|
class MongoDB_API UpdateRequest: public RequestMessage
|
||||||
/// This request is used to update a document in a database
|
/// This request is used to update a document in a database
|
||||||
/// using the OP_UPDATE client request.
|
/// using the OP_UPDATE client request.
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ SHAREDLIBLINKEXT = .so
|
|||||||
CFLAGS = -std=c11 $(ARCHFLAGS)
|
CFLAGS = -std=c11 $(ARCHFLAGS)
|
||||||
CFLAGS32 =
|
CFLAGS32 =
|
||||||
CFLAGS64 =
|
CFLAGS64 =
|
||||||
CXXFLAGS = -std=c++14 -Wall -Wno-sign-compare -Wno-psabi $(ARCHFLAGS)
|
CXXFLAGS = -std=c++17 -Wall -Wno-sign-compare -Wno-psabi $(ARCHFLAGS)
|
||||||
CXXFLAGS32 =
|
CXXFLAGS32 =
|
||||||
CXXFLAGS64 =
|
CXXFLAGS64 =
|
||||||
LINKFLAGS =
|
LINKFLAGS =
|
||||||
|
@ -49,7 +49,7 @@ SHAREDLIBLINKEXT = .dylib
|
|||||||
# Compiler and Linker Flags
|
# Compiler and Linker Flags
|
||||||
#
|
#
|
||||||
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c11
|
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c11
|
||||||
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c++14 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
|
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -std=c++17 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
|
||||||
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
||||||
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
||||||
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) $(SANITIZEFLAGS) -stdlib=libc++
|
||||||
|
@ -66,7 +66,7 @@ SHAREDLIBLINKEXT = .dylib
|
|||||||
CFLAGS = $(OSFLAGS) -std=gnu99
|
CFLAGS = $(OSFLAGS) -std=gnu99
|
||||||
CFLAGS32 =
|
CFLAGS32 =
|
||||||
CFLAGS64 =
|
CFLAGS64 =
|
||||||
CXXFLAGS = $(OSFLAGS) -std=gnu++14 -stdlib=libc++ -Wall -Wno-sign-compare
|
CXXFLAGS = $(OSFLAGS) -std=c++17 -stdlib=libc++ -Wall -Wno-sign-compare
|
||||||
CXXFLAGS32 =
|
CXXFLAGS32 =
|
||||||
CXXFLAGS64 =
|
CXXFLAGS64 =
|
||||||
LINKFLAGS = $(OSFLAGS) -stdlib=libc++
|
LINKFLAGS = $(OSFLAGS) -stdlib=libc++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user