mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-19 16:47:14 +02:00
Update POCO to 1.11.0
This commit is contained in:
@ -31,6 +31,7 @@
|
||||
#include "Poco/UnicodeConverter.h"
|
||||
#include "Poco/UTFString.h"
|
||||
#include "Poco/UTF8String.h"
|
||||
#include "Poco/UUID.h"
|
||||
#include "Poco/Any.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <vector>
|
||||
@ -135,47 +136,51 @@ public:
|
||||
/// (typeid) for the stored content.
|
||||
|
||||
virtual void convert(Int8& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(Int16& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(Int32& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(Int64& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(UInt8& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(UInt16& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(UInt32& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(UInt64& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(DateTime& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(LocalDateTime& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(Timestamp& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(UUID& val) const;
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
#ifndef POCO_INT64_IS_LONG
|
||||
@ -189,96 +194,100 @@ public:
|
||||
#else
|
||||
|
||||
virtual void convert(long long& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to suport the conversion.
|
||||
|
||||
virtual void convert(unsigned long long & val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to suport the conversion.
|
||||
|
||||
#endif
|
||||
|
||||
virtual void convert(bool& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(float& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(double& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(char& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(std::string& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual void convert(Poco::UTF16String& val) const;
|
||||
/// Throws BadCastException. Must be overriden in a type
|
||||
/// Throws BadCastException. Must be overridden in a type
|
||||
/// specialization in order to support the conversion.
|
||||
|
||||
virtual bool isArray() const;
|
||||
/// Returns true.
|
||||
|
||||
virtual bool isVector() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isList() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isDeque() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isStruct() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isOrdered() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isInteger() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isSigned() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isNumeric() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isBoolean() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isString() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isDate() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isTime() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isDateTime() const;
|
||||
/// Returns false. Must be properly overriden in a type
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual bool isUUID() const;
|
||||
/// Returns false. Must be properly overridden in a type
|
||||
/// specialization in order to support the diagnostic.
|
||||
|
||||
virtual std::size_t size() const;
|
||||
/// Returns 1 iff Var is not empty or this function overriden.
|
||||
/// Returns 1 iff Var is not empty or this function overridden.
|
||||
|
||||
protected:
|
||||
VarHolder();
|
||||
@ -519,8 +528,16 @@ inline void VarHolder::convert(Timestamp& /*val*/) const
|
||||
throw BadCastException("Can not convert to Timestamp");
|
||||
}
|
||||
|
||||
|
||||
inline void VarHolder::convert(UUID& /*val*/) const
|
||||
{
|
||||
throw BadCastException("Can not convert to UUID");
|
||||
}
|
||||
|
||||
|
||||
#ifndef POCO_INT64_IS_LONG
|
||||
|
||||
|
||||
inline void VarHolder::convert(long& val) const
|
||||
{
|
||||
Int32 tmp;
|
||||
@ -536,8 +553,10 @@ inline void VarHolder::convert(unsigned long& val) const
|
||||
val = tmp;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
inline void VarHolder::convert(long long& /*val*/) const
|
||||
{
|
||||
throw BadCastException("Can not convert to long long");
|
||||
@ -549,8 +568,10 @@ inline void VarHolder::convert(unsigned long long& /*val*/) const
|
||||
throw BadCastException("Can not convert to unsigned long long");
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
inline void VarHolder::convert(bool& /*val*/) const
|
||||
{
|
||||
throw BadCastException("Can not convert to bool");
|
||||
@ -671,6 +692,12 @@ inline bool VarHolder::isDateTime() const
|
||||
}
|
||||
|
||||
|
||||
inline bool VarHolder::isUUID() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
inline std::size_t VarHolder::size() const
|
||||
{
|
||||
return 1u;
|
||||
@ -1026,7 +1053,6 @@ public:
|
||||
return std::numeric_limits<Int16>::is_specialized;
|
||||
}
|
||||
|
||||
|
||||
bool isString() const
|
||||
{
|
||||
return false;
|
||||
@ -2750,6 +2776,11 @@ public:
|
||||
ts = tmp.timestamp();
|
||||
}
|
||||
|
||||
void convert(UUID& uuid) const
|
||||
{
|
||||
uuid.parse(_val);
|
||||
}
|
||||
|
||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const
|
||||
{
|
||||
return cloneHolder(pVarHolder, _val);
|
||||
@ -3917,6 +3948,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isUUID() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
VarHolderImpl();
|
||||
VarHolderImpl(const VarHolderImpl&);
|
||||
@ -4047,6 +4083,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isUUID() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
VarHolderImpl();
|
||||
VarHolderImpl(const VarHolderImpl&);
|
||||
@ -4177,6 +4218,11 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isUUID() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
VarHolderImpl();
|
||||
VarHolderImpl(const VarHolderImpl&);
|
||||
@ -4186,6 +4232,102 @@ private:
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
class VarHolderImpl<UUID>: public VarHolder
|
||||
{
|
||||
public:
|
||||
VarHolderImpl(const UUID& val): _val(val)
|
||||
{
|
||||
}
|
||||
|
||||
~VarHolderImpl()
|
||||
{
|
||||
}
|
||||
|
||||
const std::type_info& type() const
|
||||
{
|
||||
return typeid(UUID);
|
||||
}
|
||||
|
||||
void convert(std::string& val) const
|
||||
{
|
||||
val = _val.toString();
|
||||
}
|
||||
|
||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const
|
||||
{
|
||||
return cloneHolder(pVarHolder, _val);
|
||||
}
|
||||
|
||||
const UUID& value() const
|
||||
{
|
||||
return _val;
|
||||
}
|
||||
|
||||
bool isArray() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isStruct() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isInteger() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isSigned() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isNumeric() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isBoolean() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isString() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isDate() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isTime() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isDateTime() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isUUID() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
VarHolderImpl();
|
||||
VarHolderImpl(const VarHolderImpl&);
|
||||
VarHolderImpl& operator = (const VarHolderImpl&);
|
||||
|
||||
Poco::UUID _val;
|
||||
};
|
||||
|
||||
|
||||
typedef std::vector<Var> Vector;
|
||||
typedef std::deque<Var> Deque;
|
||||
typedef std::list<Var> List;
|
||||
|
Reference in New Issue
Block a user