Skip to content

Commit

Permalink
Merge branch 'pocoproject:devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
soroshsabz authored Dec 5, 2023
2 parents fae860b + 607b086 commit 767bad3
Show file tree
Hide file tree
Showing 42 changed files with 625 additions and 225 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ endif()
option(ENABLE_TESTS
"Set to OFF|ON (default is OFF) to control build of POCO tests" OFF)

option(ENABLE_COMPILER_WARNINGS
"Set to OFF|ON (default is OFF) to enable additional compiler warnings. Intended primarily for maintainers." OFF)

option(ENABLE_SAMPLES
"Set to OFF|ON (default is OFF) to control build of POCO samples" OFF)

Expand Down
40 changes: 20 additions & 20 deletions Data/include/Poco/Data/Binding.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Data {


template <class T>
class Binding: public AbstractBinding
class Binding final: public AbstractBinding
/// Binding maps a value or multiple values (see Binding specializations for STL containers as
/// well as type handlers) to database column(s). Values to be bound can be either mapped
/// directly (by reference) or a copy can be created, depending on the value of the copy argument.
Expand Down Expand Up @@ -109,7 +109,7 @@ class Binding: public AbstractBinding


template <class T>
class CopyBinding: public AbstractBinding
class CopyBinding final: public AbstractBinding
/// Binding maps a value or multiple values (see Binding specializations for STL containers as
/// well as type handlers) to database column(s). Values to be bound can be either mapped
/// directly (by reference) or a copy can be created, depending on the value of the copy argument.
Expand Down Expand Up @@ -177,7 +177,7 @@ class CopyBinding: public AbstractBinding


template <>
class Binding<const char*>: public AbstractBinding
class Binding<const char*> final: public AbstractBinding
/// Binding const char* specialization wraps char pointer into string.
{
public:
Expand Down Expand Up @@ -238,7 +238,7 @@ class Binding<const char*>: public AbstractBinding


template <>
class CopyBinding<const char*>: public AbstractBinding
class CopyBinding<const char*> final: public AbstractBinding
/// Binding const char* specialization wraps char pointer into string.
{
public:
Expand Down Expand Up @@ -298,7 +298,7 @@ class CopyBinding<const char*>: public AbstractBinding


template <class T>
class Binding<std::vector<T>>: public AbstractBinding
class Binding<std::vector<T>> final: public AbstractBinding
/// Specialization for std::vector.
{
public:
Expand Down Expand Up @@ -364,7 +364,7 @@ class Binding<std::vector<T>>: public AbstractBinding


template <class T>
class CopyBinding<std::vector<T>>: public AbstractBinding
class CopyBinding<std::vector<T>> final: public AbstractBinding
/// Specialization for std::vector.
{
public:
Expand Down Expand Up @@ -431,7 +431,7 @@ class CopyBinding<std::vector<T>>: public AbstractBinding


template <>
class Binding<std::vector<bool>>: public AbstractBinding
class Binding<std::vector<bool>> final: public AbstractBinding
/// Specialization for std::vector<bool>.
/// This specialization is necessary due to the nature of std::vector<bool>.
/// For details, see the standard library implementation of std::vector<bool>
Expand Down Expand Up @@ -512,7 +512,7 @@ class Binding<std::vector<bool>>: public AbstractBinding


template <>
class CopyBinding<std::vector<bool>>: public AbstractBinding
class CopyBinding<std::vector<bool>> final: public AbstractBinding
/// Specialization for std::vector<bool>.
/// This specialization is necessary due to the nature of std::vector<bool>.
/// For details, see the standard library implementation of std::vector<bool>
Expand Down Expand Up @@ -592,7 +592,7 @@ class CopyBinding<std::vector<bool>>: public AbstractBinding


template <class T>
class Binding<std::list<T>>: public AbstractBinding
class Binding<std::list<T>> final: public AbstractBinding
/// Specialization for std::list.
{
public:
Expand Down Expand Up @@ -657,7 +657,7 @@ class Binding<std::list<T>>: public AbstractBinding


template <class T>
class CopyBinding<std::list<T>>: public AbstractBinding
class CopyBinding<std::list<T>> final: public AbstractBinding
/// Specialization for std::list.
{
public:
Expand Down Expand Up @@ -722,7 +722,7 @@ class CopyBinding<std::list<T>>: public AbstractBinding


template <class T>
class Binding<std::deque<T>>: public AbstractBinding
class Binding<std::deque<T>> final: public AbstractBinding
/// Specialization for std::deque.
{
public:
Expand Down Expand Up @@ -787,7 +787,7 @@ class Binding<std::deque<T>>: public AbstractBinding


template <class T>
class CopyBinding<std::deque<T>>: public AbstractBinding
class CopyBinding<std::deque<T>> final: public AbstractBinding
/// Specialization for std::deque.
{
public:
Expand Down Expand Up @@ -852,7 +852,7 @@ class CopyBinding<std::deque<T>>: public AbstractBinding


template <class T>
class Binding<std::set<T>>: public AbstractBinding
class Binding<std::set<T>> final: public AbstractBinding
/// Specialization for std::set.
{
public:
Expand Down Expand Up @@ -917,7 +917,7 @@ class Binding<std::set<T>>: public AbstractBinding


template <class T>
class CopyBinding<std::set<T>>: public AbstractBinding
class CopyBinding<std::set<T>> final: public AbstractBinding
/// Specialization for std::set.
{
public:
Expand Down Expand Up @@ -982,7 +982,7 @@ class CopyBinding<std::set<T>>: public AbstractBinding


template <class T>
class Binding<std::multiset<T>>: public AbstractBinding
class Binding<std::multiset<T>> final: public AbstractBinding
/// Specialization for std::multiset.
{
public:
Expand Down Expand Up @@ -1047,7 +1047,7 @@ class Binding<std::multiset<T>>: public AbstractBinding


template <class T>
class CopyBinding<std::multiset<T>>: public AbstractBinding
class CopyBinding<std::multiset<T>> final: public AbstractBinding
/// Specialization for std::multiset.
{
public:
Expand Down Expand Up @@ -1112,7 +1112,7 @@ class CopyBinding<std::multiset<T>>: public AbstractBinding


template <class K, class V>
class Binding<std::map<K, V>>: public AbstractBinding
class Binding<std::map<K, V>> final: public AbstractBinding
/// Specialization for std::map.
{
public:
Expand Down Expand Up @@ -1177,7 +1177,7 @@ class Binding<std::map<K, V>>: public AbstractBinding


template <class K, class V>
class CopyBinding<std::map<K, V>>: public AbstractBinding
class CopyBinding<std::map<K, V>> final: public AbstractBinding
/// Specialization for std::map.
{
public:
Expand Down Expand Up @@ -1242,7 +1242,7 @@ class CopyBinding<std::map<K, V>>: public AbstractBinding


template <class K, class V>
class Binding<std::multimap<K, V>>: public AbstractBinding
class Binding<std::multimap<K, V>> final: public AbstractBinding
/// Specialization for std::multimap.
{
public:
Expand Down Expand Up @@ -1307,7 +1307,7 @@ class Binding<std::multimap<K, V>>: public AbstractBinding


template <class K, class V>
class CopyBinding<std::multimap<K, V>>: public AbstractBinding
class CopyBinding<std::multimap<K, V>> final: public AbstractBinding
/// Specialization for std::multimap.
{
public:
Expand Down
4 changes: 2 additions & 2 deletions Foundation/include/Poco/Format.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ inline void formatAny(std::string& result, const std::string& fmt, const std::ve
/// Supports a variable number of arguments and is used by
/// all other variants of format().
{
format(result, fmt, values);
Poco::format(result, fmt, values);
}

inline void formatAny(std::string& result, const char *fmt, const std::vector<Any>& values)
/// Supports a variable number of arguments and is used by
/// all other variants of format().
{
format(result, fmt, values);
Poco::format(result, fmt, values);
}

template <typename T, typename... Args>
Expand Down
33 changes: 7 additions & 26 deletions Foundation/include/Poco/JSONString.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,45 +38,26 @@ enum JSONOptions
/// unicode characters will be escaped in the resulting
/// string.

JSON_WRAP_STRINGS = 4
JSON_WRAP_STRINGS = 4,
/// If specified, the object will preserve the items
/// insertion order. Otherwise, items will be sorted
/// by keys.
};


//@ deprecated
void Foundation_API toJSON(const std::string& value, std::ostream& out, bool wrap = true);
/// Formats string value into the supplied output stream by
/// escaping control and ALL Unicode characters.
/// If wrap is true, the resulting string is enclosed in double quotes.
///
/// This function is deprecated, please use
///
/// void Poco::toJSON(const std::string&, std::ostream&, int)


//@ deprecated
std::string Foundation_API toJSON(const std::string& value, bool wrap = true);
/// Formats string value by escaping control and ALL Unicode characters.
/// If wrap is true, the resulting string is enclosed in double quotes
///
/// Returns formatted string.
///
/// This function is deprecated, please use
///
/// std::string Poco::toJSON(const std::string&, int)
JSON_LOWERCASE_HEX = 8
/// If specified, all encoding happens with lowercase
/// HEX characters instead of capitals
};


void Foundation_API toJSON(const std::string& value, std::ostream& out, int options);
void Foundation_API toJSON(const std::string& value, std::ostream& out, int options = Poco::JSON_WRAP_STRINGS);
/// Formats string value into the supplied output stream by
/// escaping control characters.
/// If JSON_WRAP_STRINGS is in options, the resulting strings is enclosed in double quotes
/// If JSON_ESCAPE_UNICODE is in options, all unicode characters will be escaped, otherwise
/// only the compulsory ones.


std::string Foundation_API toJSON(const std::string& value, int options);
std::string Foundation_API toJSON(const std::string& value, int options = Poco::JSON_WRAP_STRINGS);
/// Formats string value by escaping control characters.
/// If JSON_WRAP_STRINGS is in options, the resulting string is enclosed in double quotes
/// If JSON_ESCAPE_UNICODE is in options, all unicode characters will be escaped, otherwise
Expand Down
Loading

0 comments on commit 767bad3

Please sign in to comment.