ASCIIEncoding.h | ASCIIEncoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: ASCIIEncoding | // Module: ASCIIEncoding | |||
// | // | |||
// Definition of the ASCIIEncoding class. | // Definition of the ASCIIEncoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ASCIIEncoding_INCLUDED | #ifndef Foundation_ASCIIEncoding_INCLUDED | |||
#define Foundation_ASCIIEncoding_INCLUDED | #define Foundation_ASCIIEncoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractCache.h | AbstractCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AbstractCache | // Module: AbstractCache | |||
// | // | |||
// Definition of the AbstractCache class. | // Definition of the AbstractCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractCache_INCLUDED | #ifndef Foundation_AbstractCache_INCLUDED | |||
#define Foundation_AbstractCache_INCLUDED | #define Foundation_AbstractCache_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/FIFOEvent.h" | #include "Poco/FIFOEvent.h" | |||
skipping to change at line 83 | skipping to change at line 63 | |||
initialize(); | initialize(); | |||
} | } | |||
AbstractCache(const TStrategy& strat): _strategy(strat) | AbstractCache(const TStrategy& strat): _strategy(strat) | |||
{ | { | |||
initialize(); | initialize(); | |||
} | } | |||
virtual ~AbstractCache() | virtual ~AbstractCache() | |||
{ | { | |||
uninitialize(); | try | |||
{ | ||||
uninitialize(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
void add(const TKey& key, const TValue& val) | void add(const TKey& key, const TValue& val) | |||
/// Adds the key value pair to the cache. | /// Adds the key value pair to the cache. | |||
/// If for the key already an entry exists, it will be overw ritten. | /// If for the key already an entry exists, it will be overw ritten. | |||
{ | { | |||
typename TMutex::ScopedLock lock(_mutex); | typename TMutex::ScopedLock lock(_mutex); | |||
doAdd(key, val); | doAdd(key, val); | |||
} | } | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 9 lines changed or added | |||
AbstractConfiguration.h | AbstractConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: AbstractConfiguration | // Module: AbstractConfiguration | |||
// | // | |||
// Definition of the AbstractConfiguration class. | // Definition of the AbstractConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_AbstractConfiguration_INCLUDED | #ifndef Util_AbstractConfiguration_INCLUDED | |||
#define Util_AbstractConfiguration_INCLUDED | #define Util_AbstractConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/BasicEvent.h" | #include "Poco/BasicEvent.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractContainerNode.h | AbstractContainerNode.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the AbstractContainerNode class. | // Definition of the AbstractContainerNode class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_AbstractContainerNode_INCLUDED | #ifndef DOM_AbstractContainerNode_INCLUDED | |||
#define DOM_AbstractContainerNode_INCLUDED | #define DOM_AbstractContainerNode_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractDelegate.h | AbstractDelegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: AbstractDelegate | // Module: AbstractDelegate | |||
// | // | |||
// Implementation of the AbstractDelegate template. | // Implementation of the AbstractDelegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractDelegate_INCLUDED | #ifndef Foundation_AbstractDelegate_INCLUDED | |||
#define Foundation_AbstractDelegate_INCLUDED | #define Foundation_AbstractDelegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs> | template <class TArgs> | |||
class AbstractDelegate | class AbstractDelegate | |||
/// Base class for Delegate and Expire. | /// Base class for Delegate and Expire. | |||
{ | { | |||
public: | public: | |||
AbstractDelegate() | AbstractDelegate() | |||
{ | { | |||
} | } | |||
AbstractDelegate(const AbstractDelegate& del) | AbstractDelegate(const AbstractDelegate& /*del*/) | |||
{ | { | |||
} | } | |||
virtual ~AbstractDelegate() | virtual ~AbstractDelegate() | |||
{ | { | |||
} | } | |||
virtual bool notify(const void* sender, TArgs& arguments) = 0; | virtual bool notify(const void* sender, TArgs& arguments) = 0; | |||
/// Invokes the delegate's callback function. | /// Invokes the delegate's callback function. | |||
/// Returns true if successful, or false if the delegate | /// Returns true if successful, or false if the delegate | |||
/// has been disabled or has expired. | /// has been disabled or has expired. | |||
virtual bool equals(const AbstractDelegate& other) const = 0; | virtual bool equals(const AbstractDelegate& other) const = 0; | |||
/// Compares the AbstractDelegate with the other one for equ ality. | /// Compares the AbstractDelegate with the other one for equ ality. | |||
virtual AbstractDelegate* clone() const = 0; | virtual AbstractDelegate* clone() const = 0; | |||
/// Returns a deep copy of the AbstractDelegate. | /// Returns a deep copy of the AbstractDelegate. | |||
virtual void disable() = 0; | ||||
/// Disables the delegate, which is done prior to removal. | ||||
virtual const AbstractDelegate* unwrap() const | ||||
/// Returns the unwrapped delegate. Must be overridden by de | ||||
corators | ||||
/// like Expire. | ||||
{ | ||||
return this; | ||||
} | ||||
}; | ||||
template <> | ||||
class AbstractDelegate<void> | ||||
/// Base class for Delegate and Expire. | ||||
{ | ||||
public: | ||||
AbstractDelegate() | ||||
{ | ||||
} | ||||
AbstractDelegate(const AbstractDelegate&) | ||||
{ | ||||
} | ||||
virtual ~AbstractDelegate() | ||||
{ | ||||
} | ||||
virtual bool notify(const void* sender) = 0; | ||||
/// Invokes the delegate's callback function. | ||||
/// Returns true if successful, or false if the delegate | ||||
/// has been disabled or has expired. | ||||
virtual bool equals(const AbstractDelegate& other) const = 0; | ||||
/// Compares the AbstractDelegate with the other one for equ | ||||
ality. | ||||
virtual AbstractDelegate* clone() const = 0; | ||||
/// Returns a deep copy of the AbstractDelegate. | ||||
virtual void disable() = 0; | virtual void disable() = 0; | |||
/// Disables the delegate, which is done prior to removal. | /// Disables the delegate, which is done prior to removal. | |||
virtual const AbstractDelegate* unwrap() const | virtual const AbstractDelegate* unwrap() const | |||
/// Returns the unwrapped delegate. Must be overridden by de corators | /// Returns the unwrapped delegate. Must be overridden by de corators | |||
/// like Expire. | /// like Expire. | |||
{ | { | |||
return this; | return this; | |||
} | } | |||
}; | }; | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 43 lines changed or added | |||
AbstractEvent.h | AbstractEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: AbstractEvent | // Module: AbstractEvent | |||
// | // | |||
// Definition of the AbstractEvent class. | // Definition of the AbstractEvent class. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractFoundation_INCLUDED | #ifndef Foundation_AbstractFoundation_INCLUDED | |||
#define Foundation_AbstractFoundation_INCLUDED | #define Foundation_AbstractFoundation_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/SingletonHolder.h" | #include "Poco/SingletonHolder.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/ActiveResult.h" | #include "Poco/ActiveResult.h" | |||
#include "Poco/ActiveMethod.h" | #include "Poco/ActiveMethod.h" | |||
skipping to change at line 73 | skipping to change at line 53 | |||
/// to fixed values. For most use-cases the BasicEvent template will be sufficient: | /// to fixed values. For most use-cases the BasicEvent template will be sufficient: | |||
/// | /// | |||
/// #include "Poco/BasicEvent.h" | /// #include "Poco/BasicEvent.h" | |||
/// #include "Poco/Delegate.h" | /// #include "Poco/Delegate.h" | |||
/// | /// | |||
/// Note that as of release 1.4.2, the behavior of BasicEvent equals that of FIFOEvent, | /// Note that as of release 1.4.2, the behavior of BasicEvent equals that of FIFOEvent, | |||
/// so the FIFOEvent class is no longer necessary and provided for b ackwards compatibility | /// so the FIFOEvent class is no longer necessary and provided for b ackwards compatibility | |||
/// only. | /// only. | |||
/// | /// | |||
/// BasicEvent works with a standard delegate. They allow one object to register | /// BasicEvent works with a standard delegate. They allow one object to register | |||
/// onr or more delegates with an event. In contrast, a PriorityDele gate comes with an attached priority value | /// one or more delegates with an event. In contrast, a PriorityDele gate comes with an attached priority value | |||
/// and allows one object to register for one priority value one or more delegates. Note that PriorityDelegates | /// and allows one object to register for one priority value one or more delegates. Note that PriorityDelegates | |||
/// only work with PriorityEvents: | /// only work with PriorityEvents: | |||
/// | /// | |||
/// #include "Poco/PriorityEvent.h" | /// #include "Poco/PriorityEvent.h" | |||
/// #include "Poco/PriorityDelegate.h" | /// #include "Poco/PriorityDelegate.h" | |||
/// | /// | |||
/// Use events by adding them as public members to the object which is throwing notifications: | /// Use events by adding them as public members to the object which is throwing notifications: | |||
/// | /// | |||
/// class MyData | /// class MyData | |||
/// { | /// { | |||
skipping to change at line 170 | skipping to change at line 150 | |||
/// MyController::~MyController() | /// MyController::~MyController() | |||
/// { | /// { | |||
/// _data.dataChanged -= delegate(this, &MyController::onDat aChanged); | /// _data.dataChanged -= delegate(this, &MyController::onDat aChanged); | |||
/// } | /// } | |||
/// | /// | |||
/// Working with PriorityDelegate's as similar to working with Basic Event. | /// Working with PriorityDelegate's as similar to working with Basic Event. | |||
/// Instead of delegate(), the priorityDelegate() function must be u sed | /// Instead of delegate(), the priorityDelegate() function must be u sed | |||
/// to create the PriorityDelegate. | /// to create the PriorityDelegate. | |||
{ | { | |||
public: | public: | |||
typedef TDelegate* DelegateHandle; | ||||
typedef TArgs Args; | typedef TArgs Args; | |||
AbstractEvent(): | AbstractEvent(): | |||
_executeAsync(this, &AbstractEvent::executeAsyncImpl), | _executeAsync(this, &AbstractEvent::executeAsyncImpl), | |||
_enabled(true) | _enabled(true) | |||
{ | { | |||
} | } | |||
AbstractEvent(const TStrategy& strat): | AbstractEvent(const TStrategy& strat): | |||
_executeAsync(this, &AbstractEvent::executeAsyncImpl), | _executeAsync(this, &AbstractEvent::executeAsyncImpl), | |||
skipping to change at line 207 | skipping to change at line 188 | |||
void operator -= (const TDelegate& aDelegate) | void operator -= (const TDelegate& aDelegate) | |||
/// Removes a delegate from the event. | /// Removes a delegate from the event. | |||
/// | /// | |||
/// If the delegate is not found, this function does nothing . | /// If the delegate is not found, this function does nothing . | |||
{ | { | |||
typename TMutex::ScopedLock lock(_mutex); | typename TMutex::ScopedLock lock(_mutex); | |||
_strategy.remove(aDelegate); | _strategy.remove(aDelegate); | |||
} | } | |||
DelegateHandle add(const TDelegate& aDelegate) | ||||
/// Adds a delegate to the event. | ||||
/// | ||||
/// Exact behavior is determined by the TStrategy. | ||||
/// | ||||
/// Returns a DelegateHandle which can be used in call to | ||||
/// remove() to remove the delegate. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
return _strategy.add(aDelegate); | ||||
} | ||||
void remove(DelegateHandle delegateHandle) | ||||
/// Removes a delegate from the event using a DelegateHandle | ||||
/// returned by add(). | ||||
/// | ||||
/// If the delegate is not found, this function does nothing | ||||
. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_strategy.remove(delegateHandle); | ||||
} | ||||
void operator () (const void* pSender, TArgs& args) | void operator () (const void* pSender, TArgs& args) | |||
/// Shortcut for notify(pSender, args); | /// Shortcut for notify(pSender, args); | |||
{ | { | |||
notify(pSender, args); | notify(pSender, args); | |||
} | } | |||
void operator () (TArgs& args) | void operator () (TArgs& args) | |||
/// Shortcut for notify(args). | /// Shortcut for notify(args). | |||
{ | { | |||
notify(0, args); | notify(0, args); | |||
skipping to change at line 242 | skipping to change at line 245 | |||
if (!_enabled) return; | if (!_enabled) return; | |||
// thread-safeness: | // thread-safeness: | |||
// copy should be faster and safer than blocking until | // copy should be faster and safer than blocking until | |||
// execution ends | // execution ends | |||
TStrategy strategy(_strategy); | TStrategy strategy(_strategy); | |||
lock.unlock(); | lock.unlock(); | |||
strategy.notify(pSender, args); | strategy.notify(pSender, args); | |||
} | } | |||
bool hasDelegates() const { | ||||
return !(_strategy.empty()); | ||||
} | ||||
ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& ar gs) | ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& ar gs) | |||
/// Sends a notification to all registered delegates. The or der is | /// Sends a notification to all registered delegates. The or der is | |||
/// determined by the TStrategy. This method is not blocking and will | /// determined by the TStrategy. This method is not blocking and will | |||
/// immediately return. The delegates are invoked in a seper ate thread. | /// immediately return. The delegates are invoked in a seper ate thread. | |||
/// Call activeResult.wait() to wait until the notification has ended. | /// Call activeResult.wait() to wait until the notification has ended. | |||
/// While executing, other objects can change the delegate l ist. These changes don't | /// While executing, other objects can change the delegate l ist. These changes don't | |||
/// influence the current active notifications but are activ ated with | /// influence the current active notifications but are activ ated with | |||
/// the next notify. If a delegate is removed during a notif y(), the | /// the next notify. If a delegate is removed during a notif y(), the | |||
/// delegate will no longer be invoked (unless it has alread y been | /// delegate will no longer be invoked (unless it has alread y been | |||
/// invoked prior to removal). If one of the delegates throw s an exception, | /// invoked prior to removal). If one of the delegates throw s an exception, | |||
skipping to change at line 343 | skipping to change at line 350 | |||
} | } | |||
TStrategy _strategy; /// The strategy used to notify observers. | TStrategy _strategy; /// The strategy used to notify observers. | |||
bool _enabled; /// Stores if an event is enabled. Notfies on d isabled events have no effect | bool _enabled; /// Stores if an event is enabled. Notfies on d isabled events have no effect | |||
/// but it is possible to change the observers. | /// but it is possible to change the observers. | |||
mutable TMutex _mutex; | mutable TMutex _mutex; | |||
private: | private: | |||
AbstractEvent(const AbstractEvent& other); | AbstractEvent(const AbstractEvent& other); | |||
AbstractEvent& operator = (const AbstractEvent& other); | AbstractEvent& operator = (const AbstractEvent& other); | |||
}; | ||||
template <class TStrategy, class TDelegate, class TMutex> | ||||
class AbstractEvent<void, TStrategy, TDelegate, TMutex> | ||||
{ | ||||
public: | ||||
typedef TDelegate* DelegateHandle; | ||||
AbstractEvent(): | ||||
_executeAsync(this, &AbstractEvent::executeAsyncImpl), | ||||
_enabled(true) | ||||
{ | ||||
} | ||||
AbstractEvent(const TStrategy& strat): | ||||
_executeAsync(this, &AbstractEvent::executeAsyncImpl), | ||||
_strategy(strat), | ||||
_enabled(true) | ||||
{ | ||||
} | ||||
virtual ~AbstractEvent() | ||||
{ | ||||
} | ||||
void operator += (const TDelegate& aDelegate) | ||||
/// Adds a delegate to the event. | ||||
/// | ||||
/// Exact behavior is determined by the TStrategy. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_strategy.add(aDelegate); | ||||
} | ||||
void operator -= (const TDelegate& aDelegate) | ||||
/// Removes a delegate from the event. | ||||
/// | ||||
/// If the delegate is not found, this function does nothing | ||||
. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_strategy.remove(aDelegate); | ||||
} | ||||
DelegateHandle add(const TDelegate& aDelegate) | ||||
/// Adds a delegate to the event. | ||||
/// | ||||
/// Exact behavior is determined by the TStrategy. | ||||
/// | ||||
/// Returns a DelegateHandle which can be used in call to | ||||
/// remove() to remove the delegate. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
return _strategy.add(aDelegate); | ||||
} | ||||
void remove(DelegateHandle delegateHandle) | ||||
/// Removes a delegate from the event using a DelegateHandle | ||||
/// returned by add(). | ||||
/// | ||||
/// If the delegate is not found, this function does nothing | ||||
. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_strategy.remove(delegateHandle); | ||||
} | ||||
void operator () (const void* pSender) | ||||
/// Shortcut for notify(pSender, args); | ||||
{ | ||||
notify(pSender); | ||||
} | ||||
void operator () () | ||||
/// Shortcut for notify(args). | ||||
{ | ||||
notify(0); | ||||
} | ||||
void notify(const void* pSender) | ||||
/// Sends a notification to all registered delegates. The or | ||||
der is | ||||
/// determined by the TStrategy. This method is blocking. Wh | ||||
ile executing, | ||||
/// the list of delegates may be modified. These changes don | ||||
't | ||||
/// influence the current active notifications but are activ | ||||
ated with | ||||
/// the next notify. If a delegate is removed during a notif | ||||
y(), the | ||||
/// delegate will no longer be invoked (unless it has alread | ||||
y been | ||||
/// invoked prior to removal). If one of the delegates throw | ||||
s an exception, | ||||
/// the notify method is immediately aborted and the excepti | ||||
on is propagated | ||||
/// to the caller. | ||||
{ | ||||
Poco::ScopedLockWithUnlock<TMutex> lock(_mutex); | ||||
if (!_enabled) return; | ||||
// thread-safeness: | ||||
// copy should be faster and safer than blocking until | ||||
// execution ends | ||||
TStrategy strategy(_strategy); | ||||
lock.unlock(); | ||||
strategy.notify(pSender); | ||||
} | ||||
ActiveResult<void> notifyAsync(const void* pSender) | ||||
/// Sends a notification to all registered delegates. The or | ||||
der is | ||||
/// determined by the TStrategy. This method is not blocking | ||||
and will | ||||
/// immediately return. The delegates are invoked in a seper | ||||
ate thread. | ||||
/// Call activeResult.wait() to wait until the notification | ||||
has ended. | ||||
/// While executing, other objects can change the delegate l | ||||
ist. These changes don't | ||||
/// influence the current active notifications but are activ | ||||
ated with | ||||
/// the next notify. If a delegate is removed during a notif | ||||
y(), the | ||||
/// delegate will no longer be invoked (unless it has alread | ||||
y been | ||||
/// invoked prior to removal). If one of the delegates throw | ||||
s an exception, | ||||
/// the execution is aborted and the exception is propagated | ||||
to the caller. | ||||
{ | ||||
NotifyAsyncParams params(pSender); | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
// thread-safeness: | ||||
// copy should be faster and safer than blocking unt | ||||
il | ||||
// execution ends | ||||
// make a copy of the strategy here to guarantee tha | ||||
t | ||||
// between notifyAsync and the execution of the meth | ||||
od no changes can occur | ||||
params.ptrStrat = SharedPtr<TStrategy>(new TStrategy | ||||
(_strategy)); | ||||
params.enabled = _enabled; | ||||
} | ||||
ActiveResult<void> result = _executeAsync(params); | ||||
return result; | ||||
} | ||||
void enable() | ||||
/// Enables the event. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_enabled = true; | ||||
} | ||||
void disable() | ||||
/// Disables the event. notify and notifyAsnyc will be ignor | ||||
ed, | ||||
/// but adding/removing delegates is still allowed. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_enabled = false; | ||||
} | ||||
bool isEnabled() const | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
return _enabled; | ||||
} | ||||
void clear() | ||||
/// Removes all delegates. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
_strategy.clear(); | ||||
} | ||||
bool empty() const | ||||
/// Checks if any delegates are registered at the delegate. | ||||
{ | ||||
typename TMutex::ScopedLock lock(_mutex); | ||||
return _strategy.empty(); | ||||
} | ||||
protected: | ||||
struct NotifyAsyncParams | ||||
{ | ||||
SharedPtr<TStrategy> ptrStrat; | ||||
const void* pSender; | ||||
bool enabled; | ||||
NotifyAsyncParams(const void* pSend):ptrStrat(), pSender(pSe | ||||
nd), enabled(true) | ||||
/// Default constructor reduces the need for TArgs t | ||||
o have an empty constructor, only copy constructor is needed. | ||||
{ | ||||
} | ||||
}; | ||||
ActiveMethod<void, NotifyAsyncParams, AbstractEvent> _executeAsync; | ||||
void executeAsyncImpl(const NotifyAsyncParams& par) | ||||
{ | ||||
if (!par.enabled) | ||||
{ | ||||
return; | ||||
} | ||||
NotifyAsyncParams params = par; | ||||
params.ptrStrat->notify(params.pSender); | ||||
return; | ||||
} | ||||
TStrategy _strategy; /// The strategy used to notify observers. | ||||
bool _enabled; /// Stores if an event is enabled. Notfies on d | ||||
isabled events have no effect | ||||
/// but it is possible to change the observers. | ||||
mutable TMutex _mutex; | ||||
private: | ||||
AbstractEvent(const AbstractEvent& other); | ||||
AbstractEvent& operator = (const AbstractEvent& other); | ||||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_AbstractFoundation_INCLUDED | #endif // Foundation_AbstractFoundation_INCLUDED | |||
End of changes. 6 change blocks. | ||||
33 lines changed or deleted | 257 lines changed or added | |||
AbstractHTTPRequestHandler.h | AbstractHTTPRequestHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: AbstractHTTPRequestHandler | // Module: AbstractHTTPRequestHandler | |||
// | // | |||
// Definition of the AbstractHTTPRequestHandler class. | // Definition of the AbstractHTTPRequestHandler class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_AbstractHTTPRequestHandler_INCLUDED | #ifndef Net_AbstractHTTPRequestHandler_INCLUDED | |||
#define Net_AbstractHTTPRequestHandler_INCLUDED | #define Net_AbstractHTTPRequestHandler_INCLUDED | |||
#include "Poco/Net/HTTPRequestHandler.h" | #include "Poco/Net/HTTPRequestHandler.h" | |||
#include "Poco/Net/HTTPResponse.h" | #include "Poco/Net/HTTPResponse.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractNode.h | AbstractNode.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the AbstractNode class. | // Definition of the AbstractNode class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_AbstractNode_INCLUDED | #ifndef DOM_AbstractNode_INCLUDED | |||
#define DOM_AbstractNode_INCLUDED | #define DOM_AbstractNode_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/Node.h" | #include "Poco/DOM/Node.h" | |||
#include "Poco/DOM/MutationEvent.h" | #include "Poco/DOM/MutationEvent.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractObserver.h | AbstractObserver.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: NotificationCenter | // Module: NotificationCenter | |||
// | // | |||
// Definition of the AbstractObserver class. | // Definition of the AbstractObserver class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractObserver_INCLUDED | #ifndef Foundation_AbstractObserver_INCLUDED | |||
#define Foundation_AbstractObserver_INCLUDED | #define Foundation_AbstractObserver_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractPriorityDelegate.h | AbstractPriorityDelegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: AbstractPriorityDelegate | // Module: AbstractPriorityDelegate | |||
// | // | |||
// Implementation of the AbstractPriorityDelegate template. | // Implementation of the AbstractPriorityDelegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractPriorityDelegate_INCLUDED | #ifndef Foundation_AbstractPriorityDelegate_INCLUDED | |||
#define Foundation_AbstractPriorityDelegate_INCLUDED | #define Foundation_AbstractPriorityDelegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AbstractStrategy.h | AbstractStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AbstractCache | // Module: AbstractCache | |||
// | // | |||
// Definition of the AbstractStrategy class. | // Definition of the AbstractStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AbstractStrategy_INCLUDED | #ifndef Foundation_AbstractStrategy_INCLUDED | |||
#define Foundation_AbstractStrategy_INCLUDED | #define Foundation_AbstractStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/EventArgs.h" | #include "Poco/EventArgs.h" | |||
#include <set> | #include <set> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AccessExpirationDecorator.h | AccessExpirationDecorator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AccessExpirationDecorator | // Module: AccessExpirationDecorator | |||
// | // | |||
// Implementation of the AccessExpirationDecorator template. | // Implementation of the AccessExpirationDecorator template. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AccessExpirationDecorator_INCLUDED | #ifndef Foundation_AccessExpirationDecorator_INCLUDED | |||
#define Foundation_AccessExpirationDecorator_INCLUDED | #define Foundation_AccessExpirationDecorator_INCLUDED | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AccessExpireCache.h | AccessExpireCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AccessExpireCache | // Module: AccessExpireCache | |||
// | // | |||
// Definition of the AccessExpireCache class. | // Definition of the AccessExpireCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AccessExpireCache_INCLUDED | #ifndef Foundation_AccessExpireCache_INCLUDED | |||
#define Foundation_AccessExpireCache_INCLUDED | #define Foundation_AccessExpireCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/AccessExpireStrategy.h" | #include "Poco/AccessExpireStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AccessExpireLRUCache.h | AccessExpireLRUCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AccessExpireLRUCache | // Module: AccessExpireLRUCache | |||
// | // | |||
// Definition of the AccessExpireLRUCache class. | // Definition of the AccessExpireLRUCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AccessExpireLRUCache_INCLUDED | #ifndef Foundation_AccessExpireLRUCache_INCLUDED | |||
#define Foundation_AccessExpireLRUCache_INCLUDED | #define Foundation_AccessExpireLRUCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/StrategyCollection.h" | #include "Poco/StrategyCollection.h" | |||
#include "Poco/AccessExpireStrategy.h" | #include "Poco/AccessExpireStrategy.h" | |||
#include "Poco/LRUStrategy.h" | #include "Poco/LRUStrategy.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AccessExpireStrategy.h | AccessExpireStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: AccessExpireStrategy | // Module: AccessExpireStrategy | |||
// | // | |||
// Definition of the AccessExpireStrategy class. | // Definition of the AccessExpireStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AccessExpireStrategy_INCLUDED | #ifndef Foundation_AccessExpireStrategy_INCLUDED | |||
#define Foundation_AccessExpireStrategy_INCLUDED | #define Foundation_AccessExpireStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/ExpireStrategy.h" | #include "Poco/ExpireStrategy.h" | |||
#include "Poco/Bugcheck.h" | #include "Poco/Bugcheck.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ActiveDispatcher.h | ActiveDispatcher.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the ActiveDispatcher class. | // Definition of the ActiveDispatcher class. | |||
// | // | |||
// Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ActiveDispatcher_INCLUDED | #ifndef Foundation_ActiveDispatcher_INCLUDED | |||
#define Foundation_ActiveDispatcher_INCLUDED | #define Foundation_ActiveDispatcher_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/ActiveStarter.h" | #include "Poco/ActiveStarter.h" | |||
#include "Poco/ActiveRunnable.h" | #include "Poco/ActiveRunnable.h" | |||
#include "Poco/NotificationQueue.h" | #include "Poco/NotificationQueue.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API ActiveDispatcher: protected Runnable | class Foundation_API ActiveDispatcher: protected Runnable | |||
/// This class is used to implement an active object | /// This class is used to implement an active object | |||
/// with strictly serialized method execution. | /// with strictly serialized method execution. | |||
/// | /// | |||
/// An active object, with is an ordinary object | /// An active object, which is an ordinary object | |||
/// containing ActiveMethod members, executes all | /// containing ActiveMethod members, executes all | |||
/// active methods in their own thread. | /// active methods in their own thread. | |||
/// This behavior does not fit the "classic" | /// This behavior does not fit the "classic" | |||
/// definition of an active object, which serializes | /// definition of an active object, which serializes | |||
/// the execution of active methods (in other words, | /// the execution of active methods (in other words, | |||
/// only one active method can be running at any given | /// only one active method can be running at any given | |||
/// time). | /// time). | |||
/// | /// | |||
/// Using this class as a base class, the serializing | /// Using this class as a base class, the serializing | |||
/// behavior for active objects can be implemented. | /// behavior for active objects can be implemented. | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
ActiveMethod.h | ActiveMethod.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the ActiveMethod class. | // Definition of the ActiveMethod class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ActiveMethod_INCLUDED | #ifndef Foundation_ActiveMethod_INCLUDED | |||
#define Foundation_ActiveMethod_INCLUDED | #define Foundation_ActiveMethod_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/ActiveResult.h" | #include "Poco/ActiveResult.h" | |||
#include "Poco/ActiveRunnable.h" | #include "Poco/ActiveRunnable.h" | |||
#include "Poco/ActiveStarter.h" | #include "Poco/ActiveStarter.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ActiveResult.h | ActiveResult.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the ActiveResult class. | // Definition of the ActiveResult class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ActiveResult_INCLUDED | #ifndef Foundation_ActiveResult_INCLUDED | |||
#define Foundation_ActiveResult_INCLUDED | #define Foundation_ActiveResult_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ActiveRunnable.h | ActiveRunnable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the ActiveRunnable class. | // Definition of the ActiveRunnable class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ActiveRunnable_INCLUDED | #ifndef Foundation_ActiveRunnable_INCLUDED | |||
#define Foundation_ActiveRunnable_INCLUDED | #define Foundation_ActiveRunnable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/ActiveResult.h" | #include "Poco/ActiveResult.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ActiveStarter.h | ActiveStarter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the ActiveStarter class. | // Definition of the ActiveStarter class. | |||
// | // | |||
// Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ActiveStarter_INCLUDED | #ifndef Foundation_ActiveStarter_INCLUDED | |||
#define Foundation_ActiveStarter_INCLUDED | #define Foundation_ActiveStarter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/ThreadPool.h" | #include "Poco/ThreadPool.h" | |||
#include "Poco/ActiveRunnable.h" | #include "Poco/ActiveRunnable.h" | |||
namespace Poco { | namespace Poco { | |||
template <class OwnerType> | template <class OwnerType> | |||
class ActiveStarter | class ActiveStarter | |||
/// The default implementation of the StarterType | /// The default implementation of the StarterType | |||
/// policy for ActiveMethod. It starts the method | /// policy for ActiveMethod. It starts the method | |||
/// in its own thread, obtained from the default | /// in its own thread, obtained from the default | |||
/// thread pool. | /// thread pool. | |||
{ | { | |||
public: | public: | |||
static void start(OwnerType* pOwner, ActiveRunnableBase::Ptr pRunnab le) | static void start(OwnerType* /*pOwner*/, ActiveRunnableBase::Ptr pRu nnable) | |||
{ | { | |||
ThreadPool::defaultPool().start(*pRunnable); | ThreadPool::defaultPool().start(*pRunnable); | |||
pRunnable->duplicate(); // The runnable will release itself. | pRunnable->duplicate(); // The runnable will release itself. | |||
} | } | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_ActiveStarter_INCLUDED | #endif // Foundation_ActiveStarter_INCLUDED | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
Activity.h | Activity.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ActiveObjects | // Module: ActiveObjects | |||
// | // | |||
// Definition of the Activity template class. | // Definition of the Activity template class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Activity_INCLUDED | #ifndef Foundation_Activity_INCLUDED | |||
#define Foundation_Activity_INCLUDED | #define Foundation_Activity_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RunnableAdapter.h" | #include "Poco/RunnableAdapter.h" | |||
#include "Poco/ThreadPool.h" | #include "Poco/ThreadPool.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
skipping to change at line 113 | skipping to change at line 93 | |||
_done(false) | _done(false) | |||
/// Creates the activity. Call start() to | /// Creates the activity. Call start() to | |||
/// start it. | /// start it. | |||
{ | { | |||
poco_check_ptr (pOwner); | poco_check_ptr (pOwner); | |||
} | } | |||
~Activity() | ~Activity() | |||
/// Stops and destroys the activity. | /// Stops and destroys the activity. | |||
{ | { | |||
stop(); | try | |||
wait(); | { | |||
stop(); | ||||
wait(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
void start() | void start() | |||
/// Starts the activity by acquiring a | /// Starts the activity by acquiring a | |||
/// thread for it from the default thread pool. | /// thread for it from the default thread pool. | |||
{ | { | |||
start(ThreadPool::defaultPool()); | ||||
} | ||||
void start(ThreadPool& pool) | ||||
{ | ||||
FastMutex::ScopedLock lock(_mutex); | FastMutex::ScopedLock lock(_mutex); | |||
if (!_running) | if (!_running) | |||
{ | { | |||
_done.reset(); | _done.reset(); | |||
_stopped = false; | _stopped = false; | |||
_running = true; | _running = true; | |||
try | try | |||
{ | { | |||
ThreadPool::defaultPool().start(*this); | pool.start(*this); | |||
} | } | |||
catch (...) | catch (...) | |||
{ | { | |||
_running = false; | _running = false; | |||
throw; | throw; | |||
} | } | |||
} | } | |||
} | } | |||
void stop() | void stop() | |||
End of changes. 4 change blocks. | ||||
35 lines changed or deleted | 16 lines changed or added | |||
Any.h | Any.h | |||
---|---|---|---|---|
// | // | |||
// Any.h | // Any.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/Any.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/Any.h#1 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Any | // Module: Any | |||
// | // | |||
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. | // Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. | |||
// Extracted from Boost 1.33.1 lib and adapted for poco: Peter Schojer/Appl iedInformatics 2006-02-02 | // Extracted from Boost 1.33.1 lib and adapted for poco: Peter Schojer/Appl iedInformatics 2006-02-02 | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Any_INCLUDED | #ifndef Foundation_Any_INCLUDED | |||
#define Foundation_Any_INCLUDED | #define Foundation_Any_INCLUDED | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/MetaProgramming.h" | ||||
#include <algorithm> | #include <algorithm> | |||
#include <typeinfo> | #include <typeinfo> | |||
#include <cstring> | ||||
namespace Poco { | namespace Poco { | |||
class Any; | ||||
namespace Dynamic { | ||||
class Var; | ||||
class VarHolder; | ||||
template <class> class VarHolderImpl; | ||||
} | ||||
#ifndef POCO_NO_SOO | ||||
#ifndef POCO_ENABLE_CPP11 | ||||
// C++11 needed for std::aligned_storage | ||||
#error "Any SOO can only be enabled with C++11 support" | ||||
#endif | ||||
template <typename PlaceholderT, unsigned int SizeV = POCO_SMALL_OBJECT_SIZ | ||||
E> | ||||
union Placeholder | ||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for | ||||
small | ||||
/// object optimization, when enabled). | ||||
/// | ||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storag | ||||
e, | ||||
/// it will be placement-new-allocated into the local buffer | ||||
/// (i.e. there will be no heap-allocation). The local buffer size i | ||||
s one byte | ||||
/// larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value ind | ||||
icating | ||||
/// where the object was allocated (0 => heap, 1 => local). | ||||
{ | ||||
public: | ||||
struct Size | ||||
{ | ||||
static const unsigned int value = SizeV; | ||||
}; | ||||
Placeholder () | ||||
{ | ||||
erase(); | ||||
} | ||||
void erase() | ||||
{ | ||||
std::memset(holder, 0, sizeof(Placeholder)); | ||||
} | ||||
bool isLocal() const | ||||
{ | ||||
return holder[SizeV] != 0; | ||||
} | ||||
void setLocal(bool local) const | ||||
{ | ||||
holder[SizeV] = local ? 1 : 0; | ||||
} | ||||
PlaceholderT* content() const | ||||
{ | ||||
if (isLocal()) | ||||
return reinterpret_cast<PlaceholderT*>(holder); | ||||
else | ||||
return pHolder; | ||||
} | ||||
// MSVC71,80 won't extend friendship to nested class (Any::Holder) | ||||
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSV | ||||
C_VERSION > 80)) | ||||
private: | ||||
#endif | ||||
typedef typename std::aligned_storage<SizeV + 1>::type AlignerType; | ||||
PlaceholderT* pHolder; | ||||
mutable char holder [SizeV + 1]; | ||||
AlignerType aligner; | ||||
friend class Any; | ||||
friend class Dynamic::Var; | ||||
friend class Dynamic::VarHolder; | ||||
template <class> friend class Dynamic::VarHolderImpl; | ||||
}; | ||||
#else // !POCO_NO_SOO | ||||
template <typename PlaceholderT> | ||||
union Placeholder | ||||
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for | ||||
small | ||||
/// object optimization, when enabled). | ||||
/// | ||||
/// If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storag | ||||
e, | ||||
/// it will be placement-new-allocated into the local buffer | ||||
/// (i.e. there will be no heap-allocation). The local buffer size i | ||||
s one byte | ||||
/// larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value ind | ||||
icating | ||||
/// where the object was allocated (0 => heap, 1 => local). | ||||
{ | ||||
public: | ||||
Placeholder () | ||||
{ | ||||
} | ||||
PlaceholderT* content() const | ||||
{ | ||||
return pHolder; | ||||
} | ||||
// MSVC71,80 won't extend friendship to nested class (Any::Holder) | ||||
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSV | ||||
C_VERSION > 80)) | ||||
private: | ||||
#endif | ||||
PlaceholderT* pHolder; | ||||
friend class Any; | ||||
friend class Dynamic::Var; | ||||
friend class Dynamic::VarHolder; | ||||
template <class> friend class Dynamic::VarHolderImpl; | ||||
}; | ||||
#endif // POCO_NO_SOO | ||||
class Any | class Any | |||
/// An Any class represents a general type and is capable of storing any type, supporting type-safe extraction | /// An Any class represents a general type and is capable of storing any type, supporting type-safe extraction | |||
/// of the internally stored data. | /// of the internally stored data. | |||
/// | /// | |||
/// Code taken from the Boost 1.33.1 library. Original copyright by Kevlin Henney. Modified for Poco | /// Code taken from the Boost 1.33.1 library. Original copyright by Kevlin Henney. Modified for Poco | |||
/// by Applied Informatics. | /// by Applied Informatics. | |||
/// | ||||
/// Modified for small object optimization support (optionally suppo | ||||
rted through conditional compilation) | ||||
/// by Alex Fabijanic. | ||||
{ | { | |||
public: | public: | |||
Any(): | ||||
_content(0) | #ifndef POCO_NO_SOO | |||
Any() | ||||
/// Creates an empty any type. | ||||
{ | ||||
} | ||||
template<typename ValueType> | ||||
Any(const ValueType & value) | ||||
/// Creates an any which stores the init parameter inside. | ||||
/// | ||||
/// Example: | ||||
/// Any a(13); | ||||
/// Any a(string("12345")); | ||||
{ | ||||
construct(value); | ||||
} | ||||
Any(const Any& other) | ||||
/// Copy constructor, works with both empty and initialized | ||||
Any values. | ||||
{ | ||||
if ((this != &other) && !other.empty()) | ||||
construct(other); | ||||
} | ||||
~Any() | ||||
/// Destructor. If Any is locally held, calls ValueHolder de | ||||
structor; | ||||
/// otherwise, deletes the placeholder from the heap. | ||||
{ | ||||
if (!empty()) | ||||
{ | ||||
if (_valueHolder.isLocal()) | ||||
destruct(); | ||||
else | ||||
delete content(); | ||||
} | ||||
} | ||||
Any& swap(Any& other) | ||||
/// Swaps the content of the two Anys. | ||||
/// | ||||
/// When small object optimizaton is enabled, swap only | ||||
/// has no-throw guarantee when both (*this and other) | ||||
/// objects are allocated on the heap. | ||||
{ | ||||
if (this == &other) return *this; | ||||
if (!_valueHolder.isLocal() && !other._valueHolder.isLocal() | ||||
) | ||||
{ | ||||
std::swap(_valueHolder.pHolder, other._valueHolder.p | ||||
Holder); | ||||
} | ||||
else | ||||
{ | ||||
Any tmp(*this); | ||||
try | ||||
{ | ||||
if (_valueHolder.isLocal()) destruct(); | ||||
construct(other); | ||||
other = tmp; | ||||
} | ||||
catch (...) | ||||
{ | ||||
construct(tmp); | ||||
throw; | ||||
} | ||||
} | ||||
return *this; | ||||
} | ||||
template<typename ValueType> | ||||
Any& operator = (const ValueType& rhs) | ||||
/// Assignment operator for all types != Any. | ||||
/// | ||||
/// Example: | ||||
/// Any a = 13; | ||||
/// Any a = string("12345"); | ||||
{ | ||||
construct(rhs); | ||||
return *this; | ||||
} | ||||
Any& operator = (const Any& rhs) | ||||
/// Assignment operator for Any. | ||||
{ | ||||
if ((this != &rhs) && !rhs.empty()) | ||||
construct(rhs); | ||||
else if ((this != &rhs) && rhs.empty()) | ||||
_valueHolder.erase(); | ||||
return *this; | ||||
} | ||||
bool empty() const | ||||
/// Returns true if the Any is empty. | ||||
{ | ||||
char buf[POCO_SMALL_OBJECT_SIZE] = { 0 }; | ||||
return 0 == std::memcmp(_valueHolder.holder, buf, POCO_SMALL | ||||
_OBJECT_SIZE); | ||||
} | ||||
const std::type_info & type() const | ||||
/// Returns the type information of the stored content. | ||||
/// If the Any is empty typeid(void) is returned. | ||||
/// It is recommended to always query an Any for its type in | ||||
fo before | ||||
/// trying to extract data via an AnyCast/RefAnyCast. | ||||
{ | ||||
return empty() ? typeid(void) : content()->type(); | ||||
} | ||||
private: | ||||
class ValueHolder | ||||
{ | ||||
public: | ||||
virtual ~ValueHolder() | ||||
{ | ||||
} | ||||
virtual const std::type_info & type() const = 0; | ||||
virtual void clone(Placeholder<ValueHolder>*) const = 0; | ||||
}; | ||||
template<typename ValueType> | ||||
class Holder : public ValueHolder | ||||
{ | ||||
public: | ||||
Holder(const ValueType & value) : _held(value) | ||||
{ | ||||
} | ||||
virtual const std::type_info & type() const | ||||
{ | ||||
return typeid(ValueType); | ||||
} | ||||
virtual void clone(Placeholder<ValueHolder>* pPlaceholder) c | ||||
onst | ||||
{ | ||||
if ((sizeof(Holder<ValueType>) <= POCO_SMALL_OBJECT_ | ||||
SIZE)) | ||||
{ | ||||
new ((ValueHolder*) pPlaceholder->holder) Ho | ||||
lder(_held); | ||||
pPlaceholder->setLocal(true); | ||||
} | ||||
else | ||||
{ | ||||
pPlaceholder->pHolder = new Holder(_held); | ||||
pPlaceholder->setLocal(false); | ||||
} | ||||
} | ||||
ValueType _held; | ||||
private: | ||||
Holder & operator = (const Holder &); | ||||
}; | ||||
ValueHolder* content() const | ||||
{ | ||||
return _valueHolder.content(); | ||||
} | ||||
template<typename ValueType> | ||||
void construct(const ValueType& value) | ||||
{ | ||||
if (sizeof(Holder<ValueType>) <= Placeholder<ValueType>::Siz | ||||
e::value) | ||||
{ | ||||
new (reinterpret_cast<ValueHolder*>(_valueHolder.hol | ||||
der)) Holder<ValueType>(value); | ||||
_valueHolder.setLocal(true); | ||||
} | ||||
else | ||||
{ | ||||
_valueHolder.pHolder = new Holder<ValueType>(value); | ||||
_valueHolder.setLocal(false); | ||||
} | ||||
} | ||||
void construct(const Any& other) | ||||
{ | ||||
if (!other.empty()) | ||||
other.content()->clone(&_valueHolder); | ||||
else | ||||
_valueHolder.erase(); | ||||
} | ||||
void destruct() | ||||
{ | ||||
content()->~ValueHolder(); | ||||
} | ||||
Placeholder<ValueHolder> _valueHolder; | ||||
#else // if POCO_NO_SOO | ||||
Any(): _pHolder(0) | ||||
/// Creates an empty any type. | /// Creates an empty any type. | |||
{ | { | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
Any(const ValueType& value): | Any(const ValueType& value): | |||
_content(new Holder<ValueType>(value)) | _pHolder(new Holder<ValueType>(value)) | |||
/// Creates an any which stores the init parameter inside. | /// Creates an any which stores the init parameter inside. | |||
/// | /// | |||
/// Example: | /// Example: | |||
/// Any a(13); | /// Any a(13); | |||
/// Any a(string("12345")); | /// Any a(string("12345")); | |||
{ | { | |||
} | } | |||
Any(const Any& other): | Any(const Any& other): | |||
_content(other._content ? other._content->clone() : 0) | _pHolder(other._pHolder ? other._pHolder->clone() : 0) | |||
/// Copy constructor, works with empty Anys and initialized | /// Copy constructor, works with both empty and initialized | |||
Any values. | Any values. | |||
{ | { | |||
} | } | |||
~Any() | ~Any() | |||
{ | { | |||
delete _content; | delete _pHolder; | |||
} | } | |||
Any& swap(Any& rhs) | Any& swap(Any& rhs) | |||
/// Swaps the content of the two Anys. | /// Swaps the content of the two Anys. | |||
{ | { | |||
std::swap(_content, rhs._content); | std::swap(_pHolder, rhs._pHolder); | |||
return *this; | return *this; | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
Any& operator = (const ValueType& rhs) | Any& operator = (const ValueType& rhs) | |||
/// Assignment operator for all types != Any. | /// Assignment operator for all types != Any. | |||
/// | /// | |||
/// Example: | /// Example: | |||
/// Any a = 13; | /// Any a = 13; | |||
/// Any a = string("12345"); | /// Any a = string("12345"); | |||
{ | { | |||
Any(rhs).swap(*this); | Any(rhs).swap(*this); | |||
return *this; | return *this; | |||
} | } | |||
Any& operator = (const Any& rhs) | Any& operator = (const Any& rhs) | |||
/// Assignment operator for Any. | /// Assignment operator for Any. | |||
{ | { | |||
Any(rhs).swap(*this); | Any(rhs).swap(*this); | |||
return *this; | return *this; | |||
} | } | |||
bool empty() const | bool empty() const | |||
/// returns true if the Any is empty | /// Returns true if the Any is empty. | |||
{ | { | |||
return !_content; | return !_pHolder; | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
/// Returns the type information of the stored content. | /// Returns the type information of the stored content. | |||
/// If the Any is empty typeid(void) is returned. | /// If the Any is empty typeid(void) is returned. | |||
/// It is suggested to always query an Any for its type info | /// It is recommended to always query an Any for its type in | |||
before trying to extract | fo before | |||
/// data via an AnyCast/RefAnyCast. | /// trying to extract data via an AnyCast/RefAnyCast. | |||
{ | { | |||
return _content ? _content->type() : typeid(void); | return _pHolder ? _pHolder->type() : typeid(void); | |||
} | } | |||
private: | private: | |||
class Placeholder | class ValueHolder | |||
{ | { | |||
public: | public: | |||
virtual ~Placeholder() | virtual ~ValueHolder() | |||
{ | { | |||
} | } | |||
virtual const std::type_info& type() const = 0; | virtual const std::type_info& type() const = 0; | |||
virtual Placeholder* clone() const = 0; | virtual ValueHolder* clone() const = 0; | |||
}; | }; | |||
template <typename ValueType> | template <typename ValueType> | |||
class Holder: public Placeholder | class Holder: public ValueHolder | |||
{ | { | |||
public: | public: | |||
Holder(const ValueType& value): | Holder(const ValueType& value): | |||
_held(value) | _held(value) | |||
{ | { | |||
} | } | |||
virtual const std::type_info& type() const | virtual const std::type_info& type() const | |||
{ | { | |||
return typeid(ValueType); | return typeid(ValueType); | |||
} | } | |||
virtual Placeholder* clone() const | virtual ValueHolder* clone() const | |||
{ | { | |||
return new Holder(_held); | return new Holder(_held); | |||
} | } | |||
ValueType _held; | ValueType _held; | |||
private: | ||||
Holder & operator=(const Holder &); | ||||
}; | }; | |||
ValueHolder* content() const | ||||
{ | ||||
return _pHolder; | ||||
} | ||||
private: | private: | |||
ValueHolder* _pHolder; | ||||
#endif // POCO_NO_SOO | ||||
template <typename ValueType> | template <typename ValueType> | |||
friend ValueType* AnyCast(Any*); | friend ValueType* AnyCast(Any*); | |||
template <typename ValueType> | template <typename ValueType> | |||
friend ValueType* UnsafeAnyCast(Any*); | friend ValueType* UnsafeAnyCast(Any*); | |||
Placeholder* _content; | ||||
}; | }; | |||
template <typename ValueType> | template <typename ValueType> | |||
ValueType* AnyCast(Any* operand) | ValueType* AnyCast(Any* operand) | |||
/// AnyCast operator used to extract the ValueType from an Any*. Wil l return a pointer | /// AnyCast operator used to extract the ValueType from an Any*. Wil l return a pointer | |||
/// to the stored value. | /// to the stored value. | |||
/// | /// | |||
/// Example Usage: | /// Example Usage: | |||
/// MyType* pTmp = AnyCast<MyType*>(pAny). | /// MyType* pTmp = AnyCast<MyType*>(pAny). | |||
/// Will return NULL if the cast fails, i.e. types don't match. | /// Will return NULL if the cast fails, i.e. types don't match. | |||
{ | { | |||
return operand && operand->type() == typeid(ValueType) | return operand && operand->type() == typeid(ValueType) | |||
? &static_cast<Any::Holder<ValueType>*>(oper and->_content)->_held | ? &static_cast<Any::Holder<ValueType>*>(oper and->content())->_held | |||
: 0; | : 0; | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
const ValueType* AnyCast(const Any* operand) | const ValueType* AnyCast(const Any* operand) | |||
/// AnyCast operator used to extract a const ValueType pointer from an const Any*. Will return a const pointer | /// AnyCast operator used to extract a const ValueType pointer from an const Any*. Will return a const pointer | |||
/// to the stored value. | /// to the stored value. | |||
/// | /// | |||
/// Example Usage: | /// Example Usage: | |||
/// const MyType* pTmp = AnyCast<MyType*>(pAny). | /// const MyType* pTmp = AnyCast<MyType*>(pAny). | |||
/// Will return NULL if the cast fails, i.e. types don't match. | /// Will return NULL if the cast fails, i.e. types don't match. | |||
{ | { | |||
return AnyCast<ValueType>(const_cast<Any*>(operand)); | return AnyCast<ValueType>(const_cast<Any*>(operand)); | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
ValueType AnyCast(const Any& operand) | ValueType AnyCast(Any& operand) | |||
/// AnyCast operator used to extract a copy of the ValueType from an | /// AnyCast operator used to extract a copy of the ValueType from an | |||
const Any&. | Any&. | |||
/// | /// | |||
/// Example Usage: | /// Example Usage: | |||
/// MyType tmp = AnyCast<MyType>(anAny). | /// MyType tmp = AnyCast<MyType>(anAny). | |||
/// Will throw a BadCastException if the cast fails. | /// Will throw a BadCastException if the cast fails. | |||
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& = ... | /// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& tmp = ... | |||
/// Some compilers will accept this code although a copy is returned . Use the RefAnyCast in | /// Some compilers will accept this code although a copy is returned . Use the RefAnyCast in | |||
/// these cases. | /// these cases. | |||
{ | { | |||
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand)); | typedef typename TypeWrapper<ValueType>::TYPE NonRef; | |||
if (!result) throw BadCastException("Failed to convert between const | ||||
Any types"); | NonRef* result = AnyCast<NonRef>(&operand); | |||
if (!result) throw BadCastException("Failed to convert between Any t | ||||
ypes"); | ||||
return *result; | return *result; | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
ValueType AnyCast(Any& operand) | ValueType AnyCast(const Any& operand) | |||
/// AnyCast operator used to extract a copy of the ValueType from an | /// AnyCast operator used to extract a copy of the ValueType from an | |||
Any&. | const Any&. | |||
/// | /// | |||
/// Example Usage: | /// Example Usage: | |||
/// MyType tmp = AnyCast<MyType>(anAny). | /// MyType tmp = AnyCast<MyType>(anAny). | |||
/// Will throw a BadCastException if the cast fails. | /// Will throw a BadCastException if the cast fails. | |||
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& tmp = ... | /// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& = ... | |||
/// Some compilers will accept this code although a copy is returned . Use the RefAnyCast in | /// Some compilers will accept this code although a copy is returned . Use the RefAnyCast in | |||
/// these cases. | /// these cases. | |||
{ | { | |||
ValueType* result = AnyCast<ValueType>(&operand); | typedef typename TypeWrapper<ValueType>::TYPE NonRef; | |||
if (!result) throw BadCastException("Failed to convert between Any t | ||||
ypes"); | return AnyCast<NonRef&>(const_cast<Any&>(operand)); | |||
return *result; | ||||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
const ValueType& RefAnyCast(const Any & operand) | const ValueType& RefAnyCast(const Any & operand) | |||
/// AnyCast operator used to return a const reference to the interna l data. | /// AnyCast operator used to return a const reference to the interna l data. | |||
/// | /// | |||
/// Example Usage: | /// Example Usage: | |||
/// const MyType& tmp = RefAnyCast<MyType>(anAny); | /// const MyType& tmp = RefAnyCast<MyType>(anAny); | |||
{ | { | |||
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand)); | ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand)); | |||
skipping to change at line 256 | skipping to change at line 564 | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
ValueType* UnsafeAnyCast(Any* operand) | ValueType* UnsafeAnyCast(Any* operand) | |||
/// The "unsafe" versions of AnyCast are not part of the | /// The "unsafe" versions of AnyCast are not part of the | |||
/// public interface and may be removed at any time. They are | /// public interface and may be removed at any time. They are | |||
/// required where we know what type is stored in the any and can't | /// required where we know what type is stored in the any and can't | |||
/// use typeid() comparison, e.g., when our types may travel across | /// use typeid() comparison, e.g., when our types may travel across | |||
/// different shared libraries. | /// different shared libraries. | |||
{ | { | |||
return &static_cast<Any::Holder<ValueType>*>(operand->_content)->_he ld; | return &static_cast<Any::Holder<ValueType>*>(operand->content())->_h eld; | |||
} | } | |||
template <typename ValueType> | template <typename ValueType> | |||
const ValueType* UnsafeAnyCast(const Any* operand) | const ValueType* UnsafeAnyCast(const Any* operand) | |||
/// The "unsafe" versions of AnyCast are not part of the | /// The "unsafe" versions of AnyCast are not part of the | |||
/// public interface and may be removed at any time. They are | /// public interface and may be removed at any time. They are | |||
/// required where we know what type is stored in the any and can't | /// required where we know what type is stored in the any and can't | |||
/// use typeid() comparison, e.g., when our types may travel across | /// use typeid() comparison, e.g., when our types may travel across | |||
/// different shared libraries. | /// different shared libraries. | |||
{ | { | |||
End of changes. 33 change blocks. | ||||
72 lines changed or deleted | 391 lines changed or added | |||
Application.h | Application.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Application | // Package: Application | |||
// Module: Application | // Module: Application | |||
// | // | |||
// Definition of the Application class. | // Definition of the Application class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_Application_INCLUDED | #ifndef Util_Application_INCLUDED | |||
#define Util_Application_INCLUDED | #define Util_Application_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Subsystem.h" | #include "Poco/Util/Subsystem.h" | |||
#include "Poco/Util/LayeredConfiguration.h" | #include "Poco/Util/LayeredConfiguration.h" | |||
#include "Poco/Util/OptionSet.h" | #include "Poco/Util/OptionSet.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
skipping to change at line 103 | skipping to change at line 83 | |||
/// - application.dir: the path to the directory where the applica tion executable resides | /// - application.dir: the path to the directory where the applica tion executable resides | |||
/// - application.configDir: the path to the directory where the l ast configuration file loaded with loadConfiguration() was found. | /// - application.configDir: the path to the directory where the l ast configuration file loaded with loadConfiguration() was found. | |||
/// | /// | |||
/// If loadConfiguration() has never been called, application.config Dir will be equal to application.dir. | /// If loadConfiguration() has never been called, application.config Dir will be equal to application.dir. | |||
/// | /// | |||
/// The POCO_APP_MAIN macro can be used to implement main(argc, argv ). | /// The POCO_APP_MAIN macro can be used to implement main(argc, argv ). | |||
/// If POCO has been built with POCO_WIN32_UTF8, POCO_APP_MAIN suppo rts | /// If POCO has been built with POCO_WIN32_UTF8, POCO_APP_MAIN suppo rts | |||
/// Unicode command line arguments. | /// Unicode command line arguments. | |||
{ | { | |||
public: | public: | |||
typedef std::vector<std::string> ArgVec; | ||||
enum ExitCode | enum ExitCode | |||
/// Commonly used exit status codes. | /// Commonly used exit status codes. | |||
/// Based on the definitions in the 4.3BSD <sysexits.h> head er file. | /// Based on the definitions in the 4.3BSD <sysexits.h> head er file. | |||
{ | { | |||
EXIT_OK = 0, /// successful termination | EXIT_OK = 0, /// successful termination | |||
EXIT_USAGE = 64, /// command line usage error | EXIT_USAGE = 64, /// command line usage error | |||
EXIT_DATAERR = 65, /// data format error | EXIT_DATAERR = 65, /// data format error | |||
EXIT_NOINPUT = 66, /// cannot open input | EXIT_NOINPUT = 66, /// cannot open input | |||
EXIT_NOUSER = 67, /// addressee unknown | EXIT_NOUSER = 67, /// addressee unknown | |||
EXIT_NOHOST = 68, /// host name unknown | EXIT_NOHOST = 68, /// host name unknown | |||
skipping to change at line 166 | skipping to change at line 148 | |||
/// and sets the application's properties (e.g., | /// and sets the application's properties (e.g., | |||
/// "application.path", "application.name", etc.). | /// "application.path", "application.name", etc.). | |||
/// | /// | |||
/// Note that as of release 1.3.7, init() no longer | /// Note that as of release 1.3.7, init() no longer | |||
/// calls initialize(). This is now called from run(). | /// calls initialize(). This is now called from run(). | |||
/// | /// | |||
/// This Windows-specific version of init is used for passin g | /// This Windows-specific version of init is used for passin g | |||
/// Unicode command line arguments from wmain(). | /// Unicode command line arguments from wmain(). | |||
#endif | #endif | |||
void init(const std::vector<std::string>& args); | void init(const ArgVec& args); | |||
/// Processes the application's command line arguments | /// Processes the application's command line arguments | |||
/// and sets the application's properties (e.g., | /// and sets the application's properties (e.g., | |||
/// "application.path", "application.name", etc.). | /// "application.path", "application.name", etc.). | |||
/// | /// | |||
/// Note that as of release 1.3.7, init() no longer | /// Note that as of release 1.3.7, init() no longer | |||
/// calls initialize(). This is now called from run(). | /// calls initialize(). This is now called from run(). | |||
bool initialized() const; | bool initialized() const; | |||
/// Returns true iff the application is in initialized state | /// Returns true iff the application is in initialized state | |||
/// (that means, has been initialized but not yet uninitiali zed). | /// (that means, has been initialized but not yet uninitiali zed). | |||
skipping to change at line 235 | skipping to change at line 217 | |||
/// LayeredConfiguration with the given priority. | /// LayeredConfiguration with the given priority. | |||
template <class C> C& getSubsystem() const; | template <class C> C& getSubsystem() const; | |||
/// Returns a reference to the subsystem of the class | /// Returns a reference to the subsystem of the class | |||
/// given as template argument. | /// given as template argument. | |||
/// | /// | |||
/// Throws a NotFoundException if such a subsystem has | /// Throws a NotFoundException if such a subsystem has | |||
/// not been registered. | /// not been registered. | |||
virtual int run(); | virtual int run(); | |||
/// Runs the application by performing additional initializa tions | /// Runs the application by performing additional (un)initia lizations | |||
/// and calling the main() method. | /// and calling the main() method. | |||
/// | /// | |||
/// First calls initialize(), then calls main(), and | /// First calls initialize(), then calls main(), and | |||
/// finally calls uninitialize(). The latter will be called | /// finally calls uninitialize(). The latter will be called | |||
/// even if main() throws an exception. If initialize() thro ws | /// even if main() throws an exception. If initialize() thro ws | |||
/// an exception, main() will not be called and the exceptio n | /// an exception, main() will not be called and the exceptio n | |||
/// will be propagated to the caller. | /// will be propagated to the caller. If uninitialize() thro | |||
ws | ||||
/// an exception, the exception will be propagated to the ca | ||||
ller. | ||||
std::string commandName() const; | std::string commandName() const; | |||
/// Returns the command name used to invoke the application. | /// Returns the command name used to invoke the application. | |||
std::string commandPath() const; | ||||
/// Returns the full command path used to invoke the applica | ||||
tion. | ||||
LayeredConfiguration& config() const; | LayeredConfiguration& config() const; | |||
/// Returns the application's configuration. | /// Returns the application's configuration. | |||
Poco::Logger& logger() const; | Poco::Logger& logger() const; | |||
/// Returns the application's logger. | /// Returns the application's logger. | |||
/// | /// | |||
/// Before the logging subsystem has been initialized, the | /// Before the logging subsystem has been initialized, the | |||
/// application's logger is "ApplicationStartup", which is | /// application's logger is "ApplicationStartup", which is | |||
/// connected to a ConsoleChannel. | /// connected to a ConsoleChannel. | |||
/// | /// | |||
/// After the logging subsystem has been initialized, which | /// After the logging subsystem has been initialized, which | |||
/// usually happens as the first action in Application::init ialize(), | /// usually happens as the first action in Application::init ialize(), | |||
/// the application's logger is the one specified by the | /// the application's logger is the one specified by the | |||
/// "application.logger" configuration property. If that pro perty | /// "application.logger" configuration property. If that pro perty | |||
/// is not specified, the logger is "Application". | /// is not specified, the logger is "Application". | |||
const ArgVec& argv() const; | ||||
/// Returns reference to vector of the application's argumen | ||||
ts as | ||||
/// specified on the command line. If user overrides the | ||||
/// Application::main(const ArgVec&) function, it will recei | ||||
ve | ||||
/// only the command line parameters that were not processed | ||||
in | ||||
/// Application::processOptons(). This function returns the | ||||
/// full set of command line parameters as received in | ||||
/// main(argc, argv*). | ||||
const OptionSet& options() const; | const OptionSet& options() const; | |||
/// Returns the application's option set. | /// Returns the application's option set. | |||
static Application& instance(); | static Application& instance(); | |||
/// Returns a reference to the Application singleton. | /// Returns a reference to the Application singleton. | |||
/// | /// | |||
/// Throws a NullPointerException if no Application instance exists. | /// Throws a NullPointerException if no Application instance exists. | |||
const Poco::Timestamp& startTime() const; | const Poco::Timestamp& startTime() const; | |||
/// Returns the application start time (UTC). | /// Returns the application start time (UTC). | |||
skipping to change at line 365 | skipping to change at line 360 | |||
void init(); | void init(); | |||
/// Common initialization code. | /// Common initialization code. | |||
~Application(); | ~Application(); | |||
/// Destroys the Application and deletes all registered subs ystems. | /// Destroys the Application and deletes all registered subs ystems. | |||
private: | private: | |||
void setup(); | void setup(); | |||
void setArgs(int argc, char* argv[]); | void setArgs(int argc, char* argv[]); | |||
void setArgs(const std::vector<std::string>& args); | void setArgs(const ArgVec& args); | |||
void getApplicationPath(Poco::Path& path) const; | void getApplicationPath(Poco::Path& path) const; | |||
void processOptions(); | void processOptions(); | |||
bool findAppConfigFile(const std::string& appName, const std::string & extension, Poco::Path& path) const; | bool findAppConfigFile(const std::string& appName, const std::string & extension, Poco::Path& path) const; | |||
typedef Poco::AutoPtr<Subsystem> SubsystemPtr; | typedef Poco::AutoPtr<Subsystem> SubsystemPtr; | |||
typedef std::vector<SubsystemPtr> SubsystemVec; | typedef std::vector<SubsystemPtr> SubsystemVec; | |||
typedef Poco::AutoPtr<LayeredConfiguration> ConfigPtr; | typedef Poco::AutoPtr<LayeredConfiguration> ConfigPtr; | |||
typedef std::vector<std::string> ArgVec; | ||||
ConfigPtr _pConfig; | ConfigPtr _pConfig; | |||
SubsystemVec _subsystems; | SubsystemVec _subsystems; | |||
bool _initialized; | bool _initialized; | |||
std::string _command; | std::string _command; | |||
ArgVec _args; | ArgVec _argv; | |||
ArgVec _unprocessedArgs; | ||||
OptionSet _options; | OptionSet _options; | |||
bool _unixOptions; | bool _unixOptions; | |||
Poco::Logger* _pLogger; | Poco::Logger* _pLogger; | |||
Poco::Timestamp _startTime; | Poco::Timestamp _startTime; | |||
bool _stopOptionsProcessing; | bool _stopOptionsProcessing; | |||
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | |||
std::string _workingDirAtLaunch; | std::string _workingDirAtLaunch; | |||
#endif | #endif | |||
skipping to change at line 428 | skipping to change at line 423 | |||
{ | { | |||
return *const_cast<LayeredConfiguration*>(_pConfig.get()); | return *const_cast<LayeredConfiguration*>(_pConfig.get()); | |||
} | } | |||
inline Poco::Logger& Application::logger() const | inline Poco::Logger& Application::logger() const | |||
{ | { | |||
poco_check_ptr (_pLogger); | poco_check_ptr (_pLogger); | |||
return *_pLogger; | return *_pLogger; | |||
} | } | |||
inline const Application::ArgVec& Application::argv() const | ||||
{ | ||||
return _argv; | ||||
} | ||||
inline const OptionSet& Application::options() const | inline const OptionSet& Application::options() const | |||
{ | { | |||
return _options; | return _options; | |||
} | } | |||
inline Application& Application::instance() | inline Application& Application::instance() | |||
{ | { | |||
poco_check_ptr (_pInstance); | poco_check_ptr (_pInstance); | |||
return *_pInstance; | return *_pInstance; | |||
} | } | |||
End of changes. 11 change blocks. | ||||
38 lines changed or deleted | 33 lines changed or added | |||
ArchiveStrategy.h | ArchiveStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: FileChannel | // Module: FileChannel | |||
// | // | |||
// Definition of the ArchiveStrategy class and subclasses. | // Definition of the ArchiveStrategy class and subclasses. | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ArchiveStrategy_INCLUDED | #ifndef Foundation_ArchiveStrategy_INCLUDED | |||
#define Foundation_ArchiveStrategy_INCLUDED | #define Foundation_ArchiveStrategy_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/LogFile.h" | #include "Poco/LogFile.h" | |||
#include "Poco/File.h" | #include "Poco/File.h" | |||
#include "Poco/DateTimeFormatter.h" | #include "Poco/DateTimeFormatter.h" | |||
#include "Poco/NumberFormatter.h" | #include "Poco/NumberFormatter.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Array.h | Array.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Array | // Module: Array | |||
// | // | |||
// Definition of the Array class | // Definition of the Array class | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
// ------------------------------------------------------------------------ ------ | // ------------------------------------------------------------------------ ------ | |||
// (C) Copyright Nicolai M. Josuttis 2001. | // (C) Copyright Nicolai M. Josuttis 2001. | |||
// Permission to copy, use, modify, sell and distribute this software | // Permission to copy, use, modify, sell and distribute this software | |||
// is granted provided this copyright notice appears in all copies. | // is granted provided this copyright notice appears in all copies. | |||
// This software is provided "as is" without express or implied | // This software is provided "as is" without express or implied | |||
// warranty, and with no claim as to its suitability for any purpose. | // warranty, and with no claim as to its suitability for any purpose. | |||
// ------------------------------------------------------------------------ ------ | // ------------------------------------------------------------------------ ------ | |||
#ifndef Foundation_Array_INCLUDED | #ifndef Foundation_Array_INCLUDED | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Ascii.h | Ascii.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Ascii | // Module: Ascii | |||
// | // | |||
// Definition of the Ascii class. | // Definition of the Ascii class. | |||
// | // | |||
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Ascii_INCLUDED | #ifndef Foundation_Ascii_INCLUDED | |||
#define Foundation_Ascii_INCLUDED | #define Foundation_Ascii_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Ascii | class Foundation_API Ascii | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AsyncChannel.h | AsyncChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: AsyncChannel | // Module: AsyncChannel | |||
// | // | |||
// Definition of the AsyncChannel class. | // Definition of the AsyncChannel class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AsyncChannel_INCLUDED | #ifndef Foundation_AsyncChannel_INCLUDED | |||
#define Foundation_AsyncChannel_INCLUDED | #define Foundation_AsyncChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AtomicCounter.h | AtomicCounter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: AtomicCounter | // Module: AtomicCounter | |||
// | // | |||
// Definition of the AtomicCounter class. | // Definition of the AtomicCounter class. | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AtomicCounter_INCLUDED | #ifndef Foundation_AtomicCounter_INCLUDED | |||
#define Foundation_AtomicCounter_INCLUDED | #define Foundation_AtomicCounter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if POCO_OS == POCO_OS_WINDOWS_NT | #if POCO_OS == POCO_OS_WINDOWS_NT | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
#elif POCO_OS == POCO_OS_MAC_OS_X | #elif POCO_OS == POCO_OS_MAC_OS_X | |||
#include <libkern/OSAtomic.h> | #include <libkern/OSAtomic.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Attr.h | Attr.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Attr class. | // Definition of the DOM Attr class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Attr_INCLUDED | #ifndef DOM_Attr_INCLUDED | |||
#define DOM_Attr_INCLUDED | #define DOM_Attr_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
#include "Poco/DOM/Element.h" | #include "Poco/DOM/Element.h" | |||
#include "Poco/XML/Name.h" | #include "Poco/XML/Name.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AttrMap.h | AttrMap.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the AttrMap class. | // Definition of the AttrMap class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_AttrMap_INCLUDED | #ifndef DOM_AttrMap_INCLUDED | |||
#define DOM_AttrMap_INCLUDED | #define DOM_AttrMap_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/NamedNodeMap.h" | #include "Poco/DOM/NamedNodeMap.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Attributes.h | Attributes.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX2 Attributes Interface. | // SAX2 Attributes Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_Attributes_INCLUDED | #ifndef SAX_Attributes_INCLUDED | |||
#define SAX_Attributes_INCLUDED | #define SAX_Attributes_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AttributesImpl.h | AttributesImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// Implementation of the SAX2 Attributes Interface. | // Implementation of the SAX2 Attributes Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_AttributesImpl_INCLUDED | #ifndef SAX_AttributesImpl_INCLUDED | |||
#define SAX_AttributesImpl_INCLUDED | #define SAX_AttributesImpl_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/Attributes.h" | #include "Poco/SAX/Attributes.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AutoPtr.h | AutoPtr.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: AutoPtr | // Module: AutoPtr | |||
// | // | |||
// Definition of the AutoPtr template class. | // Definition of the AutoPtr template class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AutoPtr_INCLUDED | #ifndef Foundation_AutoPtr_INCLUDED | |||
#define Foundation_AutoPtr_INCLUDED | #define Foundation_AutoPtr_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <algorithm> | #include <algorithm> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
AutoReleasePool.h | AutoReleasePool.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: AutoReleasePool | // Module: AutoReleasePool | |||
// | // | |||
// Definition of the AutoReleasePool class. | // Definition of the AutoReleasePool class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_AutoReleasePool_INCLUDED | #ifndef Foundation_AutoReleasePool_INCLUDED | |||
#define Foundation_AutoReleasePool_INCLUDED | #define Foundation_AutoReleasePool_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <list> | #include <list> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Base64Decoder.h | Base64Decoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: Base64 | // Module: Base64 | |||
// | // | |||
// Definition of class Base64Decoder. | // Definition of class Base64Decoder. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Base64Decoder_INCLUDED | #ifndef Foundation_Base64Decoder_INCLUDED | |||
#define Foundation_Base64Decoder_INCLUDED | #define Foundation_Base64Decoder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Base64Encoder.h | Base64Encoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: Base64 | // Module: Base64 | |||
// | // | |||
// Definition of class Base64Encoder. | // Definition of class Base64Encoder. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Base64Encoder_INCLUDED | #ifndef Foundation_Base64Encoder_INCLUDED | |||
#define Foundation_Base64Encoder_INCLUDED | #define Foundation_Base64Encoder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
BasicEvent.h | BasicEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: BasicEvent | // Module: BasicEvent | |||
// | // | |||
// Implementation of the BasicEvent template. | // Implementation of the BasicEvent template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BasicEvent_INCLUDED | #ifndef Foundation_BasicEvent_INCLUDED | |||
#define Foundation_BasicEvent_INCLUDED | #define Foundation_BasicEvent_INCLUDED | |||
#include "Poco/AbstractEvent.h" | #include "Poco/AbstractEvent.h" | |||
#include "Poco/DefaultStrategy.h" | #include "Poco/DefaultStrategy.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
BinaryReader.h | BinaryReader.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: BinaryReaderWriter | // Module: BinaryReaderWriter | |||
// | // | |||
// Definition of the BinaryReader class. | // Definition of the BinaryReader class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BinaryReader_INCLUDED | #ifndef Foundation_BinaryReader_INCLUDED | |||
#define Foundation_BinaryReader_INCLUDED | #define Foundation_BinaryReader_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Buffer.h" | #include "Poco/Buffer.h" | |||
#include "Poco/MemoryStream.h" | #include "Poco/MemoryStream.h" | |||
#include <vector> | #include <vector> | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
BinaryWriter.h | BinaryWriter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: BinaryReaderWriter | // Module: BinaryReaderWriter | |||
// | // | |||
// Definition of the BinaryWriter class. | // Definition of the BinaryWriter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BinaryWriter_INCLUDED | #ifndef Foundation_BinaryWriter_INCLUDED | |||
#define Foundation_BinaryWriter_INCLUDED | #define Foundation_BinaryWriter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Buffer.h" | #include "Poco/Buffer.h" | |||
#include "Poco/MemoryStream.h" | #include "Poco/MemoryStream.h" | |||
#include <vector> | #include <vector> | |||
#include <ostream> | #include <ostream> | |||
skipping to change at line 184 | skipping to change at line 164 | |||
/// Returns the byte ordering used by the writer, which is | /// Returns the byte ordering used by the writer, which is | |||
/// either BIG_ENDIAN_BYTE_ORDER or LITTLE_ENDIAN_BYTE_ORDER . | /// either BIG_ENDIAN_BYTE_ORDER or LITTLE_ENDIAN_BYTE_ORDER . | |||
private: | private: | |||
std::ostream& _ostr; | std::ostream& _ostr; | |||
bool _flipBytes; | bool _flipBytes; | |||
TextConverter* _pTextConverter; | TextConverter* _pTextConverter; | |||
}; | }; | |||
template <typename T> | template <typename T> | |||
class BasicMemoryBinaryWriter : public BinaryWriter | class BasicMemoryBinaryWriter: public BinaryWriter | |||
/// A convenient wrapper for using Buffer and MemoryStream with Bina rWriter. | /// A convenient wrapper for using Buffer and MemoryStream with Bina rWriter. | |||
{ | { | |||
public: | public: | |||
BasicMemoryBinaryWriter(Buffer<T>& data, StreamByteOrder byteOrder = NATIVE_BYTE_ORDER): | BasicMemoryBinaryWriter(Buffer<T>& data, StreamByteOrder byteOrder = NATIVE_BYTE_ORDER): | |||
BinaryWriter(_ostr, byteOrder), | BinaryWriter(_ostr, byteOrder), | |||
_data(data), | _data(data), | |||
_ostr(data.begin(), data.capacity()) | _ostr(data.begin(), data.capacity()) | |||
{ | { | |||
} | } | |||
BasicMemoryBinaryWriter(Buffer<T>& data, TextEncoding& encoding, Str eamByteOrder byteOrder = NATIVE_BYTE_ORDER): | BasicMemoryBinaryWriter(Buffer<T>& data, TextEncoding& encoding, Str eamByteOrder byteOrder = NATIVE_BYTE_ORDER): | |||
BinaryWriter(_ostr, encoding, byteOrder), | BinaryWriter(_ostr, encoding, byteOrder), | |||
_data(data), | _data(data), | |||
_ostr(data.begin(), data.capacity()) | _ostr(data.begin(), data.capacity()) | |||
{ | { | |||
} | } | |||
~BasicMemoryBinaryWriter() | ~BasicMemoryBinaryWriter() | |||
{ | { | |||
flush(); | try | |||
{ | ||||
flush(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
Buffer<T>& data() | Buffer<T>& data() | |||
{ | { | |||
return _data; | return _data; | |||
} | } | |||
const Buffer<T>& data() const | const Buffer<T>& data() const | |||
{ | { | |||
return _data; | return _data; | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 10 lines changed or added | |||
Buffer.h | Buffer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Buffer | // Module: Buffer | |||
// | // | |||
// Definition of the Buffer class. | // Definition of the Buffer class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Buffer_INCLUDED | #ifndef Foundation_Buffer_INCLUDED | |||
#define Foundation_Buffer_INCLUDED | #define Foundation_Buffer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <cstring> | #include <cstring> | |||
#include <cstddef> | #include <cstddef> | |||
namespace Poco { | 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. | |||
{ | { | |||
public: | public: | |||
Buffer(std::size_t capacity): | Buffer(std::size_t capacity): | |||
_capacity(capacity), | _capacity(capacity), | |||
_used(capacity), | _used(capacity), | |||
_ptr(new T[capacity]), | _ptr(0), | |||
_ownMem(true) | _ownMem(true) | |||
/// Creates and allocates the Buffer. | /// Creates and allocates the Buffer. | |||
{ | { | |||
if (capacity > 0) | ||||
{ | ||||
_ptr = new T[capacity]; | ||||
} | ||||
} | } | |||
explicit Buffer(T* pMem, std::size_t length): | Buffer(T* pMem, std::size_t length): | |||
_capacity(length), | _capacity(length), | |||
_used(length), | _used(length), | |||
_ptr(pMem), | _ptr(pMem), | |||
_ownMem(false) | _ownMem(false) | |||
/// Creates the Buffer. Length argument specifies the length | /// Creates the Buffer. Length argument specifies the length | |||
/// of the supplied memory pointed to by pMem in the number | /// of the supplied memory pointed to by pMem in the number | |||
/// of elements of type T. Supplied pointer is considered | /// of elements of type T. Supplied pointer is considered | |||
/// blank and not owned by Buffer, so in this case Buffer | /// blank and not owned by Buffer, so in this case Buffer | |||
/// only acts as a wrapper around externally supplied | /// only acts as a wrapper around externally supplied | |||
/// (and lifetime-managed) memory. | /// (and lifetime-managed) memory. | |||
{ | { | |||
} | } | |||
explicit Buffer(const T* pMem, std::size_t length): | Buffer(const T* pMem, std::size_t length): | |||
_capacity(length), | _capacity(length), | |||
_used(length), | _used(length), | |||
_ptr(new T[length]), | _ptr(0), | |||
_ownMem(true) | _ownMem(true) | |||
/// Creates and allocates the Buffer; copies the contents of | /// Creates and allocates the Buffer; copies the contents of | |||
/// the supplied memory into the buffer. Length argument spe cifies | /// the supplied memory into the buffer. Length argument spe cifies | |||
/// the length of the supplied memory pointed to by pMem in the | /// the length of the supplied memory pointed to by pMem in the | |||
/// number of elements of type T. | /// number of elements of type T. | |||
{ | { | |||
if (_used) | if (_capacity > 0) | |||
{ | ||||
_ptr = new T[_capacity]; | ||||
std::memcpy(_ptr, pMem, _used * sizeof(T)); | std::memcpy(_ptr, pMem, _used * sizeof(T)); | |||
} | ||||
} | } | |||
Buffer(const Buffer& other): | Buffer(const Buffer& other): | |||
/// Copy constructor. | /// Copy constructor. | |||
_capacity(other._used), | _capacity(other._used), | |||
_used(other._used), | _used(other._used), | |||
_ptr(new T[other._used]), | _ptr(0), | |||
_ownMem(true) | _ownMem(true) | |||
{ | { | |||
if (_used) | if (_used) | |||
{ | ||||
_ptr = new T[_used]; | ||||
std::memcpy(_ptr, other._ptr, _used * sizeof(T)); | std::memcpy(_ptr, other._ptr, _used * sizeof(T)); | |||
} | ||||
} | } | |||
Buffer& operator =(const Buffer& other) | Buffer& operator = (const Buffer& other) | |||
/// Assignment operator. | /// Assignment operator. | |||
{ | { | |||
if (this != &other) | if (this != &other) | |||
{ | { | |||
Buffer tmp(other); | Buffer tmp(other); | |||
swap(tmp); | swap(tmp); | |||
} | } | |||
return *this; | return *this; | |||
} | } | |||
skipping to change at line 135 | skipping to change at line 124 | |||
/// Resizes the buffer capacity and size. If preserveContent is true, | /// Resizes the buffer capacity and size. If preserveContent is true, | |||
/// the content of the old buffer is copied over to the | /// the content of the old buffer is copied over to the | |||
/// new buffer. The new capacity can be larger or smaller th an | /// new buffer. The new capacity can be larger or smaller th an | |||
/// the current one; if it is smaller, capacity will remain intact. | /// the current one; if it is smaller, capacity will remain intact. | |||
/// Size will always be set to the new capacity. | /// Size will always be set to the new capacity. | |||
/// | /// | |||
/// Buffers only wrapping externally owned storage can not b e | /// Buffers only wrapping externally owned storage can not b e | |||
/// resized. If resize is attempted on those, IllegalAccessE xception | /// resized. If resize is attempted on those, IllegalAccessE xception | |||
/// is thrown. | /// is thrown. | |||
{ | { | |||
if (!_ownMem) | if (!_ownMem) throw Poco::InvalidAccessException("Cannot res | |||
throw Poco::InvalidAccessException("Cannot resize bu | ize buffer which does not own its storage."); | |||
ffer which does not own its storage."); | ||||
if (newCapacity > _capacity) | if (newCapacity > _capacity) | |||
{ | { | |||
T* ptr = new T[newCapacity]; | T* ptr = new T[newCapacity]; | |||
if (preserveContent) | if (preserveContent) | |||
std::memcpy(ptr, _ptr, newCapacity); | { | |||
std::memcpy(ptr, _ptr, _used * sizeof(T)); | ||||
} | ||||
delete [] _ptr; | delete [] _ptr; | |||
_ptr = ptr; | _ptr = ptr; | |||
_capacity = newCapacity; | _capacity = newCapacity; | |||
} | } | |||
_used = newCapacity; | _used = newCapacity; | |||
} | } | |||
void setCapacity(std::size_t newCapacity, bool preserveContent = tru | ||||
e) | ||||
/// Sets the buffer capacity. If preserveContent is true, | ||||
/// the content of the old buffer is copied over to the | ||||
/// new buffer. The new capacity can be larger or smaller th | ||||
an | ||||
/// the current one; size will be set to the new capacity on | ||||
ly if | ||||
/// new capacity is smaller than the current size, otherwise | ||||
it will | ||||
/// remain intact. | ||||
/// | ||||
/// Buffers only wrapping externally owned storage can not b | ||||
e | ||||
/// resized. If resize is attempted on those, IllegalAccessE | ||||
xception | ||||
/// is thrown. | ||||
{ | ||||
if (!_ownMem) throw Poco::InvalidAccessException("Cannot res | ||||
ize buffer which does not own its storage."); | ||||
if (newCapacity != _capacity) | ||||
{ | ||||
T* ptr = 0; | ||||
if (newCapacity > 0) | ||||
{ | ||||
ptr = new T[newCapacity]; | ||||
if (preserveContent) | ||||
{ | ||||
std::size_t newSz = _used < newCapac | ||||
ity ? _used : newCapacity; | ||||
std::memcpy(ptr, _ptr, newSz * sizeo | ||||
f(T)); | ||||
} | ||||
} | ||||
delete [] _ptr; | ||||
_ptr = ptr; | ||||
_capacity = newCapacity; | ||||
if (newCapacity < _used) _used = newCapacity; | ||||
} | ||||
} | ||||
void assign(const T* buf, std::size_t sz) | void assign(const T* buf, std::size_t sz) | |||
/// Assigns the argument buffer to this buffer. | /// Assigns the argument buffer to this buffer. | |||
/// If necessary, resizes the buffer. | /// If necessary, resizes the buffer. | |||
{ | { | |||
if (0 == sz) return; | if (0 == sz) return; | |||
if (sz > _capacity) resize(sz, false); | if (sz > _capacity) resize(sz, false); | |||
std::memcpy(_ptr, buf, sz); | std::memcpy(_ptr, buf, sz * sizeof(T)); | |||
_used = sz; | _used = sz; | |||
} | } | |||
void append(const T* buf, std::size_t sz) | void append(const T* buf, std::size_t sz) | |||
/// Resizes this buffer and appends the argument buffer. | /// Resizes this buffer and appends the argument buffer. | |||
{ | { | |||
if (0 == sz) return; | if (0 == sz) return; | |||
std::size_t oldSize = _used; | ||||
resize(_used + sz, true); | resize(_used + sz, true); | |||
std::memcpy(_ptr + oldSize, buf, sz); | std::memcpy(_ptr + _used - sz, buf, sz * sizeof(T)); | |||
} | ||||
void append(T val) | ||||
/// Resizes this buffer by one element and appends the argum | ||||
ent value. | ||||
{ | ||||
resize(_used + 1, true); | ||||
_ptr[_used - 1] = val; | ||||
} | } | |||
void append(const Buffer& buf) | void append(const Buffer& buf) | |||
/// Resizes this buffer and appends the argument buffer. | /// Resizes this buffer and appends the argument buffer. | |||
{ | { | |||
append(buf.begin(), buf.size()); | append(buf.begin(), buf.size()); | |||
} | } | |||
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. | |||
{ | { | |||
using std::swap; | using std::swap; | |||
swap(_ptr, other._ptr); | swap(_ptr, other._ptr); | |||
swap(_capacity, other._capacity); | swap(_capacity, other._capacity); | |||
swap(_used, other._used); | swap(_used, other._used); | |||
} | } | |||
bool operator ==(const Buffer& other) const | bool operator == (const Buffer& other) const | |||
/// Compare operator. | /// Compare operator. | |||
{ | { | |||
if (this != &other) | if (this != &other) | |||
{ | { | |||
if (_used == other._used) | if (_used == other._used) | |||
{ | { | |||
if (std::memcmp(_ptr, other._ptr, _used) == 0) | if (std::memcmp(_ptr, other._ptr, _used * si zeof(T)) == 0) | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
} | } | |||
return false; | return false; | |||
} | } | |||
return true; | return true; | |||
} | } | |||
bool operator !=(const Buffer& other) const | bool operator != (const Buffer& other) const | |||
/// Compare operator. | /// Compare operator. | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
void clear() | void clear() | |||
/// Sets the contents of the bufer to zero. | /// Sets the contents of the buffer to zero. | |||
{ | { | |||
std::memset(_ptr, 0, _used * sizeof(T)); | std::memset(_ptr, 0, _used * sizeof(T)); | |||
} | } | |||
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. | |||
{ | { | |||
return _ptr; | return _ptr; | |||
} | } | |||
const T* begin() const | const T* begin() const | |||
/// Returns a pointer to the beginning of the buffer. | /// Returns a pointer to the beginning of the buffer. | |||
{ | { | |||
return _ptr; | return _ptr; | |||
End of changes. 28 change blocks. | ||||
57 lines changed or deleted | 97 lines changed or added | |||
BufferAllocator.h | BufferAllocator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: BufferAllocator | // Module: BufferAllocator | |||
// | // | |||
// Definition of the BufferAllocator class. | // Definition of the BufferAllocator class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BufferAllocator_INCLUDED | #ifndef Foundation_BufferAllocator_INCLUDED | |||
#define Foundation_BufferAllocator_INCLUDED | #define Foundation_BufferAllocator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <ios> | #include <ios> | |||
#include <cstddef> | #include <cstddef> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 60 | skipping to change at line 40 | |||
/// BufferAllocator has been specified. | /// BufferAllocator has been specified. | |||
{ | { | |||
public: | public: | |||
typedef ch char_type; | typedef ch char_type; | |||
static char_type* allocate(std::streamsize size) | static char_type* allocate(std::streamsize size) | |||
{ | { | |||
return new char_type[static_cast<std::size_t>(size)]; | return new char_type[static_cast<std::size_t>(size)]; | |||
} | } | |||
static void deallocate(char_type* ptr, std::streamsize size) | static void deallocate(char_type* ptr, std::streamsize /*size*/) thr ow() | |||
{ | { | |||
delete [] ptr; | delete [] ptr; | |||
} | } | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_BufferAllocator_INCLUDED | #endif // Foundation_BufferAllocator_INCLUDED | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
BufferedBidirectionalStreamBuf.h | BufferedBidirectionalStreamBuf.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamBuf | // Module: StreamBuf | |||
// | // | |||
// Definition of template BasicBufferedBidirectionalStreamBuf and class Buf feredBidirectionalStreamBuf. | // Definition of template BasicBufferedBidirectionalStreamBuf and class Buf feredBidirectionalStreamBuf. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BufferedBidirectionalStreamBuf_INCLUDED | #ifndef Foundation_BufferedBidirectionalStreamBuf_INCLUDED | |||
#define Foundation_BufferedBidirectionalStreamBuf_INCLUDED | #define Foundation_BufferedBidirectionalStreamBuf_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferAllocator.h" | #include "Poco/BufferAllocator.h" | |||
#include "Poco/StreamUtil.h" | #include "Poco/StreamUtil.h" | |||
#include <streambuf> | #include <streambuf> | |||
#include <iosfwd> | #include <iosfwd> | |||
skipping to change at line 152 | skipping to change at line 132 | |||
return _mode; | return _mode; | |||
} | } | |||
void resetBuffers() | void resetBuffers() | |||
{ | { | |||
this->setg(_pReadBuffer + 4, _pReadBuffer + 4, _pReadBuffer + 4); | this->setg(_pReadBuffer + 4, _pReadBuffer + 4, _pReadBuffer + 4); | |||
this->setp(_pWriteBuffer, _pWriteBuffer + (_bufsize - 1)); | this->setp(_pWriteBuffer, _pWriteBuffer + (_bufsize - 1)); | |||
} | } | |||
private: | private: | |||
virtual int readFromDevice(char_type* buffer, std::streamsize length ) | virtual int readFromDevice(char_type* /*buffer*/, std::streamsize /* length*/) | |||
{ | { | |||
return 0; | return 0; | |||
} | } | |||
virtual int writeToDevice(const char_type* buffer, std::streamsize l ength) | virtual int writeToDevice(const char_type* /*buffer*/, std::streamsi ze /*length*/) | |||
{ | { | |||
return 0; | return 0; | |||
} | } | |||
int flushBuffer() | int flushBuffer() | |||
{ | { | |||
int n = int(this->pptr() - this->pbase()); | int n = int(this->pptr() - this->pbase()); | |||
if (writeToDevice(this->pbase(), n) == n) | if (writeToDevice(this->pbase(), n) == n) | |||
{ | { | |||
this->pbump(-n); | this->pbump(-n); | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
BufferedStreamBuf.h | BufferedStreamBuf.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamBuf | // Module: StreamBuf | |||
// | // | |||
// Definition of template BasicBufferedStreamBuf and class BufferedStreamBu f. | // Definition of template BasicBufferedStreamBuf and class BufferedStreamBu f. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_BufferedStreamBuf_INCLUDED | #ifndef Foundation_BufferedStreamBuf_INCLUDED | |||
#define Foundation_BufferedStreamBuf_INCLUDED | #define Foundation_BufferedStreamBuf_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferAllocator.h" | #include "Poco/BufferAllocator.h" | |||
#include "Poco/StreamUtil.h" | #include "Poco/StreamUtil.h" | |||
#include <streambuf> | #include <streambuf> | |||
#include <iosfwd> | #include <iosfwd> | |||
skipping to change at line 145 | skipping to change at line 125 | |||
{ | { | |||
_mode = mode; | _mode = mode; | |||
} | } | |||
openmode getMode() const | openmode getMode() const | |||
{ | { | |||
return _mode; | return _mode; | |||
} | } | |||
private: | private: | |||
virtual int readFromDevice(char_type* buffer, std::streamsize length ) | virtual int readFromDevice(char_type* /*buffer*/, std::streamsize /* length*/) | |||
{ | { | |||
return 0; | return 0; | |||
} | } | |||
virtual int writeToDevice(const char_type* buffer, std::streamsize l ength) | virtual int writeToDevice(const char_type* /*buffer*/, std::streamsi ze /*length*/) | |||
{ | { | |||
return 0; | return 0; | |||
} | } | |||
int flushBuffer() | int flushBuffer() | |||
{ | { | |||
int n = int(this->pptr() - this->pbase()); | int n = int(this->pptr() - this->pbase()); | |||
if (writeToDevice(this->pbase(), n) == n) | if (writeToDevice(this->pbase(), n) == n) | |||
{ | { | |||
this->pbump(-n); | this->pbump(-n); | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
Bugcheck.h | Bugcheck.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Bugcheck | // Module: Bugcheck | |||
// | // | |||
// Definition of the Bugcheck class and the self-testing macros. | // Definition of the Bugcheck class and the self-testing macros. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Bugcheck_INCLUDED | #ifndef Foundation_Bugcheck_INCLUDED | |||
#define Foundation_Bugcheck_INCLUDED | #define Foundation_Bugcheck_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <string> | #include <string> | |||
#if defined(_DEBUG) | #if defined(_DEBUG) | |||
# include <iostream> | # include <iostream> | |||
#endif | #endif | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Bugcheck | class Foundation_API Bugcheck | |||
/// This class provides some static methods that are | /// This class provides some static methods that are | |||
/// used by the | /// used by the | |||
/// poco_assert_dbg(), poco_assert(), poco_check_ptr() | /// poco_assert_dbg(), poco_assert(), poco_check_ptr(), | |||
/// and poco_bugcheck() macros. | /// poco_bugcheck() and poco_unexpected() macros. | |||
/// You should not invoke these methods | /// You should not invoke these methods | |||
/// directly. Use the macros instead, as they | /// directly. Use the macros instead, as they | |||
/// automatically provide useful context information. | /// automatically provide useful context information. | |||
{ | { | |||
public: | public: | |||
static void assertion(const char* cond, const char* file, int line); | static void assertion(const char* cond, const char* file, int line, const char* text = 0); | |||
/// An assertion failed. Break into the debugger, if | /// An assertion failed. Break into the debugger, if | |||
/// possible, then throw an AssertionViolationException. | /// possible, then throw an AssertionViolationException. | |||
static void nullPointer(const char* ptr, const char* file, int line) ; | static void nullPointer(const char* ptr, const char* file, int line) ; | |||
/// An null pointer was encountered. Break into the debugger , if | /// An null pointer was encountered. Break into the debugger , if | |||
/// possible, then throw an NullPointerException. | /// possible, then throw an NullPointerException. | |||
static void bugcheck(const char* file, int line); | static void bugcheck(const char* file, int line); | |||
/// An internal error was encountered. Break into the debugg er, if | /// An internal error was encountered. Break into the debugg er, if | |||
/// possible, then throw an BugcheckException. | /// possible, then throw an BugcheckException. | |||
static void bugcheck(const char* msg, const char* file, int line); | static void bugcheck(const char* msg, const char* file, int line); | |||
/// An internal error was encountered. Break into the debugg er, if | /// An internal error was encountered. Break into the debugg er, if | |||
/// possible, then throw an BugcheckException. | /// possible, then throw an BugcheckException. | |||
static void unexpected(const char* file, int line); | ||||
/// An exception was caught in a destructor. Break into debu | ||||
gger, | ||||
/// if possible and report exception. Must only be called fr | ||||
om | ||||
/// within a catch () block as it rethrows the exception to | ||||
/// determine its class. | ||||
static void debugger(const char* file, int line); | static void debugger(const char* file, int line); | |||
/// An internal error was encountered. Break into the debugg er, if | /// An internal error was encountered. Break into the debugg er, if | |||
/// possible. | /// possible. | |||
static void debugger(const char* msg, const char* file, int line); | static void debugger(const char* msg, const char* file, int line); | |||
/// An internal error was encountered. Break into the debugg er, if | /// An internal error was encountered. Break into the debugg er, if | |||
/// possible. | /// possible. | |||
protected: | protected: | |||
static std::string what(const char* msg, const char* file, int line) ; | static std::string what(const char* msg, const char* file, int line, const char* text = 0); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
// | // | |||
// useful macros (these automatically supply line number and file name) | // useful macros (these automatically supply line number and file name) | |||
// | // | |||
#if defined(_DEBUG) | #if defined(_DEBUG) | |||
#define poco_assert_dbg(cond) \ | #define poco_assert_dbg(cond) \ | |||
if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LI NE__); else (void) 0 | if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LI NE__); else (void) 0 | |||
#define poco_assert_msg_dbg(cond, text) \ | ||||
if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LI | ||||
NE__, text); else (void) 0 | ||||
#else | #else | |||
#define poco_assert_msg_dbg(cond, text) | ||||
#define poco_assert_dbg(cond) | #define poco_assert_dbg(cond) | |||
#endif | #endif | |||
#define poco_assert(cond) \ | #define poco_assert(cond) \ | |||
if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LINE__); e lse (void) 0 | if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LINE__); e lse (void) 0 | |||
#define poco_assert_msg(cond, text) \ | ||||
if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LINE__, te | ||||
xt); else (void) 0 | ||||
#define poco_check_ptr(ptr) \ | #define poco_check_ptr(ptr) \ | |||
if (!(ptr)) Poco::Bugcheck::nullPointer(#ptr, __FILE__, __LINE__); e lse (void) 0 | if (!(ptr)) Poco::Bugcheck::nullPointer(#ptr, __FILE__, __LINE__); e lse (void) 0 | |||
#define poco_bugcheck() \ | #define poco_bugcheck() \ | |||
Poco::Bugcheck::bugcheck(__FILE__, __LINE__) | Poco::Bugcheck::bugcheck(__FILE__, __LINE__) | |||
#define poco_bugcheck_msg(msg) \ | #define poco_bugcheck_msg(msg) \ | |||
Poco::Bugcheck::bugcheck(msg, __FILE__, __LINE__) | Poco::Bugcheck::bugcheck(msg, __FILE__, __LINE__) | |||
#define poco_unexpected() \ | ||||
Poco::Bugcheck::unexpected(__FILE__, __LINE__); | ||||
#define poco_debugger() \ | #define poco_debugger() \ | |||
Poco::Bugcheck::debugger(__FILE__, __LINE__) | Poco::Bugcheck::debugger(__FILE__, __LINE__) | |||
#define poco_debugger_msg(msg) \ | #define poco_debugger_msg(msg) \ | |||
Poco::Bugcheck::debugger(msg, __FILE__, __LINE__) | Poco::Bugcheck::debugger(msg, __FILE__, __LINE__) | |||
#if defined(_DEBUG) | #if defined(_DEBUG) | |||
# define poco_stdout_dbg(outstr) \ | # define poco_stdout_dbg(outstr) \ | |||
std::cout << __FILE__ << '(' << std::dec << __LINE__ << "):" << outs tr << std::endl; | std::cout << __FILE__ << '(' << std::dec << __LINE__ << "):" << outs tr << std::endl; | |||
#else | #else | |||
skipping to change at line 137 | skipping to change at line 133 | |||
#else | #else | |||
# define poco_stderr_dbg(outstr) | # define poco_stderr_dbg(outstr) | |||
#endif | #endif | |||
// | // | |||
// poco_static_assert | // poco_static_assert | |||
// | // | |||
// The following was ported from <boost/static_assert.hpp> | // The following was ported from <boost/static_assert.hpp> | |||
// | // | |||
GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings | ||||
template <bool x> | template <bool x> | |||
struct POCO_STATIC_ASSERTION_FAILURE; | struct POCO_STATIC_ASSERTION_FAILURE; | |||
template <> | template <> | |||
struct POCO_STATIC_ASSERTION_FAILURE<true> | struct POCO_STATIC_ASSERTION_FAILURE<true> | |||
{ | { | |||
enum | enum | |||
{ | { | |||
value = 1 | value = 1 | |||
}; | }; | |||
End of changes. 10 change blocks. | ||||
36 lines changed or deleted | 27 lines changed or added | |||
ByteOrder.h | ByteOrder.h | |||
---|---|---|---|---|
// | // | |||
// ByteOrder.h | // ByteOrder.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/ByteOrder.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/ByteOrder.h#5 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: ByteOrder | // Module: ByteOrder | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2014, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ByteOrder_INCLUDED | #ifndef Foundation_ByteOrder_INCLUDED | |||
#define Foundation_ByteOrder_INCLUDED | #define Foundation_ByteOrder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Types.h" | #include "Poco/Types.h" | |||
#if defined(_MSC_VER) | ||||
#include <stdlib.h> // builtins | ||||
#endif | ||||
namespace Poco { | namespace Poco { | |||
class Foundation_API ByteOrder | class Foundation_API ByteOrder | |||
/// This class contains a number of static methods | /// This class contains a number of static methods | |||
/// to convert between big-endian and little-endian | /// to convert between big-endian and little-endian | |||
/// integers of various sizes. | /// integers of various sizes. | |||
{ | { | |||
public: | public: | |||
static Int16 flipBytes(Int16 value); | static Int16 flipBytes(Int16 value); | |||
skipping to change at line 114 | skipping to change at line 97 | |||
static Int16 fromNetwork(Int16 value); | static Int16 fromNetwork(Int16 value); | |||
static UInt16 fromNetwork (UInt16 value); | static UInt16 fromNetwork (UInt16 value); | |||
static Int32 fromNetwork(Int32 value); | static Int32 fromNetwork(Int32 value); | |||
static UInt32 fromNetwork (UInt32 value); | static UInt32 fromNetwork (UInt32 value); | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
static Int64 fromNetwork(Int64 value); | static Int64 fromNetwork(Int64 value); | |||
static UInt64 fromNetwork (UInt64 value); | static UInt64 fromNetwork (UInt64 value); | |||
#endif | #endif | |||
}; | }; | |||
#if !defined(POCO_NO_BYTESWAP_BUILTINS) | ||||
#if defined(_MSC_VER) | ||||
#if (POCO_MSVC_VERSION > 71) | ||||
#define POCO_HAVE_MSC_BYTESWAP 1 | ||||
#endif | ||||
#elif defined(__clang__) | ||||
#if __has_builtin(__builtin_bswap32) | ||||
#define POCO_HAVE_GCC_BYTESWAP 1 | ||||
#endif | ||||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC | ||||
_MINOR__ >= 3)) | ||||
#define POCO_HAVE_GCC_BYTESWAP 1 | ||||
#endif | ||||
#endif | ||||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline UInt16 ByteOrder::flipBytes(UInt16 value) | inline UInt16 ByteOrder::flipBytes(UInt16 value) | |||
{ | { | |||
#if defined(POCO_HAVE_MSC_BYTESWAP) | ||||
return _byteswap_ushort(value); | ||||
#else | ||||
return ((value >> 8) & 0x00FF) | ((value << 8) & 0xFF00); | return ((value >> 8) & 0x00FF) | ((value << 8) & 0xFF00); | |||
#endif | ||||
} | } | |||
inline Int16 ByteOrder::flipBytes(Int16 value) | inline Int16 ByteOrder::flipBytes(Int16 value) | |||
{ | { | |||
return Int16(flipBytes(UInt16(value))); | return Int16(flipBytes(UInt16(value))); | |||
} | } | |||
inline UInt32 ByteOrder::flipBytes(UInt32 value) | inline UInt32 ByteOrder::flipBytes(UInt32 value) | |||
{ | { | |||
#if defined(POCO_HAVE_MSC_BYTESWAP) | ||||
return _byteswap_ulong(value); | ||||
#elif defined(POCO_HAVE_GCC_BYTESWAP) | ||||
return __builtin_bswap32(value); | ||||
#else | ||||
return ((value >> 24) & 0x000000FF) | ((value >> 8) & 0x0000FF00) | return ((value >> 24) & 0x000000FF) | ((value >> 8) & 0x0000FF00) | |||
| ((value << 8) & 0x00FF0000) | ((value << 24) & 0xFF000000); | | ((value << 8) & 0x00FF0000) | ((value << 24) & 0xFF000000); | |||
#endif | ||||
} | } | |||
inline Int32 ByteOrder::flipBytes(Int32 value) | inline Int32 ByteOrder::flipBytes(Int32 value) | |||
{ | { | |||
return Int32(flipBytes(UInt32(value))); | return Int32(flipBytes(UInt32(value))); | |||
} | } | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
inline UInt64 ByteOrder::flipBytes(UInt64 value) | inline UInt64 ByteOrder::flipBytes(UInt64 value) | |||
{ | { | |||
#if defined(POCO_HAVE_MSC_BYTESWAP) | ||||
return _byteswap_uint64(value); | ||||
#elif defined(POCO_HAVE_GCC_BYTESWAP) | ||||
return __builtin_bswap64(value); | ||||
#else | ||||
UInt32 hi = UInt32(value >> 32); | UInt32 hi = UInt32(value >> 32); | |||
UInt32 lo = UInt32(value & 0xFFFFFFFF); | UInt32 lo = UInt32(value & 0xFFFFFFFF); | |||
return UInt64(flipBytes(hi)) | (UInt64(flipBytes(lo)) << 32); | return UInt64(flipBytes(hi)) | (UInt64(flipBytes(lo)) << 32); | |||
#endif | ||||
} | } | |||
inline Int64 ByteOrder::flipBytes(Int64 value) | inline Int64 ByteOrder::flipBytes(Int64 value) | |||
{ | { | |||
return Int64(flipBytes(UInt64(value))); | return Int64(flipBytes(UInt64(value))); | |||
} | } | |||
#endif // POCO_HAVE_INT64 | #endif // POCO_HAVE_INT64 | |||
// | // | |||
// some macro trickery to automate the method implementation | // some macro trickery to automate the method implementation | |||
End of changes. 11 change blocks. | ||||
34 lines changed or deleted | 37 lines changed or added | |||
CDATASection.h | CDATASection.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM CDATASection class. | // Definition of the DOM CDATASection class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_CDATASection_INCLUDED | #ifndef DOM_CDATASection_INCLUDED | |||
#define DOM_CDATASection_INCLUDED | #define DOM_CDATASection_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/Text.h" | #include "Poco/DOM/Text.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Channel.h | Channel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Channel | // Module: Channel | |||
// | // | |||
// Definition of the Channel class. | // Definition of the Channel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Channel_INCLUDED | #ifndef Foundation_Channel_INCLUDED | |||
#define Foundation_Channel_INCLUDED | #define Foundation_Channel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Configurable.h" | #include "Poco/Configurable.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
CharacterData.h | CharacterData.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM CharacterData class. | // Definition of the DOM CharacterData class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_CharacterData_INCLUDED | #ifndef DOM_CharacterData_INCLUDED | |||
#define DOM_CharacterData_INCLUDED | #define DOM_CharacterData_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Checksum.h | Checksum.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Checksum | // Module: Checksum | |||
// | // | |||
// Definition of the Checksum class. | // Definition of the Checksum class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Checksum_INCLUDED | #ifndef Foundation_Checksum_INCLUDED | |||
#define Foundation_Checksum_INCLUDED | #define Foundation_Checksum_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Checksum | class Foundation_API Checksum | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ChildNodesList.h | ChildNodesList.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the ChildNodesList class. | // Definition of the ChildNodesList class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_ChildNodesList_INCLUDED | #ifndef DOM_ChildNodesList_INCLUDED | |||
#define DOM_ChildNodesList_INCLUDED | #define DOM_ChildNodesList_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/NodeList.h" | #include "Poco/DOM/NodeList.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ClassLibrary.h | ClassLibrary.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: ClassLoader | // Module: ClassLoader | |||
// | // | |||
// Definitions for class libraries. | // Definitions for class libraries. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ClassLibrary_INCLUDED | #ifndef Foundation_ClassLibrary_INCLUDED | |||
#define Foundation_ClassLibrary_INCLUDED | #define Foundation_ClassLibrary_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Manifest.h" | #include "Poco/Manifest.h" | |||
#include <typeinfo> | #include <typeinfo> | |||
#if defined(_WIN32) | #if defined(_WIN32) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ClassLoader.h | ClassLoader.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: ClassLoader | // Module: ClassLoader | |||
// | // | |||
// Definition of the ClassLoader class. | // Definition of the ClassLoader class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ClassLoader_INCLUDED | #ifndef Foundation_ClassLoader_INCLUDED | |||
#define Foundation_ClassLoader_INCLUDED | #define Foundation_ClassLoader_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/MetaObject.h" | #include "Poco/MetaObject.h" | |||
#include "Poco/Manifest.h" | #include "Poco/Manifest.h" | |||
#include "Poco/SharedLibrary.h" | #include "Poco/SharedLibrary.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Comment.h | Comment.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Comment class. | // Definition of the DOM Comment class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Comment_INCLUDED | #ifndef DOM_Comment_INCLUDED | |||
#define DOM_Comment_INCLUDED | #define DOM_Comment_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/CharacterData.h" | #include "Poco/DOM/CharacterData.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Condition.h | Condition.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Condition | // Module: Condition | |||
// | // | |||
// Definition of the Condition class template. | // Definition of the Condition class template. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Condition_INCLUDED | #ifndef Foundation_Condition_INCLUDED | |||
#define Foundation_Condition_INCLUDED | #define Foundation_Condition_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/ScopedUnlock.h" | #include "Poco/ScopedUnlock.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Config.h | Config.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Foundation | // Module: Foundation | |||
// | // | |||
// Feature configuration for the POCO libraries. | // Feature configuration for the POCO libraries. | |||
// | // | |||
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Config_INCLUDED | #ifndef Foundation_Config_INCLUDED | |||
#define Foundation_Config_INCLUDED | #define Foundation_Config_INCLUDED | |||
// Define to enable Windows Unicode (UTF-8) support | // Define to enable Windows Unicode (UTF-8) support | |||
// NOTE: As of POCO C++ Libraries release 1.6.0, compiling POCO | ||||
// without POCO_WIN32_UTF8 defined on Windows is deprecated. | ||||
#define POCO_WIN32_UTF8 | #define POCO_WIN32_UTF8 | |||
// Define to enable C++11 support | // Define to enable C++11 support | |||
//#define POCO_ENABLE_CPP11 | // #define POCO_ENABLE_CPP11 | |||
// Define to disable implicit linking | // Define to disable implicit linking | |||
// #define POCO_NO_AUTOMATIC_LIBS | // #define POCO_NO_AUTOMATIC_LIBS | |||
// Define to disable automatic initialization | ||||
// Defining this will disable ALL automatic | ||||
// initialization framework-wide (e.g. Net | ||||
// on Windows, all Data back-ends, etc). | ||||
// | ||||
// #define POCO_NO_AUTOMATIC_LIB_INIT | ||||
// Define to disable FPEnvironment support | // Define to disable FPEnvironment support | |||
// #define POCO_NO_FPENVIRONMENT | // #define POCO_NO_FPENVIRONMENT | |||
// Define if std::wstring is not available | // Define if std::wstring is not available | |||
// #define POCO_NO_WSTRING | // #define POCO_NO_WSTRING | |||
// Define to disable shared memory | // Define to disable shared memory | |||
// #define POCO_NO_SHAREDMEMORY | // #define POCO_NO_SHAREDMEMORY | |||
// Define if no <locale> header is available (such as on WinCE) | // Define if no <locale> header is available (such as on WinCE) | |||
skipping to change at line 78 | skipping to change at line 67 | |||
// Define to override system-provided | // Define to override system-provided | |||
// minimum thread priority value on POSIX | // minimum thread priority value on POSIX | |||
// platforms (returned by Poco::Thread::getMinOSPriority()). | // platforms (returned by Poco::Thread::getMinOSPriority()). | |||
// #define POCO_THREAD_PRIORITY_MIN 0 | // #define POCO_THREAD_PRIORITY_MIN 0 | |||
// Define to override system-provided | // Define to override system-provided | |||
// maximum thread priority value on POSIX | // maximum thread priority value on POSIX | |||
// platforms (returned by Poco::Thread::getMaxOSPriority()). | // platforms (returned by Poco::Thread::getMaxOSPriority()). | |||
// #define POCO_THREAD_PRIORITY_MAX 31 | // #define POCO_THREAD_PRIORITY_MAX 31 | |||
// Define to disable small object optimization. If not | ||||
// defined, Any and Dynamic::Var (and similar optimization | ||||
// candidates) will be auto-allocated on the stack in | ||||
// cases when value holder fits into POCO_SMALL_OBJECT_SIZE | ||||
// (see below). | ||||
// | ||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||||
// !!! NOTE: Any/Dynamic::Var SOO will NOT work reliably !!! | ||||
// !!! without C++11 (std::aligned_storage in particular). !!! | ||||
// !!! Only comment this out if your compiler has support !!! | ||||
// !!! for std::aligned_storage. !!! | ||||
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||||
// | ||||
#define POCO_NO_SOO | ||||
// Small object size in bytes. When assigned to Any or Var, | ||||
// objects larger than this value will be alocated on the heap, | ||||
// while those smaller will be placement new-ed into an | ||||
// internal buffer. | ||||
#if !defined(POCO_SMALL_OBJECT_SIZE) && !defined(POCO_NO_SOO) | ||||
#define POCO_SMALL_OBJECT_SIZE 32 | ||||
#endif | ||||
// Define to disable compilation of DirectoryWatcher | ||||
// on platforms with no inotify. | ||||
// #define POCO_NO_INOTIFY | ||||
// Following are options to remove certain features | // Following are options to remove certain features | |||
// to reduce library/executable size for smaller | // to reduce library/executable size for smaller | |||
// embedded platforms. By enabling these options, | // embedded platforms. By enabling these options, | |||
// the size of a statically executable can be | // the size of a statically executable can be | |||
// reduced by a few 100 Kbytes. | // reduced by a few 100 Kbytes. | |||
// No automatic registration of FileChannel in | // No automatic registration of FileChannel in | |||
// LoggingFactory - avoids FileChannel and friends | // LoggingFactory - avoids FileChannel and friends | |||
// being linked to executable. | // being linked to executable. | |||
// #define POCO_NO_FILECHANNEL | // #define POCO_NO_FILECHANNEL | |||
skipping to change at line 106 | skipping to change at line 122 | |||
// linked to executable on Unix/Linux systems. | // linked to executable on Unix/Linux systems. | |||
// #define POCO_NO_SYSLOGCHANNEL | // #define POCO_NO_SYSLOGCHANNEL | |||
// Define to enable MSVC secure warnings | // Define to enable MSVC secure warnings | |||
// #define POCO_MSVC_SECURE_WARNINGS | // #define POCO_MSVC_SECURE_WARNINGS | |||
// No support for INI file configurations in | // No support for INI file configurations in | |||
// Poco::Util::Application. | // Poco::Util::Application. | |||
// #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. | |||
// #define POCO_UTIL_NO_XMLCONFIGURATION | // #define POCO_UTIL_NO_XMLCONFIGURATION | |||
// No IPv6 support | // No IPv6 support | |||
// Define to disable IPv6 | // Define to disable IPv6 | |||
// #define POCO_NET_NO_IPv6 | // #define POCO_NET_NO_IPv6 | |||
// 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 | |||
// Enable the poco_debug_* and poco_trace_* macros | ||||
// even if the _DEBUG variable is not set. | ||||
// This allows the use of these macros in a release version. | ||||
// #define POCO_LOG_DEBUG | ||||
#endif // Foundation_Config_INCLUDED | #endif // Foundation_Config_INCLUDED | |||
End of changes. 8 change blocks. | ||||
34 lines changed or deleted | 49 lines changed or added | |||
Configurable.h | Configurable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Configurable | // Module: Configurable | |||
// | // | |||
// Definition of the Configurable class. | // Definition of the Configurable class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Configurable_INCLUDED | #ifndef Foundation_Configurable_INCLUDED | |||
#define Foundation_Configurable_INCLUDED | #define Foundation_Configurable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Configurable | class Foundation_API Configurable | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ConfigurationMapper.h | ConfigurationMapper.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: ConfigurationMapper | // Module: ConfigurationMapper | |||
// | // | |||
// Definition of the ConfigurationMapper class. | // Definition of the ConfigurationMapper class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_ConfigurationMapper_INCLUDED | #ifndef Util_ConfigurationMapper_INCLUDED | |||
#define Util_ConfigurationMapper_INCLUDED | #define Util_ConfigurationMapper_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ConfigurationView.h | ConfigurationView.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: ConfigurationView | // Module: ConfigurationView | |||
// | // | |||
// Definition of the ConfigurationView class. | // Definition of the ConfigurationView class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_ConfigurationView_INCLUDED | #ifndef Util_ConfigurationView_INCLUDED | |||
#define Util_ConfigurationView_INCLUDED | #define Util_ConfigurationView_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ConsoleChannel.h | ConsoleChannel.h | |||
---|---|---|---|---|
// | // | |||
// ConsoleChannel.h | // ConsoleChannel.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/ConsoleChannel.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/ConsoleChannel.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: ConsoleChannel | // Module: ConsoleChannel | |||
// | // | |||
// Definition of the ConsoleChannel class. | // Definition of the ConsoleChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ConsoleChannel_INCLUDED | #ifndef Foundation_ConsoleChannel_INCLUDED | |||
#define Foundation_ConsoleChannel_INCLUDED | #define Foundation_ConsoleChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <ostream> | #include <ostream> | |||
skipping to change at line 65 | skipping to change at line 45 | |||
/// appropriate Formatter to control what is contained | /// appropriate Formatter to control what is contained | |||
/// in the text. | /// in the text. | |||
/// | /// | |||
/// Similar to StreamChannel, except that a static | /// Similar to StreamChannel, except that a static | |||
/// mutex is used to protect against multiple | /// mutex is used to protect against multiple | |||
/// console channels concurrently writing to the | /// console channels concurrently writing to the | |||
/// same stream. | /// same stream. | |||
{ | { | |||
public: | public: | |||
ConsoleChannel(); | ConsoleChannel(); | |||
/// Creates the channel and attached std::clog. | /// Creates the channel and attaches std::clog. | |||
ConsoleChannel(std::ostream& str); | ConsoleChannel(std::ostream& str); | |||
/// Creates the channel. | /// Creates the channel using the given stream. | |||
void log(const Message& msg); | void log(const Message& msg); | |||
/// Logs the given message to the channel's stream. | /// Logs the given message to the channel's stream. | |||
protected: | protected: | |||
~ConsoleChannel(); | ~ConsoleChannel(); | |||
private: | private: | |||
std::ostream& _str; | std::ostream& _str; | |||
static FastMutex _mutex; | static FastMutex _mutex; | |||
}; | }; | |||
class Foundation_API ColorConsoleChannel: public Channel | ||||
/// A channel that writes to an ostream. | ||||
/// | ||||
/// Only the message's text is written, followed | ||||
/// by a newline. | ||||
/// | ||||
/// Messages can be colored depending on priority. | ||||
/// The console device must support ANSI escape codes | ||||
/// in order to display colored messages. | ||||
/// | ||||
/// To enable message coloring, set the "enableColors" | ||||
/// property to true (default). Furthermore, colors can be | ||||
/// configured by setting the following properties | ||||
/// (default values are given in parenthesis): | ||||
/// | ||||
/// * traceColor (gray) | ||||
/// * debugColor (gray) | ||||
/// * informationColor (default) | ||||
/// * noticeColor (default) | ||||
/// * warningColor (yellow) | ||||
/// * errorColor (lightRed) | ||||
/// * criticalColor (lightRed) | ||||
/// * fatalColor (lightRed) | ||||
/// | ||||
/// The following color values are supported: | ||||
/// | ||||
/// * default | ||||
/// * black | ||||
/// * red | ||||
/// * green | ||||
/// * brown | ||||
/// * blue | ||||
/// * magenta | ||||
/// * cyan | ||||
/// * gray | ||||
/// * darkgray | ||||
/// * lightRed | ||||
/// * lightGreen | ||||
/// * yellow | ||||
/// * lightBlue | ||||
/// * lightMagenta | ||||
/// * lightCyan | ||||
/// * white | ||||
/// | ||||
/// Chain this channel to a FormattingChannel with an | ||||
/// appropriate Formatter to control what is contained | ||||
/// in the text. | ||||
/// | ||||
/// Similar to StreamChannel, except that a static | ||||
/// mutex is used to protect against multiple | ||||
/// console channels concurrently writing to the | ||||
/// same stream. | ||||
{ | ||||
public: | ||||
ColorConsoleChannel(); | ||||
/// Creates the channel and attaches std::clog. | ||||
ColorConsoleChannel(std::ostream& str); | ||||
/// Creates the channel using the given stream. | ||||
void log(const Message& msg); | ||||
/// Logs the given message to the channel's stream. | ||||
void setProperty(const std::string& name, const std::string& value); | ||||
/// Sets the property with the given name. | ||||
/// | ||||
/// The following properties are supported: | ||||
/// * enableColors: Enable or disable colors. | ||||
/// * traceColor: Specify color for trace messages. | ||||
/// * debugColor: Specify color for debug messages. | ||||
/// * informationColor: Specify color for information mes | ||||
sages. | ||||
/// * noticeColor: Specify color for notice messages | ||||
. | ||||
/// * warningColor: Specify color for warning message | ||||
s. | ||||
/// * errorColor: Specify color for error messages. | ||||
/// * criticalColor: Specify color for critical messag | ||||
es. | ||||
/// * fatalColor: Specify color for fatal messages. | ||||
/// | ||||
/// See the class documentation for a list of supported colo | ||||
r values. | ||||
std::string getProperty(const std::string& name) const; | ||||
/// Returns the value of the property with the given name. | ||||
/// See setProperty() for a description of the supported | ||||
/// properties. | ||||
protected: | ||||
enum Color | ||||
{ | ||||
CC_DEFAULT = 0x0027, | ||||
CC_BLACK = 0x001e, | ||||
CC_RED = 0x001f, | ||||
CC_GREEN = 0x0020, | ||||
CC_BROWN = 0x0021, | ||||
CC_BLUE = 0x0022, | ||||
CC_MAGENTA = 0x0023, | ||||
CC_CYAN = 0x0024, | ||||
CC_GRAY = 0x0025, | ||||
CC_DARKGRAY = 0x011e, | ||||
CC_LIGHTRED = 0x011f, | ||||
CC_LIGHTGREEN = 0x0120, | ||||
CC_YELLOW = 0x0121, | ||||
CC_LIGHTBLUE = 0x0122, | ||||
CC_LIGHTMAGENTA = 0x0123, | ||||
CC_LIGHTCYAN = 0x0124, | ||||
CC_WHITE = 0x0125 | ||||
}; | ||||
~ColorConsoleChannel(); | ||||
Color parseColor(const std::string& color) const; | ||||
std::string formatColor(Color color) const; | ||||
void initColors(); | ||||
private: | ||||
std::ostream& _str; | ||||
bool _enableColors; | ||||
Color _colors[9]; | ||||
static FastMutex _mutex; | ||||
static const std::string CSI; | ||||
}; | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_ConsoleChannel_INCLUDED | #endif // Foundation_ConsoleChannel_INCLUDED | |||
End of changes. 5 change blocks. | ||||
35 lines changed or deleted | 128 lines changed or added | |||
ContentHandler.h | ContentHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX2 ContentHandler Interface. | // SAX2 ContentHandler Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_ContentHandler_INCLUDED | #ifndef SAX_ContentHandler_INCLUDED | |||
#define SAX_ContentHandler_INCLUDED | #define SAX_ContentHandler_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
CountingStream.h | CountingStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: CountingStream | // Module: CountingStream | |||
// | // | |||
// Definition of the CountingStreamBuf, CountingInputStream and CountingOut putStream classes. | // Definition of the CountingStreamBuf, CountingInputStream and CountingOut putStream classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_CountingStream_INCLUDED | #ifndef Foundation_CountingStream_INCLUDED | |||
#define Foundation_CountingStream_INCLUDED | #define Foundation_CountingStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
skipping to change at line 88 | skipping to change at line 68 | |||
void setCurrentLineNumber(int line); | void setCurrentLineNumber(int line); | |||
/// Sets the current line number. | /// Sets the current line number. | |||
/// | /// | |||
/// This is mainly useful when parsing C/C++ | /// This is mainly useful when parsing C/C++ | |||
/// preprocessed source code containing #line directives. | /// preprocessed source code containing #line directives. | |||
int getCurrentLineNumber() const; | int getCurrentLineNumber() const; | |||
/// Returns the current line number (same as lines()). | /// Returns the current line number (same as lines()). | |||
void addChars(int chars); | ||||
/// Add to the total number of characters. | ||||
void addLines(int lines); | ||||
/// Add to the total number of lines. | ||||
void addPos(int pos); | ||||
/// Add to the number of characters on the current line. | ||||
protected: | protected: | |||
int readFromDevice(); | int readFromDevice(); | |||
int writeToDevice(char c); | int writeToDevice(char c); | |||
private: | private: | |||
std::istream* _pIstr; | std::istream* _pIstr; | |||
std::ostream* _pOstr; | std::ostream* _pOstr; | |||
int _chars; | int _chars; | |||
int _lines; | int _lines; | |||
int _pos; | int _pos; | |||
skipping to change at line 142 | skipping to change at line 131 | |||
void setCurrentLineNumber(int line); | void setCurrentLineNumber(int line); | |||
/// Sets the current line number. | /// Sets the current line number. | |||
/// | /// | |||
/// This is mainly useful when parsing C/C++ | /// This is mainly useful when parsing C/C++ | |||
/// preprocessed source code containing #line directives. | /// preprocessed source code containing #line directives. | |||
int getCurrentLineNumber() const; | int getCurrentLineNumber() const; | |||
/// Returns the current line number (same as lines()). | /// Returns the current line number (same as lines()). | |||
void addChars(int chars); | ||||
/// Add to the total number of characters. | ||||
void addLines(int lines); | ||||
/// Add to the total number of lines. | ||||
void addPos(int pos); | ||||
/// Add to the number of characters on the current line. | ||||
CountingStreamBuf* rdbuf(); | CountingStreamBuf* rdbuf(); | |||
/// Returns a pointer to the underlying streambuf. | /// Returns a pointer to the underlying streambuf. | |||
protected: | protected: | |||
CountingStreamBuf _buf; | CountingStreamBuf _buf; | |||
}; | }; | |||
class Foundation_API CountingInputStream: public CountingIOS, public std::i stream | class Foundation_API CountingInputStream: public CountingIOS, public std::i stream | |||
/// This stream counts all characters and lines | /// This stream counts all characters and lines | |||
/// going through it. This is useful for lexers and parsers | /// going through it. This is useful for lexers and parsers | |||
skipping to change at line 173 | skipping to change at line 171 | |||
class Foundation_API CountingOutputStream: public CountingIOS, public std:: ostream | class Foundation_API CountingOutputStream: public CountingIOS, public std:: ostream | |||
/// This stream counts all characters and lines | /// This stream counts all characters and lines | |||
/// going through it. | /// going through it. | |||
{ | { | |||
public: | public: | |||
CountingOutputStream(); | CountingOutputStream(); | |||
/// Creates an unconnected CountingOutputStream. | /// Creates an unconnected CountingOutputStream. | |||
CountingOutputStream(std::ostream& ostr); | CountingOutputStream(std::ostream& ostr); | |||
/// Creates the CountingOutputStream and connects it | /// Creates the CountingOutputStream and connects it | |||
/// to the given input stream. | /// to the given output stream. | |||
~CountingOutputStream(); | ~CountingOutputStream(); | |||
/// Destroys the CountingOutputStream. | /// Destroys the CountingOutputStream. | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline int CountingStreamBuf::chars() const | inline int CountingStreamBuf::chars() const | |||
{ | { | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 20 lines changed or added | |||
DNS.h | DNS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: DNS | // Module: DNS | |||
// | // | |||
// Definition of the DNS class. | // Definition of the DNS class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_DNS_INCLUDED | #ifndef Net_DNS_INCLUDED | |||
#define Net_DNS_INCLUDED | #define Net_DNS_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketDefs.h" | #include "Poco/Net/SocketDefs.h" | |||
#include "Poco/Net/IPAddress.h" | #include "Poco/Net/IPAddress.h" | |||
#include "Poco/Net/HostEntry.h" | #include "Poco/Net/HostEntry.h" | |||
#include "Poco/Mutex.h" | ||||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class Net_API DNS | class Net_API DNS | |||
/// This class provides an interface to the | /// This class provides an interface to the | |||
/// domain name service. | /// domain name service. | |||
/// | /// | |||
/// An internal DNS cache is used to speed up name lookups. | /// An internal DNS cache is used to speed up name lookups. | |||
{ | { | |||
public: | public: | |||
static HostEntry hostByName(const std::string& hostname); | ||||
enum HintFlag | ||||
{ | ||||
DNS_HINT_NONE = 0, | ||||
#ifdef POCO_HAVE_ADDRINFO | ||||
DNS_HINT_AI_PASSIVE = AI_PASSIVE, // Socket address will be | ||||
used in bind() call | ||||
DNS_HINT_AI_CANONNAME = AI_CANONNAME, // Return canonical na | ||||
me in first ai_canonname | ||||
DNS_HINT_AI_NUMERICHOST = AI_NUMERICHOST, // Nodename must b | ||||
e a numeric address string | ||||
DNS_HINT_AI_NUMERICSERV = AI_NUMERICSERV, // Servicename mus | ||||
t be a numeric port number | ||||
DNS_HINT_AI_ALL = AI_ALL, // Query both IP6 and IP4 with AI_ | ||||
V4MAPPED | ||||
DNS_HINT_AI_ADDRCONFIG = AI_ADDRCONFIG, // Resolution only i | ||||
f global address configured | ||||
DNS_HINT_AI_V4MAPPED = AI_V4MAPPED, // On v6 failure, query | ||||
v4 and convert to V4MAPPED format | ||||
#endif | ||||
}; | ||||
static HostEntry hostByName(const std::string& hostname, unsigned hi | ||||
ntFlags = | ||||
#ifdef POCO_HAVE_ADDRINFO | ||||
DNS_HINT_AI_CANONNAME | DNS_HINT_AI_ADDRCONFIG | ||||
#else | ||||
DNS_HINT_NONE | ||||
#endif | ||||
); | ||||
/// Returns a HostEntry object containing the DNS informatio n | /// Returns a HostEntry object containing the DNS informatio n | |||
/// for the host with the given name. | /// for the host with the given name. HintFlag argument is o | |||
nly | ||||
/// used on platforms that have getaddrinfo(). | ||||
/// | /// | |||
/// Throws a HostNotFoundException if a host with the given | /// Throws a HostNotFoundException if a host with the given | |||
/// name cannot be found. | /// name cannot be found. | |||
/// | /// | |||
/// Throws a NoAddressFoundException if no address can be | /// Throws a NoAddressFoundException if no address can be | |||
/// found for the hostname. | /// found for the hostname. | |||
/// | /// | |||
/// Throws a DNSException in case of a general DNS error. | /// Throws a DNSException in case of a general DNS error. | |||
/// | /// | |||
/// Throws an IOException in case of any other error. | /// Throws an IOException in case of any other error. | |||
static HostEntry hostByAddress(const IPAddress& address); | static HostEntry hostByAddress(const IPAddress& address, unsigned hi | |||
ntFlags = | ||||
#ifdef POCO_HAVE_ADDRINFO | ||||
DNS_HINT_AI_CANONNAME | DNS_HINT_AI_ADDRCONFIG | ||||
#else | ||||
DNS_HINT_NONE | ||||
#endif | ||||
); | ||||
/// Returns a HostEntry object containing the DNS informatio n | /// Returns a HostEntry object containing the DNS informatio n | |||
/// for the host with the given IP address. | /// for the host with the given IP address. HintFlag argumen | |||
t is only | ||||
/// used on platforms that have getaddrinfo(). | ||||
/// | /// | |||
/// Throws a HostNotFoundException if a host with the given | /// Throws a HostNotFoundException if a host with the given | |||
/// name cannot be found. | /// name cannot be found. | |||
/// | /// | |||
/// Throws a DNSException in case of a general DNS error. | /// Throws a DNSException in case of a general DNS error. | |||
/// | /// | |||
/// Throws an IOException in case of any other error. | /// Throws an IOException in case of any other error. | |||
static HostEntry resolve(const std::string& address); | static HostEntry resolve(const std::string& address); | |||
/// Returns a HostEntry object containing the DNS informatio n | /// Returns a HostEntry object containing the DNS informatio n | |||
skipping to change at line 114 | skipping to change at line 122 | |||
/// Throws a HostNotFoundException if DNS information | /// Throws a HostNotFoundException if DNS information | |||
/// for this host cannot be found. | /// for this host cannot be found. | |||
/// | /// | |||
/// Throws a NoAddressFoundException if no address can be | /// Throws a NoAddressFoundException if no address can be | |||
/// found for this host. | /// found for this host. | |||
/// | /// | |||
/// Throws a DNSException in case of a general DNS error. | /// Throws a DNSException in case of a general DNS error. | |||
/// | /// | |||
/// Throws an IOException in case of any other error. | /// Throws an IOException in case of any other error. | |||
static void reload(); | ||||
/// Reloads the resolver configuration. | ||||
/// | ||||
/// This method will call res_init() if the Net library | ||||
/// has been compiled with -DPOCO_HAVE_LIBRESOLV. Otherwise | ||||
/// it will do nothing. | ||||
//@ deprecated | //@ deprecated | |||
static void flushCache(); | static void flushCache(); | |||
/// Flushes the internal DNS cache. | /// Flushes the internal DNS cache. | |||
/// | /// | |||
/// As of 1.4.2, the DNS cache is no longer used | /// As of 1.4.2, the DNS cache is no longer used | |||
/// and this method does not do anything. | /// and this method does not do anything. | |||
static std::string hostName(); | static std::string hostName(); | |||
/// Returns the host name of this host. | /// Returns the host name of this host. | |||
End of changes. 7 change blocks. | ||||
37 lines changed or deleted | 52 lines changed or added | |||
DOMBuilder.h | DOMBuilder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMBuilder | // Module: DOMBuilder | |||
// | // | |||
// Definition of the DOMBuilder class. | // Definition of the DOMBuilder class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMBuilder_INCLUDED | #ifndef DOM_DOMBuilder_INCLUDED | |||
#define DOM_DOMBuilder_INCLUDED | #define DOM_DOMBuilder_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/ContentHandler.h" | #include "Poco/SAX/ContentHandler.h" | |||
#include "Poco/SAX/LexicalHandler.h" | #include "Poco/SAX/LexicalHandler.h" | |||
#include "Poco/SAX/DTDHandler.h" | #include "Poco/SAX/DTDHandler.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMException.h | DOMException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM DOMException class. | // Definition of the DOM DOMException class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMException_INCLUDED | #ifndef DOM_DOMException_INCLUDED | |||
#define DOM_DOMException_INCLUDED | #define DOM_DOMException_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLException.h" | #include "Poco/XML/XMLException.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMImplementation.h | DOMImplementation.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM DOMImplementation class. | // Definition of the DOM DOMImplementation class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMImplementation_INCLUDED | #ifndef DOM_DOMImplementation_INCLUDED | |||
#define DOM_DOMImplementation_INCLUDED | #define DOM_DOMImplementation_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMObject.h | DOMObject.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOMObject class. | // Definition of the DOMObject class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMObject_INCLUDED | #ifndef DOM_DOMObject_INCLUDED | |||
#define DOM_DOMObject_INCLUDED | #define DOM_DOMObject_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMParser.h | DOMParser.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMParser | // Module: DOMParser | |||
// | // | |||
// Definition of the DOMParser class. | // Definition of the DOMParser class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMParser_INCLUDED | #ifndef DOM_DOMParser_INCLUDED | |||
#define DOM_DOMParser_INCLUDED | #define DOM_DOMParser_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/SAXParser.h" | #include "Poco/SAX/SAXParser.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMSerializer.h | DOMSerializer.h | |||
---|---|---|---|---|
skipping to change at line 13 | skipping to change at line 13 | |||
// | // | |||
// $Id: //poco/1.4/XML/include/Poco/DOM/DOMSerializer.h#1 $ | // $Id: //poco/1.4/XML/include/Poco/DOM/DOMSerializer.h#1 $ | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMSerializer | // Module: DOMSerializer | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMSerializer_INCLUDED | #ifndef DOM_DOMSerializer_INCLUDED | |||
#define DOM_DOMSerializer_INCLUDED | #define DOM_DOMSerializer_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/XMLReader.h" | #include "Poco/SAX/XMLReader.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DOMWriter.h | DOMWriter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMWriter | // Module: DOMWriter | |||
// | // | |||
// Definition of class DOMWriter. | // Definition of class DOMWriter. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DOMWriter_INCLUDED | #ifndef DOM_DOMWriter_INCLUDED | |||
#define DOM_DOMWriter_INCLUDED | #define DOM_DOMWriter_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/XML/XMLStream.h" | #include "Poco/XML/XMLStream.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DTDHandler.h | DTDHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX DTDHandler Interface. | // SAX DTDHandler Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_DTDHandler_INCLUDED | #ifndef SAX_DTDHandler_INCLUDED | |||
#define SAX_DTDHandler_INCLUDED | #define SAX_DTDHandler_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DTDMap.h | DTDMap.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DTDMap class. | // Definition of the DTDMap class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DTDMap_INCLUDED | #ifndef DOM_DTDMap_INCLUDED | |||
#define DOM_DTDMap_INCLUDED | #define DOM_DTDMap_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/NamedNodeMap.h" | #include "Poco/DOM/NamedNodeMap.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DatagramSocket.h | DatagramSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: DatagramSocket | // Module: DatagramSocket | |||
// | // | |||
// Definition of the DatagramSocket class. | // Definition of the DatagramSocket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_DatagramSocket_INCLUDED | #ifndef Net_DatagramSocket_INCLUDED | |||
#define Net_DatagramSocket_INCLUDED | #define Net_DatagramSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 88 | skipping to change at line 68 | |||
/// Assignment operator. | /// Assignment operator. | |||
/// | /// | |||
/// Releases the socket's SocketImpl and | /// Releases the socket's SocketImpl and | |||
/// attaches the SocketImpl from the other socket and | /// attaches the SocketImpl from the other socket and | |||
/// increments the reference count of the SocketImpl. | /// increments the reference count of the SocketImpl. | |||
void connect(const SocketAddress& address); | void connect(const SocketAddress& address); | |||
/// Restricts incoming and outgoing | /// Restricts incoming and outgoing | |||
/// packets to the specified address. | /// packets to the specified address. | |||
/// | /// | |||
/// Cannot be used together with bind(). | /// Calls to connect() cannot come before calls to bind(). | |||
void bind(const SocketAddress& address, bool reuseAddress = false); | void bind(const SocketAddress& address, bool reuseAddress = false); | |||
/// Bind a local address to the socket. | /// Bind a local address to the socket. | |||
/// | /// | |||
/// This is usually only done when establishing a server | /// This is usually only done when establishing a server | |||
/// socket. | /// socket. | |||
/// | /// | |||
/// If reuseAddress is true, sets the SO_REUSEADDR | /// If reuseAddress is true, sets the SO_REUSEADDR | |||
/// socket option. | /// socket option. | |||
/// | /// | |||
/// Cannot be used together with connect(). | /// Calls to connect cannot() come before calls to bind(). | |||
int sendBytes(const void* buffer, int length, int flags = 0); | int sendBytes(const void* buffer, int length, int flags = 0); | |||
/// Sends the contents of the given buffer through | /// Sends the contents of the given buffer through | |||
/// the socket. | /// the socket. | |||
/// | /// | |||
/// Returns the number of bytes sent, which may be | /// Returns the number of bytes sent, which may be | |||
/// less than the number of bytes specified. | /// less than the number of bytes specified. | |||
int receiveBytes(void* buffer, int length, int flags = 0); | int receiveBytes(void* buffer, int length, int flags = 0); | |||
/// Receives data from the socket and stores it | /// Receives data from the socket and stores it | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
DatagramSocketImpl.h | DatagramSocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: DatagramSocketImpl | // Module: DatagramSocketImpl | |||
// | // | |||
// Definition of the DatagramSocketImpl class. | // Definition of the DatagramSocketImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_DatagramSocketImpl_INCLUDED | #ifndef Net_DatagramSocketImpl_INCLUDED | |||
#define Net_DatagramSocketImpl_INCLUDED | #define Net_DatagramSocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketImpl.h" | #include "Poco/Net/SocketImpl.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DateTime.h | DateTime.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: DateTime | // Module: DateTime | |||
// | // | |||
// Definition of the DateTime class. | // Definition of the DateTime class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DateTime_INCLUDED | #ifndef Foundation_DateTime_INCLUDED | |||
#define Foundation_DateTime_INCLUDED | #define Foundation_DateTime_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DateTimeFormat.h | DateTimeFormat.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: DateTimeFormat | // Module: DateTimeFormat | |||
// | // | |||
// Definition of the DateTimeFormat class. | // Definition of the DateTimeFormat class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DateTimeFormat_INCLUDED | #ifndef Foundation_DateTimeFormat_INCLUDED | |||
#define Foundation_DateTimeFormat_INCLUDED | #define Foundation_DateTimeFormat_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API DateTimeFormat | class Foundation_API DateTimeFormat | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DateTimeFormatter.h | DateTimeFormatter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: DateTimeFormatter | // Module: DateTimeFormatter | |||
// | // | |||
// Definition of the DateTimeFormatter class. | // Definition of the DateTimeFormatter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DateTimeFormatter_INCLUDED | #ifndef Foundation_DateTimeFormatter_INCLUDED | |||
#define Foundation_DateTimeFormatter_INCLUDED | #define Foundation_DateTimeFormatter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DateTime.h" | #include "Poco/DateTime.h" | |||
#include "Poco/LocalDateTime.h" | #include "Poco/LocalDateTime.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DateTimeParser.h | DateTimeParser.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: DateTimeParser | // Module: DateTimeParser | |||
// | // | |||
// Definition of the DateTimeParser class. | // Definition of the DateTimeParser class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DateTimeParser_INCLUDED | #ifndef Foundation_DateTimeParser_INCLUDED | |||
#define Foundation_DateTimeParser_INCLUDED | #define Foundation_DateTimeParser_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DateTime.h" | #include "Poco/DateTime.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 66 | skipping to change at line 46 | |||
/// | /// | |||
/// Note: When parsing a time in 12-hour (AM/PM) format, the hour | /// Note: When parsing a time in 12-hour (AM/PM) format, the hour | |||
/// (%h) must be parsed before the AM/PM designator (%a, %A), | /// (%h) must be parsed before the AM/PM designator (%a, %A), | |||
/// otherwise the AM/PM designator will be ignored. | /// otherwise the AM/PM designator will be ignored. | |||
/// | /// | |||
/// See the DateTimeFormatter class for a list of supported format s pecifiers. | /// See the DateTimeFormatter class for a list of supported format s pecifiers. | |||
/// In addition to the format specifiers supported by DateTimeFormat ter, an | /// In addition to the format specifiers supported by DateTimeFormat ter, an | |||
/// additional specifier is supported: %r will parse a year given by either | /// additional specifier is supported: %r will parse a year given by either | |||
/// two or four digits. Years 69-00 are interpreted in the 20th cent ury | /// two or four digits. Years 69-00 are interpreted in the 20th cent ury | |||
/// (1969-2000), years 01-68 in the 21th century (2001-2068). | /// (1969-2000), years 01-68 in the 21th century (2001-2068). | |||
/// | ||||
/// Note that in the current implementation all characters other tha | ||||
n format specifiers in | ||||
/// the format string are ignored/not matched against the date/time | ||||
string. This may | ||||
/// lead to non-error results even with nonsense input strings. | ||||
/// This may change in a future version to a more strict behavior. | ||||
/// If more strict format validation of date/time strings is require | ||||
d, a regular | ||||
/// expression could be used for initial validation, before passing | ||||
the string | ||||
/// to DateTimeParser. | ||||
{ | { | |||
public: | public: | |||
static void parse(const std::string& fmt, const std::string& str, Da teTime& dateTime, int& timeZoneDifferential); | static void parse(const std::string& fmt, const std::string& str, Da teTime& dateTime, int& timeZoneDifferential); | |||
/// Parses a date and time in the given format from the give n string. | /// Parses a date and time in the given format from the give n string. | |||
/// Throws a SyntaxException if the string cannot be success fully parsed. | /// Throws a SyntaxException if the string cannot be success fully parsed. | |||
/// Please see DateTimeFormatter::format() for a description of the format string. | /// Please see DateTimeFormatter::format() for a description of the format string. | |||
/// Class DateTimeFormat defines format strings for various standard date/time formats. | /// Class DateTimeFormat defines format strings for various standard date/time formats. | |||
static DateTime parse(const std::string& fmt, const std::string& str , int& timeZoneDifferential); | static DateTime parse(const std::string& fmt, const std::string& str , int& timeZoneDifferential); | |||
/// Parses a date and time in the given format from the give n string. | /// Parses a date and time in the given format from the give n string. | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 13 lines changed or added | |||
Debugger.h | Debugger.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Debugger | // Module: Debugger | |||
// | // | |||
// Definition of the Debugger class. | // Definition of the Debugger class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Debugger_INCLUDED | #ifndef Foundation_Debugger_INCLUDED | |||
#define Foundation_Debugger_INCLUDED | #define Foundation_Debugger_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Debugger | class Foundation_API Debugger | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DeclHandler.h | DeclHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX2-ext DeclHandler Interface. | // SAX2-ext DeclHandler Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_DeclHandler_INCLUDED | #ifndef SAX_DeclHandler_INCLUDED | |||
#define SAX_DeclHandler_INCLUDED | #define SAX_DeclHandler_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DefaultHandler.h | DefaultHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX-2 DefaultHandler class. | // SAX-2 DefaultHandler class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_DefaultHandler_INCLUDED | #ifndef SAX_DefaultHandler_INCLUDED | |||
#define SAX_DefaultHandler_INCLUDED | #define SAX_DefaultHandler_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/EntityResolver.h" | #include "Poco/SAX/EntityResolver.h" | |||
#include "Poco/SAX/DTDHandler.h" | #include "Poco/SAX/DTDHandler.h" | |||
#include "Poco/SAX/ContentHandler.h" | #include "Poco/SAX/ContentHandler.h" | |||
#include "Poco/SAX/ErrorHandler.h" | #include "Poco/SAX/ErrorHandler.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DefaultStrategy.h | DefaultStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: DefaultStrategy | // Module: DefaultStrategy | |||
// | // | |||
// Implementation of the DefaultStrategy template. | // Implementation of the DefaultStrategy template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DefaultStrategy_INCLUDED | #ifndef Foundation_DefaultStrategy_INCLUDED | |||
#define Foundation_DefaultStrategy_INCLUDED | #define Foundation_DefaultStrategy_INCLUDED | |||
#include "Poco/NotificationStrategy.h" | #include "Poco/NotificationStrategy.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs, class TDelegate> | template <class TArgs, class TDelegate> | |||
class DefaultStrategy: public NotificationStrategy<TArgs, TDelegate> | class DefaultStrategy: public NotificationStrategy<TArgs, TDelegate> | |||
/// Default notification strategy. | /// Default notification strategy. | |||
/// | /// | |||
/// Internally, a std::vector<> is used to store | /// Internally, a std::vector<> is used to store | |||
/// delegate objects. Delegates are invoked in the | /// delegate objects. Delegates are invoked in the | |||
/// order in which they have been registered. | /// order in which they have been registered. | |||
{ | { | |||
public: | public: | |||
typedef TDelegate* DelegateHandle; | ||||
typedef SharedPtr<TDelegate> DelegatePtr; | typedef SharedPtr<TDelegate> DelegatePtr; | |||
typedef std::vector<DelegatePtr> Delegates; | typedef std::vector<DelegatePtr> Delegates; | |||
typedef typename Delegates::iterator Iterator; | typedef typename Delegates::iterator Iterator; | |||
public: | public: | |||
DefaultStrategy() | DefaultStrategy() | |||
{ | { | |||
} | } | |||
DefaultStrategy(const DefaultStrategy& s): | DefaultStrategy(const DefaultStrategy& s): | |||
skipping to change at line 82 | skipping to change at line 63 | |||
} | } | |||
void notify(const void* sender, TArgs& arguments) | void notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | |||
{ | { | |||
(*it)->notify(sender, arguments); | (*it)->notify(sender, arguments); | |||
} | } | |||
} | } | |||
void add(const TDelegate& delegate) | DelegateHandle add(const TDelegate& delegate) | |||
{ | { | |||
_delegates.push_back(DelegatePtr(static_cast<TDelegate*>(del | DelegatePtr pDelegate(static_cast<TDelegate*>(delegate.clone | |||
egate.clone()))); | ())); | |||
_delegates.push_back(pDelegate); | ||||
return pDelegate.get(); | ||||
} | } | |||
void remove(const TDelegate& delegate) | void remove(const TDelegate& delegate) | |||
{ | { | |||
for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | |||
{ | { | |||
if (delegate.equals(**it)) | if (delegate.equals(**it)) | |||
{ | { | |||
(*it)->disable(); | (*it)->disable(); | |||
_delegates.erase(it); | _delegates.erase(it); | |||
return; | return; | |||
} | } | |||
} | } | |||
} | } | |||
void remove(DelegateHandle delegateHandle) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (*it == delegateHandle) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
DefaultStrategy& operator = (const DefaultStrategy& s) | ||||
{ | ||||
if (this != &s) | ||||
{ | ||||
_delegates = s._delegates; | ||||
} | ||||
return *this; | ||||
} | ||||
void clear() | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
(*it)->disable(); | ||||
} | ||||
_delegates.clear(); | ||||
} | ||||
bool empty() const | ||||
{ | ||||
return _delegates.empty(); | ||||
} | ||||
protected: | ||||
Delegates _delegates; | ||||
}; | ||||
template <class TDelegate> | ||||
class DefaultStrategy<void,TDelegate>: public NotificationStrategy<void, TD | ||||
elegate> | ||||
/// Default notification strategy. | ||||
/// | ||||
/// Internally, a std::vector<> is used to store | ||||
/// delegate objects. Delegates are invoked in the | ||||
/// order in which they have been registered. | ||||
{ | ||||
public: | ||||
typedef TDelegate* DelegateHandle; | ||||
typedef SharedPtr<TDelegate> DelegatePtr; | ||||
typedef std::vector<DelegatePtr> Delegates; | ||||
typedef typename Delegates::iterator Iterator; | ||||
public: | ||||
DefaultStrategy() | ||||
{ | ||||
} | ||||
DefaultStrategy(const DefaultStrategy& s): | ||||
_delegates(s._delegates) | ||||
{ | ||||
} | ||||
~DefaultStrategy() | ||||
{ | ||||
} | ||||
void notify(const void* sender) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
(*it)->notify(sender); | ||||
} | ||||
} | ||||
DelegateHandle add(const TDelegate& delegate) | ||||
{ | ||||
DelegatePtr pDelegate(static_cast<TDelegate*>(delegate.clone | ||||
())); | ||||
_delegates.push_back(pDelegate); | ||||
return pDelegate.get(); | ||||
} | ||||
void remove(const TDelegate& delegate) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (delegate.equals(**it)) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
void remove(DelegateHandle delegateHandle) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (*it == delegateHandle) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
DefaultStrategy& operator = (const DefaultStrategy& s) | DefaultStrategy& operator = (const DefaultStrategy& s) | |||
{ | { | |||
if (this != &s) | if (this != &s) | |||
{ | { | |||
_delegates = s._delegates; | _delegates = s._delegates; | |||
} | } | |||
return *this; | return *this; | |||
} | } | |||
void clear() | void clear() | |||
End of changes. 5 change blocks. | ||||
35 lines changed or deleted | 123 lines changed or added | |||
DeflatingStream.h | DeflatingStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: ZLibStream | // Module: ZLibStream | |||
// | // | |||
// Definition of the DeflatingStream class. | // Definition of the DeflatingStream class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DeflatingStream_INCLUDED | #ifndef Foundation_DeflatingStream_INCLUDED | |||
#define Foundation_DeflatingStream_INCLUDED | #define Foundation_DeflatingStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
#if defined(POCO_UNBUNDLED) | #if defined(POCO_UNBUNDLED) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Delegate.h | Delegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: Delegate | // Module: Delegate | |||
// | // | |||
// Implementation of the Delegate template. | // Implementation of the Delegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Delegate_INCLUDED | #ifndef Foundation_Delegate_INCLUDED | |||
#define Foundation_Delegate_INCLUDED | #define Foundation_Delegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
#include "Poco/FunctionDelegate.h" | #include "Poco/FunctionDelegate.h" | |||
#include "Poco/Expire.h" | #include "Poco/Expire.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
skipping to change at line 191 | skipping to change at line 171 | |||
protected: | protected: | |||
TObj* _receiverObject; | TObj* _receiverObject; | |||
NotifyMethod _receiverMethod; | NotifyMethod _receiverMethod; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
Delegate(); | Delegate(); | |||
}; | }; | |||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static Delegate<TObj, TArgs, true> delegate(TObj* pObj, void (TObj::*Notify Method)(const void*, TArgs&)) | inline Delegate<TObj, TArgs, true> delegate(TObj* pObj, void (TObj::*Notify Method)(const void*, TArgs&)) | |||
{ | { | |||
return Delegate<TObj, TArgs, true>(pObj, NotifyMethod); | return Delegate<TObj, TArgs, true>(pObj, NotifyMethod); | |||
} | } | |||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static Delegate<TObj, TArgs, false> delegate(TObj* pObj, void (TObj::*Notif yMethod)(TArgs&)) | inline Delegate<TObj, TArgs, false> delegate(TObj* pObj, void (TObj::*Notif yMethod)(TArgs&)) | |||
{ | { | |||
return Delegate<TObj, TArgs, false>(pObj, NotifyMethod); | return Delegate<TObj, TArgs, false>(pObj, NotifyMethod); | |||
} | } | |||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs) | inline Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const void*, TArgs&), Timestamp::TimeDiff expireMillisecs) | |||
{ | { | |||
return Expire<TArgs>(Delegate<TObj, TArgs, true>(pObj, NotifyMethod) , expireMillisecs); | return Expire<TArgs>(Delegate<TObj, TArgs, true>(pObj, NotifyMethod) , expireMillisecs); | |||
} | } | |||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs& ), Timestamp::TimeDiff expireMillisecs) | inline Expire<TArgs> delegate(TObj* pObj, void (TObj::*NotifyMethod)(TArgs& ), Timestamp::TimeDiff expireMillisecs) | |||
{ | { | |||
return Expire<TArgs>(Delegate<TObj, TArgs, false>(pObj, NotifyMethod ), expireMillisecs); | return Expire<TArgs>(Delegate<TObj, TArgs, false>(pObj, NotifyMethod ), expireMillisecs); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static Expire<TArgs> delegate(void (*NotifyMethod)(const void*, TArgs&), Ti mestamp::TimeDiff expireMillisecs) | inline Expire<TArgs> delegate(void (*NotifyMethod)(const void*, TArgs&), Ti mestamp::TimeDiff expireMillisecs) | |||
{ | { | |||
return Expire<TArgs>(FunctionDelegate<TArgs, true, true>(NotifyMetho d), expireMillisecs); | return Expire<TArgs>(FunctionDelegate<TArgs, true, true>(NotifyMetho d), expireMillisecs); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static Expire<TArgs> delegate(void (*NotifyMethod)(void*, TArgs&), Timestam p::TimeDiff expireMillisecs) | inline Expire<TArgs> delegate(void (*NotifyMethod)(void*, TArgs&), Timestam p::TimeDiff expireMillisecs) | |||
{ | { | |||
return Expire<TArgs>(FunctionDelegate<TArgs, true, false>(NotifyMeth od), expireMillisecs); | return Expire<TArgs>(FunctionDelegate<TArgs, true, false>(NotifyMeth od), expireMillisecs); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static Expire<TArgs> delegate(void (*NotifyMethod)(TArgs&), Timestamp::Time Diff expireMillisecs) | inline Expire<TArgs> delegate(void (*NotifyMethod)(TArgs&), Timestamp::Time Diff expireMillisecs) | |||
{ | { | |||
return Expire<TArgs>(FunctionDelegate<TArgs, false>(NotifyMethod), e xpireMillisecs); | return Expire<TArgs>(FunctionDelegate<TArgs, false>(NotifyMethod), e xpireMillisecs); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static FunctionDelegate<TArgs, true, true> delegate(void (*NotifyMethod)(co nst void*, TArgs&)) | inline FunctionDelegate<TArgs, true, true> delegate(void (*NotifyMethod)(co nst void*, TArgs&)) | |||
{ | { | |||
return FunctionDelegate<TArgs, true, true>(NotifyMethod); | return FunctionDelegate<TArgs, true, true>(NotifyMethod); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static FunctionDelegate<TArgs, true, false> delegate(void (*NotifyMethod)(v oid*, TArgs&)) | inline FunctionDelegate<TArgs, true, false> delegate(void (*NotifyMethod)(v oid*, TArgs&)) | |||
{ | { | |||
return FunctionDelegate<TArgs, true, false>(NotifyMethod); | return FunctionDelegate<TArgs, true, false>(NotifyMethod); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static FunctionDelegate<TArgs, false> delegate(void (*NotifyMethod)(TArgs&) ) | inline FunctionDelegate<TArgs, false> delegate(void (*NotifyMethod)(TArgs&) ) | |||
{ | { | |||
return FunctionDelegate<TArgs, false>(NotifyMethod); | return FunctionDelegate<TArgs, false>(NotifyMethod); | |||
} | } | |||
template <class TObj> | ||||
class Delegate<TObj,void,true>: public AbstractDelegate<void> | ||||
{ | ||||
public: | ||||
typedef void (TObj::*NotifyMethod)(const void*); | ||||
Delegate(TObj* obj, NotifyMethod method): | ||||
_receiverObject(obj), | ||||
_receiverMethod(method) | ||||
{ | ||||
} | ||||
Delegate(const Delegate& delegate): | ||||
AbstractDelegate<void>(delegate), | ||||
_receiverObject(delegate._receiverObject), | ||||
_receiverMethod(delegate._receiverMethod) | ||||
{ | ||||
} | ||||
~Delegate() | ||||
{ | ||||
} | ||||
Delegate& operator = (const Delegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_receiverObject = delegate._receiverObject; | ||||
this->_receiverMethod = delegate._receiverMethod; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_receiverObject) | ||||
{ | ||||
(_receiverObject->*_receiverMethod)(sender); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const Delegate* pOtherDelegate = reinterpret_cast<const Dele | ||||
gate*>(other.unwrap()); | ||||
return pOtherDelegate && _receiverObject == pOtherDelegate-> | ||||
_receiverObject && _receiverMethod == pOtherDelegate->_receiverMethod; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new Delegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_receiverObject = 0; | ||||
} | ||||
protected: | ||||
TObj* _receiverObject; | ||||
NotifyMethod _receiverMethod; | ||||
Mutex _mutex; | ||||
private: | ||||
Delegate(); | ||||
}; | ||||
template <class TObj> | ||||
class Delegate<TObj, void, false>: public AbstractDelegate<void> | ||||
{ | ||||
public: | ||||
typedef void (TObj::*NotifyMethod)(); | ||||
Delegate(TObj* obj, NotifyMethod method): | ||||
_receiverObject(obj), | ||||
_receiverMethod(method) | ||||
{ | ||||
} | ||||
Delegate(const Delegate& delegate): | ||||
AbstractDelegate<void>(delegate), | ||||
_receiverObject(delegate._receiverObject), | ||||
_receiverMethod(delegate._receiverMethod) | ||||
{ | ||||
} | ||||
~Delegate() | ||||
{ | ||||
} | ||||
Delegate& operator = (const Delegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_pTarget = delegate._pTarget; | ||||
this->_receiverObject = delegate._receiverObject; | ||||
this->_receiverMethod = delegate._receiverMethod; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void*) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_receiverObject) | ||||
{ | ||||
(_receiverObject->*_receiverMethod)(); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const Delegate* pOtherDelegate = reinterpret_cast<const Dele | ||||
gate*>(other.unwrap()); | ||||
return pOtherDelegate && _receiverObject == pOtherDelegate-> | ||||
_receiverObject && _receiverMethod == pOtherDelegate->_receiverMethod; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new Delegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_receiverObject = 0; | ||||
} | ||||
protected: | ||||
TObj* _receiverObject; | ||||
NotifyMethod _receiverMethod; | ||||
Mutex _mutex; | ||||
private: | ||||
Delegate(); | ||||
}; | ||||
template <class TObj> | ||||
inline Delegate<TObj, void, true> delegate(TObj* pObj, void (TObj::*NotifyM | ||||
ethod)(const void*)) | ||||
{ | ||||
return Delegate<TObj, void, true>(pObj, NotifyMethod); | ||||
} | ||||
template <class TObj> | ||||
inline Delegate<TObj, void, false> delegate(TObj* pObj, void (TObj::*Notify | ||||
Method)()) | ||||
{ | ||||
return Delegate<TObj, void, false>(pObj, NotifyMethod); | ||||
} | ||||
template <class TObj> | ||||
inline Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(const v | ||||
oid*), Timestamp::TimeDiff expireMillisecs) | ||||
{ | ||||
return Expire<void>(Delegate<TObj, void, true>(pObj, NotifyMethod), | ||||
expireMillisecs); | ||||
} | ||||
template <class TObj> | ||||
inline Expire<void> delegate(TObj* pObj, void (TObj::*NotifyMethod)(), Time | ||||
stamp::TimeDiff expireMillisecs) | ||||
{ | ||||
return Expire<void>(Delegate<TObj, void, false>(pObj, NotifyMethod), | ||||
expireMillisecs); | ||||
} | ||||
inline Expire<void> delegate(void (*NotifyMethod)(const void*), Timestamp:: | ||||
TimeDiff expireMillisecs) | ||||
{ | ||||
return Expire<void>(FunctionDelegate<void, true, true>(NotifyMethod) | ||||
, expireMillisecs); | ||||
} | ||||
inline Expire<void> delegate(void (*NotifyMethod)(void*), Timestamp::TimeDi | ||||
ff expireMillisecs) | ||||
{ | ||||
return Expire<void>(FunctionDelegate<void, true, false>(NotifyMethod | ||||
), expireMillisecs); | ||||
} | ||||
inline Expire<void> delegate(void (*NotifyMethod)(), Timestamp::TimeDiff ex | ||||
pireMillisecs) | ||||
{ | ||||
return Expire<void>(FunctionDelegate<void, false>(NotifyMethod), exp | ||||
ireMillisecs); | ||||
} | ||||
inline FunctionDelegate<void, true, true> delegate(void (*NotifyMethod)(con | ||||
st void*)) | ||||
{ | ||||
return FunctionDelegate<void, true, true>(NotifyMethod); | ||||
} | ||||
inline FunctionDelegate<void, true, false> delegate(void (*NotifyMethod)(vo | ||||
id*)) | ||||
{ | ||||
return FunctionDelegate<void, true, false>(NotifyMethod); | ||||
} | ||||
inline FunctionDelegate<void, false> delegate(void (*NotifyMethod)()) | ||||
{ | ||||
return FunctionDelegate<void, false>(NotifyMethod); | ||||
} | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Delegate_INCLUDED | #endif // Foundation_Delegate_INCLUDED | |||
End of changes. 12 change blocks. | ||||
42 lines changed or deleted | 224 lines changed or added | |||
DialogSocket.h | DialogSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: DialogSocket | // Module: DialogSocket | |||
// | // | |||
// Definition of the DialogSocket class. | // Definition of the DialogSocket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_DialogSocket_INCLUDED | #ifndef Net_DialogSocket_INCLUDED | |||
#define Net_DialogSocket_INCLUDED | #define Net_DialogSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DigestEngine.h | DigestEngine.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: DigestEngine | // Module: DigestEngine | |||
// | // | |||
// Definition of class DigestEngine. | // Definition of class DigestEngine. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DigestEngine_INCLUDED | #ifndef Foundation_DigestEngine_INCLUDED | |||
#define Foundation_DigestEngine_INCLUDED | #define Foundation_DigestEngine_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 81 | skipping to change at line 61 | |||
/// Resets the engine so that a new | /// Resets the engine so that a new | |||
/// digest can be computed. | /// digest can be computed. | |||
virtual const Digest& digest() = 0; | virtual const Digest& digest() = 0; | |||
/// Finishes the computation of the digest and | /// Finishes the computation of the digest and | |||
/// returns the message digest. Resets the engine | /// returns the message digest. Resets the engine | |||
/// and can thus only be called once for every digest. | /// and can thus only be called once for every digest. | |||
/// 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 destroy ed. | /// time digest() is called, or the engine object is destroy ed. | |||
static std::string digestToHex(const Digest& bytes); | static std::string digestToHex(const Digest& bytes); | |||
/// Converts a message digest into a string of hexadecimal | /// Converts a message digest into a string of hexadecimal n | |||
numbers. | umbers. | |||
static Digest digestFromHex(const std::string& digest); | static Digest digestFromHex(const std::string& digest); | |||
/// Converts a string created by digestToHex back to its Di | /// Converts a string created by digestToHex back to its Dig | |||
gest presentation | est 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 impleme | /// Updates the digest with the given data. Must be implemen | |||
nted | ted | |||
/// by subclasses. | /// by subclasses. | |||
private: | private: | |||
DigestEngine(const DigestEngine&); | DigestEngine(const DigestEngine&); | |||
DigestEngine& operator = (const DigestEngine&); | DigestEngine& operator = (const DigestEngine&); | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
End of changes. 4 change blocks. | ||||
41 lines changed or deleted | 10 lines changed or added | |||
DigestStream.h | DigestStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: DigestStream | // Module: DigestStream | |||
// | // | |||
// Definition of classes DigestInputStream and DigestOutputStream. | // Definition of classes DigestInputStream and DigestOutputStream. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DigestStream_INCLUDED | #ifndef Foundation_DigestStream_INCLUDED | |||
#define Foundation_DigestStream_INCLUDED | #define Foundation_DigestStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include "Poco/DigestEngine.h" | #include "Poco/DigestEngine.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DirectoryIterator.h | DirectoryIterator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryIterator | // Module: DirectoryIterator | |||
// | // | |||
// Definition of the DirectoryIterator class. | // Definition of the DirectoryIterator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryIterator_INCLUDED | #ifndef Foundation_DirectoryIterator_INCLUDED | |||
#define Foundation_DirectoryIterator_INCLUDED | #define Foundation_DirectoryIterator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/File.h" | #include "Poco/File.h" | |||
#include "Poco/Path.h" | #include "Poco/Path.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 79 | skipping to change at line 59 | |||
DirectoryIterator(const DirectoryIterator& iterator); | DirectoryIterator(const DirectoryIterator& iterator); | |||
/// Creates a directory iterator for the given path. | /// Creates a directory iterator for the given path. | |||
DirectoryIterator(const File& file); | DirectoryIterator(const File& file); | |||
/// Creates a directory iterator for the given file. | /// Creates a directory iterator for the given file. | |||
DirectoryIterator(const Path& path); | DirectoryIterator(const Path& path); | |||
/// Creates a directory iterator for the given path. | /// Creates a directory iterator for the given path. | |||
~DirectoryIterator(); | virtual ~DirectoryIterator(); | |||
/// Destroys the DirectoryIterator. | /// Destroys the DirectoryIterator. | |||
const std::string& name() const; | const std::string& name() const; | |||
/// Returns the current filename. | /// Returns the current filename. | |||
const Path& path() const; | const Path& path() const; | |||
/// Returns the current path. | /// Returns the current path. | |||
DirectoryIterator& operator = (const DirectoryIterator& it); | DirectoryIterator& operator = (const DirectoryIterator& it); | |||
DirectoryIterator& operator = (const File& file); | DirectoryIterator& operator = (const File& file); | |||
DirectoryIterator& operator = (const Path& path); | DirectoryIterator& operator = (const Path& path); | |||
DirectoryIterator& operator = (const std::string& path); | DirectoryIterator& operator = (const std::string& path); | |||
DirectoryIterator& operator ++ (); // prefix | virtual DirectoryIterator& operator ++ (); // prefix | |||
//@ deprecated | //@ deprecated | |||
DirectoryIterator operator ++ (int); // postfix | DirectoryIterator operator ++ (int); // postfix | |||
/// Please use the prefix increment operator instead. | /// Please use the prefix increment operator instead. | |||
const File& operator * () const; | const File& operator * () const; | |||
File& operator * (); | File& operator * (); | |||
const File* operator -> () const; | const File* operator -> () const; | |||
File* operator -> (); | File* operator -> (); | |||
bool operator == (const DirectoryIterator& iterator) const; | bool operator == (const DirectoryIterator& iterator) const; | |||
bool operator != (const DirectoryIterator& iterator) const; | bool operator != (const DirectoryIterator& iterator) const; | |||
private: | protected: | |||
Path _path; | Path _path; | |||
File _file; | File _file; | |||
private: | ||||
DirectoryIteratorImpl* _pImpl; | DirectoryIteratorImpl* _pImpl; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline const std::string& DirectoryIterator::name() const | inline const std::string& DirectoryIterator::name() const | |||
{ | { | |||
return _path.getFileName(); | return _path.getFileName(); | |||
} | } | |||
End of changes. 5 change blocks. | ||||
35 lines changed or deleted | 6 lines changed or added | |||
DirectoryIterator_UNIX.h | DirectoryIterator_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryIterator | // Module: DirectoryIterator | |||
// | // | |||
// Definition of the DirectoryIteratorImpl class for UNIX. | // Definition of the DirectoryIteratorImpl class for UNIX. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryIterator_UNIX_INCLUDED | #ifndef Foundation_DirectoryIterator_UNIX_INCLUDED | |||
#define Foundation_DirectoryIterator_UNIX_INCLUDED | #define Foundation_DirectoryIterator_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <dirent.h> | #include <dirent.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DirectoryIterator_VMS.h | DirectoryIterator_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryIterator | // Module: DirectoryIterator | |||
// | // | |||
// Definition of the DirectoryIteratorImpl class for OpenVMS. | // Definition of the DirectoryIteratorImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryIterator_VMS_INCLUDED | #ifndef Foundation_DirectoryIterator_VMS_INCLUDED | |||
#define Foundation_DirectoryIterator_VMS_INCLUDED | #define Foundation_DirectoryIterator_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <rms.h> | #include <rms.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DirectoryIterator_WIN32.h | DirectoryIterator_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryIterator | // Module: DirectoryIterator | |||
// | // | |||
// Definition of the DirectoryIteratorImpl class for WIN32. | // Definition of the DirectoryIteratorImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryIterator_WIN32_INCLUDED | #ifndef Foundation_DirectoryIterator_WIN32_INCLUDED | |||
#define Foundation_DirectoryIterator_WIN32_INCLUDED | #define Foundation_DirectoryIterator_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DirectoryIterator_WIN32U.h | DirectoryIterator_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryIterator | // Module: DirectoryIterator | |||
// | // | |||
// Definition of the DirectoryIteratorImpl class for WIN32. | // Definition of the DirectoryIteratorImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryIterator_WIN32U_INCLUDED | #ifndef Foundation_DirectoryIterator_WIN32U_INCLUDED | |||
#define Foundation_DirectoryIterator_WIN32U_INCLUDED | #define Foundation_DirectoryIterator_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DirectoryWatcher.h | DirectoryWatcher.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: DirectoryWatcher | // Module: DirectoryWatcher | |||
// | // | |||
// Definition of the DirectoryWatcher class. | // Definition of the DirectoryWatcher class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DirectoryWatcher_INCLUDED | #ifndef Foundation_DirectoryWatcher_INCLUDED | |||
#define Foundation_DirectoryWatcher_INCLUDED | #define Foundation_DirectoryWatcher_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#ifndef POCO_NO_INOTIFY | ||||
#include "Poco/File.h" | #include "Poco/File.h" | |||
#include "Poco/BasicEvent.h" | #include "Poco/BasicEvent.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/AtomicCounter.h" | #include "Poco/AtomicCounter.h" | |||
namespace Poco { | namespace Poco { | |||
class DirectoryWatcherStrategy; | class DirectoryWatcherStrategy; | |||
skipping to change at line 99 | skipping to change at line 82 | |||
DW_ITEM_REMOVED = 2, | DW_ITEM_REMOVED = 2, | |||
/// An item has been removed from the directory. | /// An item has been removed from the directory. | |||
DW_ITEM_MODIFIED = 4, | DW_ITEM_MODIFIED = 4, | |||
/// An item has been modified. | /// An item has been modified. | |||
DW_ITEM_MOVED_FROM = 8, | DW_ITEM_MOVED_FROM = 8, | |||
/// An item has been renamed or moved. This event de livers the old name. | /// An item has been renamed or moved. This event de livers the old name. | |||
DW_ITEM_MOVED_TO = 16, | DW_ITEM_MOVED_TO = 16 | |||
/// An item has been renamed or moved. This event de livers the new name. | /// An item has been renamed or moved. This event de livers the new name. | |||
}; | }; | |||
enum DirectoryEventMask | enum DirectoryEventMask | |||
{ | { | |||
DW_FILTER_ENABLE_ALL = 31, | DW_FILTER_ENABLE_ALL = 31, | |||
/// Enables all event types. | /// Enables all event types. | |||
DW_FILTER_DISABLE_ALL = 0 | DW_FILTER_DISABLE_ALL = 0 | |||
/// Disables all event types. | /// Disables all event types. | |||
skipping to change at line 233 | skipping to change at line 216 | |||
return _scanInterval; | return _scanInterval; | |||
} | } | |||
inline const File& DirectoryWatcher::directory() const | inline const File& DirectoryWatcher::directory() const | |||
{ | { | |||
return _directory; | return _directory; | |||
} | } | |||
} // namespace Poco | } // namespace Poco | |||
#endif // POCO_NO_INOTIFY | ||||
#endif // Foundation_DirectoryWatcher_INCLUDED | #endif // Foundation_DirectoryWatcher_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
Document.h | Document.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Document class. | // Definition of the DOM Document class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Document_INCLUDED | #ifndef DOM_Document_INCLUDED | |||
#define DOM_Document_INCLUDED | #define DOM_Document_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractContainerNode.h" | #include "Poco/DOM/AbstractContainerNode.h" | |||
#include "Poco/DOM/DocumentEvent.h" | #include "Poco/DOM/DocumentEvent.h" | |||
#include "Poco/DOM/Element.h" | #include "Poco/DOM/Element.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DocumentEvent.h | DocumentEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM DocumentEvent interface. | // Definition of the DOM DocumentEvent interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DocumentEvent_INCLUDED | #ifndef DOM_DocumentEvent_INCLUDED | |||
#define DOM_DocumentEvent_INCLUDED | #define DOM_DocumentEvent_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DocumentFragment.h | DocumentFragment.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM DocumentFragment class. | // Definition of the DOM DocumentFragment class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DocumentFragment_INCLUDED | #ifndef DOM_DocumentFragment_INCLUDED | |||
#define DOM_DocumentFragment_INCLUDED | #define DOM_DocumentFragment_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractContainerNode.h" | #include "Poco/DOM/AbstractContainerNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DocumentType.h | DocumentType.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM DocumentType class. | // Definition of the DOM DocumentType class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_DocumentType_INCLUDED | #ifndef DOM_DocumentType_INCLUDED | |||
#define DOM_DocumentType_INCLUDED | #define DOM_DocumentType_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractContainerNode.h" | #include "Poco/DOM/AbstractContainerNode.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DynamicAny.h | DynamicAny.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: Var | // Module: Var | |||
// | // | |||
// Forward header for Var class to maintain backward compatibility. | // Forward header for Var class to maintain backward compatibility. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DynamicAny_INCLUDED | #ifndef Foundation_DynamicAny_INCLUDED | |||
#define Foundation_DynamicAny_INCLUDED | #define Foundation_DynamicAny_INCLUDED | |||
//@ deprecated | //@ deprecated | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#endif // Foundation_DynamicAny_INCLUDED | #endif // Foundation_DynamicAny_INCLUDED | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DynamicAnyHolder.h | DynamicAnyHolder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: VarHolder | // Module: VarHolder | |||
// | // | |||
// Forward header for VarHolder class to maintain backward compatibility | // Forward header for VarHolder class to maintain backward compatibility | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DynamicAnyHolder_INCLUDED | #ifndef Foundation_DynamicAnyHolder_INCLUDED | |||
#define Foundation_DynamicAnyHolder_INCLUDED | #define Foundation_DynamicAnyHolder_INCLUDED | |||
//@ deprecated | //@ deprecated | |||
#include "Poco/Dynamic/VarHolder.h" | #include "Poco/Dynamic/VarHolder.h" | |||
#endif // Foundation_DynamicAnyHolder_INCLUDED | #endif // Foundation_DynamicAnyHolder_INCLUDED | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DynamicFactory.h | DynamicFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: DynamicFactory | // Module: DynamicFactory | |||
// | // | |||
// Definition of the DynamicFactory class. | // Definition of the DynamicFactory class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DynamicFactory_INCLUDED | #ifndef Foundation_DynamicFactory_INCLUDED | |||
#define Foundation_DynamicFactory_INCLUDED | #define Foundation_DynamicFactory_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Instantiator.h" | #include "Poco/Instantiator.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <map> | #include <map> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
DynamicStruct.h | DynamicStruct.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: Struct | // Module: Struct | |||
// | // | |||
// Forward header for Struct class to maintain backward compatibility. | // Forward header for Struct class to maintain backward compatibility. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_DynamicStruct_INCLUDED | #ifndef Foundation_DynamicStruct_INCLUDED | |||
#define Foundation_DynamicStruct_INCLUDED | #define Foundation_DynamicStruct_INCLUDED | |||
//@ deprecated | //@ deprecated | |||
#include "Poco/Dynamic/Struct.h" | #include "Poco/Dynamic/Struct.h" | |||
#endif // Foundation_DynamicStruct_INCLUDED | #endif // Foundation_DynamicStruct_INCLUDED | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Element.h | Element.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Element class. | // Definition of the DOM Element class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Element_INCLUDED | #ifndef DOM_Element_INCLUDED | |||
#define DOM_Element_INCLUDED | #define DOM_Element_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractContainerNode.h" | #include "Poco/DOM/AbstractContainerNode.h" | |||
#include "Poco/XML/Name.h" | #include "Poco/XML/Name.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ElementsByTagNameList.h | ElementsByTagNameList.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the ElementsByTagNameList and ElementsByTagNameListNS clas ses. | // Definition of the ElementsByTagNameList and ElementsByTagNameListNS clas ses. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_ElementsByTagNameList_INCLUDED | #ifndef DOM_ElementsByTagNameList_INCLUDED | |||
#define DOM_ElementsByTagNameList_INCLUDED | #define DOM_ElementsByTagNameList_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/NodeList.h" | #include "Poco/DOM/NodeList.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Entity.h | Entity.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Entity class. | // Definition of the DOM Entity class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Entity_INCLUDED | #ifndef DOM_Entity_INCLUDED | |||
#define DOM_Entity_INCLUDED | #define DOM_Entity_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractContainerNode.h" | #include "Poco/DOM/AbstractContainerNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EntityReference.h | EntityReference.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM EntityReference class. | // Definition of the DOM EntityReference class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_EntityReference_INCLUDED | #ifndef DOM_EntityReference_INCLUDED | |||
#define DOM_EntityReference_INCLUDED | #define DOM_EntityReference_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EntityResolver.h | EntityResolver.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX EntityResolver Interface. | // SAX EntityResolver Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_EntityResolver_INCLUDED | #ifndef SAX_EntityResolver_INCLUDED | |||
#define SAX_EntityResolver_INCLUDED | #define SAX_EntityResolver_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EntityResolverImpl.h | EntityResolverImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// An implementation of EntityResolver. | // An implementation of EntityResolver. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_EntityResolverImpl_INCLUDED | #ifndef SAX_EntityResolverImpl_INCLUDED | |||
#define SAX_EntityResolverImpl_INCLUDED | #define SAX_EntityResolverImpl_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/SAX/EntityResolver.h" | #include "Poco/SAX/EntityResolver.h" | |||
#include "Poco/URIStreamOpener.h" | #include "Poco/URIStreamOpener.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment.h | Environment.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the Environment class. | // Definition of the Environment class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_INCLUDED | #ifndef Foundation_Environment_INCLUDED | |||
#define Foundation_Environment_INCLUDED | #define Foundation_Environment_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Environment | class Foundation_API Environment | |||
skipping to change at line 80 | skipping to change at line 60 | |||
static std::string osName(); | static std::string osName(); | |||
/// Returns the operating system name. | /// Returns the operating system name. | |||
static std::string osDisplayName(); | static std::string osDisplayName(); | |||
/// Returns the operating system name in a | /// Returns the operating system name in a | |||
/// "user-friendly" way. | /// "user-friendly" way. | |||
/// | /// | |||
/// Currently this is only implemented for | /// Currently this is only implemented for | |||
/// Windows. There it will return names like | /// Windows. There it will return names like | |||
/// "Windows XP" or "Windows 7/Server 2008 SP2". | /// "Windows XP" or "Windows 7/Server 2008 SP2". | |||
/// On other platform, returns the same as | /// On other platforms, returns the same as | |||
/// osName(). | /// osName(). | |||
static std::string osVersion(); | static std::string osVersion(); | |||
/// Returns the operating system version. | /// Returns the operating system version. | |||
static std::string osArchitecture(); | static std::string osArchitecture(); | |||
/// Returns the operating system architecture. | /// Returns the operating system architecture. | |||
static std::string nodeName(); | static std::string nodeName(); | |||
/// Returns the node (or host) name. | /// Returns the node (or host) name. | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
Environment_UNIX.h | Environment_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for Unix. | // Definition of the EnvironmentImpl class for Unix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_UNIX_INCLUDED | #ifndef Foundation_Environment_UNIX_INCLUDED | |||
#define Foundation_Environment_UNIX_INCLUDED | #define Foundation_Environment_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment_VMS.h | Environment_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for OpenVMS. | // Definition of the EnvironmentImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_VMS_INCLUDED | #ifndef Foundation_Environment_VMS_INCLUDED | |||
#define Foundation_Environment_VMS_INCLUDED | #define Foundation_Environment_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment_VX.h | Environment_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for VxWorks. | // Definition of the EnvironmentImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_VX_INCLUDED | #ifndef Foundation_Environment_VX_INCLUDED | |||
#define Foundation_Environment_VX_INCLUDED | #define Foundation_Environment_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment_WIN32.h | Environment_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for WIN32. | // Definition of the EnvironmentImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_WIN32_INCLUDED | #ifndef Foundation_Environment_WIN32_INCLUDED | |||
#define Foundation_Environment_WIN32_INCLUDED | #define Foundation_Environment_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API EnvironmentImpl | class Foundation_API EnvironmentImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment_WIN32U.h | Environment_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for WIN32. | // Definition of the EnvironmentImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_WIN32U_INCLUDED | #ifndef Foundation_Environment_WIN32U_INCLUDED | |||
#define Foundation_Environment_WIN32U_INCLUDED | #define Foundation_Environment_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API EnvironmentImpl | class Foundation_API EnvironmentImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Environment_WINCE.h | Environment_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Environment | // Module: Environment | |||
// | // | |||
// Definition of the EnvironmentImpl class for WINCE. | // Definition of the EnvironmentImpl class for WINCE. | |||
// | // | |||
// Copyright (c) 2009-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Environment_WINCE_INCLUDED | #ifndef Foundation_Environment_WINCE_INCLUDED | |||
#define Foundation_Environment_WINCE_INCLUDED | #define Foundation_Environment_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API EnvironmentImpl | class Foundation_API EnvironmentImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ErrorHandler.h | ErrorHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ErrorHandler | // Module: ErrorHandler | |||
// | // | |||
// Definition of the ErrorHandler class. | // Definition of the ErrorHandler class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ErrorHandler_INCLUDED | #ifndef Foundation_ErrorHandler_INCLUDED | |||
#define Foundation_ErrorHandler_INCLUDED | #define Foundation_ErrorHandler_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Event.h | Event.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Event | // Module: Event | |||
// | // | |||
// Definition of the Event class. | // Definition of the Event class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Event_INCLUDED | #ifndef Foundation_Event_INCLUDED | |||
#define Foundation_Event_INCLUDED | #define Foundation_Event_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#include "Poco/Event_WIN32.h" | #include "Poco/Event_WIN32.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventArgs.h | EventArgs.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: EventArgs | // Module: EventArgs | |||
// | // | |||
// Definition of EventArgs. | // Definition of EventArgs. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_EventArgs_INCLUDED | #ifndef Foundation_EventArgs_INCLUDED | |||
#define Foundation_EventArgs_INCLUDED | #define Foundation_EventArgs_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API EventArgs | class Foundation_API EventArgs | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventDispatcher.h | EventDispatcher.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMEvents | // Module: DOMEvents | |||
// | // | |||
// Definition of the EventDispatcher class. | // Definition of the EventDispatcher class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_EventDispatcher_INCLUDED | #ifndef DOM_EventDispatcher_INCLUDED | |||
#define DOM_EventDispatcher_INCLUDED | #define DOM_EventDispatcher_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include <list> | #include <list> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventException.h | EventException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMEvents | // Module: DOMEvents | |||
// | // | |||
// Definition of the DOM EventException class. | // Definition of the DOM EventException class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_EventException_INCLUDED | #ifndef DOM_EventException_INCLUDED | |||
#define DOM_EventException_INCLUDED | #define DOM_EventException_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLException.h" | #include "Poco/XML/XMLException.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventListener.h | EventListener.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMEvents | // Module: DOMEvents | |||
// | // | |||
// Definition of the DOM EventListener interface. | // Definition of the DOM EventListener interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_EventListener_INCLUDED | #ifndef DOM_EventListener_INCLUDED | |||
#define DOM_EventListener_INCLUDED | #define DOM_EventListener_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventLogChannel.h | EventLogChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: EventLogChannel | // Module: EventLogChannel | |||
// | // | |||
// Definition of the EventLogChannel class specific to WIN32. | // Definition of the EventLogChannel class specific to WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_EventLogChannel_INCLUDED | #ifndef Foundation_EventLogChannel_INCLUDED | |||
#define Foundation_EventLogChannel_INCLUDED | #define Foundation_EventLogChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
EventTarget.h | EventTarget.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMEvents | // Module: DOMEvents | |||
// | // | |||
// Definition of the DOM EventTarget interface. | // Definition of the DOM EventTarget interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_EventTarget_INCLUDED | #ifndef DOM_EventTarget_INCLUDED | |||
#define DOM_EventTarget_INCLUDED | #define DOM_EventTarget_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/DOMObject.h" | #include "Poco/DOM/DOMObject.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Event_POSIX.h | Event_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Event | // Module: Event | |||
// | // | |||
// Definition of the EventImpl class for POSIX Threads. | // Definition of the EventImpl class for POSIX Threads. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Event_POSIX_INCLUDED | #ifndef Foundation_Event_POSIX_INCLUDED | |||
#define Foundation_Event_POSIX_INCLUDED | #define Foundation_Event_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Event_VX.h | Event_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Event | // Module: Event | |||
// | // | |||
// Definition of the EventImpl class for VxWorks. | // Definition of the EventImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Event_VX_INCLUDED | #ifndef Foundation_Event_VX_INCLUDED | |||
#define Foundation_Event_VX_INCLUDED | #define Foundation_Event_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <semLib.h> | #include <semLib.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Event_WIN32.h | Event_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Event | // Module: Event | |||
// | // | |||
// Definition of the EventImpl class for WIN32. | // Definition of the EventImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Event_WIN32_INCLUDED | #ifndef Foundation_Event_WIN32_INCLUDED | |||
#define Foundation_Event_WIN32_INCLUDED | #define Foundation_Event_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Exception.h | Exception.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Exception | // Module: Exception | |||
// | // | |||
// Definition of various Poco exception classes. | // Definition of various Poco exception classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Exception_INCLUDED | #ifndef Foundation_Exception_INCLUDED | |||
#define Foundation_Exception_INCLUDED | #define Foundation_Exception_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <stdexcept> | #include <stdexcept> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ExpirationDecorator.h | ExpirationDecorator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: ExpirationDecorator | // Module: ExpirationDecorator | |||
// | // | |||
// Implementation of the ExpirationDecorator template. | // Implementation of the ExpirationDecorator template. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ExpirationDecorator_INCLUDED | #ifndef Foundation_ExpirationDecorator_INCLUDED | |||
#define Foundation_ExpirationDecorator_INCLUDED | #define Foundation_ExpirationDecorator_INCLUDED | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Expire.h | Expire.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: Expire | // Module: Expire | |||
// | // | |||
// Implementation of the Expire template. | // Implementation of the Expire template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Expire_INCLUDED | #ifndef Foundation_Expire_INCLUDED | |||
#define Foundation_Expire_INCLUDED | #define Foundation_Expire_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 127 | skipping to change at line 107 | |||
} | } | |||
AbstractDelegate<TArgs>* _pDelegate; | AbstractDelegate<TArgs>* _pDelegate; | |||
Timestamp::TimeDiff _expire; | Timestamp::TimeDiff _expire; | |||
Timestamp _creationTime; | Timestamp _creationTime; | |||
private: | private: | |||
Expire(); | Expire(); | |||
}; | }; | |||
template <> | ||||
class Expire<void>: public AbstractDelegate<void> | ||||
/// Decorator for AbstractDelegate adding automatic | ||||
/// expiration of registrations to AbstractDelegate's. | ||||
{ | ||||
public: | ||||
Expire(const AbstractDelegate<void>& p, Timestamp::TimeDiff expireMi | ||||
llisecs): | ||||
_pDelegate(p.clone()), | ||||
_expire(expireMillisecs*1000) | ||||
{ | ||||
} | ||||
Expire(const Expire& expire): | ||||
AbstractDelegate<void>(expire), | ||||
_pDelegate(expire._pDelegate->clone()), | ||||
_expire(expire._expire), | ||||
_creationTime(expire._creationTime) | ||||
{ | ||||
} | ||||
~Expire() | ||||
{ | ||||
delete _pDelegate; | ||||
} | ||||
Expire& operator = (const Expire& expire) | ||||
{ | ||||
if (&expire != this) | ||||
{ | ||||
delete this->_pDelegate; | ||||
this->_pDelegate = expire._pDelegate->clone(); | ||||
this->_expire = expire._expire; | ||||
this->_creationTime = expire._creationTime; | ||||
//this->_pTarget = expire._pTarget; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
if (!expired()) | ||||
return this->_pDelegate->notify(sender); | ||||
else | ||||
return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
return other.equals(*_pDelegate); | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new Expire(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
_pDelegate->disable(); | ||||
} | ||||
const AbstractDelegate<void>* unwrap() const | ||||
{ | ||||
return this->_pDelegate; | ||||
} | ||||
protected: | ||||
bool expired() const | ||||
{ | ||||
return _creationTime.isElapsed(_expire); | ||||
} | ||||
AbstractDelegate<void>* _pDelegate; | ||||
Timestamp::TimeDiff _expire; | ||||
Timestamp _creationTime; | ||||
private: | ||||
Expire(); | ||||
}; | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Expire_INCLUDED | #endif // Foundation_Expire_INCLUDED | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 82 lines changed or added | |||
ExpireCache.h | ExpireCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: ExpireCache | // Module: ExpireCache | |||
// | // | |||
// Definition of the ExpireCache class. | // Definition of the ExpireCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ExpireCache_INCLUDED | #ifndef Foundation_ExpireCache_INCLUDED | |||
#define Foundation_ExpireCache_INCLUDED | #define Foundation_ExpireCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/ExpireStrategy.h" | #include "Poco/ExpireStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ExpireLRUCache.h | ExpireLRUCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: ExpireLRUCache | // Module: ExpireLRUCache | |||
// | // | |||
// Definition of the ExpireLRUCache class. | // Definition of the ExpireLRUCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ExpireLRUCache_INCLUDED | #ifndef Foundation_ExpireLRUCache_INCLUDED | |||
#define Foundation_ExpireLRUCache_INCLUDED | #define Foundation_ExpireLRUCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/StrategyCollection.h" | #include "Poco/StrategyCollection.h" | |||
#include "Poco/ExpireStrategy.h" | #include "Poco/ExpireStrategy.h" | |||
#include "Poco/LRUStrategy.h" | #include "Poco/LRUStrategy.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ExpireStrategy.h | ExpireStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: ExpireStrategy | // Module: ExpireStrategy | |||
// | // | |||
// Definition of the ExpireStrategy class. | // Definition of the ExpireStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ExpireStrategy_INCLUDED | #ifndef Foundation_ExpireStrategy_INCLUDED | |||
#define Foundation_ExpireStrategy_INCLUDED | #define Foundation_ExpireStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/AbstractStrategy.h" | #include "Poco/AbstractStrategy.h" | |||
#include "Poco/Bugcheck.h" | #include "Poco/Bugcheck.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
skipping to change at line 81 | skipping to change at line 61 | |||
if (_expireTime < 25000) throw InvalidArgumentException("exp ireTime must be at least 25 ms"); | if (_expireTime < 25000) throw InvalidArgumentException("exp ireTime must be at least 25 ms"); | |||
} | } | |||
~ExpireStrategy() | ~ExpireStrategy() | |||
{ | { | |||
} | } | |||
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::valu | typename TimeIndex::value_type tiValue(now, args.key()); | |||
e_type(now, args.key())); | IndexIterator it = _keyIndex.insert(tiValue); | |||
std::pair<Iterator, bool> stat = _keys.insert(typename Keys: | typename Keys::value_type kValue(args.key(), it); | |||
:value_type(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); | |||
stat.first->second = it; | stat.first->second = it; | |||
} | } | |||
} | } | |||
void onRemove(const void*, const TKey& key) | void onRemove(const void*, const TKey& key) | |||
{ | { | |||
Iterator it = _keys.find(key); | Iterator it = _keys.find(key); | |||
End of changes. 2 change blocks. | ||||
36 lines changed or deleted | 5 lines changed or added | |||
FIFOBuffer.h | FIFOBuffer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FIFOBuffer | // Module: FIFOBuffer | |||
// | // | |||
// Definition of the FIFOBuffer class. | // Definition of the FIFOBuffer class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FIFOBuffer_INCLUDED | #ifndef Foundation_FIFOBuffer_INCLUDED | |||
#define Foundation_FIFOBuffer_INCLUDED | #define Foundation_FIFOBuffer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/Buffer.h" | #include "Poco/Buffer.h" | |||
#include "Poco/BasicEvent.h" | #include "Poco/BasicEvent.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Format.h" | #include "Poco/Format.h" | |||
namespace Poco { | namespace Poco { | |||
template <class T> | template <class T> | |||
class BasicFIFOBuffer | 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. | |||
/// | ||||
/// Critical portions of code are protected by a recursive mutex. | ||||
/// However, to achieve thread-safety in cases where multiple | ||||
/// member function calls are involved and have to be atomic, | ||||
/// the mutex must be locked externally. | ||||
/// | ||||
/// 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. | |||
{ | { | |||
public: | public: | |||
typedef T Type; | typedef T Type; | |||
mutable Poco::BasicEvent<bool> writable; | mutable Poco::BasicEvent<bool> writable; | |||
/// Event indicating "writability" of the buffer, | /// Event indicating "writability" of the buffer, | |||
/// triggered as follows: | /// triggered as follows: | |||
skipping to change at line 92 | skipping to change at line 80 | |||
/// value as the argument | /// value as the argument | |||
/// | /// | |||
/// * when FIFOBuffer transitions from empty to non-empt y, | /// * when FIFOBuffer transitions from empty to non-empt y, | |||
/// Readable event observers are notified, with true v alue | /// Readable event observers are notified, with true v alue | |||
/// as the argument | /// as the argument | |||
BasicFIFOBuffer(std::size_t size, bool notify = false): | BasicFIFOBuffer(std::size_t size, bool notify = false): | |||
_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. | |||
{ | { | |||
} | } | |||
explicit BasicFIFOBuffer(T* pBuffer, std::size_t size, bool notify = false): | BasicFIFOBuffer(T* pBuffer, std::size_t size, bool notify = false): | |||
_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. | |||
{ | { | |||
} | } | |||
explicit BasicFIFOBuffer(const T* pBuffer, std::size_t size, bool no tify = false): | BasicFIFOBuffer(const T* pBuffer, std::size_t size, bool notify = fa lse): | |||
_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. | |||
{ | { | |||
} | } | |||
~BasicFIFOBuffer() | ~BasicFIFOBuffer() | |||
/// Destroys the FIFOBuffer. | /// Destroys the FIFOBuffer. | |||
{ | { | |||
} | } | |||
void resize(std::size_t newSize, bool preserveContent = true) | void resize(std::size_t newSize, bool preserveContent = true) | |||
skipping to change at line 153 | skipping to change at line 147 | |||
/// If length is zero, the return is immediate. | /// If length is zero, the return is immediate. | |||
/// If length is greater than used length, | /// If length is greater than used length, | |||
/// it is substituted with the the current FIFO | /// it is substituted with the the current FIFO | |||
/// used length. | /// used length. | |||
/// | /// | |||
/// Returns the number of elements copied in the | /// Returns the number of elements copied in the | |||
/// supplied buffer. | /// supplied buffer. | |||
{ | { | |||
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 * size of(T)); | std::memcpy(pBuffer, _buffer.begin() + _begin, length * size of(T)); | |||
return length; | return length; | |||
} | } | |||
std::size_t peek(Poco::Buffer<T>& buffer, std::size_t length = 0) co nst | std::size_t peek(Poco::Buffer<T>& buffer, std::size_t length = 0) co nst | |||
/// Peeks into the data currently in the FIFO | /// Peeks into the data currently in the FIFO | |||
/// without actually extracting it. | /// without actually extracting it. | |||
/// Resizes the supplied buffer to the size of | /// Resizes the supplied buffer to the size of | |||
/// data written to it. If length is not | /// data written to it. If length is not | |||
/// supplied by the caller or is greater than length | /// supplied by the caller or is greater than length | |||
/// of currently used data, the current FIFO used | /// of currently used data, the current FIFO used | |||
/// data length is substituted for it. | /// data length is substituted for it. | |||
/// | /// | |||
/// Returns the number of elements copied in the | /// Returns the number of elements copied in the | |||
/// 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); | |||
} | } | |||
std::size_t read(T* pBuffer, std::size_t length) | std::size_t read(T* pBuffer, std::size_t length) | |||
/// Copies the data currently in the FIFO | /// Copies the data currently in the FIFO | |||
/// into the supplied buffer. | /// into the supplied buffer. | |||
/// Resizes the supplied buffer to the size of | /// Resizes the supplied buffer to the size of | |||
/// data written to it. | /// data written to it. | |||
/// | /// | |||
/// 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); | |||
_used -= readLen; | _used -= readLen; | |||
if (0 == _used) _begin = 0; | if (0 == _used) _begin = 0; | |||
else _begin += length; | else _begin += length; | |||
if (_notify) notify(usedBefore); | if (_notify) notify(usedBefore); | |||
return readLen; | return readLen; | |||
skipping to change at line 209 | skipping to change at line 204 | |||
std::size_t read(Poco::Buffer<T>& buffer, std::size_t length = 0) | std::size_t read(Poco::Buffer<T>& buffer, std::size_t length = 0) | |||
/// Copies the data currently in the FIFO | /// Copies the data currently in the FIFO | |||
/// into the supplied buffer. | /// into the supplied buffer. | |||
/// Resizes the supplied buffer to the size of | /// Resizes the supplied buffer to the size of | |||
/// data written to it. | /// data written to it. | |||
/// | /// | |||
/// 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); | |||
_used -= readLen; | _used -= readLen; | |||
if (0 == _used) _begin = 0; | if (0 == _used) _begin = 0; | |||
else _begin += length; | else _begin += length; | |||
if (_notify) notify(usedBefore); | if (_notify) notify(usedBefore); | |||
return readLen; | return readLen; | |||
skipping to change at line 235 | skipping to change at line 228 | |||
/// Writes data from supplied buffer to the FIFO buffer. | /// Writes data from supplied buffer to the FIFO buffer. | |||
/// If there is no sufficient space for the whole | /// If there is no sufficient space for the whole | |||
/// buffer to be written, data up to available | /// buffer to be written, data up to available | |||
/// length is written. | /// length is written. | |||
/// The length of data to be written is determined from the | /// The length of data to be written is determined from the | |||
/// length argument. Function does nothing and returns zero | /// length argument. Function does nothing and returns zero | |||
/// if length argument is equal to zero. | /// if length argument is equal to zero. | |||
/// | /// | |||
/// 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() + _beg in, _used); | std::memmove(_buffer.begin(), _buffer.begin() + _beg in, _used * sizeof(T)); | |||
_begin = 0; | _begin = 0; | |||
} | } | |||
std::size_t usedBefore = _used; | std::size_t usedBefore = _used; | |||
std::size_t available = _buffer.size() - _used - _begin; | std::size_t available = _buffer.size() - _used - _begin; | |||
std::size_t len = length > available ? available : length; | std::size_t len = length > available ? available : length; | |||
std::memcpy(_buffer.begin() + _begin + _used, pBuffer, len * sizeof(T)); | std::memcpy(_buffer.begin() + _begin + _used, pBuffer, len * sizeof(T)); | |||
_used += len; | _used += len; | |||
poco_assert (_used <= _buffer.size()); | poco_assert (_used <= _buffer.size()); | |||
if (_notify) notify(usedBefore); | if (_notify) notify(usedBefore); | |||
skipping to change at line 267 | skipping to change at line 262 | |||
/// Writes data from supplied buffer to the FIFO buffer. | /// Writes data from supplied buffer to the FIFO buffer. | |||
/// If there is no sufficient space for the whole | /// If there is no sufficient space for the whole | |||
/// buffer to be written, data up to available | /// buffer to be written, data up to available | |||
/// length is written. | /// length is written. | |||
/// The length of data to be written is determined from the | /// The length of data to be written is determined from the | |||
/// length argument or buffer size (when length argument is | /// length argument or buffer size (when length argument is | |||
/// default zero or greater than buffer size). | /// default zero or greater than buffer size). | |||
/// | /// | |||
/// Returns the length of data written. | /// Returns the length of data written. | |||
{ | { | |||
if (isFull()) return 0; | if (length == 0 || length > buffer.size()) | |||
length = buffer.size(); | ||||
if (0 == length || length > buffer.size()) length = buffer.s | ||||
ize(); | ||||
return write(buffer.begin(), length); | return write(buffer.begin(), length); | |||
} | } | |||
std::size_t size() const | std::size_t size() const | |||
/// Returns the size of the buffer. | /// Returns the size of the buffer. | |||
{ | { | |||
return _buffer.size(); | return _buffer.size(); | |||
} | } | |||
skipping to change at line 297 | skipping to change at line 291 | |||
/// Returns the size of the available portion of the buffer. | /// Returns the size of the available portion of the buffer. | |||
{ | { | |||
return _buffer.size() - _used; | return _buffer.size() - _used; | |||
} | } | |||
void drain(std::size_t length = 0) | void drain(std::size_t length = 0) | |||
/// Drains length number of elements from the buffer. | /// Drains length number of elements from the buffer. | |||
/// 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) | |||
{ | { | |||
_begin = 0; | _begin = 0; | |||
_used = 0; | _used = 0; | |||
} | } | |||
else | else | |||
{ | ||||
_begin += length; | ||||
_used -= length; | _used -= length; | |||
} | ||||
if (_notify) notify(usedBefore); | if (_notify) notify(usedBefore); | |||
} | } | |||
void copy(const T* ptr, std::size_t length) | void copy(const T* ptr, std::size_t length) | |||
/// Copies the supplied data to the buffer and adjusts | /// Copies the supplied data to the buffer and adjusts | |||
/// the used buffer size. | /// the used buffer size. | |||
{ | { | |||
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 bu ffer."); | throw Poco::InvalidAccessException("Cannot extend bu ffer."); | |||
std::memcpy(&_buffer[_used], ptr, length); | if (!isWritable()) | |||
advance(length); | throw Poco::InvalidAccessException("Buffer not writa | |||
ble."); | ||||
std::memcpy(&_buffer[_used], ptr, length * sizeof(T)); | ||||
std::size_t usedBefore = _used; | ||||
_used += length; | ||||
if (_notify) notify(usedBefore); | ||||
} | } | |||
void advance(std::size_t length) | void advance(std::size_t length) | |||
/// Advances buffer by length elements. | /// Advances buffer by length elements. | |||
/// 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 bu ffer."); | throw Poco::InvalidAccessException("Cannot extend bu ffer."); | |||
if (!isWritable()) | ||||
throw Poco::InvalidAccessException("Buffer not writa | ||||
ble."); | ||||
std::size_t usedBefore = _used; | std::size_t usedBefore = _used; | |||
_used += length; | _used += length; | |||
if (_notify) notify(usedBefore); | if (_notify) notify(usedBefore); | |||
} | } | |||
T* begin() | T* begin() | |||
/// Returns the pointer to the beginning of the buffer. | /// Returns the pointer to the beginning of the buffer. | |||
{ | { | |||
return _buffer.begin(); | return _buffer.begin(); | |||
} | } | |||
skipping to change at line 356 | skipping to change at line 368 | |||
throw InvalidAccessException("Buffer is full."); | throw InvalidAccessException("Buffer is full."); | |||
return _buffer.begin() + _used; | return _buffer.begin() + _used; | |||
} | } | |||
T& operator [] (std::size_t index) | T& operator [] (std::size_t index) | |||
/// Returns value at index position. | /// Returns value at index position. | |||
/// 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 bo unds: %z (max index allowed: %z)", index, _used - 1)); | throw InvalidAccessException(format("Index out of bo unds: %z (max index allowed: %z)", index, _used - 1)); | |||
return _buffer[_begin + index]; | return _buffer[_begin + index]; | |||
} | } | |||
const T& operator [] (std::size_t index) const | const T& operator [] (std::size_t index) const | |||
/// Returns value at index position. | /// Returns value at index position. | |||
/// 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 bo unds: %z (max index allowed: %z)", index, _used - 1)); | throw InvalidAccessException(format("Index out of bo unds: %z (max index allowed: %z)", index, _used - 1)); | |||
return _buffer[_begin + index]; | return _buffer[_begin + index]; | |||
} | } | |||
const Buffer<T>& buffer() const | const Buffer<T>& buffer() const | |||
/// Returns const reference to the underlying buffer. | /// Returns const reference to the underlying buffer. | |||
{ | { | |||
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/writi | ||||
ng, | ||||
/// the error flag must be set to false. | ||||
{ | ||||
if (error) | ||||
{ | ||||
bool f = false; | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (error && isReadable() && _notify) readable.notif | ||||
y(this, f); | ||||
if (error && isWritable() && _notify) writable.notif | ||||
y(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 empt | ||||
y. | ||||
{ | ||||
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; | |||
} | } | |||
bool isFull() const | bool isFull() const | |||
/// Returns true is buffer is full, false otherwise. | /// Returns true is buffer is full, false otherwise. | |||
{ | { | |||
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. | |||
{ | { | |||
_notify = notify; | _notify = notify; | |||
} | } | |||
bool getNotify() const | bool getNotify() const | |||
/// Returns true if notifications are enabled, false otherwi se. | /// Returns true if notifications are enabled, false otherwi se. | |||
{ | { | |||
return _notify; | return _notify; | |||
} | } | |||
Mutex& mutex() | ||||
/// Returns reference to mutex. | ||||
{ | ||||
return _mutex; | ||||
} | ||||
private: | private: | |||
void notify(std::size_t usedBefore) | void notify(std::size_t usedBefore) | |||
{ | { | |||
bool t = true, f = false; | bool t = true, f = false; | |||
if (usedBefore == 0 && _used > 0) | if (usedBefore == 0 && _used > 0) | |||
readable.notify(this, t); | readable.notify(this, t); | |||
else if (usedBefore > 0 && 0 == _used) | else if (usedBefore > 0 && 0 == _used) | |||
readable.notify(this, f); | readable.notify(this, f); | |||
if (usedBefore == _buffer.size() && _used < _buffer.size()) | if (usedBefore == _buffer.size() && _used < _buffer.size()) | |||
skipping to change at line 427 | skipping to change at line 527 | |||
BasicFIFOBuffer(); | BasicFIFOBuffer(); | |||
BasicFIFOBuffer(const BasicFIFOBuffer&); | BasicFIFOBuffer(const BasicFIFOBuffer&); | |||
BasicFIFOBuffer& operator = (const BasicFIFOBuffer&); | BasicFIFOBuffer& operator = (const BasicFIFOBuffer&); | |||
Buffer<T> _buffer; | Buffer<T> _buffer; | |||
std::size_t _begin; | std::size_t _begin; | |||
std::size_t _used; | std::size_t _used; | |||
bool _notify; | bool _notify; | |||
mutable Mutex _mutex; | mutable Mutex _mutex; | |||
bool _eof; | ||||
bool _error; | ||||
}; | }; | |||
// | // | |||
// We provide an instantiation for char | // We provide an instantiation for char | |||
// | // | |||
typedef BasicFIFOBuffer<char> FIFOBuffer; | typedef BasicFIFOBuffer<char> FIFOBuffer; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_FIFOBuffer_INCLUDED | #endif // Foundation_FIFOBuffer_INCLUDED | |||
End of changes. 30 change blocks. | ||||
54 lines changed or deleted | 150 lines changed or added | |||
FIFOBufferStream.h | FIFOBufferStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: FIFOBufferStream | // Module: FIFOBufferStream | |||
// | // | |||
// Definition of the FIFOBufferStream class. | // Definition of the FIFOBufferStream class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FIFOBufferStream_INCLUDED | #ifndef Foundation_FIFOBufferStream_INCLUDED | |||
#define Foundation_FIFOBufferStream_INCLUDED | #define Foundation_FIFOBufferStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/FIFOBuffer.h" | #include "Poco/FIFOBuffer.h" | |||
#include "Poco/BufferedBidirectionalStreamBuf.h" | #include "Poco/BufferedBidirectionalStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
skipping to change at line 61 | skipping to change at line 41 | |||
/// FIFOBuffer is enabled for emtpy/non-empty/full state transitions notifications. | /// FIFOBuffer is enabled for emtpy/non-empty/full state transitions notifications. | |||
{ | { | |||
public: | public: | |||
FIFOBufferStreamBuf(); | FIFOBufferStreamBuf(); | |||
/// Creates a FIFOBufferStreamBuf. | /// Creates a FIFOBufferStreamBuf. | |||
explicit FIFOBufferStreamBuf(FIFOBuffer& fifoBuffer); | explicit FIFOBufferStreamBuf(FIFOBuffer& fifoBuffer); | |||
/// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | /// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | |||
explicit FIFOBufferStreamBuf(char* pBuffer, std::size_t length); | FIFOBufferStreamBuf(char* pBuffer, std::size_t length); | |||
/// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | /// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | |||
explicit FIFOBufferStreamBuf(const char* pBuffer, std::size_t length ); | FIFOBufferStreamBuf(const char* pBuffer, std::size_t length); | |||
/// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | /// Creates a FIFOBufferStreamBuf and assigns the given buff er to it. | |||
explicit FIFOBufferStreamBuf(std::size_t length); | explicit FIFOBufferStreamBuf(std::size_t length); | |||
/// Creates a FIFOBufferStreamBuf of the given length. | /// Creates a FIFOBufferStreamBuf of the given length. | |||
~FIFOBufferStreamBuf(); | ~FIFOBufferStreamBuf(); | |||
/// Destroys the FIFOBufferStreamBuf. | /// Destroys the FIFOBufferStreamBuf. | |||
FIFOBuffer& fifoBuffer(); | FIFOBuffer& fifoBuffer(); | |||
/// Returns the underlying FIFO buffer reference. | /// Returns the underlying FIFO buffer reference. | |||
skipping to change at line 101 | skipping to change at line 81 | |||
/// The base class for FIFOBufferInputStream and | /// The base class for FIFOBufferInputStream and | |||
/// FIFOBufferStream. | /// FIFOBufferStream. | |||
/// | /// | |||
/// This class is needed to ensure the correct initialization | /// This class is needed to ensure the correct initialization | |||
/// order of the stream buffer and base classes. | /// order of the stream buffer and base classes. | |||
{ | { | |||
public: | public: | |||
explicit FIFOIOS(FIFOBuffer& buffer); | explicit FIFOIOS(FIFOBuffer& buffer); | |||
/// Creates a FIFOIOS and assigns the given buffer to it. | /// Creates a FIFOIOS and assigns the given buffer to it. | |||
explicit FIFOIOS(char* pBuffer, std::size_t length); | FIFOIOS(char* pBuffer, std::size_t length); | |||
/// Creates a FIFOIOS and assigns the given buffer to it. | /// Creates a FIFOIOS and assigns the given buffer to it. | |||
explicit FIFOIOS(const char* pBuffer, std::size_t length); | FIFOIOS(const char* pBuffer, std::size_t length); | |||
/// Creates a FIFOIOS and assigns the given buffer to it. | /// Creates a FIFOIOS and assigns the given buffer to it. | |||
explicit FIFOIOS(std::size_t length); | explicit FIFOIOS(std::size_t length); | |||
/// Creates a FIFOIOS of the given length. | /// Creates a FIFOIOS of the given length. | |||
~FIFOIOS(); | ~FIFOIOS(); | |||
/// Destroys the FIFOIOS. | /// Destroys the FIFOIOS. | |||
/// | /// | |||
/// Flushes the buffer. | /// Flushes the buffer. | |||
skipping to change at line 129 | skipping to change at line 109 | |||
/// Flushes the stream. | /// Flushes the stream. | |||
protected: | protected: | |||
FIFOBufferStreamBuf _buf; | FIFOBufferStreamBuf _buf; | |||
}; | }; | |||
class Foundation_API FIFOBufferStream: public FIFOIOS, public std::iostream | 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: | |||
Poco::BasicEvent<bool>& readable; | Poco::BasicEvent<bool>& readable; | |||
Poco::BasicEvent<bool>& writable; | Poco::BasicEvent<bool>& writable; | |||
explicit FIFOBufferStream(FIFOBuffer& buffer); | explicit FIFOBufferStream(FIFOBuffer& buffer); | |||
/// Creates the FIFOBufferStream with supplied buffer as ini tial value. | /// Creates the FIFOBufferStream with supplied buffer as ini tial value. | |||
explicit FIFOBufferStream(char* pBuffer, std::size_t length); | FIFOBufferStream(char* pBuffer, std::size_t length); | |||
/// Creates a FIFOBufferStream and assigns the given buffer to it. | /// Creates a FIFOBufferStream and assigns the given buffer to it. | |||
explicit FIFOBufferStream(const char* pBuffer, std::size_t length); | FIFOBufferStream(const char* pBuffer, std::size_t length); | |||
/// Creates a FIFOBufferStream and assigns the given buffer to it. | /// Creates a FIFOBufferStream and assigns the given buffer to it. | |||
explicit FIFOBufferStream(std::size_t length); | explicit FIFOBufferStream(std::size_t length); | |||
/// Creates a FIFOBufferStream of the given length. | /// Creates a FIFOBufferStream of the given length. | |||
~FIFOBufferStream(); | ~FIFOBufferStream(); | |||
/// Destroys the FIFOBufferStream. | /// Destroys the FIFOBufferStream. | |||
/// | /// | |||
/// Flushes the buffer. | /// Flushes the buffer. | |||
End of changes. 8 change blocks. | ||||
39 lines changed or deleted | 8 lines changed or added | |||
FIFOEvent.h | FIFOEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: FIFOEvent | // Module: FIFOEvent | |||
// | // | |||
// Implementation of the FIFOEvent template. | // Implementation of the FIFOEvent template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FIFOEvent_INCLUDED | #ifndef Foundation_FIFOEvent_INCLUDED | |||
#define Foundation_FIFOEvent_INCLUDED | #define Foundation_FIFOEvent_INCLUDED | |||
#include "Poco/AbstractEvent.h" | #include "Poco/AbstractEvent.h" | |||
#include "Poco/FIFOStrategy.h" | #include "Poco/FIFOStrategy.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FIFOStrategy.h | FIFOStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: FIFOStragegy | // Module: FIFOStragegy | |||
// | // | |||
// Implementation of the FIFOStrategy template. | // Implementation of the FIFOStrategy template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FIFOStrategy_INCLUDED | #ifndef Foundation_FIFOStrategy_INCLUDED | |||
#define Foundation_FIFOStrategy_INCLUDED | #define Foundation_FIFOStrategy_INCLUDED | |||
#include "Poco/DefaultStrategy.h" | #include "Poco/DefaultStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
//@ deprecated | //@ deprecated | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FPEnvironment.h | FPEnvironment.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definitions of class FPEnvironment. | // Definitions of class FPEnvironment. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_INCLUDED | #ifndef Foundation_FPEnvironment_INCLUDED | |||
#define Foundation_FPEnvironment_INCLUDED | #define Foundation_FPEnvironment_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_NO_FPENVIRONMENT) | #if defined(POCO_NO_FPENVIRONMENT) | |||
#include "Poco/FPEnvironment_DUMMY.h" | #include "Poco/FPEnvironment_DUMMY.h" | |||
#elif defined(__osf__) || defined(__VMS) | #elif defined(__osf__) || defined(__VMS) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FPEnvironment_C99.h | FPEnvironment_C99.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definitions of class FPEnvironmentImpl for C99. | // Definitions of class FPEnvironmentImpl for C99. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_C99_INCLUDED | #ifndef Foundation_FPEnvironment_C99_INCLUDED | |||
#define Foundation_FPEnvironment_C99_INCLUDED | #define Foundation_FPEnvironment_C99_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <fenv.h> | #include <fenv.h> | |||
#include <math.h> | #include <cmath> | |||
namespace Poco { | namespace Poco { | |||
class FPEnvironmentImpl | class FPEnvironmentImpl | |||
{ | { | |||
protected: | protected: | |||
enum RoundingModeImpl | enum RoundingModeImpl | |||
{ | { | |||
FP_ROUND_DOWNWARD_IMPL = FE_DOWNWARD, | FP_ROUND_DOWNWARD_IMPL = FE_DOWNWARD, | |||
FP_ROUND_UPWARD_IMPL = FE_UPWARD, | FP_ROUND_UPWARD_IMPL = FE_UPWARD, | |||
skipping to change at line 93 | skipping to change at line 73 | |||
private: | private: | |||
fenv_t _env; | fenv_t _env; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
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 copysignf(target, source); | |||
} | } | |||
inline double FPEnvironmentImpl::copySignImpl(double target, double source) | inline double FPEnvironmentImpl::copySignImpl(double target, double source) | |||
{ | { | |||
return copysign(target, source); | return copysign(target, source); | |||
End of changes. 8 change blocks. | ||||
39 lines changed or deleted | 8 lines changed or added | |||
FPEnvironment_DEC.h | FPEnvironment_DEC.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definitions of class FPEnvironmentImpl for Tru64 and OpenVMS Alpha. | // Definitions of class FPEnvironmentImpl for Tru64 and OpenVMS Alpha. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_DEC_INCLUDED | #ifndef Foundation_FPEnvironment_DEC_INCLUDED | |||
#define Foundation_FPEnvironment_DEC_INCLUDED | #define Foundation_FPEnvironment_DEC_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(__VMS) | #if defined(__VMS) | |||
#include <ieeedef.h> | #include <ieeedef.h> | |||
#else | #else | |||
#include <machine/fpu.h> | #include <machine/fpu.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FPEnvironment_DUMMY.h | FPEnvironment_DUMMY.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definition of class FPEnvironmentImpl for platforms that do not | // Definition of class FPEnvironmentImpl for platforms that do not | |||
// support IEEE 754 extensions. | // support IEEE 754 extensions. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_DUMMY_INCLUDED | #ifndef Foundation_FPEnvironment_DUMMY_INCLUDED | |||
#define Foundation_FPEnvironment_DUMMY_INCLUDED | #define Foundation_FPEnvironment_DUMMY_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <math.h> | #include <cmath> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API FPEnvironmentImpl | class Foundation_API FPEnvironmentImpl | |||
{ | { | |||
protected: | protected: | |||
enum RoundingModeImpl | enum RoundingModeImpl | |||
{ | { | |||
FP_ROUND_DOWNWARD_IMPL, | FP_ROUND_DOWNWARD_IMPL, | |||
FP_ROUND_UPWARD_IMPL, | FP_ROUND_UPWARD_IMPL, | |||
skipping to change at line 93 | skipping to change at line 73 | |||
private: | private: | |||
static RoundingModeImpl _roundingMode; | static RoundingModeImpl _roundingMode; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
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 copysignf(target, source); | |||
} | } | |||
inline double FPEnvironmentImpl::copySignImpl(double target, double source) | inline double FPEnvironmentImpl::copySignImpl(double target, double source) | |||
{ | { | |||
return copysign(target, source); | return copysign(target, source); | |||
End of changes. 8 change blocks. | ||||
39 lines changed or deleted | 8 lines changed or added | |||
FPEnvironment_SUN.h | FPEnvironment_SUN.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definitions of class FPEnvironmentImpl for Solaris. | // Definitions of class FPEnvironmentImpl for Solaris. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_SUN_INCLUDED | #ifndef Foundation_FPEnvironment_SUN_INCLUDED | |||
#define Foundation_FPEnvironment_SUN_INCLUDED | #define Foundation_FPEnvironment_SUN_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <ieeefp.h> | #include <ieeefp.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FPEnvironment_WIN32.h | FPEnvironment_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: FPEnvironment | // Module: FPEnvironment | |||
// | // | |||
// Definitions of class FPEnvironmentImpl for WIN32. | // Definitions of class FPEnvironmentImpl for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FPEnvironment_WIN32_INCLUDED | #ifndef Foundation_FPEnvironment_WIN32_INCLUDED | |||
#define Foundation_FPEnvironment_WIN32_INCLUDED | #define Foundation_FPEnvironment_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <float.h> | #include <float.h> | |||
#include <math.h> | #include <math.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FTPClientSession.h | FTPClientSession.h | |||
---|---|---|---|---|
// | // | |||
// FTPClientSession.h | // FTPClientSession.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/FTPClientSession.h#1 $ | // $Id: //poco/svn/Net/include/Poco/Net/FTPClientSession.h#2 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: FTP | // Package: FTP | |||
// Module: FTPClientSession | // Module: FTPClientSession | |||
// | // | |||
// Definition of the FTPClientSession class. | // Definition of the FTPClientSession class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_FTPClientSession_INCLUDED | #ifndef Net_FTPClientSession_INCLUDED | |||
#define Net_FTPClientSession_INCLUDED | #define Net_FTPClientSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/DialogSocket.h" | #include "Poco/Net/DialogSocket.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
skipping to change at line 78 | skipping to change at line 58 | |||
{ | { | |||
FTP_PORT = 21 | FTP_PORT = 21 | |||
}; | }; | |||
enum FileType | enum FileType | |||
{ | { | |||
TYPE_TEXT, // TYPE A (ASCII) | TYPE_TEXT, // TYPE A (ASCII) | |||
TYPE_BINARY // TYPE I (Image) | TYPE_BINARY // TYPE I (Image) | |||
}; | }; | |||
FTPClientSession(); | ||||
/// Creates an FTPClientSession. | ||||
/// | ||||
/// Passive mode will be used for data transfers. | ||||
explicit FTPClientSession(const StreamSocket& socket); | explicit FTPClientSession(const StreamSocket& socket); | |||
/// Creates an FTPClientSession using the given | /// Creates an FTPClientSession using the given | |||
/// connected socket for the control connection. | /// connected socket for the control connection. | |||
/// | /// | |||
/// Passive mode will be used for data transfers. | /// Passive mode will be used for data transfers. | |||
FTPClientSession(const std::string& host, Poco::UInt16 port = FTP_PO | FTPClientSession(const std::string& host, | |||
RT); | Poco::UInt16 port = FTP_PORT, | |||
const std::string& username = "", | ||||
const std::string& password = ""); | ||||
/// Creates an FTPClientSession using a socket connected | /// Creates an FTPClientSession using a socket connected | |||
/// to the given host and port. | /// to the given host and port. If username is supplied, | |||
/// login is attempted. | ||||
/// | /// | |||
/// Passive mode will be used for data transfers. | /// Passive mode will be used for data transfers. | |||
virtual ~FTPClientSession(); | virtual ~FTPClientSession(); | |||
/// Destroys the FTPClientSession. | /// Destroys the FTPClientSession. | |||
void setTimeout(const Poco::Timespan& timeout); | void setTimeout(const Poco::Timespan& timeout); | |||
/// Sets the timeout for socket operations. | /// Sets the timeout for socket operations. | |||
Poco::Timespan getTimeout() const; | Poco::Timespan getTimeout() const; | |||
skipping to change at line 110 | skipping to change at line 99 | |||
/// Enables (default) or disables FTP passive mode for this session. | /// Enables (default) or disables FTP passive mode for this session. | |||
/// | /// | |||
/// If useRFC1738 is true (the default), the RFC 1738 | /// If useRFC1738 is true (the default), the RFC 1738 | |||
/// EPSV command is used (with a fallback to PASV if EPSV fa ils) | /// EPSV command is used (with a fallback to PASV if EPSV fa ils) | |||
/// for switching to passive mode. The same applies to | /// for switching to passive mode. The same applies to | |||
/// EPRT and PORT for active connections. | /// EPRT and PORT for active connections. | |||
bool getPassive() const; | bool getPassive() const; | |||
/// Returns true iff passive mode is enabled for this connec tion. | /// Returns true iff passive mode is enabled for this connec tion. | |||
void open(const std::string& host, | ||||
Poco::UInt16 port, | ||||
const std::string& username = "", | ||||
const std::string& password = ""); | ||||
/// Opens the FTP connection to the given host and port. | ||||
/// If username is supplied, login is attempted. | ||||
void login(const std::string& username, const std::string& password) ; | void login(const std::string& username, const std::string& password) ; | |||
/// Authenticates the user against the FTP server. Must be | /// Authenticates the user against the FTP server. Must be | |||
/// called before any other commands (except QUIT) can be se nt. | /// called before any other commands (except QUIT) can be se nt. | |||
/// | /// | |||
/// Sends a USER command followed by a PASS command with the | /// Sends a USER command followed by a PASS command with the | |||
/// respective arguments to the server. | /// respective arguments to the server. | |||
/// | /// | |||
/// Throws a FTPException in case of a FTP-specific error, o r a | /// Throws a FTPException in case of a FTP-specific error, o r a | |||
/// NetException in case of a general network communication failure. | /// NetException in case of a general network communication failure. | |||
void logout(); | ||||
void close(); | void close(); | |||
/// Sends a QUIT command and closes the connection to the se rver. | /// Sends a QUIT command and closes the connection to the se rver. | |||
/// | /// | |||
/// Throws a FTPException in case of a FTP-specific error, o r a | /// Throws a FTPException in case of a FTP-specific error, o r a | |||
/// NetException in case of a general network communication failure. | /// NetException in case of a general network communication failure. | |||
std::string systemType(); | std::string systemType(); | |||
/// Returns the system type of the FTP server. | /// Returns the system type of the FTP server. | |||
/// | /// | |||
/// Sends a SYST command to the server and returns the resul t. | /// Sends a SYST command to the server and returns the resul t. | |||
skipping to change at line 298 | skipping to change at line 296 | |||
/// not necessary. | /// not necessary. | |||
int sendCommand(const std::string& command, std::string& response); | int sendCommand(const std::string& command, std::string& response); | |||
/// Sends the given command verbatim to the server | /// Sends the given command verbatim to the server | |||
/// and waits for a response. | /// and waits for a response. | |||
int sendCommand(const std::string& command, const std::string& arg, std::string& response); | int sendCommand(const std::string& command, const std::string& arg, std::string& response); | |||
/// Sends the given command verbatim to the server | /// Sends the given command verbatim to the server | |||
/// and waits for a response. | /// and waits for a response. | |||
bool isOpen() const; | ||||
/// Returns true if the connection with FTP server is opened | ||||
. | ||||
bool isLoggedIn() const; | ||||
/// Returns true if the session is logged in. | ||||
protected: | protected: | |||
enum StatusClass | enum StatusClass | |||
{ | { | |||
FTP_POSITIVE_PRELIMINARY = 1, | FTP_POSITIVE_PRELIMINARY = 1, | |||
FTP_POSITIVE_COMPLETION = 2, | FTP_POSITIVE_COMPLETION = 2, | |||
FTP_POSITIVE_INTERMEDIATE = 3, | FTP_POSITIVE_INTERMEDIATE = 3, | |||
FTP_TRANSIENT_NEGATIVE = 4, | FTP_TRANSIENT_NEGATIVE = 4, | |||
FTP_PERMANENT_NEGATIVE = 5 | FTP_PERMANENT_NEGATIVE = 5 | |||
}; | }; | |||
enum | enum | |||
skipping to change at line 332 | skipping to change at line 336 | |||
SocketAddress sendPassiveCommand(); | SocketAddress sendPassiveCommand(); | |||
bool sendEPRT(const SocketAddress& addr); | bool sendEPRT(const SocketAddress& addr); | |||
void sendPORT(const SocketAddress& addr); | void sendPORT(const SocketAddress& addr); | |||
bool sendEPSV(SocketAddress& addr); | bool sendEPSV(SocketAddress& addr); | |||
void sendPASV(SocketAddress& addr); | void sendPASV(SocketAddress& addr); | |||
void parseAddress(const std::string& str, SocketAddress& addr); | void parseAddress(const std::string& str, SocketAddress& addr); | |||
void parseExtAddress(const std::string& str, SocketAddress& addr); | void parseExtAddress(const std::string& str, SocketAddress& addr); | |||
void endTransfer(); | void endTransfer(); | |||
private: | private: | |||
FTPClientSession(); | ||||
FTPClientSession(const FTPClientSession&); | FTPClientSession(const FTPClientSession&); | |||
FTPClientSession& operator = (const FTPClientSession&); | FTPClientSession& operator = (const FTPClientSession&); | |||
DialogSocket _controlSocket; | std::string _host; | |||
Poco::UInt16 _port; | ||||
DialogSocket* _pControlSocket; | ||||
SocketStream* _pDataStream; | SocketStream* _pDataStream; | |||
bool _passiveMode; | bool _passiveMode; | |||
FileType _fileType; | FileType _fileType; | |||
bool _supports1738; | bool _supports1738; | |||
bool _isOpen; | bool _serverReady; | |||
bool _isLoggedIn; | ||||
Poco::Timespan _timeout; | Poco::Timespan _timeout; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline bool FTPClientSession::isPositivePreliminary(int status) | inline bool FTPClientSession::isPositivePreliminary(int status) | |||
{ | { | |||
return status/100 == FTP_POSITIVE_PRELIMINARY; | return status/100 == FTP_POSITIVE_PRELIMINARY; | |||
} | } | |||
skipping to change at line 373 | skipping to change at line 379 | |||
inline bool FTPClientSession::isTransientNegative(int status) | inline bool FTPClientSession::isTransientNegative(int status) | |||
{ | { | |||
return status/100 == FTP_TRANSIENT_NEGATIVE; | return status/100 == FTP_TRANSIENT_NEGATIVE; | |||
} | } | |||
inline bool FTPClientSession::isPermanentNegative(int status) | inline bool FTPClientSession::isPermanentNegative(int status) | |||
{ | { | |||
return status/100 == FTP_PERMANENT_NEGATIVE; | return status/100 == FTP_PERMANENT_NEGATIVE; | |||
} | } | |||
inline bool FTPClientSession::isOpen() const | ||||
{ | ||||
return _pControlSocket != 0; | ||||
} | ||||
inline bool FTPClientSession::isLoggedIn() const | ||||
{ | ||||
return _isLoggedIn; | ||||
} | ||||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_FTPClientSession_INCLUDED | #endif // Net_FTPClientSession_INCLUDED | |||
End of changes. 13 change blocks. | ||||
41 lines changed or deleted | 46 lines changed or added | |||
FTPStreamFactory.h | FTPStreamFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: FTP | // Package: FTP | |||
// Module: FTPStreamFactory | // Module: FTPStreamFactory | |||
// | // | |||
// Definition of the FTPStreamFactory class. | // Definition of the FTPStreamFactory class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_FTPStreamFactory_INCLUDED | #ifndef Net_FTPStreamFactory_INCLUDED | |||
#define Net_FTPStreamFactory_INCLUDED | #define Net_FTPStreamFactory_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPSession.h" | #include "Poco/Net/HTTPSession.h" | |||
#include "Poco/URIStreamFactory.h" | #include "Poco/URIStreamFactory.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 119 | skipping to change at line 99 | |||
/// FTPStreamFactory is used for the first time. | /// FTPStreamFactory is used for the first time. | |||
static FTPPasswordProvider* getPasswordProvider(); | static FTPPasswordProvider* getPasswordProvider(); | |||
/// Returns the FTPPasswordProvider currently in use, | /// Returns the FTPPasswordProvider currently in use, | |||
/// or NULL if no one has been set. | /// or NULL if no one has been set. | |||
static void registerFactory(); | static void registerFactory(); | |||
/// Registers the FTPStreamFactory with the | /// Registers the FTPStreamFactory with the | |||
/// default URIStreamOpener instance. | /// default URIStreamOpener instance. | |||
static void unregisterFactory(); | ||||
/// Unregisters the FTPStreamFactory with the | ||||
/// default URIStreamOpener instance. | ||||
protected: | protected: | |||
static void splitUserInfo(const std::string& userInfo, std::string& username, std::string& password); | static void splitUserInfo(const std::string& userInfo, std::string& username, std::string& password); | |||
static void getUserInfo(const Poco::URI& uri, std::string& username, std::string& password); | static void getUserInfo(const Poco::URI& uri, std::string& username, std::string& password); | |||
static void getPathAndType(const Poco::URI& uri, std::string& path, char& type); | static void getPathAndType(const Poco::URI& uri, std::string& path, char& type); | |||
private: | private: | |||
static std::string _anonymousPassword; | static std::string _anonymousPassword; | |||
static FTPPasswordProvider* _pPasswordProvider; | static FTPPasswordProvider* _pPasswordProvider; | |||
}; | }; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 5 lines changed or added | |||
File.h | File.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the File class. | // Definition of the File class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_INCLUDED | #ifndef Foundation_File_INCLUDED | |||
#define Foundation_File_INCLUDED | #define Foundation_File_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include <vector> | #include <vector> | |||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | #if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FileChannel.h | FileChannel.h | |||
---|---|---|---|---|
// | // | |||
// FileChannel.h | // FileChannel.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/FileChannel.h#2 $ | // $Id: //poco/1.4/Foundation/include/Poco/FileChannel.h#5 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: FileChannel | // Module: FileChannel | |||
// | // | |||
// Definition of the FileChannel class. | // Definition of the FileChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FileChannel_INCLUDED | #ifndef Foundation_FileChannel_INCLUDED | |||
#define Foundation_FileChannel_INCLUDED | #define Foundation_FileChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
skipping to change at line 138 | skipping to change at line 118 | |||
/// "access.log.20050802110300". | /// "access.log.20050802110300". | |||
/// | /// | |||
/// Using the "times" property it is possible to specify | /// Using the "times" property it is possible to specify | |||
/// time mode for the day/time based rotation. The following values | /// time mode for the day/time based rotation. The following values | |||
/// for the "times" property are supported: | /// for the "times" property are supported: | |||
/// | /// | |||
/// * utc: Rotation strategy is based on UTC time (default) . | /// * utc: Rotation strategy is based on UTC time (default) . | |||
/// * local: Rotation strategy is based on local time. | /// * local: Rotation strategy is based on local time. | |||
/// | /// | |||
/// Archived log files can be compressed using the gzip compression | /// Archived log files can be compressed using the gzip compression | |||
/// method. Compressing can be controlled with the "compression" | /// method. Compressing can be controlled with the "compress" | |||
/// property. The following values for the "compress" property | /// property. The following values for the "compress" property | |||
/// are supported: | /// are supported: | |||
/// | /// | |||
/// * true: Compress archived log files. | /// * true: Compress archived log files. | |||
/// * false: Do not compress archived log files. | /// * false: Do not compress archived log files. | |||
/// | /// | |||
/// Archived log files can be automatically purged, either if | /// Archived log files can be automatically purged, either if | |||
/// they reach a certain age, or if the number of archived | /// they reach a certain age, or if the number of archived | |||
/// log files reaches a given maximum number. This is | /// log files reaches a given maximum number. This is | |||
/// controlled by the purgeAge and purgeCount properties. | /// controlled by the purgeAge and purgeCount properties. | |||
/// | /// | |||
/// The purgeAge property can have the following values: | /// The purgeAge property can have the following values: | |||
/// | /// | |||
/// * "none" or "" no purging | ||||
/// * <n> [seconds]: the maximum age is <n> seconds. | /// * <n> [seconds]: the maximum age is <n> seconds. | |||
/// * <n> minutes: the maximum age is <n> minutes. | /// * <n> minutes: the maximum age is <n> minutes. | |||
/// * <n> hours: the maximum age is <n> hours. | /// * <n> hours: the maximum age is <n> hours. | |||
/// * <n> days: the maximum age is <n> days. | /// * <n> days: the maximum age is <n> days. | |||
/// * <n> weeks: the maximum age is <n> weeks. | /// * <n> weeks: the maximum age is <n> weeks. | |||
/// * <n> months: the maximum age is <n> months, where a month has 30 days. | /// * <n> months: the maximum age is <n> months, where a month has 30 days. | |||
/// | /// | |||
/// The purgeCount property has an integer value that specifies the maximum number | /// The purgeCount property has an integer value that specifies the maximum number | |||
/// of archived log files. If the number is exceeded, archived log f iles are | /// of archived log files. If the number is exceeded, archived log f iles are | |||
/// deleted, starting with the oldest. When "none" or empty string a re | /// deleted, starting with the oldest. When "none" or empty string a re | |||
/// supplied, they reset purgeCount to none (no purging). | /// supplied, they reset purgeCount to none (no purging). | |||
/// | /// | |||
/// The flush property specifies whether each log message is flushed | /// The flush property specifies whether each log message is flushed | |||
/// immediately to the log file (which may hurt application performa nce, | /// immediately to the log file (which may hurt application performa nce, | |||
/// but ensures that everything is in the log in case of a system cr ash), | /// but ensures that everything is in the log in case of a system cr ash), | |||
// or whether it's allowed to stay in the system's file buffer for some time. | // or whether it's allowed to stay in the system's file buffer for some time. | |||
/// Valid values are: | /// Valid values are: | |||
/// | /// | |||
/// * true: Every essages is immediately flushed to the log file | /// * true: Every essages is immediately flushed to the log file | |||
(default). | (default). | |||
/// * false: Messages are not immediately flushed to the log file | /// * false: Messages are not immediately flushed to the log file. | |||
. | /// | |||
/// The rotateOnOpen property specifies whether an existing log file | ||||
should be | ||||
/// rotated (and archived) when the channel is opened. Valid values | ||||
are: | ||||
/// | ||||
/// * true: The log file is rotated (and archived) when the chann | ||||
el is opened. | ||||
/// * false: Log messages will be appended to an existing log file | ||||
, | ||||
/// if it exists (unless other conditions for a rotation | ||||
are met). | ||||
/// This is the default. | ||||
/// | /// | |||
/// For a more lightweight file channel class, see SimpleFileChannel . | /// For a more lightweight file channel class, see SimpleFileChannel . | |||
{ | { | |||
public: | public: | |||
FileChannel(); | FileChannel(); | |||
/// Creates the FileChannel. | /// Creates the FileChannel. | |||
FileChannel(const std::string& path); | FileChannel(const std::string& path); | |||
/// Creates the FileChannel for a file with the given path. | /// Creates the FileChannel for a file with the given path. | |||
skipping to change at line 196 | skipping to change at line 183 | |||
void close(); | void close(); | |||
/// Closes the FileChannel. | /// Closes the FileChannel. | |||
void log(const Message& msg); | void log(const Message& msg); | |||
/// Logs the given message to the file. | /// Logs the given message to the file. | |||
void setProperty(const std::string& name, const std::string& value); | void setProperty(const std::string& name, const std::string& value); | |||
/// Sets the property with the given name. | /// Sets the property with the given name. | |||
/// | /// | |||
/// The following properties are supported: | /// The following properties are supported: | |||
/// * path: The log file's path. | /// * path: The log file's path. | |||
/// * rotation: The log file's rotation mode. See the | /// * rotation: The log file's rotation mode. See the | |||
/// FileChannel class for details. | /// FileChannel class for details. | |||
/// * archive: The log file's archive mode. See the | /// * archive: The log file's archive mode. See the | |||
/// FileChannel class for details. | /// FileChannel class for details. | |||
/// * times: The log file's time mode. See the | /// * times: The log file's time mode. See the | |||
/// FileChannel class for details. | /// FileChannel class for details. | |||
/// * compress: Enable or disable compression of | /// * compress: Enable or disable compression of | |||
/// archived files. See the FileChannel clas | /// archived files. See the FileChannel cl | |||
s | ass | |||
/// for details. | /// for details. | |||
/// * purgeAge: Maximum age of an archived log file befo | /// * purgeAge: Maximum age of an archived log file be | |||
re | fore | |||
/// it is purged. See the FileChannel class | /// it is purged. See the FileChannel clas | |||
for | s for | |||
/// details. | /// details. | |||
/// * purgeCount: Maximum number of archived log files bef | /// * purgeCount: Maximum number of archived log files b | |||
ore | efore | |||
/// files are purged. See the FileChannel cl | /// files are purged. See the FileChannel | |||
ass | class | |||
/// for details. | /// for details. | |||
/// * flush: Specifies whether messages are immediate | /// * flush: Specifies whether messages are immedia | |||
ly | tely | |||
/// flushed to the log file. See the FileCha | /// flushed to the log file. See the FileC | |||
nnel class | hannel class | |||
/// for details. | /// for details. | |||
/// * rotateOnOpen: Specifies whether an existing log file | ||||
should be | ||||
/// rotated and archived when the channel | ||||
is opened. | ||||
std::string getProperty(const std::string& name) const; | std::string getProperty(const std::string& name) const; | |||
/// Returns the value of the property with the given name. | /// Returns the value of the property with the given name. | |||
/// See setProperty() for a description of the supported | /// See setProperty() for a description of the supported | |||
/// properties. | /// properties. | |||
Timestamp creationDate() const; | Timestamp creationDate() const; | |||
/// Returns the log file's creation date. | /// Returns the log file's creation date. | |||
UInt64 size() const; | UInt64 size() const; | |||
skipping to change at line 238 | skipping to change at line 227 | |||
/// Returns the log file's path. | /// Returns the log file's path. | |||
static const std::string PROP_PATH; | static const std::string PROP_PATH; | |||
static const std::string PROP_ROTATION; | static const std::string PROP_ROTATION; | |||
static const std::string PROP_ARCHIVE; | static const std::string PROP_ARCHIVE; | |||
static const std::string PROP_TIMES; | static const std::string PROP_TIMES; | |||
static const std::string PROP_COMPRESS; | static const std::string PROP_COMPRESS; | |||
static const std::string PROP_PURGEAGE; | static const std::string PROP_PURGEAGE; | |||
static const std::string PROP_PURGECOUNT; | static const std::string PROP_PURGECOUNT; | |||
static const std::string PROP_FLUSH; | static const std::string PROP_FLUSH; | |||
static const std::string PROP_ROTATEONOPEN; | ||||
protected: | protected: | |||
~FileChannel(); | ~FileChannel(); | |||
void setRotation(const std::string& rotation); | void setRotation(const std::string& rotation); | |||
void setArchive(const std::string& archive); | void setArchive(const std::string& archive); | |||
void setCompress(const std::string& compress); | void setCompress(const std::string& compress); | |||
void setPurgeAge(const std::string& age); | void setPurgeAge(const std::string& age); | |||
void setPurgeCount(const std::string& count); | void setPurgeCount(const std::string& count); | |||
void setFlush(const std::string& flush); | void setFlush(const std::string& flush); | |||
void setRotateOnOpen(const std::string& rotateOnOpen); | ||||
void purge(); | void purge(); | |||
private: | private: | |||
std::string _path; | std::string _path; | |||
std::string _times; | std::string _times; | |||
std::string _rotation; | std::string _rotation; | |||
std::string _archive; | std::string _archive; | |||
bool _compress; | bool _compress; | |||
std::string _purgeAge; | std::string _purgeAge; | |||
std::string _purgeCount; | std::string _purgeCount; | |||
bool _flush; | bool _flush; | |||
bool _rotateOnOpen; | ||||
LogFile* _pFile; | LogFile* _pFile; | |||
RotateStrategy* _pRotateStrategy; | RotateStrategy* _pRotateStrategy; | |||
ArchiveStrategy* _pArchiveStrategy; | ArchiveStrategy* _pArchiveStrategy; | |||
PurgeStrategy* _pPurgeStrategy; | PurgeStrategy* _pPurgeStrategy; | |||
FastMutex _mutex; | FastMutex _mutex; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_FileChannel_INCLUDED | #endif // Foundation_FileChannel_INCLUDED | |||
End of changes. 9 change blocks. | ||||
65 lines changed or deleted | 52 lines changed or added | |||
FilePartSource.h | FilePartSource.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: FilePartSource | // Module: FilePartSource | |||
// | // | |||
// Definition of the FilePartSource class. | // Definition of the FilePartSource class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_FilePartSource_INCLUDED | #ifndef Net_FilePartSource_INCLUDED | |||
#define Net_FilePartSource_INCLUDED | #define Net_FilePartSource_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/PartSource.h" | #include "Poco/Net/PartSource.h" | |||
#include "Poco/FileStream.h" | #include "Poco/FileStream.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 79 | skipping to change at line 59 | |||
/// used as part filename (see filename()) only. | /// used as part filename (see filename()) only. | |||
/// | /// | |||
/// Throws an OpenFileException if the file cannot be opened . | /// Throws an OpenFileException if the file cannot be opened . | |||
~FilePartSource(); | ~FilePartSource(); | |||
/// Destroys the FilePartSource. | /// Destroys the FilePartSource. | |||
std::istream& stream(); | std::istream& stream(); | |||
/// Returns a file input stream for the given file. | /// Returns a file input stream for the given file. | |||
const std::string& filename(); | const std::string& filename() const; | |||
/// Returns the filename portion of the path. | /// Returns the filename portion of the path. | |||
std::streamsize getContentLength() const; | ||||
/// Returns the file size. | ||||
private: | private: | |||
std::string _path; | ||||
std::string _filename; | std::string _filename; | |||
Poco::FileInputStream _istr; | Poco::FileInputStream _istr; | |||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_FilePartSource_INCLUDED | #endif // Net_FilePartSource_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 6 lines changed or added | |||
FileStream.h | FileStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: FileStream | // Module: FileStream | |||
// | // | |||
// Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FileStream_INCLUDED | #ifndef Foundation_FileStream_INCLUDED | |||
#define Foundation_FileStream_INCLUDED | #define Foundation_FileStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#include "FileStream_WIN32.h" | #include "Poco/FileStream_WIN32.h" | |||
#else | #else | |||
#include "FileStream_POSIX.h" | #include "Poco/FileStream_POSIX.h" | |||
#endif | #endif | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API FileIOS: public virtual std::ios | class Foundation_API FileIOS: public virtual std::ios | |||
/// The base class for FileInputStream and FileOutputStream. | /// The base class for FileInputStream and FileOutputStream. | |||
/// | /// | |||
/// This class is needed to ensure the correct initialization | /// This class is needed to ensure the correct initialization | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
FileStreamFactory.h | FileStreamFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: URI | // Package: URI | |||
// Module: FileStreamFactory | // Module: FileStreamFactory | |||
// | // | |||
// Definition of the FileStreamFactory class. | // Definition of the FileStreamFactory class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FileStreamFactory_INCLUDED | #ifndef Foundation_FileStreamFactory_INCLUDED | |||
#define Foundation_FileStreamFactory_INCLUDED | #define Foundation_FileStreamFactory_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/URIStreamFactory.h" | #include "Poco/URIStreamFactory.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FileStream_POSIX.h | FileStream_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: FileStream | // Module: FileStream | |||
// | // | |||
// Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FileStream_POSIX_INCLUDED | #ifndef Foundation_FileStream_POSIX_INCLUDED | |||
#define Foundation_FileStream_POSIX_INCLUDED | #define Foundation_FileStream_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedBidirectionalStreamBuf.h" | #include "Poco/BufferedBidirectionalStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FileStream_WIN32.h | FileStream_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: FileStream | // Module: FileStream | |||
// | // | |||
// Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl asses. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FileStream_WIN32_INCLUDED | #ifndef Foundation_FileStream_WIN32_INCLUDED | |||
#define Foundation_FileStream_WIN32_INCLUDED | #define Foundation_FileStream_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedBidirectionalStreamBuf.h" | #include "Poco/BufferedBidirectionalStreamBuf.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_UNIX.h | File_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the FileImpl class for Unix. | // Definition of the FileImpl class for Unix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_UNIX_INCLUDED | #ifndef Foundation_File_UNIX_INCLUDED | |||
#define Foundation_File_UNIX_INCLUDED | #define Foundation_File_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class FileImpl | class FileImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_VMS.h | File_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the FileImpl class for OpenVMS. | // Definition of the FileImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_VMS_INCLUDED | #ifndef Foundation_File_VMS_INCLUDED | |||
#define Foundation_File_VMS_INCLUDED | #define Foundation_File_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class FileImpl | class FileImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_VX.h | File_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the FileImpl class for VxWorks. | // Definition of the FileImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_VX_INCLUDED | #ifndef Foundation_File_VX_INCLUDED | |||
#define Foundation_File_VX_INCLUDED | #define Foundation_File_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class FileImpl | class FileImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_WIN32.h | File_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the FileImpl class for WIN32. | // Definition of the FileImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_WIN32_INCLUDED | #ifndef Foundation_File_WIN32_INCLUDED | |||
#define Foundation_File_WIN32_INCLUDED | #define Foundation_File_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_WIN32U.h | File_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the Unicode FileImpl class for WIN32. | // Definition of the Unicode FileImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_WIN32U_INCLUDED | #ifndef Foundation_File_WIN32U_INCLUDED | |||
#define Foundation_File_WIN32U_INCLUDED | #define Foundation_File_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
File_WINCE.h | File_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: File | // Module: File | |||
// | // | |||
// Definition of the Unicode FileImpl class for WIN32. | // Definition of the Unicode FileImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_File_WINCE_INCLUDED | #ifndef Foundation_File_WINCE_INCLUDED | |||
#define Foundation_File_WINCE_INCLUDED | #define Foundation_File_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FilesystemConfiguration.h | FilesystemConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: FilesystemConfiguration | // Module: FilesystemConfiguration | |||
// | // | |||
// Definition of the FilesystemConfiguration class. | // Definition of the FilesystemConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_FilesystemConfiguration_INCLUDED | #ifndef Util_FilesystemConfiguration_INCLUDED | |||
#define Util_FilesystemConfiguration_INCLUDED | #define Util_FilesystemConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include "Poco/Path.h" | #include "Poco/Path.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Format.h | Format.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Format | // Module: Format | |||
// | // | |||
// Definition of the format freestanding function. | // Definition of the format freestanding function. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Format_INCLUDED | #ifndef Foundation_Format_INCLUDED | |||
#define Foundation_Format_INCLUDED | #define Foundation_Format_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Any.h" | #include "Poco/Any.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 128 | skipping to change at line 108 | |||
/// | /// | |||
/// Usage Examples: | /// Usage Examples: | |||
/// std::string s1 = format("The answer to life, the universe, a nd everything is %d", 42); | /// std::string s1 = format("The answer to life, the universe, a nd everything is %d", 42); | |||
/// std::string s2 = format("second: %[1]d, first: %[0]d", 1, 2) ; | /// std::string s2 = format("second: %[1]d, first: %[0]d", 1, 2) ; | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2); | std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2); | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3); | std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3); | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4); | std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4); | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4, const Any& value 5); | std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4, const Any& value 5); | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4, const Any& value 5, const Any& value6); | std::string Foundation_API format(const std::string& fmt, const Any& value1 , const Any& value2, const Any& value3, const Any& value4, const Any& value 5, const Any& value6); | |||
std::string Foundation_API format(const std::string& fmt, const Any& value1 | ||||
, const Any& value2, const Any& value3, const Any& value4, const Any& value | ||||
5, const Any& value6, const Any& value7); | ||||
std::string Foundation_API format(const std::string& fmt, const Any& value1 | ||||
, const Any& value2, const Any& value3, const Any& value4, const Any& value | ||||
5, const Any& value6, const Any& value7, const Any& value8); | ||||
std::string Foundation_API format(const std::string& fmt, const Any& value1 | ||||
, const Any& value2, const Any& value3, const Any& value4, const Any& value | ||||
5, const Any& value6, const Any& value7, const Any& value8, const Any& valu | ||||
e9); | ||||
std::string Foundation_API format(const std::string& fmt, const Any& value1 | ||||
, const Any& value2, const Any& value3, const Any& value4, const Any& value | ||||
5, const Any& value6, const Any& value7, const Any& value8, const Any& valu | ||||
e9, const Any& value10); | ||||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value); | |||
/// Appends the formatted string to result. | /// Appends the formatted string to result. | |||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2); | |||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3); | |||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4); | |||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4, co nst Any& value5); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4, co nst Any& value5); | |||
void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4, co nst Any& value5, const Any& value6); | void Foundation_API format(std::string& result, const std::string& fmt, con st Any& value1, const Any& value2, const Any& value3, const Any& value4, co nst Any& value5, const Any& value6); | |||
void Foundation_API format(std::string& result, const std::string& fmt, con | ||||
st Any& value1, const Any& value2, const Any& value3, const Any& value4, co | ||||
nst Any& value5, const Any& value6, const Any& value7); | ||||
void Foundation_API format(std::string& result, const std::string& fmt, con | ||||
st Any& value1, const Any& value2, const Any& value3, const Any& value4, co | ||||
nst Any& value5, const Any& value6, const Any& value7, const Any& value8); | ||||
void Foundation_API format(std::string& result, const std::string& fmt, con | ||||
st Any& value1, const Any& value2, const Any& value3, const Any& value4, co | ||||
nst Any& value5, const Any& value6, const Any& value7, const Any& value8, c | ||||
onst Any& value9); | ||||
void Foundation_API format(std::string& result, const std::string& fmt, con | ||||
st Any& value1, const Any& value2, const Any& value3, const Any& value4, co | ||||
nst Any& value5, const Any& value6, const Any& value7, const Any& value8, c | ||||
onst Any& value9, const Any& value10); | ||||
void Foundation_API format(std::string& result, const std::string& fmt, con st std::vector<Any>& values); | void Foundation_API format(std::string& result, const std::string& fmt, con st std::vector<Any>& values); | |||
/// Supports a variable number of arguments and is used by | /// Supports a variable number of arguments and is used by | |||
/// all other variants of format(). | /// all other variants of format(). | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Format_INCLUDED | #endif // Foundation_Format_INCLUDED | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 29 lines changed or added | |||
Formatter.h | Formatter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Formatter | // Module: Formatter | |||
// | // | |||
// Definition of the Formatter class. | // Definition of the Formatter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Formatter_INCLUDED | #ifndef Foundation_Formatter_INCLUDED | |||
#define Foundation_Formatter_INCLUDED | #define Foundation_Formatter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Configurable.h" | #include "Poco/Configurable.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
FormattingChannel.h | FormattingChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Formatter | // Module: Formatter | |||
// | // | |||
// Definition of the FormattingChannel class. | // Definition of the FormattingChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FormattingChannel_INCLUDED | #ifndef Foundation_FormattingChannel_INCLUDED | |||
#define Foundation_FormattingChannel_INCLUDED | #define Foundation_FormattingChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Foundation.h | Foundation.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// Package: Core | // Package: Core | |||
// Module: Foundation | // Module: Foundation | |||
// | // | |||
// Basic definitions for the POCO Foundation library. | // Basic definitions for the POCO Foundation library. | |||
// This file must be the first file included by every other Foundation | // This file must be the first file included by every other Foundation | |||
// header file. | // header file. | |||
// | // | |||
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Foundation_INCLUDED | #ifndef Foundation_Foundation_INCLUDED | |||
#define Foundation_Foundation_INCLUDED | #define Foundation_Foundation_INCLUDED | |||
// | // | |||
// Include library configuration | // Include library configuration | |||
// | // | |||
#include "Poco/Config.h" | #include "Poco/Config.h" | |||
skipping to change at line 74 | skipping to change at line 54 | |||
// | // | |||
#if (defined(_WIN32) || defined(_WIN32_WCE)) && defined(POCO_DLL) | #if (defined(_WIN32) || defined(_WIN32_WCE)) && defined(POCO_DLL) | |||
#if defined(Foundation_EXPORTS) | #if defined(Foundation_EXPORTS) | |||
#define Foundation_API __declspec(dllexport) | #define Foundation_API __declspec(dllexport) | |||
#else | #else | |||
#define Foundation_API __declspec(dllimport) | #define Foundation_API __declspec(dllimport) | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined(Foundation_API) | #if !defined(Foundation_API) | |||
#define Foundation_API | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__ | |||
GNUC__ >= 4) | ||||
#define Foundation_API __attribute__ ((visibility ("default" | ||||
))) | ||||
#else | ||||
#define Foundation_API | ||||
#endif | ||||
#endif | #endif | |||
// | // | |||
// Automatically link Foundation library. | // Automatically link Foundation library. | |||
// | // | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#if defined(POCO_DLL) | #if defined(POCO_DLL) | |||
#if defined(_DEBUG) | #if defined(_DEBUG) | |||
#define POCO_LIB_SUFFIX "d.lib" | #define POCO_LIB_SUFFIX "d.lib" | |||
#else | #else | |||
skipping to change at line 121 | skipping to change at line 105 | |||
#include "Poco/Platform_WIN32.h" | #include "Poco/Platform_WIN32.h" | |||
#elif defined(__VMS) | #elif defined(__VMS) | |||
#include "Poco/Platform_VMS.h" | #include "Poco/Platform_VMS.h" | |||
#elif defined(POCO_VXWORKS) | #elif defined(POCO_VXWORKS) | |||
#include "Poco/Platform_VX.h" | #include "Poco/Platform_VX.h" | |||
#elif defined(POCO_OS_FAMILY_UNIX) | #elif defined(POCO_OS_FAMILY_UNIX) | |||
#include "Poco/Platform_POSIX.h" | #include "Poco/Platform_POSIX.h" | |||
#endif | #endif | |||
// | // | |||
// Include alignment settings early | ||||
// | ||||
#include "Poco/Alignment.h" | ||||
// | ||||
// Cleanup inconsistencies | // Cleanup inconsistencies | |||
// | // | |||
#ifdef POCO_OS_FAMILY_WINDOWS | #ifdef POCO_OS_FAMILY_WINDOWS | |||
#if defined(POCO_WIN32_UTF8) && defined(POCO_NO_WSTRING) | #if defined(POCO_WIN32_UTF8) && defined(POCO_NO_WSTRING) | |||
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually excl usive. | #error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually excl usive. | |||
#endif | #endif | |||
#else | #else | |||
#ifdef POCO_WIN32_UTF8 | #ifdef POCO_WIN32_UTF8 | |||
#undef POCO_WIN32_UTF8 | #undef POCO_WIN32_UTF8 | |||
#endif | #endif | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 13 lines changed or added | |||
FunctionDelegate.h | FunctionDelegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: FunctionDelegate | // Module: FunctionDelegate | |||
// | // | |||
// Implementation of the FunctionDelegate template. | // Implementation of the FunctionDelegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FunctionDelegate_INCLUDED | #ifndef Foundation_FunctionDelegate_INCLUDED | |||
#define Foundation_FunctionDelegate_INCLUDED | #define Foundation_FunctionDelegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractDelegate.h" | #include "Poco/AbstractDelegate.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs, bool hasSender = true, bool senderIsConst = true> | template <class TArgs, bool hasSender = true, bool senderIsConst = true> | |||
class FunctionDelegate: public AbstractDelegate<TArgs> | class FunctionDelegate: public AbstractDelegate<TArgs> | |||
/// Wraps a freestanding function or static member function | /// Wraps a freestanding function or static member function | |||
/// for use as a Delegate. | /// for use as a Delegate. | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(const void*, TArgs&); | typedef void (*NotifyFunction)(const void*, TArgs&); | |||
FunctionDelegate(NotifyMethod method): | FunctionDelegate(NotifyFunction function): | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionDelegate(const FunctionDelegate& delegate): | FunctionDelegate(const FunctionDelegate& delegate): | |||
AbstractDelegate<TArgs>(delegate), | AbstractDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
~FunctionDelegate() | ~FunctionDelegate() | |||
{ | { | |||
} | } | |||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | FunctionDelegate& operator = (const FunctionDelegate& delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(sender, arguments); | (*_function)(sender, arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | |||
return pOtherDelegate && _receiverMethod == pOtherDelegate-> _receiverMethod; | return pOtherDelegate && _function == pOtherDelegate->_funct ion; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionDelegate(*this); | return new FunctionDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionDelegate(); | FunctionDelegate(); | |||
}; | }; | |||
template <class TArgs> | template <class TArgs> | |||
class FunctionDelegate<TArgs, true, false>: public AbstractDelegate<TArgs> | class FunctionDelegate<TArgs, true, false>: public AbstractDelegate<TArgs> | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(void*, TArgs&); | typedef void (*NotifyFunction)(void*, TArgs&); | |||
FunctionDelegate(NotifyMethod method): | FunctionDelegate(NotifyFunction function): | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionDelegate(const FunctionDelegate& delegate): | FunctionDelegate(const FunctionDelegate& delegate): | |||
AbstractDelegate<TArgs>(delegate), | AbstractDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
~FunctionDelegate() | ~FunctionDelegate() | |||
{ | { | |||
} | } | |||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | FunctionDelegate& operator = (const FunctionDelegate& delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(const_cast<void*>(sender), argume nts); | (*_function)(const_cast<void*>(sender), arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | |||
return pOtherDelegate && _receiverMethod == pOtherDelegate-> _receiverMethod; | return pOtherDelegate && _function == pOtherDelegate->_funct ion; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionDelegate(*this); | return new FunctionDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionDelegate(); | FunctionDelegate(); | |||
}; | }; | |||
template <class TArgs, bool senderIsConst> | template <class TArgs, bool senderIsConst> | |||
class FunctionDelegate<TArgs, false, senderIsConst>: public AbstractDelegat e<TArgs> | class FunctionDelegate<TArgs, false, senderIsConst>: public AbstractDelegat e<TArgs> | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(TArgs&); | typedef void (*NotifyFunction)(TArgs&); | |||
FunctionDelegate(NotifyMethod method): | FunctionDelegate(NotifyFunction function): | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionDelegate(const FunctionDelegate& delegate): | FunctionDelegate(const FunctionDelegate& delegate): | |||
AbstractDelegate<TArgs>(delegate), | AbstractDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
~FunctionDelegate() | ~FunctionDelegate() | |||
{ | { | |||
} | } | |||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | FunctionDelegate& operator = (const FunctionDelegate& delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* /*sender*/, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(arguments); | (*_function)(arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | const FunctionDelegate* pOtherDelegate = dynamic_cast<const FunctionDelegate*>(other.unwrap()); | |||
return pOtherDelegate && _receiverMethod == pOtherDelegate-> _receiverMethod; | return pOtherDelegate && _function == pOtherDelegate->_funct ion; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionDelegate(*this); | return new FunctionDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionDelegate(); | ||||
}; | ||||
template <> | ||||
class FunctionDelegate<void, true, true>: public AbstractDelegate<void> | ||||
/// Wraps a freestanding function or static member function | ||||
/// for use as a Delegate. | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(const void*); | ||||
FunctionDelegate(NotifyFunction function): | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionDelegate(const FunctionDelegate& delegate): | ||||
AbstractDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
~FunctionDelegate() | ||||
{ | ||||
} | ||||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(sender); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const | ||||
FunctionDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && _function == pOtherDelegate->_funct | ||||
ion; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionDelegate(); | ||||
}; | ||||
template <> | ||||
class FunctionDelegate<void, true, false>: public AbstractDelegate<void> | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(void*); | ||||
FunctionDelegate(NotifyFunction function): | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionDelegate(const FunctionDelegate& delegate): | ||||
AbstractDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
~FunctionDelegate() | ||||
{ | ||||
} | ||||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(const_cast<void*>(sender)); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const | ||||
FunctionDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && _function == pOtherDelegate->_funct | ||||
ion; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionDelegate(); | ||||
}; | ||||
template <bool senderIsConst> | ||||
class FunctionDelegate<void, false, senderIsConst>: public AbstractDelegate | ||||
<void> | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(); | ||||
FunctionDelegate(NotifyFunction function): | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionDelegate(const FunctionDelegate& delegate): | ||||
AbstractDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
~FunctionDelegate() | ||||
{ | ||||
} | ||||
FunctionDelegate& operator = (const FunctionDelegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* /*sender*/) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionDelegate* pOtherDelegate = dynamic_cast<const | ||||
FunctionDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && _function == pOtherDelegate->_funct | ||||
ion; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionDelegate(); | FunctionDelegate(); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_FunctionDelegate_INCLUDED | #endif // Foundation_FunctionDelegate_INCLUDED | |||
End of changes. 29 change blocks. | ||||
66 lines changed or deleted | 239 lines changed or added | |||
FunctionPriorityDelegate.h | FunctionPriorityDelegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: FunctionPriorityDelegate | // Module: FunctionPriorityDelegate | |||
// | // | |||
// Implementation of the FunctionPriorityDelegate template. | // Implementation of the FunctionPriorityDelegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_FunctionPriorityDelegate_INCLUDED | #ifndef Foundation_FunctionPriorityDelegate_INCLUDED | |||
#define Foundation_FunctionPriorityDelegate_INCLUDED | #define Foundation_FunctionPriorityDelegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractPriorityDelegate.h" | #include "Poco/AbstractPriorityDelegate.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs, bool useSender = true, bool senderIsConst = true> | template <class TArgs, bool useSender = true, bool senderIsConst = true> | |||
class FunctionPriorityDelegate: public AbstractPriorityDelegate<TArgs> | class FunctionPriorityDelegate: public AbstractPriorityDelegate<TArgs> | |||
/// Wraps a freestanding function or static member function | /// Wraps a freestanding function or static member function | |||
/// for use as a PriorityDelegate. | /// for use as a PriorityDelegate. | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(const void*, TArgs&); | typedef void (*NotifyFunction)(const void*, TArgs&); | |||
FunctionPriorityDelegate(NotifyMethod method, int prio): | FunctionPriorityDelegate(NotifyFunction function, int prio): | |||
AbstractPriorityDelegate<TArgs>(prio), | AbstractPriorityDelegate<TArgs>(prio), | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | |||
AbstractPriorityDelegate<TArgs>(delegate), | AbstractPriorityDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | this->_priority = delegate._priority; | |||
this->_priority = delegate._priority; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
~FunctionPriorityDelegate() | ~FunctionPriorityDelegate() | |||
{ | { | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(sender, arguments); | (*_function)(sender, arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | |||
return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _receiverMethod == pOtherDelegate->_receiverMethod; | return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _function == pOtherDelegate->_function; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionPriorityDelegate(*this); | return new FunctionPriorityDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionPriorityDelegate(); | FunctionPriorityDelegate(); | |||
}; | }; | |||
template <class TArgs> | template <class TArgs> | |||
class FunctionPriorityDelegate<TArgs, true, false>: public AbstractPriority Delegate<TArgs> | class FunctionPriorityDelegate<TArgs, true, false>: public AbstractPriority Delegate<TArgs> | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(void*, TArgs&); | typedef void (*NotifyFunction)(void*, TArgs&); | |||
FunctionPriorityDelegate(NotifyMethod method, int prio): | FunctionPriorityDelegate(NotifyFunction function, int prio): | |||
AbstractPriorityDelegate<TArgs>(prio), | AbstractPriorityDelegate<TArgs>(prio), | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | |||
AbstractPriorityDelegate<TArgs>(delegate), | AbstractPriorityDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | this->_priority = delegate._priority; | |||
this->_priority = delegate._priority; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
~FunctionPriorityDelegate() | ~FunctionPriorityDelegate() | |||
{ | { | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(const_cast<void*>(sender), argume nts); | (*_function)(const_cast<void*>(sender), arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | |||
return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _receiverMethod == pOtherDelegate->_receiverMethod; | return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _function == pOtherDelegate->_function; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionPriorityDelegate(*this); | return new FunctionPriorityDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionPriorityDelegate(); | FunctionPriorityDelegate(); | |||
}; | }; | |||
template <class TArgs> | template <class TArgs> | |||
class FunctionPriorityDelegate<TArgs, false>: public AbstractPriorityDelega te<TArgs> | class FunctionPriorityDelegate<TArgs, false>: public AbstractPriorityDelega te<TArgs> | |||
{ | { | |||
public: | public: | |||
typedef void (*NotifyMethod)(TArgs&); | typedef void (*NotifyFunction)(TArgs&); | |||
FunctionPriorityDelegate(NotifyMethod method, int prio): | FunctionPriorityDelegate(NotifyFunction function, int prio): | |||
AbstractPriorityDelegate<TArgs>(prio), | AbstractPriorityDelegate<TArgs>(prio), | |||
_receiverMethod(method) | _function(function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | |||
AbstractPriorityDelegate<TArgs>(delegate), | AbstractPriorityDelegate<TArgs>(delegate), | |||
_receiverMethod(delegate._receiverMethod) | _function(delegate._function) | |||
{ | { | |||
} | } | |||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate & delegate) | |||
{ | { | |||
if (&delegate != this) | if (&delegate != this) | |||
{ | { | |||
this->_pTarget = delegate._pTarget; | this->_function = delegate._function; | |||
this->_receiverMethod = delegate._receiverMethod; | this->_priority = delegate._priority; | |||
this->_priority = delegate._priority; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
~FunctionPriorityDelegate() | ~FunctionPriorityDelegate() | |||
{ | { | |||
} | } | |||
bool notify(const void* sender, TArgs& arguments) | bool notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
if (_receiverMethod) | if (_function) | |||
{ | { | |||
(*_receiverMethod)(arguments); | (*_function)(arguments); | |||
return true; | return true; | |||
} | } | |||
else return false; | else return false; | |||
} | } | |||
bool equals(const AbstractDelegate<TArgs>& other) const | bool equals(const AbstractDelegate<TArgs>& other) const | |||
{ | { | |||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas t<const FunctionPriorityDelegate*>(other.unwrap()); | |||
return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _receiverMethod == pOtherDelegate->_receiverMethod; | return pOtherDelegate && this->priority() == pOtherDelegate- >priority() && _function == pOtherDelegate->_function; | |||
} | } | |||
AbstractDelegate<TArgs>* clone() const | AbstractDelegate<TArgs>* clone() const | |||
{ | { | |||
return new FunctionPriorityDelegate(*this); | return new FunctionPriorityDelegate(*this); | |||
} | } | |||
void disable() | void disable() | |||
{ | { | |||
Mutex::ScopedLock lock(_mutex); | Mutex::ScopedLock lock(_mutex); | |||
_receiverMethod = 0; | _function = 0; | |||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionPriorityDelegate(); | ||||
}; | ||||
template <> | ||||
class FunctionPriorityDelegate<void, true, true>: public AbstractPriorityDe | ||||
legate<void> | ||||
/// Wraps a freestanding function or static member function | ||||
/// for use as a PriorityDelegate. | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(const void*); | ||||
FunctionPriorityDelegate(NotifyFunction function, int prio): | ||||
AbstractPriorityDelegate<void>(prio), | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | ||||
AbstractPriorityDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate | ||||
& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
this->_priority = delegate._priority; | ||||
} | ||||
return *this; | ||||
} | ||||
~FunctionPriorityDelegate() | ||||
{ | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(sender); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas | ||||
t<const FunctionPriorityDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && this->priority() == pOtherDelegate- | ||||
>priority() && _function == pOtherDelegate->_function; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionPriorityDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionPriorityDelegate(); | ||||
}; | ||||
template <> | ||||
class FunctionPriorityDelegate<void, true, false>: public AbstractPriorityD | ||||
elegate<void> | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(void*); | ||||
FunctionPriorityDelegate(NotifyFunction function, int prio): | ||||
AbstractPriorityDelegate<void>(prio), | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | ||||
AbstractPriorityDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate | ||||
& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
this->_priority = delegate._priority; | ||||
} | ||||
return *this; | ||||
} | ||||
~FunctionPriorityDelegate() | ||||
{ | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(const_cast<void*>(sender)); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas | ||||
t<const FunctionPriorityDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && this->priority() == pOtherDelegate- | ||||
>priority() && _function == pOtherDelegate->_function; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionPriorityDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | ||||
protected: | ||||
NotifyFunction _function; | ||||
Mutex _mutex; | ||||
private: | ||||
FunctionPriorityDelegate(); | ||||
}; | ||||
template <> | ||||
class FunctionPriorityDelegate<void, false>: public AbstractPriorityDelegat | ||||
e<void> | ||||
{ | ||||
public: | ||||
typedef void (*NotifyFunction)(); | ||||
FunctionPriorityDelegate(NotifyFunction function, int prio): | ||||
AbstractPriorityDelegate<void>(prio), | ||||
_function(function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate(const FunctionPriorityDelegate& delegate): | ||||
AbstractPriorityDelegate<void>(delegate), | ||||
_function(delegate._function) | ||||
{ | ||||
} | ||||
FunctionPriorityDelegate& operator = (const FunctionPriorityDelegate | ||||
& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_function = delegate._function; | ||||
this->_priority = delegate._priority; | ||||
} | ||||
return *this; | ||||
} | ||||
~FunctionPriorityDelegate() | ||||
{ | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_function) | ||||
{ | ||||
(*_function)(); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const FunctionPriorityDelegate* pOtherDelegate = dynamic_cas | ||||
t<const FunctionPriorityDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && this->priority() == pOtherDelegate- | ||||
>priority() && _function == pOtherDelegate->_function; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new FunctionPriorityDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_function = 0; | ||||
} | } | |||
protected: | protected: | |||
NotifyMethod _receiverMethod; | NotifyFunction _function; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
FunctionPriorityDelegate(); | FunctionPriorityDelegate(); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_FunctionPriorityDelegate_INCLUDED | #endif // Foundation_FunctionPriorityDelegate_INCLUDED | |||
End of changes. 31 change blocks. | ||||
68 lines changed or deleted | 252 lines changed or added | |||
Glob.h | Glob.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Glob | // Module: Glob | |||
// | // | |||
// Definition of the Glob class. | // Definition of the Glob class. | |||
// | // | |||
// Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Glob_INCLUDED | #ifndef Foundation_Glob_INCLUDED | |||
#define Foundation_Glob_INCLUDED | #define Foundation_Glob_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextIterator.h" | #include "Poco/TextIterator.h" | |||
#include <set> | #include <set> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 137 | skipping to change at line 117 | |||
/// | /// | |||
/// The pattern may contain wildcard expressions even in int ermediate | /// The pattern may contain wildcard expressions even in int ermediate | |||
/// directory names (e.g. /usr/include/*/*.h). | /// directory names (e.g. /usr/include/*/*.h). | |||
/// | /// | |||
/// Note that, for obvious reasons, escaping characters in a pattern | /// Note that, for obvious reasons, escaping characters in a pattern | |||
/// with a backslash does not work in Windows-style paths. | /// with a backslash does not work in Windows-style paths. | |||
/// | /// | |||
/// Directories that for whatever reason cannot be traversed are | /// Directories that for whatever reason cannot be traversed are | |||
/// ignored. | /// ignored. | |||
static void glob(const Path& pathPattern, const Path& basePath, std: | ||||
:set<std::string>& files, int options = 0); | ||||
/// Creates a set of files that match the given pathPattern, | ||||
starting from basePath. | ||||
/// | ||||
/// The pattern may contain wildcard expressions even in int | ||||
ermediate | ||||
/// directory names (e.g. /usr/include/*/*.h). | ||||
/// | ||||
/// Note that, for obvious reasons, escaping characters in a | ||||
pattern | ||||
/// with a backslash does not work in Windows-style paths. | ||||
/// | ||||
/// Directories that for whatever reason cannot be traversed | ||||
are | ||||
/// ignored. | ||||
protected: | protected: | |||
bool match(TextIterator& itp, const TextIterator& endp, TextIterator & its, const TextIterator& ends); | bool match(TextIterator& itp, const TextIterator& endp, TextIterator & its, const TextIterator& ends); | |||
bool matchAfterAsterisk(TextIterator itp, const TextIterator& endp, TextIterator its, const TextIterator& ends); | bool matchAfterAsterisk(TextIterator itp, const TextIterator& endp, TextIterator its, const TextIterator& ends); | |||
bool matchSet(TextIterator& itp, const TextIterator& endp, int c); | bool matchSet(TextIterator& itp, const TextIterator& endp, int c); | |||
static void collect(const Path& pathPattern, const Path& base, const Path& current, const std::string& pattern, std::set<std::string>& files, i nt options); | static void collect(const Path& pathPattern, const Path& base, const Path& current, const std::string& pattern, std::set<std::string>& files, i nt options); | |||
static bool isDirectory(const Path& path, bool followSymlink); | static bool isDirectory(const Path& path, bool followSymlink); | |||
private: | private: | |||
std::string _pattern; | std::string _pattern; | |||
int _options; | int _options; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 18 lines changed or added | |||
HMACEngine.h | HMACEngine.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: HMACEngine | // Module: HMACEngine | |||
// | // | |||
// Definition of the HMACEngine class. | // Definition of the HMACEngine class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HMACEngine_INCLUDED | #ifndef Foundation_HMACEngine_INCLUDED | |||
#define Foundation_HMACEngine_INCLUDED | #define Foundation_HMACEngine_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DigestEngine.h" | #include "Poco/DigestEngine.h" | |||
#include <cstring> | #include <cstring> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTMLForm.h | HTMLForm.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTML | // Package: HTML | |||
// Module: HTMLForm | // Module: HTMLForm | |||
// | // | |||
// Definition of the HTMLForm class. | // Definition of the HTMLForm class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTMLForm_INCLUDED | #ifndef Net_HTMLForm_INCLUDED | |||
#define Net_HTMLForm_INCLUDED | #define Net_HTMLForm_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/NameValueCollection.h" | #include "Poco/Net/NameValueCollection.h" | |||
#include <ostream> | #include <ostream> | |||
#include <istream> | #include <istream> | |||
#include <vector> | #include <vector> | |||
skipping to change at line 172 | skipping to change at line 152 | |||
/// POST), the form's content type is set to the form's enco ding. | /// POST), the form's content type is set to the form's enco ding. | |||
/// The form's parameters must be written to the | /// The form's parameters must be written to the | |||
/// request body separately, with a call to write. | /// request body separately, with a call to write. | |||
/// If the request's HTTP version is HTTP/1.0: | /// If the request's HTTP version is HTTP/1.0: | |||
/// - persistent connections are disabled | /// - persistent connections are disabled | |||
/// - the content transfer encoding is set to identity en coding | /// - the content transfer encoding is set to identity en coding | |||
/// Otherwise, if the request's HTTP version is HTTP/1.1: | /// Otherwise, if the request's HTTP version is HTTP/1.1: | |||
/// - the request's persistent connection state is left u nchanged | /// - the request's persistent connection state is left u nchanged | |||
/// - the content transfer encoding is set to chunked | /// - the content transfer encoding is set to chunked | |||
std::streamsize calculateContentLength(); | ||||
/// Calculate the content length for the form. | ||||
/// May be UNKNOWN_CONTENT_LENGTH if not possible | ||||
/// to calculate | ||||
void write(std::ostream& ostr, const std::string& boundary); | void write(std::ostream& ostr, const std::string& boundary); | |||
/// Writes the form data to the given output stream, | /// Writes the form data to the given output stream, | |||
/// using the specified encoding. | /// using the specified encoding. | |||
void write(std::ostream& ostr); | void write(std::ostream& ostr); | |||
/// Writes the form data to the given output stream, | /// Writes the form data to the given output stream, | |||
/// using the specified encoding. | /// using the specified encoding. | |||
const std::string& boundary() const; | const std::string& boundary() const; | |||
/// Returns the MIME boundary used for writing | /// Returns the MIME boundary used for writing | |||
skipping to change at line 201 | skipping to change at line 186 | |||
/// Sets the maximum number of header fields | /// Sets the maximum number of header fields | |||
/// allowed. This limit is used to defend certain | /// allowed. This limit is used to defend certain | |||
/// kinds of denial-of-service attacks. | /// kinds of denial-of-service attacks. | |||
/// Specify 0 for unlimited (not recommended). | /// Specify 0 for unlimited (not recommended). | |||
/// | /// | |||
/// The default limit is 100. | /// The default limit is 100. | |||
static const std::string ENCODING_URL; /// "application/x-www- form-urlencoded" | static const std::string ENCODING_URL; /// "application/x-www- form-urlencoded" | |||
static const std::string ENCODING_MULTIPART; /// "multipart/form-dat a" | static const std::string ENCODING_MULTIPART; /// "multipart/form-dat a" | |||
static const int UNKNOWN_CONTENT_LENGTH; | ||||
protected: | protected: | |||
void readUrl(std::istream& istr); | void readUrl(std::istream& istr); | |||
void readMultipart(std::istream& istr, PartHandler& handler); | void readMultipart(std::istream& istr, PartHandler& handler); | |||
void writeUrl(std::ostream& ostr); | void writeUrl(std::ostream& ostr); | |||
void writeMultipart(std::ostream& ostr); | void writeMultipart(std::ostream& ostr); | |||
private: | private: | |||
HTMLForm(const HTMLForm&); | HTMLForm(const HTMLForm&); | |||
HTMLForm& operator = (const HTMLForm&); | HTMLForm& operator = (const HTMLForm&); | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 7 lines changed or added | |||
HTTPAuthenticationParams.h | HTTPAuthenticationParams.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPAuthenticationParams | // Module: HTTPAuthenticationParams | |||
// | // | |||
// Definition of the HTTPAuthenticationParams class. | // Definition of the HTTPAuthenticationParams class. | |||
// | // | |||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | // Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPAuthenticationParams_INCLUDED | #ifndef Net_HTTPAuthenticationParams_INCLUDED | |||
#define Net_HTTPAuthenticationParams_INCLUDED | #define Net_HTTPAuthenticationParams_INCLUDED | |||
#include "Poco/Net/NameValueCollection.h" | #include "Poco/Net/NameValueCollection.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 64 | skipping to change at line 44 | |||
public: | public: | |||
HTTPAuthenticationParams(); | HTTPAuthenticationParams(); | |||
/// Creates an empty authentication parameters collection. | /// Creates an empty authentication parameters collection. | |||
explicit HTTPAuthenticationParams(const std::string& authInfo); | explicit HTTPAuthenticationParams(const std::string& authInfo); | |||
/// See fromAuthInfo() documentation. | /// See fromAuthInfo() documentation. | |||
explicit HTTPAuthenticationParams(const HTTPRequest& request); | explicit HTTPAuthenticationParams(const HTTPRequest& request); | |||
/// See fromRequest() documentation. | /// See fromRequest() documentation. | |||
explicit HTTPAuthenticationParams(const HTTPResponse& response); | HTTPAuthenticationParams(const HTTPResponse& response, const std::st ring& header = WWW_AUTHENTICATE); | |||
/// See fromResponse() documentation. | /// See fromResponse() documentation. | |||
virtual ~HTTPAuthenticationParams(); | virtual ~HTTPAuthenticationParams(); | |||
/// Destroys the HTTPAuthenticationParams. | /// Destroys the HTTPAuthenticationParams. | |||
HTTPAuthenticationParams& operator = (const HTTPAuthenticationParams & authParams); | HTTPAuthenticationParams& operator = (const HTTPAuthenticationParams & authParams); | |||
/// Assigns the content of another HTTPAuthenticationParams. | /// Assigns the content of another HTTPAuthenticationParams. | |||
void fromAuthInfo(const std::string& authInfo); | void fromAuthInfo(const std::string& authInfo); | |||
/// Creates an HTTPAuthenticationParams by parsing authentic ation | /// Creates an HTTPAuthenticationParams by parsing authentic ation | |||
skipping to change at line 86 | skipping to change at line 66 | |||
void fromRequest(const HTTPRequest& request); | void fromRequest(const HTTPRequest& request); | |||
/// Extracts authentication information from the request and creates | /// Extracts authentication information from the request and creates | |||
/// HTTPAuthenticationParams by parsing it. | /// HTTPAuthenticationParams by parsing it. | |||
/// | /// | |||
/// Throws a NotAuthenticatedException if no authentication | /// Throws a NotAuthenticatedException if no authentication | |||
/// information is contained in request. | /// information is contained in request. | |||
/// Throws a InvalidArgumentException if authentication sche me is | /// Throws a InvalidArgumentException if authentication sche me is | |||
/// unknown or invalid. | /// unknown or invalid. | |||
void fromResponse(const HTTPResponse& response); | void fromResponse(const HTTPResponse& response, const std::string& h eader = WWW_AUTHENTICATE); | |||
/// Extracts authentication information from the response an d creates | /// Extracts authentication information from the response an d creates | |||
/// HTTPAuthenticationParams by parsing it. | /// HTTPAuthenticationParams by parsing it. | |||
/// | /// | |||
/// Throws a NotAuthenticatedException if no authentication | /// Throws a NotAuthenticatedException if no authentication | |||
/// information is contained in response. | /// information is contained in response. | |||
/// Throws a InvalidArgumentException if authentication sche me is | /// Throws a InvalidArgumentException if authentication sche me is | |||
/// unknown or invalid. | /// unknown or invalid. | |||
void setRealm(const std::string& realm); | void setRealm(const std::string& realm); | |||
/// Sets the "realm" parameter to the provided string. | /// Sets the "realm" parameter to the provided string. | |||
skipping to change at line 109 | skipping to change at line 89 | |||
/// Returns value of the "realm" parameter. | /// Returns value of the "realm" parameter. | |||
/// | /// | |||
/// Throws NotFoundException is there is no "realm" set in t he | /// Throws NotFoundException is there is no "realm" set in t he | |||
/// HTTPAuthenticationParams. | /// HTTPAuthenticationParams. | |||
std::string toString() const; | std::string toString() const; | |||
/// Formats the HTTPAuthenticationParams for inclusion in HT TP | /// Formats the HTTPAuthenticationParams for inclusion in HT TP | |||
/// request or response authentication header. | /// request or response authentication header. | |||
static const std::string REALM; | static const std::string REALM; | |||
static const std::string WWW_AUTHENTICATE; | ||||
static const std::string PROXY_AUTHENTICATE; | ||||
private: | private: | |||
void parse(std::string::const_iterator first, std::string::const_ite rator last); | void parse(std::string::const_iterator first, std::string::const_ite rator last); | |||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_HTTPAuthenticationParams_INCLUDED | #endif // Net_HTTPAuthenticationParams_INCLUDED | |||
End of changes. 4 change blocks. | ||||
34 lines changed or deleted | 5 lines changed or added | |||
HTTPBasicCredentials.h | HTTPBasicCredentials.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPBasicCredentials | // Module: HTTPBasicCredentials | |||
// | // | |||
// Definition of the HTTPBasicCredentials class. | // Definition of the HTTPBasicCredentials class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPBasicCredentials_INCLUDED | #ifndef Net_HTTPBasicCredentials_INCLUDED | |||
#define Net_HTTPBasicCredentials_INCLUDED | #define Net_HTTPBasicCredentials_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPBasicStreamBuf.h | HTTPBasicStreamBuf.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPBasicStreamBuf | // Module: HTTPBasicStreamBuf | |||
// | // | |||
// Definition of the HTTPBasicStreamBuf class. | // Definition of the HTTPBasicStreamBuf class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPBasicStreamBuf_INCLUDED | #ifndef Net_HTTPBasicStreamBuf_INCLUDED | |||
#define Net_HTTPBasicStreamBuf_INCLUDED | #define Net_HTTPBasicStreamBuf_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include "Poco/Net/HTTPBufferAllocator.h" | #include "Poco/Net/HTTPBufferAllocator.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPBufferAllocator.h | HTTPBufferAllocator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPBufferAllocator | // Module: HTTPBufferAllocator | |||
// | // | |||
// Definition of the HTTPBufferAllocator class. | // Definition of the HTTPBufferAllocator class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPBufferAllocator_INCLUDED | #ifndef Net_HTTPBufferAllocator_INCLUDED | |||
#define Net_HTTPBufferAllocator_INCLUDED | #define Net_HTTPBufferAllocator_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/MemoryPool.h" | #include "Poco/MemoryPool.h" | |||
#include <ios> | #include <ios> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPChunkedStream.h | HTTPChunkedStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPChunkedStream | // Module: HTTPChunkedStream | |||
// | // | |||
// Definition of the HTTPChunkedStream class. | // Definition of the HTTPChunkedStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPChunkedStream_INCLUDED | #ifndef Net_HTTPChunkedStream_INCLUDED | |||
#define Net_HTTPChunkedStream_INCLUDED | #define Net_HTTPChunkedStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPBasicStreamBuf.h" | #include "Poco/Net/HTTPBasicStreamBuf.h" | |||
#include "Poco/MemoryPool.h" | #include "Poco/MemoryPool.h" | |||
#include <cstddef> | #include <cstddef> | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPClientSession.h | HTTPClientSession.h | |||
---|---|---|---|---|
// | // | |||
// HTTPClientSession.h | // HTTPClientSession.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPClientSession.h#4 $ | // $Id: //poco/1.4/Net/include/Poco/Net/HTTPClientSession.h#8 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPClient | // Package: HTTPClient | |||
// Module: HTTPClientSession | // Module: HTTPClientSession | |||
// | // | |||
// Definition of the HTTPClientSession class. | // Definition of the HTTPClientSession class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPClientSession_INCLUDED | #ifndef Net_HTTPClientSession_INCLUDED | |||
#define Net_HTTPClientSession_INCLUDED | #define Net_HTTPClientSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPSession.h" | #include "Poco/Net/HTTPSession.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class HTTPRequest; | class HTTPRequest; | |||
class HTTPResponse; | class HTTPResponse; | |||
class Net_API HTTPClientSession: public HTTPSession | class Net_API HTTPClientSession: public HTTPSession | |||
skipping to change at line 81 | skipping to change at line 62 | |||
/// read the response body. | /// read the response body. | |||
/// | /// | |||
/// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more | /// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more | |||
/// information about the HTTP protocol. | /// information about the HTTP protocol. | |||
/// | /// | |||
/// Proxies and proxy authorization (only HTTP Basic Authorization) | /// Proxies and proxy authorization (only HTTP Basic Authorization) | |||
/// is supported. Use setProxy() and setProxyCredentials() to | /// is supported. Use setProxy() and setProxyCredentials() to | |||
/// set up a session through a proxy. | /// set up a session through a proxy. | |||
{ | { | |||
public: | public: | |||
struct ProxyConfig | ||||
/// HTTP proxy server configuration. | ||||
{ | ||||
ProxyConfig(): | ||||
port(HTTP_PORT) | ||||
{ | ||||
} | ||||
std::string host; | ||||
/// Proxy server host name or IP address. | ||||
Poco::UInt16 port; | ||||
/// Proxy server TCP port. | ||||
std::string username; | ||||
/// Proxy server username. | ||||
std::string password; | ||||
/// Proxy server password. | ||||
std::string nonProxyHosts; | ||||
/// A regular expression defining hosts for which th | ||||
e proxy should be bypassed, | ||||
/// e.g. "localhost|127\.0\.0\.1|192\.168\.0\.\d+". | ||||
Can also be an empty | ||||
/// string to disable proxy bypassing. | ||||
}; | ||||
HTTPClientSession(); | HTTPClientSession(); | |||
/// Creates an unconnected HTTPClientSession. | /// Creates an unconnected HTTPClientSession. | |||
explicit HTTPClientSession(const StreamSocket& socket); | explicit HTTPClientSession(const StreamSocket& socket); | |||
/// Creates a HTTPClientSession using the given socket. | /// Creates a HTTPClientSession using the given socket. | |||
/// The socket must not be connected. The session | /// The socket must not be connected. The session | |||
/// takes ownership of the socket. | /// takes ownership of the socket. | |||
explicit HTTPClientSession(const SocketAddress& address); | explicit HTTPClientSession(const SocketAddress& address); | |||
/// Creates a HTTPClientSession using the given address. | /// Creates a HTTPClientSession using the given address. | |||
HTTPClientSession(const std::string& host, Poco::UInt16 port = HTTPS ession::HTTP_PORT); | HTTPClientSession(const std::string& host, Poco::UInt16 port = HTTPS ession::HTTP_PORT); | |||
/// Creates a HTTPClientSession using the given host and por t. | /// Creates a HTTPClientSession using the given host and por t. | |||
HTTPClientSession(const std::string& host, Poco::UInt16 port, const | ||||
ProxyConfig& proxyConfig); | ||||
/// Creates a HTTPClientSession using the given host, port a | ||||
nd proxy configuration. | ||||
virtual ~HTTPClientSession(); | virtual ~HTTPClientSession(); | |||
/// Destroys the HTTPClientSession and closes | /// Destroys the HTTPClientSession and closes | |||
/// the underlying socket. | /// the underlying socket. | |||
void setHost(const std::string& host); | void setHost(const std::string& host); | |||
/// Sets the host name of the target HTTP server. | /// Sets the host name of the target HTTP server. | |||
/// | /// | |||
/// The host must not be changed once there is an | /// The host must not be changed once there is an | |||
/// open connection to the server. | /// open connection to the server. | |||
skipping to change at line 150 | skipping to change at line 156 | |||
const std::string& getProxyUsername() const; | const std::string& getProxyUsername() const; | |||
/// Returns the username for proxy authentication. | /// Returns the username for proxy authentication. | |||
void setProxyPassword(const std::string& password); | void setProxyPassword(const std::string& password); | |||
/// Sets the password for proxy authentication. | /// Sets the password for proxy authentication. | |||
/// Only Basic authentication is supported. | /// Only Basic authentication is supported. | |||
const std::string& getProxyPassword() const; | const std::string& getProxyPassword() const; | |||
/// Returns the password for proxy authentication. | /// Returns the password for proxy authentication. | |||
void setProxyConfig(const ProxyConfig& config); | ||||
/// Sets the proxy configuration. | ||||
const ProxyConfig& getProxyConfig() const; | ||||
/// Returns the proxy configuration. | ||||
static void setGlobalProxyConfig(const ProxyConfig& config); | ||||
/// Sets the global proxy configuration. | ||||
/// | ||||
/// The global proxy configuration is used by all HTTPClient | ||||
Session | ||||
/// instances, unless a different proxy configuration is exp | ||||
licitly set. | ||||
/// | ||||
/// Warning: Setting the global proxy configuration is not t | ||||
hread safe. | ||||
/// The global proxy configuration should be set at start up | ||||
, before | ||||
/// the first HTTPClientSession instance is created. | ||||
static const ProxyConfig& getGlobalProxyConfig(); | ||||
/// Returns the global proxy configuration. | ||||
void setKeepAliveTimeout(const Poco::Timespan& timeout); | void setKeepAliveTimeout(const Poco::Timespan& timeout); | |||
/// Sets the connection timeout for HTTP connections. | /// Sets the connection timeout for HTTP connections. | |||
const Poco::Timespan& getKeepAliveTimeout() const; | const Poco::Timespan& getKeepAliveTimeout() const; | |||
/// Returns the connection timeout for HTTP connections. | /// Returns the connection timeout for HTTP connections. | |||
virtual std::ostream& sendRequest(HTTPRequest& request); | virtual std::ostream& sendRequest(HTTPRequest& request); | |||
/// Sends the header for the given HTTP request to | /// Sends the header for the given HTTP request to | |||
/// the server. | /// the server. | |||
/// | /// | |||
skipping to change at line 216 | skipping to change at line 241 | |||
/// This should be called whenever something went | /// This should be called whenever something went | |||
/// wrong when sending a request (e.g., sendRequest() | /// wrong when sending a request (e.g., sendRequest() | |||
/// or receiveResponse() throws an exception, or | /// or receiveResponse() throws an exception, or | |||
/// the request or response stream changes into | /// the request or response stream changes into | |||
/// fail or bad state, but not eof state). | /// fail or bad state, but not eof state). | |||
virtual bool secure() const; | virtual bool secure() const; | |||
/// Return true iff the session uses SSL or TLS, | /// Return true iff the session uses SSL or TLS, | |||
/// or false otherwise. | /// or false otherwise. | |||
bool bypassProxy() const; | ||||
/// Returns true if the proxy should be bypassed | ||||
/// for the current host. | ||||
protected: | protected: | |||
enum | enum | |||
{ | { | |||
DEFAULT_KEEP_ALIVE_TIMEOUT = 8 | DEFAULT_KEEP_ALIVE_TIMEOUT = 8 | |||
}; | }; | |||
void reconnect(); | void reconnect(); | |||
/// Connects the underlying socket to the HTTP server. | /// Connects the underlying socket to the HTTP server. | |||
int write(const char* buffer, std::streamsize length); | int write(const char* buffer, std::streamsize length); | |||
/// Tries to re-connect if keep-alive is on. | /// Tries to re-connect if keep-alive is on. | |||
virtual std::string proxyRequestPrefix() const; | virtual std::string proxyRequestPrefix() const; | |||
/// Returns the prefix prepended to the URI for proxy reques ts | /// Returns the prefix prepended to the URI for proxy reques ts | |||
/// (e.g., "http://myhost.com"). | /// (e.g., "http://myhost.com"). | |||
void deleteResponseStream(); | ||||
/// Deletes the response stream and sets it to 0. | ||||
void deleteRequestStream(); | ||||
/// Deletes the request stream and sets it to 0. | ||||
void setResponseStream(std::istream* pRespStream); | ||||
/// Sets the response stream iff _pResponseStream is 0. | ||||
void setRequestStream(std::ostream* pRequestStream); | ||||
/// Sets the request stream iff _pRequestStream is 0. | ||||
std::istream* getResponseStream() const; | ||||
/// Returns the currently set response stream. Can return 0. | ||||
std::ostream* getRequestStream() const; | ||||
/// Returns the currently set request stream. Can return 0. | ||||
void setReconnect(bool recon); | ||||
/// Sets _reconnect. | ||||
void setExpectResponseBody(bool expect); | ||||
/// Sets _expectResponseBody. | ||||
bool getExpectResponseBody() const; | ||||
/// Returns _expectResponseBody. | ||||
virtual bool mustReconnect() const; | virtual bool mustReconnect() const; | |||
/// Checks if we can reuse a persistent connection. | /// Checks if we can reuse a persistent connection. | |||
virtual void proxyAuthenticate(HTTPRequest& request); | virtual void proxyAuthenticate(HTTPRequest& request); | |||
/// Sets the proxy credentials (Proxy-Authorization header), if | /// Sets the proxy credentials (Proxy-Authorization header), if | |||
/// proxy username and password have been set. | /// proxy username and password have been set. | |||
void proxyAuthenticateImpl(HTTPRequest& request); | void proxyAuthenticateImpl(HTTPRequest& request); | |||
/// Sets the proxy credentials (Proxy-Authorization header), if | /// Sets the proxy credentials (Proxy-Authorization header), if | |||
/// proxy username and password have been set. | /// proxy username and password have been set. | |||
skipping to change at line 281 | skipping to change at line 283 | |||
/// Sends a CONNECT request to the proxy server and returns | /// Sends a CONNECT request to the proxy server and returns | |||
/// a StreamSocket for the resulting connection. | /// a StreamSocket for the resulting connection. | |||
void proxyTunnel(); | void proxyTunnel(); | |||
/// Calls proxyConnect() and attaches the resulting StreamSo cket | /// Calls proxyConnect() and attaches the resulting StreamSo cket | |||
/// to the HTTPClientSession. | /// to the HTTPClientSession. | |||
private: | private: | |||
std::string _host; | std::string _host; | |||
Poco::UInt16 _port; | Poco::UInt16 _port; | |||
std::string _proxyHost; | ProxyConfig _proxyConfig; | |||
Poco::UInt16 _proxyPort; | ||||
std::string _proxyUsername; | ||||
std::string _proxyPassword; | ||||
Poco::Timespan _keepAliveTimeout; | Poco::Timespan _keepAliveTimeout; | |||
Poco::Timestamp _lastRequest; | Poco::Timestamp _lastRequest; | |||
bool _reconnect; | bool _reconnect; | |||
bool _mustReconnect; | bool _mustReconnect; | |||
bool _expectResponseBody; | bool _expectResponseBody; | |||
std::ostream* _pRequestStream; | Poco::SharedPtr<std::ostream> _pRequestStream; | |||
std::istream* _pResponseStream; | Poco::SharedPtr<std::istream> _pResponseStream; | |||
static ProxyConfig _globalProxyConfig; | ||||
HTTPClientSession(const HTTPClientSession&); | HTTPClientSession(const HTTPClientSession&); | |||
HTTPClientSession& operator = (const HTTPClientSession&); | HTTPClientSession& operator = (const HTTPClientSession&); | |||
friend class WebSocket; | friend class WebSocket; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
skipping to change at line 314 | skipping to change at line 315 | |||
return _host; | return _host; | |||
} | } | |||
inline Poco::UInt16 HTTPClientSession::getPort() const | inline Poco::UInt16 HTTPClientSession::getPort() const | |||
{ | { | |||
return _port; | return _port; | |||
} | } | |||
inline const std::string& HTTPClientSession::getProxyHost() const | inline const std::string& HTTPClientSession::getProxyHost() const | |||
{ | { | |||
return _proxyHost; | return _proxyConfig.host; | |||
} | } | |||
inline Poco::UInt16 HTTPClientSession::getProxyPort() const | inline Poco::UInt16 HTTPClientSession::getProxyPort() const | |||
{ | { | |||
return _proxyPort; | return _proxyConfig.port; | |||
} | } | |||
inline const std::string& HTTPClientSession::getProxyUsername() const | inline const std::string& HTTPClientSession::getProxyUsername() const | |||
{ | { | |||
return _proxyUsername; | return _proxyConfig.username; | |||
} | } | |||
inline const std::string& HTTPClientSession::getProxyPassword() const | inline const std::string& HTTPClientSession::getProxyPassword() const | |||
{ | { | |||
return _proxyPassword; | return _proxyConfig.password; | |||
} | ||||
inline std::istream* HTTPClientSession::getResponseStream() const | ||||
{ | ||||
return _pResponseStream; | ||||
} | ||||
inline std::ostream* HTTPClientSession::getRequestStream() const | ||||
{ | ||||
return _pRequestStream; | ||||
} | ||||
inline void HTTPClientSession::setReconnect(bool recon) | ||||
{ | ||||
_reconnect = recon; | ||||
} | } | |||
inline void HTTPClientSession::setExpectResponseBody(bool expect) | inline const HTTPClientSession::ProxyConfig& HTTPClientSession::getProxyCon fig() const | |||
{ | { | |||
_expectResponseBody = expect; | return _proxyConfig; | |||
} | } | |||
inline bool HTTPClientSession::getExpectResponseBody() const | inline const HTTPClientSession::ProxyConfig& HTTPClientSession::getGlobalPr oxyConfig() | |||
{ | { | |||
return _expectResponseBody; | return _globalProxyConfig; | |||
} | } | |||
inline const Poco::Timespan& HTTPClientSession::getKeepAliveTimeout() const | inline const Poco::Timespan& HTTPClientSession::getKeepAliveTimeout() const | |||
{ | { | |||
return _keepAliveTimeout; | return _keepAliveTimeout; | |||
} | } | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_HTTPClientSession_INCLUDED | #endif // Net_HTTPClientSession_INCLUDED | |||
End of changes. 18 change blocks. | ||||
89 lines changed or deleted | 72 lines changed or added | |||
HTTPCookie.h | HTTPCookie.h | |||
---|---|---|---|---|
// | // | |||
// HTTPCookie.h | // HTTPCookie.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPCookie.h#1 $ | // $Id: //poco/1.4/Net/include/Poco/Net/HTTPCookie.h#2 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPCookie | // Module: HTTPCookie | |||
// | // | |||
// Definition of the HTTPCookie class. | // Definition of the HTTPCookie class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPCookie_INCLUDED | #ifndef Net_HTTPCookie_INCLUDED | |||
#define Net_HTTPCookie_INCLUDED | #define Net_HTTPCookie_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 138 | skipping to change at line 118 | |||
void setDomain(const std::string& domain); | void setDomain(const std::string& domain); | |||
/// Sets the domain for the cookie. | /// Sets the domain for the cookie. | |||
const std::string& getDomain() const; | const std::string& getDomain() const; | |||
/// Returns the domain for the cookie. | /// Returns the domain for the cookie. | |||
void setPath(const std::string& path); | void setPath(const std::string& path); | |||
/// Sets the path for the cookie. | /// Sets the path for the cookie. | |||
void setPriority(const std::string& priority); | ||||
/// Sets the priority for the cookie. | ||||
const std::string& getPath() const; | const std::string& getPath() const; | |||
/// Returns the path for the cookie. | /// Returns the path for the cookie. | |||
const std::string& getPriority() const; | ||||
/// Returns the priority for the cookie. | ||||
void setSecure(bool secure); | void setSecure(bool secure); | |||
/// Sets the value of the secure flag for | /// Sets the value of the secure flag for | |||
/// the cookie. | /// the cookie. | |||
bool getSecure() const; | bool getSecure() const; | |||
/// Returns the value of the secure flag | /// Returns the value of the secure flag | |||
/// for the cookie. | /// for the cookie. | |||
void setMaxAge(int maxAge); | void setMaxAge(int maxAge); | |||
/// Sets the maximum age in seconds for | /// Sets the maximum age in seconds for | |||
/// the cookie. | /// the cookie. | |||
/// | /// | |||
/// A value of -1 causes the cookie to | /// A value of -1 (default) causes the cookie | |||
/// never expire on the client. | /// to become a session cookie, which will | |||
/// be deleted when the browser window | ||||
/// is closed. | ||||
/// | /// | |||
/// A value of 0 deletes the cookie on | /// A value of 0 deletes the cookie on | |||
/// the client. | /// the client. | |||
int getMaxAge() const; | int getMaxAge() const; | |||
/// Returns the maximum age in seconds for | /// Returns the maximum age in seconds for | |||
/// the cookie. | /// the cookie. | |||
void setHttpOnly(bool flag = true); | void setHttpOnly(bool flag = true); | |||
/// Sets the HttpOnly flag for the cookie. | /// Sets the HttpOnly flag for the cookie. | |||
skipping to change at line 208 | skipping to change at line 196 | |||
/// escape sequences in the form %xx with the | /// escape sequences in the form %xx with the | |||
/// respective characters. | /// respective characters. | |||
private: | private: | |||
int _version; | int _version; | |||
std::string _name; | std::string _name; | |||
std::string _value; | std::string _value; | |||
std::string _comment; | std::string _comment; | |||
std::string _domain; | std::string _domain; | |||
std::string _path; | std::string _path; | |||
std::string _priority; | ||||
bool _secure; | bool _secure; | |||
int _maxAge; | int _maxAge; | |||
bool _httpOnly; | bool _httpOnly; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline int HTTPCookie::getVersion() const | inline int HTTPCookie::getVersion() const | |||
{ | { | |||
skipping to change at line 246 | skipping to change at line 235 | |||
inline const std::string& HTTPCookie::getDomain() const | inline const std::string& HTTPCookie::getDomain() const | |||
{ | { | |||
return _domain; | return _domain; | |||
} | } | |||
inline const std::string& HTTPCookie::getPath() const | inline const std::string& HTTPCookie::getPath() const | |||
{ | { | |||
return _path; | return _path; | |||
} | } | |||
inline const std::string& HTTPCookie::getPriority() const | ||||
{ | ||||
return _priority; | ||||
} | ||||
inline bool HTTPCookie::getSecure() const | inline bool HTTPCookie::getSecure() const | |||
{ | { | |||
return _secure; | return _secure; | |||
} | } | |||
inline int HTTPCookie::getMaxAge() const | inline int HTTPCookie::getMaxAge() const | |||
{ | { | |||
return _maxAge; | return _maxAge; | |||
} | } | |||
End of changes. 7 change blocks. | ||||
35 lines changed or deleted | 18 lines changed or added | |||
HTTPCredentials.h | HTTPCredentials.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPCredentials | // Module: HTTPCredentials | |||
// | // | |||
// Definition of the HTTPCredentials class. | // Definition of the HTTPCredentials class. | |||
// | // | |||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | // Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPCredentials_INCLUDED | #ifndef Net_HTTPCredentials_INCLUDED | |||
#define Net_HTTPCredentials_INCLUDED | #define Net_HTTPCredentials_INCLUDED | |||
#include "Poco/Net/HTTPDigestCredentials.h" | #include "Poco/Net/HTTPDigestCredentials.h" | |||
namespace Poco { | namespace Poco { | |||
class URI; | class URI; | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPDigestCredentials.h | HTTPDigestCredentials.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPDigestCredentials | // Module: HTTPDigestCredentials | |||
// | // | |||
// Definition of the HTTPDigestCredentials class. | // Definition of the HTTPDigestCredentials class. | |||
// | // | |||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | // Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru). | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPDigestCredentials_INCLUDED | #ifndef Net_HTTPDigestCredentials_INCLUDED | |||
#define Net_HTTPDigestCredentials_INCLUDED | #define Net_HTTPDigestCredentials_INCLUDED | |||
#include "Poco/Net/HTTPAuthenticationParams.h" | #include "Poco/Net/HTTPAuthenticationParams.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 70 | skipping to change at line 50 | |||
public: | public: | |||
HTTPDigestCredentials(); | HTTPDigestCredentials(); | |||
/// Creates an empty HTTPDigestCredentials object. | /// Creates an empty HTTPDigestCredentials object. | |||
HTTPDigestCredentials(const std::string& username, const std::string & password); | HTTPDigestCredentials(const std::string& username, const std::string & password); | |||
/// Creates a HTTPDigestCredentials object with the given us ername and password. | /// Creates a HTTPDigestCredentials object with the given us ername and password. | |||
~HTTPDigestCredentials(); | ~HTTPDigestCredentials(); | |||
/// Destroys the HTTPDigestCredentials. | /// Destroys the HTTPDigestCredentials. | |||
void reset(); | ||||
/// Resets the HTTPDigestCredentials object to a clean state | ||||
. | ||||
void setUsername(const std::string& username); | void setUsername(const std::string& username); | |||
/// Sets the username. | /// Sets the username. | |||
const std::string& getUsername() const; | const std::string& getUsername() const; | |||
/// Returns the username. | /// Returns the username. | |||
void setPassword(const std::string& password); | void setPassword(const std::string& password); | |||
/// Sets the password. | /// Sets the password. | |||
const std::string& getPassword() const; | const std::string& getPassword() const; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 5 lines changed or added | |||
HTTPFixedLengthStream.h | HTTPFixedLengthStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPFixedLengthStream | // Module: HTTPFixedLengthStream | |||
// | // | |||
// Definition of the HTTPFixedLengthStream class. | // Definition of the HTTPFixedLengthStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPFixedLengthStream_INCLUDED | #ifndef Net_HTTPFixedLengthStream_INCLUDED | |||
#define Net_HTTPFixedLengthStream_INCLUDED | #define Net_HTTPFixedLengthStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPBasicStreamBuf.h" | #include "Poco/Net/HTTPBasicStreamBuf.h" | |||
#include <cstddef> | #include <cstddef> | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPHeaderStream.h | HTTPHeaderStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPHeaderStream | // Module: HTTPHeaderStream | |||
// | // | |||
// Definition of the HTTPHeaderStream class. | // Definition of the HTTPHeaderStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPHeaderStream_INCLUDED | #ifndef Net_HTTPHeaderStream_INCLUDED | |||
#define Net_HTTPHeaderStream_INCLUDED | #define Net_HTTPHeaderStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPBasicStreamBuf.h" | #include "Poco/Net/HTTPBasicStreamBuf.h" | |||
#include "Poco/MemoryPool.h" | #include "Poco/MemoryPool.h" | |||
#include <cstddef> | #include <cstddef> | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPIOStream.h | HTTPIOStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPIOStream | // Module: HTTPIOStream | |||
// | // | |||
// Definition of the HTTPIOStream class. | // Definition of the HTTPIOStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPIOStream_INCLUDED | #ifndef Net_HTTPIOStream_INCLUDED | |||
#define Net_HTTPIOStream_INCLUDED | #define Net_HTTPIOStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPResponse.h" | #include "Poco/Net/HTTPResponse.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPMessage.h | HTTPMessage.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPMessage | // Module: HTTPMessage | |||
// | // | |||
// Definition of the HTTPMessage class. | // Definition of the HTTPMessage class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPMessage_INCLUDED | #ifndef Net_HTTPMessage_INCLUDED | |||
#define Net_HTTPMessage_INCLUDED | #define Net_HTTPMessage_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/MessageHeader.h" | #include "Poco/Net/MessageHeader.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPRequest.h | HTTPRequest.h | |||
---|---|---|---|---|
// | // | |||
// HTTPRequest.h | // HTTPRequest.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPRequest.h#2 $ | // $Id: //poco/1.4/Net/include/Poco/Net/HTTPRequest.h#3 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPRequest | // Module: HTTPRequest | |||
// | // | |||
// Definition of the HTTPRequest class. | // Definition of the HTTPRequest class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPRequest_INCLUDED | #ifndef Net_HTTPRequest_INCLUDED | |||
#define Net_HTTPRequest_INCLUDED | #define Net_HTTPRequest_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPMessage.h" | #include "Poco/Net/HTTPMessage.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 160 | skipping to change at line 140 | |||
static const std::string HTTP_POST; | static const std::string HTTP_POST; | |||
static const std::string HTTP_OPTIONS; | static const std::string HTTP_OPTIONS; | |||
static const std::string HTTP_DELETE; | static const std::string HTTP_DELETE; | |||
static const std::string HTTP_TRACE; | static const std::string HTTP_TRACE; | |||
static const std::string HTTP_CONNECT; | static const std::string HTTP_CONNECT; | |||
static const std::string HOST; | static const std::string HOST; | |||
static const std::string COOKIE; | static const std::string COOKIE; | |||
static const std::string AUTHORIZATION; | static const std::string AUTHORIZATION; | |||
static const std::string PROXY_AUTHORIZATION; | static const std::string PROXY_AUTHORIZATION; | |||
static const std::string UPGRADE; | ||||
protected: | protected: | |||
void getCredentials(const std::string& header, std::string& scheme, std::string& authInfo) const; | void getCredentials(const std::string& header, std::string& scheme, std::string& authInfo) const; | |||
/// Returns the authentication scheme and additional authent ication | /// Returns the authentication scheme and additional authent ication | |||
/// information contained in the given header of request. | /// information contained in the given header of request. | |||
/// | /// | |||
/// Throws a NotAuthenticatedException if no authentication information | /// Throws a NotAuthenticatedException if no authentication information | |||
/// is contained in the request. | /// is contained in the request. | |||
void setCredentials(const std::string& header, const std::string& sc heme, const std::string& authInfo); | void setCredentials(const std::string& header, const std::string& sc heme, const std::string& authInfo); | |||
/// Writes the authentication scheme and information for | /// Writes the authentication scheme and information for | |||
/// this request to the given header. | /// this request to the given header. | |||
private: | private: | |||
enum Limits | enum Limits | |||
{ | { | |||
MAX_METHOD_LENGTH = 32, | MAX_METHOD_LENGTH = 32, | |||
MAX_URI_LENGTH = 4096, | MAX_URI_LENGTH = 16384, | |||
MAX_VERSION_LENGTH = 8 | MAX_VERSION_LENGTH = 8 | |||
}; | }; | |||
std::string _method; | std::string _method; | |||
std::string _uri; | std::string _uri; | |||
HTTPRequest(const HTTPRequest&); | HTTPRequest(const HTTPRequest&); | |||
HTTPRequest& operator = (const HTTPRequest&); | HTTPRequest& operator = (const HTTPRequest&); | |||
}; | }; | |||
End of changes. 4 change blocks. | ||||
34 lines changed or deleted | 4 lines changed or added | |||
HTTPRequestHandler.h | HTTPRequestHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPRequestHandler | // Module: HTTPRequestHandler | |||
// | // | |||
// Definition of the HTTPRequestHandler class. | // Definition of the HTTPRequestHandler class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPRequestHandler_INCLUDED | #ifndef Net_HTTPRequestHandler_INCLUDED | |||
#define Net_HTTPRequestHandler_INCLUDED | #define Net_HTTPRequestHandler_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPRequestHandlerFactory.h | HTTPRequestHandlerFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPRequestHandlerFactory | // Module: HTTPRequestHandlerFactory | |||
// | // | |||
// Definition of the HTTPRequestHandlerFactory class. | // Definition of the HTTPRequestHandlerFactory class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPRequestHandlerFactory_INCLUDED | #ifndef Net_HTTPRequestHandlerFactory_INCLUDED | |||
#define Net_HTTPRequestHandlerFactory_INCLUDED | #define Net_HTTPRequestHandlerFactory_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/BasicEvent.h" | #include "Poco/BasicEvent.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPResponse.h | HTTPResponse.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPResponse | // Module: HTTPResponse | |||
// | // | |||
// Definition of the HTTPResponse class. | // Definition of the HTTPResponse class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPResponse_INCLUDED | #ifndef Net_HTTPResponse_INCLUDED | |||
#define Net_HTTPResponse_INCLUDED | #define Net_HTTPResponse_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPMessage.h" | #include "Poco/Net/HTTPMessage.h" | |||
#include "Poco/Net/HTTPCookie.h" | #include "Poco/Net/HTTPCookie.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServer.h | HTTPServer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServer | // Module: HTTPServer | |||
// | // | |||
// Definition of the HTTPServer class. | // Definition of the HTTPServer class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServer_INCLUDED | #ifndef Net_HTTPServer_INCLUDED | |||
#define Net_HTTPServer_INCLUDED | #define Net_HTTPServer_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/TCPServer.h" | #include "Poco/Net/TCPServer.h" | |||
#include "Poco/Net/HTTPRequestHandlerFactory.h" | #include "Poco/Net/HTTPRequestHandlerFactory.h" | |||
#include "Poco/Net/HTTPServerParams.h" | #include "Poco/Net/HTTPServerParams.h" | |||
skipping to change at line 72 | skipping to change at line 52 | |||
/// - automatic decoding/encoding of request/response message bodi es | /// - automatic decoding/encoding of request/response message bodi es | |||
/// using chunked transfer encoding. | /// using chunked transfer encoding. | |||
/// | /// | |||
/// Please see the TCPServer class for information about | /// Please see the TCPServer class for information about | |||
/// connection and thread handling. | /// connection and thread handling. | |||
/// | /// | |||
/// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more | /// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more | |||
/// information about the HTTP protocol. | /// information about the HTTP protocol. | |||
{ | { | |||
public: | public: | |||
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::UInt16 por | ||||
tNumber = 80, HTTPServerParams::Ptr pParams = new HTTPServerParams); | ||||
/// Creates HTTPServer listening on the given port (default | ||||
80). | ||||
/// | ||||
/// The server takes ownership of the HTTPRequstHandlerFacto | ||||
ry | ||||
/// and deletes it when it's no longer needed. | ||||
/// | ||||
/// New threads are taken from the default thread pool. | ||||
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSock et& socket, HTTPServerParams::Ptr pParams); | HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSock et& socket, HTTPServerParams::Ptr pParams); | |||
/// Creates the HTTPServer, using the given ServerSocket. | /// Creates the HTTPServer, using the given ServerSocket. | |||
/// | /// | |||
/// The server takes ownership of the HTTPRequstHandlerFacto ry | /// The server takes ownership of the HTTPRequstHandlerFacto ry | |||
/// and deletes it when it's no longer needed. | /// and deletes it when it's no longer needed. | |||
/// | /// | |||
/// The server also takes ownership of the HTTPServerParams object. | /// The server also takes ownership of the HTTPServerParams object. | |||
/// | /// | |||
/// News threads are taken from the default thread pool. | /// New threads are taken from the default thread pool. | |||
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool & threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams); | HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool & threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams); | |||
/// Creates the HTTPServer, using the given ServerSocket. | /// Creates the HTTPServer, using the given ServerSocket. | |||
/// | /// | |||
/// The server takes ownership of the HTTPRequstHandlerFacto ry | /// The server takes ownership of the HTTPRequstHandlerFacto ry | |||
/// and deletes it when it's no longer needed. | /// and deletes it when it's no longer needed. | |||
/// | /// | |||
/// The server also takes ownership of the HTTPServerParams object. | /// The server also takes ownership of the HTTPServerParams object. | |||
/// | /// | |||
/// News threads are taken from the given thread pool. | /// New threads are taken from the given thread pool. | |||
~HTTPServer(); | ~HTTPServer(); | |||
/// Destroys the HTTPServer and its HTTPRequestHandlerFactor y. | /// Destroys the HTTPServer and its HTTPRequestHandlerFactor y. | |||
void stopAll(bool abortCurrent = false); | void stopAll(bool abortCurrent = false); | |||
/// Stops the server. In contrast to TCPServer::stop(), whic h also | /// Stops the server. In contrast to TCPServer::stop(), whic h also | |||
/// stops the server, but allows all client connections to f inish at | /// stops the server, but allows all client connections to f inish at | |||
/// their pace, this allows finer control over client connec tions. | /// their pace, this allows finer control over client connec tions. | |||
/// | /// | |||
/// If abortCurrent is false, all current requests are allow ed to | /// If abortCurrent is false, all current requests are allow ed to | |||
/// complete. If abortCurrent is false, the underlying socke ts of | /// complete. If abortCurrent is true, the underlying socket s of | |||
/// all client connections are shut down, causing all reques ts | /// all client connections are shut down, causing all reques ts | |||
/// to abort. | /// to abort. | |||
private: | private: | |||
HTTPRequestHandlerFactory::Ptr _pFactory; | HTTPRequestHandlerFactory::Ptr _pFactory; | |||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_HTTPServer_INCLUDED | #endif // Net_HTTPServer_INCLUDED | |||
End of changes. 5 change blocks. | ||||
35 lines changed or deleted | 15 lines changed or added | |||
HTTPServerConnection.h | HTTPServerConnection.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerConnection | // Module: HTTPServerConnection | |||
// | // | |||
// Definition of the HTTPServerConnection class. | // Definition of the HTTPServerConnection class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerConnection_INCLUDED | #ifndef Net_HTTPServerConnection_INCLUDED | |||
#define Net_HTTPServerConnection_INCLUDED | #define Net_HTTPServerConnection_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/TCPServerConnection.h" | #include "Poco/Net/TCPServerConnection.h" | |||
#include "Poco/Net/HTTPResponse.h" | #include "Poco/Net/HTTPResponse.h" | |||
#include "Poco/Net/HTTPRequestHandlerFactory.h" | #include "Poco/Net/HTTPRequestHandlerFactory.h" | |||
#include "Poco/Net/HTTPServerParams.h" | #include "Poco/Net/HTTPServerParams.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerConnectionFactory.h | HTTPServerConnectionFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerConnectionFactory | // Module: HTTPServerConnectionFactory | |||
// | // | |||
// Definition of the HTTPServerConnectionFactory class. | // Definition of the HTTPServerConnectionFactory class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerConnectionFactory_INCLUDED | #ifndef Net_HTTPServerConnectionFactory_INCLUDED | |||
#define Net_HTTPServerConnectionFactory_INCLUDED | #define Net_HTTPServerConnectionFactory_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/TCPServerConnectionFactory.h" | #include "Poco/Net/TCPServerConnectionFactory.h" | |||
#include "Poco/Net/HTTPRequestHandlerFactory.h" | #include "Poco/Net/HTTPRequestHandlerFactory.h" | |||
#include "Poco/Net/HTTPServerParams.h" | #include "Poco/Net/HTTPServerParams.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerParams.h | HTTPServerParams.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerParams | // Module: HTTPServerParams | |||
// | // | |||
// Definition of the HTTPServerParams class. | // Definition of the HTTPServerParams class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerParams_INCLUDED | #ifndef Net_HTTPServerParams_INCLUDED | |||
#define Net_HTTPServerParams_INCLUDED | #define Net_HTTPServerParams_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/TCPServerParams.h" | #include "Poco/Net/TCPServerParams.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerRequest.h | HTTPServerRequest.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerRequest | // Module: HTTPServerRequest | |||
// | // | |||
// Definition of the HTTPServerRequest class. | // Definition of the HTTPServerRequest class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerRequest_INCLUDED | #ifndef Net_HTTPServerRequest_INCLUDED | |||
#define Net_HTTPServerRequest_INCLUDED | #define Net_HTTPServerRequest_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPRequest.h" | #include "Poco/Net/HTTPRequest.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerRequestImpl.h | HTTPServerRequestImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerRequestImpl | // Module: HTTPServerRequestImpl | |||
// | // | |||
// Definition of the HTTPServerRequestImpl class. | // Definition of the HTTPServerRequestImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerRequestImpl_INCLUDED | #ifndef Net_HTTPServerRequestImpl_INCLUDED | |||
#define Net_HTTPServerRequestImpl_INCLUDED | #define Net_HTTPServerRequestImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPServerRequest.h" | #include "Poco/Net/HTTPServerRequest.h" | |||
#include "Poco/Net/HTTPServerResponseImpl.h" | #include "Poco/Net/HTTPServerResponseImpl.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerResponse.h | HTTPServerResponse.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerResponse | // Module: HTTPServerResponse | |||
// | // | |||
// Definition of the HTTPServerResponse class. | // Definition of the HTTPServerResponse class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerResponse_INCLUDED | #ifndef Net_HTTPServerResponse_INCLUDED | |||
#define Net_HTTPServerResponse_INCLUDED | #define Net_HTTPServerResponse_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPResponse.h" | #include "Poco/Net/HTTPResponse.h" | |||
#include <cstddef> | #include <cstddef> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerResponseImpl.h | HTTPServerResponseImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerResponseImpl | // Module: HTTPServerResponseImpl | |||
// | // | |||
// Definition of the HTTPServerResponseImpl class. | // Definition of the HTTPServerResponseImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerResponseImpl_INCLUDED | #ifndef Net_HTTPServerResponseImpl_INCLUDED | |||
#define Net_HTTPServerResponseImpl_INCLUDED | #define Net_HTTPServerResponseImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPServerResponse.h" | #include "Poco/Net/HTTPServerResponse.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPServerSession.h | HTTPServerSession.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPServer | // Package: HTTPServer | |||
// Module: HTTPServerSession | // Module: HTTPServerSession | |||
// | // | |||
// Definition of the HTTPServerSession class. | // Definition of the HTTPServerSession class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPServerSession_INCLUDED | #ifndef Net_HTTPServerSession_INCLUDED | |||
#define Net_HTTPServerSession_INCLUDED | #define Net_HTTPServerSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPSession.h" | #include "Poco/Net/HTTPSession.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/Net/HTTPServerSession.h" | #include "Poco/Net/HTTPServerSession.h" | |||
#include "Poco/Net/HTTPServerParams.h" | #include "Poco/Net/HTTPServerParams.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPSession.h | HTTPSession.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPSession | // Module: HTTPSession | |||
// | // | |||
// Definition of the HTTPSession class. | // Definition of the HTTPSession class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPSession_INCLUDED | #ifndef Net_HTTPSession_INCLUDED | |||
#define Net_HTTPSession_INCLUDED | #define Net_HTTPSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/Any.h" | #include "Poco/Any.h" | |||
skipping to change at line 184 | skipping to change at line 164 | |||
void attachSocket(const StreamSocket& socket); | void attachSocket(const StreamSocket& socket); | |||
/// Attaches a socket to the session, replacing the | /// Attaches a socket to the session, replacing the | |||
/// previously attached socket. | /// previously attached socket. | |||
void close(); | void close(); | |||
/// Closes the underlying socket. | /// Closes the underlying socket. | |||
void setException(const Poco::Exception& exc); | void setException(const Poco::Exception& exc); | |||
/// Stores a clone of the exception. | /// Stores a clone of the exception. | |||
void clearException(); | ||||
/// Clears the stored exception. | ||||
private: | private: | |||
enum | enum | |||
{ | { | |||
HTTP_DEFAULT_TIMEOUT = 60000000 | HTTP_DEFAULT_TIMEOUT = 60000000 | |||
}; | }; | |||
HTTPSession(const HTTPSession&); | HTTPSession(const HTTPSession&); | |||
HTTPSession& operator = (const HTTPSession&); | HTTPSession& operator = (const HTTPSession&); | |||
StreamSocket _socket; | StreamSocket _socket; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 4 lines changed or added | |||
HTTPSessionFactory.h | HTTPSessionFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPClient | // Package: HTTPClient | |||
// Module: HTTPSessionFactory | // Module: HTTPSessionFactory | |||
// | // | |||
// Definition of the HTTPSessionFactory class. | // Definition of the HTTPSessionFactory class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPSessionFactoryMgr_INCLUDED | #ifndef Net_HTTPSessionFactoryMgr_INCLUDED | |||
#define Net_HTTPSessionFactoryMgr_INCLUDED | #define Net_HTTPSessionFactoryMgr_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/URI.h" | #include "Poco/URI.h" | |||
#include "Poco/SingletonHolder.h" | #include "Poco/SingletonHolder.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPSessionInstantiator.h | HTTPSessionInstantiator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTPClient | // Package: HTTPClient | |||
// Module: HTTPSessionInstantiator | // Module: HTTPSessionInstantiator | |||
// | // | |||
// Definition of the HTTPSessionInstantiator class. | // Definition of the HTTPSessionInstantiator class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPSessionInstantiator_INCLUDED | #ifndef Net_HTTPSessionInstantiator_INCLUDED | |||
#define Net_HTTPSessionInstantiator_INCLUDED | #define Net_HTTPSessionInstantiator_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPSession.h" | #include "Poco/Net/HTTPSession.h" | |||
#include "Poco/URI.h" | #include "Poco/URI.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPStream.h | HTTPStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPStream | // Module: HTTPStream | |||
// | // | |||
// Definition of the HTTPStream class. | // Definition of the HTTPStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPStream_INCLUDED | #ifndef Net_HTTPStream_INCLUDED | |||
#define Net_HTTPStream_INCLUDED | #define Net_HTTPStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPBasicStreamBuf.h" | #include "Poco/Net/HTTPBasicStreamBuf.h" | |||
#include "Poco/MemoryPool.h" | #include "Poco/MemoryPool.h" | |||
#include <cstddef> | #include <cstddef> | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HTTPStreamFactory.h | HTTPStreamFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: HTTP | // Package: HTTP | |||
// Module: HTTPStreamFactory | // Module: HTTPStreamFactory | |||
// | // | |||
// Definition of the HTTPStreamFactory class. | // Definition of the HTTPStreamFactory class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HTTPStreamFactory_INCLUDED | #ifndef Net_HTTPStreamFactory_INCLUDED | |||
#define Net_HTTPStreamFactory_INCLUDED | #define Net_HTTPStreamFactory_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/HTTPSession.h" | #include "Poco/Net/HTTPSession.h" | |||
#include "Poco/URIStreamFactory.h" | #include "Poco/URIStreamFactory.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Handler.h | Handler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Handler | // Module: Handler | |||
// | // | |||
// Definition of the Handler class. | // Definition of the Handler class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_Handler_INCLUDED | #ifndef JSON_Handler_INCLUDED | |||
#define JSON_Handler_INCLUDED | #define JSON_Handler_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/Dynamic/Struct.h" | ||||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
class JSON_API Handler | class JSON_API Handler | |||
{ | { | |||
public: | public: | |||
typedef SharedPtr<Handler> Ptr; | ||||
Handler(); | ||||
/// Constructor; | ||||
virtual ~Handler(); | ||||
/// Destructor | ||||
virtual void reset() = 0; | ||||
/// Resets the handler state. | ||||
virtual void startObject() = 0; | virtual void startObject() = 0; | |||
/// The parser has read a {, meaning a new object will be re ad | /// The parser has read a {, meaning a new object will be re ad | |||
virtual void endObject() = 0; | virtual void endObject() = 0; | |||
/// The parser has read a }, meaning the object is read | /// The parser has read a }, meaning the object is read | |||
virtual void startArray() = 0; | virtual void startArray() = 0; | |||
/// The parser has read a [, meaning a new array will be rea d | /// The parser has read a [, meaning a new array will be rea d | |||
virtual void endArray() = 0; | virtual void endArray() = 0; | |||
skipping to change at line 71 | skipping to change at line 64 | |||
virtual void key(const std::string& k) = 0; | virtual void key(const std::string& k) = 0; | |||
/// A key of an object is read | /// A key of an object is read | |||
virtual void null() = 0; | virtual void null() = 0; | |||
/// A null value is read | /// A null value is read | |||
virtual void value(int v) = 0; | virtual void value(int v) = 0; | |||
/// An integer value is read | /// An integer value is read | |||
virtual void value(unsigned v) = 0; | ||||
/// An unsigned value is read. This will only be triggered i | ||||
f the | ||||
/// value cannot fit into a signed int. | ||||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
virtual void value(Int64 v) = 0; | virtual void value(Int64 v) = 0; | |||
/// A 64-bit integer value is read | /// A 64-bit integer value is read | |||
virtual void value(UInt64 v) = 0; | ||||
/// An unsigned 64-bit integer value is read. This will only | ||||
be | ||||
/// triggered if the value cannot fit into a signed 64-bit i | ||||
nteger. | ||||
#endif | #endif | |||
virtual void value(const std::string& value) = 0; | virtual void value(const std::string& value) = 0; | |||
/// A string value is read. | /// A string value is read. | |||
virtual void value(double d) = 0; | virtual void value(double d) = 0; | |||
/// A double value is read | /// A double value is read | |||
virtual void value(bool b) = 0; | virtual void value(bool b) = 0; | |||
/// A boolean value is read | /// A boolean value is read | |||
protected: | virtual Poco::Dynamic::Var asVar() const; | |||
/// Returns the result of the parser (an object, array or st | ||||
virtual ~Handler(); | ring), | |||
/// Destructor | /// empty Var if there is no result. | |||
private: | virtual Poco::DynamicStruct asStruct() const; | |||
/// Returns the result of the parser (an object, array or st | ||||
ring), | ||||
/// empty Var if there is no result. | ||||
}; | }; | |||
}} // namespace Poco::JSON | }} // namespace Poco::JSON | |||
#endif // JSON_Handler_INCLUDED | #endif // JSON_Handler_INCLUDED | |||
End of changes. 7 change blocks. | ||||
38 lines changed or deleted | 34 lines changed or added | |||
Hash.h | Hash.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: Hash | // Module: Hash | |||
// | // | |||
// Definition of the Hash class. | // Definition of the Hash class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Hash_INCLUDED | #ifndef Foundation_Hash_INCLUDED | |||
#define Foundation_Hash_INCLUDED | #define Foundation_Hash_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <cstddef> | #include <cstddef> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HashFunction.h | HashFunction.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: HashFunction | // Module: HashFunction | |||
// | // | |||
// Definition of the HashFunction class. | // Definition of the HashFunction class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HashFunction_INCLUDED | #ifndef Foundation_HashFunction_INCLUDED | |||
#define Foundation_HashFunction_INCLUDED | #define Foundation_HashFunction_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Hash.h" | #include "Poco/Hash.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HashMap.h | HashMap.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: HashMap | // Module: HashMap | |||
// | // | |||
// Definition of the HashMap class. | // Definition of the HashMap class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HashMap_INCLUDED | #ifndef Foundation_HashMap_INCLUDED | |||
#define Foundation_HashMap_INCLUDED | #define Foundation_HashMap_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/LinearHashTable.h" | #include "Poco/LinearHashTable.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <utility> | #include <utility> | |||
skipping to change at line 177 | skipping to change at line 157 | |||
ValueType value(key); | ValueType value(key); | |||
return _table.find(value); | return _table.find(value); | |||
} | } | |||
Iterator find(const KeyType& key) | Iterator find(const KeyType& key) | |||
{ | { | |||
ValueType value(key); | ValueType value(key); | |||
return _table.find(value); | return _table.find(value); | |||
} | } | |||
std::size_t count(const KeyType& key) const | ||||
{ | ||||
ValueType value(key); | ||||
return _table.find(value) != _table.end() ? 1 : 0; | ||||
} | ||||
std::pair<Iterator, bool> insert(const PairType& pair) | std::pair<Iterator, bool> insert(const PairType& pair) | |||
{ | { | |||
ValueType value(pair.first, pair.second); | ValueType value(pair.first, pair.second); | |||
return _table.insert(value); | return _table.insert(value); | |||
} | } | |||
std::pair<Iterator, bool> insert(const ValueType& value) | std::pair<Iterator, bool> insert(const ValueType& value) | |||
{ | { | |||
return _table.insert(value); | return _table.insert(value); | |||
} | } | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 7 lines changed or added | |||
HashSet.h | HashSet.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: HashSet | // Module: HashSet | |||
// | // | |||
// Definition of the HashSet class. | // Definition of the HashSet class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HashSet_INCLUDED | #ifndef Foundation_HashSet_INCLUDED | |||
#define Foundation_HashSet_INCLUDED | #define Foundation_HashSet_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/LinearHashTable.h" | #include "Poco/LinearHashTable.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HashStatistic.h | HashStatistic.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: HashStatistic | // Module: HashStatistic | |||
// | // | |||
// Definition of the HashStatistic class. | // Definition of the HashStatistic class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HashStatistic_INCLUDED | #ifndef Foundation_HashStatistic_INCLUDED | |||
#define Foundation_HashStatistic_INCLUDED | #define Foundation_HashStatistic_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HashTable.h | HashTable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: HashTable | // Module: HashTable | |||
// | // | |||
// Definition of the HashTable class. | // Definition of the HashTable class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HashTable_INCLUDED | #ifndef Foundation_HashTable_INCLUDED | |||
#define Foundation_HashTable_INCLUDED | #define Foundation_HashTable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/HashFunction.h" | #include "Poco/HashFunction.h" | |||
#include "Poco/HashStatistic.h" | #include "Poco/HashStatistic.h" | |||
#include <vector> | #include <vector> | |||
skipping to change at line 129 | skipping to change at line 109 | |||
} | } | |||
return *this; | return *this; | |||
} | } | |||
void clear() | void clear() | |||
{ | { | |||
if (!_entries) | if (!_entries) | |||
return; | return; | |||
for (UInt32 i = 0; i < _maxCapacity; ++i) | for (UInt32 i = 0; i < _maxCapacity; ++i) | |||
{ | { | |||
if (_entries[i]) | delete _entries[i]; | |||
delete _entries[i]; | ||||
} | } | |||
delete[] _entries; | delete[] _entries; | |||
_entries = 0; | _entries = 0; | |||
_size = 0; | _size = 0; | |||
_maxCapacity = 0; | _maxCapacity = 0; | |||
} | } | |||
UInt32 insert(const Key& key, const Value& value) | UInt32 insert(const Key& key, const Value& value) | |||
/// Returns the hash value of the inserted item. | /// Returns the hash value of the inserted item. | |||
/// Throws an exception if the entry was already inserted | /// Throws an exception if the entry was already inserted | |||
skipping to change at line 347 | skipping to change at line 326 | |||
} | } | |||
} | } | |||
HashStatistic currentState(bool details = false) const | HashStatistic currentState(bool details = false) const | |||
/// Returns the current internal state | /// Returns the current internal state | |||
{ | { | |||
UInt32 numberOfEntries = (UInt32)_size; | UInt32 numberOfEntries = (UInt32)_size; | |||
UInt32 numZeroEntries = 0; | UInt32 numZeroEntries = 0; | |||
UInt32 maxEntriesPerHash = 0; | UInt32 maxEntriesPerHash = 0; | |||
std::vector<UInt32> detailedEntriesPerHash; | std::vector<UInt32> detailedEntriesPerHash; | |||
#ifdef DEBUG | #ifdef _DEBUG | |||
UInt32 totalSize = 0; | UInt32 totalSize = 0; | |||
#endif | #endif | |||
for (UInt32 i = 0; i < _maxCapacity; ++i) | for (UInt32 i = 0; i < _maxCapacity; ++i) | |||
{ | { | |||
if (_entries[i]) | if (_entries[i]) | |||
{ | { | |||
UInt32 size = (UInt32)_entries[i]->size(); | UInt32 size = (UInt32)_entries[i]->size(); | |||
poco_assert_dbg(size != 0); | poco_assert_dbg(size != 0); | |||
if (size > maxEntriesPerHash) | if (size > maxEntriesPerHash) | |||
maxEntriesPerHash = size; | maxEntriesPerHash = size; | |||
if (details) | if (details) | |||
detailedEntriesPerHash.push_back(siz e); | detailedEntriesPerHash.push_back(siz e); | |||
#ifdef DEBUG | #ifdef _DEBUG | |||
totalSize += size; | totalSize += size; | |||
#endif | #endif | |||
} | } | |||
else | else | |||
{ | { | |||
numZeroEntries++; | numZeroEntries++; | |||
if (details) | if (details) | |||
detailedEntriesPerHash.push_back(0); | detailedEntriesPerHash.push_back(0); | |||
} | } | |||
} | } | |||
#ifdef DEBUG | #ifdef _DEBUG | |||
poco_assert_dbg(totalSize == numberOfEntries); | poco_assert_dbg(totalSize == numberOfEntries); | |||
#endif | #endif | |||
return HashStatistic(_maxCapacity, numberOfEntries, numZeroE ntries, maxEntriesPerHash, detailedEntriesPerHash); | return HashStatistic(_maxCapacity, numberOfEntries, numZeroE ntries, maxEntriesPerHash, detailedEntriesPerHash); | |||
} | } | |||
private: | private: | |||
HashTableVector _entries; | HashTableVector _entries; | |||
std::size_t _size; | std::size_t _size; | |||
UInt32 _maxCapacity; | UInt32 _maxCapacity; | |||
KeyHashFunction _hash; | KeyHashFunction _hash; | |||
End of changes. 5 change blocks. | ||||
37 lines changed or deleted | 5 lines changed or added | |||
HelpFormatter.h | HelpFormatter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: HelpFormatter | // Module: HelpFormatter | |||
// | // | |||
// Definition of the HelpFormatter class. | // Definition of the HelpFormatter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_HelpFormatter_INCLUDED | #ifndef Util_HelpFormatter_INCLUDED | |||
#define Util_HelpFormatter_INCLUDED | #define Util_HelpFormatter_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HexBinaryDecoder.h | HexBinaryDecoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: HexBinary | // Module: HexBinary | |||
// | // | |||
// Definition of the HexBinaryDecoder class. | // Definition of the HexBinaryDecoder class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HexBinaryDecoder_INCLUDED | #ifndef Foundation_HexBinaryDecoder_INCLUDED | |||
#define Foundation_HexBinaryDecoder_INCLUDED | #define Foundation_HexBinaryDecoder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HexBinaryEncoder.h | HexBinaryEncoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: HexBinary | // Module: HexBinary | |||
// | // | |||
// Definition of the HexBinaryEncoder class. | // Definition of the HexBinaryEncoder class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_HexBinaryEncoder_INCLUDED | #ifndef Foundation_HexBinaryEncoder_INCLUDED | |||
#define Foundation_HexBinaryEncoder_INCLUDED | #define Foundation_HexBinaryEncoder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
HostEntry.h | HostEntry.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: HostEntry | // Module: HostEntry | |||
// | // | |||
// Definition of the HostEntry class. | // Definition of the HostEntry class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_HostEntry_INCLUDED | #ifndef Net_HostEntry_INCLUDED | |||
#define Net_HostEntry_INCLUDED | #define Net_HostEntry_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketDefs.h" | #include "Poco/Net/SocketDefs.h" | |||
#include "Poco/Net/IPAddress.h" | #include "Poco/Net/IPAddress.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPClient.h | ICMPClient.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPClient | // Module: ICMPClient | |||
// | // | |||
// Definition of the ICMPClient class. | // Definition of the ICMPClient class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPClient_INCLUDED | #ifndef Net_ICMPClient_INCLUDED | |||
#define Net_ICMPClient_INCLUDED | #define Net_ICMPClient_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/ICMPSocket.h" | #include "Poco/Net/ICMPSocket.h" | |||
#include "Poco/Net/ICMPEventArgs.h" | #include "Poco/Net/ICMPEventArgs.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/BasicEvent.h" | #include "Poco/BasicEvent.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPEventArgs.h | ICMPEventArgs.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPEventArgs | // Module: ICMPEventArgs | |||
// | // | |||
// Definition of ICMPEventArgs. | // Definition of ICMPEventArgs. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPEventArgs_INCLUDED | #ifndef Net_ICMPEventArgs_INCLUDED | |||
#define Net_ICMPEventArgs_INCLUDED | #define Net_ICMPEventArgs_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include <vector> | #include <vector> | |||
#include <algorithm> | #include <algorithm> | |||
skipping to change at line 109 | skipping to change at line 89 | |||
int avgRTT() const; | int avgRTT() const; | |||
/// Returns the average round trip time for a sequence of re quests. | /// Returns the average round trip time for a sequence of re quests. | |||
float percent() const; | float percent() const; | |||
/// Returns the success percentage for a sequence of request s. | /// Returns the success percentage for a sequence of request s. | |||
private: | private: | |||
ICMPEventArgs(); | ICMPEventArgs(); | |||
void setRepetitions(int repetitions); | void setRepetitions(int repetitions); | |||
void setDataSize(int dataSize); | void setDataSize(int sz); | |||
void setTTL(int ttl); | void setTTL(int timeToLive); | |||
void setReplyTime(int index, int time); | void setReplyTime(int index, int time); | |||
void setError(int index, const std::string& text); | void setError(int index, const std::string& text); | |||
ICMPEventArgs& operator ++ (); | ICMPEventArgs& operator ++ (); | |||
ICMPEventArgs operator ++ (int); | ICMPEventArgs operator ++ (int); | |||
SocketAddress _address; | SocketAddress _address; | |||
int _sent; | int _sent; | |||
int _dataSize; | int _dataSize; | |||
int _ttl; | int _ttl; | |||
std::vector<int> _rtt; | std::vector<int> _rtt; | |||
skipping to change at line 134 | skipping to change at line 114 | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline int ICMPEventArgs::repetitions() const | inline int ICMPEventArgs::repetitions() const | |||
{ | { | |||
return (int) _rtt.size(); | return (int) _rtt.size(); | |||
} | } | |||
inline void ICMPEventArgs::setDataSize(int dataSize) | inline void ICMPEventArgs::setDataSize(int sz) | |||
{ | { | |||
_dataSize = dataSize; | _dataSize = sz; | |||
} | } | |||
inline int ICMPEventArgs::dataSize() const | inline int ICMPEventArgs::dataSize() const | |||
{ | { | |||
return _dataSize; | return _dataSize; | |||
} | } | |||
inline void ICMPEventArgs::setTTL(int ttl) | inline void ICMPEventArgs::setTTL(int timeToLive) | |||
{ | { | |||
_ttl = ttl; | _ttl = timeToLive; | |||
} | } | |||
inline int ICMPEventArgs::ttl() const | inline int ICMPEventArgs::ttl() const | |||
{ | { | |||
return _ttl; | return _ttl; | |||
} | } | |||
inline int ICMPEventArgs::sent() const | inline int ICMPEventArgs::sent() const | |||
{ | { | |||
return _sent; | return _sent; | |||
End of changes. 6 change blocks. | ||||
38 lines changed or deleted | 7 lines changed or added | |||
ICMPPacket.h | ICMPPacket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPPacket | // Module: ICMPPacket | |||
// | // | |||
// Definition of the ICMPPacket class. | // Definition of the ICMPPacket class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPPacket_INCLUDED | #ifndef Net_ICMPPacket_INCLUDED | |||
#define Net_ICMPPacket_INCLUDED | #define Net_ICMPPacket_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/Net/ICMPPacketImpl.h" | #include "Poco/Net/ICMPPacketImpl.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPPacketImpl.h | ICMPPacketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPPacketImpl | // Module: ICMPPacketImpl | |||
// | // | |||
// Definition of the ICMPPacketImpl class. | // Definition of the ICMPPacketImpl class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPPacketImpl_INCLUDED | #ifndef Net_ICMPPacketImpl_INCLUDED | |||
#define Net_ICMPPacketImpl_INCLUDED | #define Net_ICMPPacketImpl_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPSocket.h | ICMPSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPSocket | // Module: ICMPSocket | |||
// | // | |||
// Definition of the ICMPSocket class. | // Definition of the ICMPSocket class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPSocket_INCLUDED | #ifndef Net_ICMPSocket_INCLUDED | |||
#define Net_ICMPSocket_INCLUDED | #define Net_ICMPSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPSocketImpl.h | ICMPSocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPSocketImpl | // Module: ICMPSocketImpl | |||
// | // | |||
// Definition of the ICMPSocketImpl class. | // Definition of the ICMPSocketImpl class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPSocketImpl_INCLUDED | #ifndef Net_ICMPSocketImpl_INCLUDED | |||
#define Net_ICMPSocketImpl_INCLUDED | #define Net_ICMPSocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/RawSocketImpl.h" | #include "Poco/Net/RawSocketImpl.h" | |||
#include "Poco/Net/ICMPPacket.h" | #include "Poco/Net/ICMPPacket.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ICMPv4PacketImpl.h | ICMPv4PacketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: ICMP | // Package: ICMP | |||
// Module: ICMPv4PacketImpl | // Module: ICMPv4PacketImpl | |||
// | // | |||
// Definition of the ICMPv4PacketImpl class. | // Definition of the ICMPv4PacketImpl class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ICMPv4PacketImpl_INCLUDED | #ifndef Net_ICMPv4PacketImpl_INCLUDED | |||
#define Net_ICMPv4PacketImpl_INCLUDED | #define Net_ICMPv4PacketImpl_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/Net/ICMPPacketImpl.h" | #include "Poco/Net/ICMPPacketImpl.h" | |||
#include <cstddef> | #include <cstddef> | |||
skipping to change at line 68 | skipping to change at line 48 | |||
struct Header | struct Header | |||
{ | { | |||
Poco::UInt8 type; // ICMP packet type | Poco::UInt8 type; // ICMP packet type | |||
Poco::UInt8 code; // Type sub code | Poco::UInt8 code; // Type sub code | |||
Poco::UInt16 checksum; | Poco::UInt16 checksum; | |||
Poco::UInt16 id; | Poco::UInt16 id; | |||
Poco::UInt16 seq; | Poco::UInt16 seq; | |||
}; | }; | |||
// compile-time shield against misalignment | // compile-time shield against misalignment | |||
#ifndef POCO_ANDROID | ||||
poco_static_assert (offsetof(Header, code) == 0x01); | poco_static_assert (offsetof(Header, code) == 0x01); | |||
poco_static_assert (offsetof(Header, checksum) == 0x02); | poco_static_assert (offsetof(Header, checksum) == 0x02); | |||
poco_static_assert (offsetof(Header, id) == 0x04); | poco_static_assert (offsetof(Header, id) == 0x04); | |||
poco_static_assert (offsetof(Header, seq) == 0x06); | poco_static_assert (offsetof(Header, seq) == 0x06); | |||
#endif | ||||
enum MessageType | enum MessageType | |||
{ | { | |||
ECHO_REPLY, | ECHO_REPLY, | |||
ICMP_1, | ICMP_1, | |||
ICMP_2, | ICMP_2, | |||
DESTINATION_UNREACHABLE, | DESTINATION_UNREACHABLE, | |||
SOURCE_QUENCH, | SOURCE_QUENCH, | |||
REDIRECT, | REDIRECT, | |||
ICMP_6, | ICMP_6, | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 3 lines changed or added | |||
IPAddress.h | IPAddress.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: IPAddress | // Module: IPAddress | |||
// | // | |||
// Definition of the IPAddress class. | // Definition of the IPAddress class. | |||
// | // | |||
// Copyright (c) 2005-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_IPAddress_INCLUDED | #ifndef Net_IPAddress_INCLUDED | |||
#define Net_IPAddress_INCLUDED | #define Net_IPAddress_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketDefs.h" | #include "Poco/Net/SocketDefs.h" | |||
#include "Poco/Net/IPAddressImpl.h" | ||||
#include "Poco/AutoPtr.h" | ||||
#include "Poco/Exception.h" | ||||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
class BinaryReader; | class BinaryReader; | |||
class BinaryWriter; | class BinaryWriter; | |||
namespace Net { | namespace Net { | |||
class IPAddressImpl; | ||||
class Net_API IPAddress | class Net_API IPAddress | |||
/// This class represents an internet (IP) host | /// This class represents an internet (IP) host | |||
/// address. The address can belong either to the | /// address. The address can belong either to the | |||
/// IPv4 or the IPv6 address family. | /// IPv4 or the IPv6 address family. | |||
/// | /// | |||
/// Relational operators (==, !=, <, <=, >, >=) are | /// Relational operators (==, !=, <, <=, >, >=) are | |||
/// supported. However, you must not interpret any | /// supported. However, you must not interpret any | |||
/// special meaning into the result of these | /// special meaning into the result of these | |||
/// operations, other than that the results are | /// operations, other than that the results are | |||
/// consistent. | /// consistent. | |||
skipping to change at line 78 | skipping to change at line 59 | |||
/// | /// | |||
/// IPv6 addresses are supported only if the target platform | /// IPv6 addresses are supported only if the target platform | |||
/// supports IPv6. | /// supports IPv6. | |||
{ | { | |||
public: | public: | |||
typedef std::vector<IPAddress> List; | typedef std::vector<IPAddress> List; | |||
enum Family | enum Family | |||
/// Possible address families for IP addresses. | /// Possible address families for IP addresses. | |||
{ | { | |||
IPv4 | IPv4 = Poco::Net::Impl::IPAddressImpl::IPv4 | |||
#ifdef POCO_HAVE_IPv6 | #ifdef POCO_HAVE_IPv6 | |||
,IPv6 | ,IPv6 = Poco::Net::Impl::IPAddressImpl::IPv6 | |||
#endif | #endif | |||
}; | }; | |||
IPAddress(); | IPAddress(); | |||
/// Creates a wildcard (zero) IPv4 IPAddress. | /// Creates a wildcard (zero) IPv4 IPAddress. | |||
IPAddress(const IPAddress& addr); | IPAddress(const IPAddress& addr); | |||
/// Creates an IPAddress by copying another one. | /// Creates an IPAddress by copying another one. | |||
explicit IPAddress(Family family); | explicit IPAddress(Family family); | |||
skipping to change at line 140 | skipping to change at line 121 | |||
IPAddress(const struct sockaddr& sockaddr); | IPAddress(const struct sockaddr& sockaddr); | |||
/// Same for struct sock_addr on POSIX. | /// Same for struct sock_addr on POSIX. | |||
~IPAddress(); | ~IPAddress(); | |||
/// Destroys the IPAddress. | /// Destroys the IPAddress. | |||
IPAddress& operator = (const IPAddress& addr); | IPAddress& operator = (const IPAddress& addr); | |||
/// Assigns an IPAddress. | /// Assigns an IPAddress. | |||
void swap(IPAddress& address); | ||||
/// Swaps the IPAddress with another one. | ||||
Family family() const; | Family family() const; | |||
/// Returns the address family (IPv4 or IPv6) of the address . | /// Returns the address family (IPv4 or IPv6) of the address . | |||
Poco::UInt32 scope() const; | Poco::UInt32 scope() const; | |||
/// Returns the IPv6 scope identifier of the address. Return s 0 if | /// Returns the IPv6 scope identifier of the address. Return s 0 if | |||
/// the address is an IPv4 address, or the address is an | /// the address is an IPv4 address, or the address is an | |||
/// IPv6 address but does not have a scope identifier. | /// IPv6 address but does not have a scope identifier. | |||
std::string toString() const; | std::string toString() const; | |||
/// Returns a string containing a representation of the addr ess | /// Returns a string containing a representation of the addr ess | |||
skipping to change at line 176 | skipping to change at line 154 | |||
/// | /// | |||
/// It is common for IPv6 addresses to contain long strings of zero bits. | /// It is common for IPv6 addresses to contain long strings of zero bits. | |||
/// In order to make writing addresses containing zero bits easier, a special syntax is | /// In order to make writing addresses containing zero bits easier, a special syntax is | |||
/// available to compress the zeros. The use of "::" indicat es multiple groups of 16-bits of zeros. | /// available to compress the zeros. The use of "::" indicat es multiple groups of 16-bits of zeros. | |||
/// The "::" can only appear once in an address. The "::" ca n also be used to compress the leading | /// The "::" can only appear once in an address. The "::" ca n also be used to compress the leading | |||
/// and/or trailing zeros in an address. Example: 1080::8:60 0:200A:425C | /// and/or trailing zeros in an address. Example: 1080::8:60 0:200A:425C | |||
/// | /// | |||
/// For dealing with IPv4 compatible addresses in a mixed en vironment, | /// For dealing with IPv4 compatible addresses in a mixed en vironment, | |||
/// a special syntax is available: x:x:x:x:x:x:d.d.d.d, wher e the 'x's are the | /// a special syntax is available: x:x:x:x:x:x:d.d.d.d, wher e the 'x's are the | |||
/// hexadecimal values of the six high-order 16-bit pieces o f the address, | /// hexadecimal values of the six high-order 16-bit pieces o f the address, | |||
/// and the 'd's are the decimal values of the four low-order 8-bit | /// and the 'd's are the decimal values of the four low-orde | |||
pieces of the | r 8-bit pieces of the | |||
/// standard IPv4 representation address. Example: ::FFFF:192.168.1 | /// standard IPv4 representation address. Example: ::FFFF:19 | |||
.120 | 2.168.1.120 | |||
/// | /// | |||
/// If an IPv6 address contains a non-zero scope identifier, it is | /// If an IPv6 address contains a non-zero scope identifier, | |||
added | it is added | |||
/// to the string, delimited by a percent character. On Windows pla | /// to the string, delimited by a percent character. On Wind | |||
tforms, | ows platforms, | |||
/// the numeric value (which specifies an interface index) is direc | /// the numeric value (which specifies an interface index) i | |||
tly | s directly | |||
/// appended. On Unix platforms, the name of the interface correspo | /// appended. On Unix platforms, the name of the interface c | |||
nding | orresponding | |||
/// to the index (interpretation of the scope identifier) is added. | /// to the index (interpretation of the scope identifier) is | |||
added. | ||||
bool isWildcard() const; | bool isWildcard() const; | |||
/// Returns true iff the address is a wildcard (all zero) | /// Returns true iff the address is a wildcard (all zero) | |||
/// address. | /// address. | |||
bool isBroadcast() const; | bool isBroadcast() const; | |||
/// Returns true iff the address is a broadcast address. | /// Returns true iff the address is a broadcast address. | |||
/// | /// | |||
/// Only IPv4 addresses can be broadcast addresses. In a bro adcast | /// Only IPv4 addresses can be broadcast addresses. In a bro adcast | |||
/// address, all bits are one. | /// address, all bits are one. | |||
skipping to change at line 384 | skipping to change at line 362 | |||
{ | { | |||
MAX_ADDRESS_LENGTH = | MAX_ADDRESS_LENGTH = | |||
#if defined(POCO_HAVE_IPv6) | #if defined(POCO_HAVE_IPv6) | |||
sizeof(struct in6_addr) | sizeof(struct in6_addr) | |||
#else | #else | |||
sizeof(struct in_addr) | sizeof(struct in_addr) | |||
#endif | #endif | |||
/// Maximum length in bytes of a socket address. | /// Maximum length in bytes of a socket address. | |||
}; | }; | |||
protected: | ||||
void init(IPAddressImpl* pImpl); | ||||
private: | private: | |||
IPAddressImpl* _pImpl; | typedef Poco::Net::Impl::IPAddressImpl Impl; | |||
#ifdef POCO_HAVE_ALIGNMENT | ||||
typedef Impl* Ptr; | ||||
#else | ||||
typedef Poco::AutoPtr<Impl> Ptr; | ||||
#endif | ||||
Ptr pImpl() const; | ||||
void newIPv4(const void* hostAddr); | ||||
void newIPv6(const void* hostAddr); | ||||
void newIPv6(const void* hostAddr, Poco::UInt32 scope); | ||||
void newIPv4(unsigned prefix); | ||||
void newIPv6(unsigned prefix); | ||||
void newIPv4(); | ||||
void newIPv6(); | ||||
void destruct(); | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
char* storage(); | ||||
#ifdef POCO_ENABLE_CPP11 | ||||
static const unsigned sz = sizeof(Poco::Net::Impl::IPv6Addre | ||||
ssImpl); | ||||
typedef std::aligned_storage<sz>::type AlignerType; | ||||
union | ||||
{ | ||||
char buffer[sz]; | ||||
private: | ||||
AlignerType aligner; | ||||
} | ||||
#else // !POCO_ENABLE_CPP11 | ||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6AddressImpl> | ||||
#endif // POCO_ENABLE_CPP11 | ||||
_memory; | ||||
#else // !POCO_HAVE_ALIGNMENT | ||||
Ptr _pImpl; | ||||
#endif // POCO_HAVE_ALIGNMENT | ||||
}; | }; | |||
// | inline void IPAddress::destruct() | |||
// inlines | ||||
// | ||||
inline void swap(IPAddress& addr1, IPAddress& addr2) | ||||
{ | { | |||
addr1.swap(addr2); | #ifdef POCO_HAVE_ALIGNMENT | |||
pImpl()->~IPAddressImpl(); | ||||
#endif | ||||
} | } | |||
inline IPAddress::Ptr IPAddress::pImpl() const | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
return reinterpret_cast<Ptr>(const_cast<char *>(_memory.buffer)); | ||||
#else | ||||
if (_pImpl) return _pImpl; | ||||
throw NullPointerException("IPaddress implementation pointer is NULL | ||||
."); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv4(const void* hostAddr) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl(hostAddr); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl(hostAddr); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv6(const void* hostAddr) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl(hostAddr); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl(hostAddr); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv6(const void* hostAddr, Poco::UInt32 scope) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl(hostAddr, scope); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl(hostAddr, scope); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv4(unsigned prefix) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl(prefix); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl(prefix); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv6(unsigned prefix) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl(prefix); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl(prefix); | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv4() | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4AddressImpl; | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4AddressImpl; | ||||
#endif | ||||
} | ||||
inline void IPAddress::newIPv6() | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6AddressImpl; | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6AddressImpl; | ||||
#endif | ||||
} | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
inline char* IPAddress::storage() | ||||
{ | ||||
return _memory.buffer; | ||||
} | ||||
#endif | ||||
BinaryWriter& operator << (BinaryWriter& writer, const IPAddress& value); | BinaryWriter& operator << (BinaryWriter& writer, const IPAddress& value); | |||
BinaryReader& operator >> (BinaryReader& reader, IPAddress& value); | BinaryReader& operator >> (BinaryReader& reader, IPAddress& value); | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_IPAddress_INCLUDED | #endif // Net_IPAddress_INCLUDED | |||
End of changes. 12 change blocks. | ||||
62 lines changed or deleted | 152 lines changed or added | |||
InflatingStream.h | InflatingStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: ZLibStream | // Module: ZLibStream | |||
// | // | |||
// Definition of the InflatingInputStream and InflatingOutputStream classes . | // Definition of the InflatingInputStream and InflatingOutputStream classes . | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_InflatingStream_INCLUDED | #ifndef Foundation_InflatingStream_INCLUDED | |||
#define Foundation_InflatingStream_INCLUDED | #define Foundation_InflatingStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
#if defined(POCO_UNBUNDLED) | #if defined(POCO_UNBUNDLED) | |||
skipping to change at line 104 | skipping to change at line 84 | |||
/// Finishes up the stream. | /// Finishes up the stream. | |||
/// | /// | |||
/// Must be called when inflating to an output stream. | /// Must be called when inflating to an output stream. | |||
void reset(); | void reset(); | |||
/// Resets the stream buffer. | /// Resets the stream buffer. | |||
protected: | protected: | |||
int readFromDevice(char* buffer, std::streamsize length); | int readFromDevice(char* buffer, std::streamsize length); | |||
int writeToDevice(const char* buffer, std::streamsize length); | int writeToDevice(const char* buffer, std::streamsize length); | |||
int sync(); | ||||
private: | private: | |||
enum | enum | |||
{ | { | |||
STREAM_BUFFER_SIZE = 1024, | STREAM_BUFFER_SIZE = 1024, | |||
INFLATE_BUFFER_SIZE = 32768 | INFLATE_BUFFER_SIZE = 32768 | |||
}; | }; | |||
std::istream* _pIstr; | std::istream* _pIstr; | |||
std::ostream* _pOstr; | std::ostream* _pOstr; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 2 lines changed or added | |||
IniFileConfiguration.h | IniFileConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: IniFileConfiguration | // Module: IniFileConfiguration | |||
// | // | |||
// Definition of the IniFileConfiguration class. | // Definition of the IniFileConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_IniFileConfiguration_INCLUDED | #ifndef Util_IniFileConfiguration_INCLUDED | |||
#define Util_IniFileConfiguration_INCLUDED | #define Util_IniFileConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#ifndef POCO_UTIL_NO_INIFILECONFIGURATION | ||||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include <map> | #include <map> | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
class Util_API IniFileConfiguration: public AbstractConfiguration | class Util_API IniFileConfiguration: public AbstractConfiguration | |||
/// This implementation of a Configuration reads properties | /// This implementation of a Configuration reads properties | |||
/// from a legacy Windows initialization (.ini) file. | /// from a legacy Windows initialization (.ini) file. | |||
skipping to change at line 107 | skipping to change at line 90 | |||
bool operator () (const std::string& s1, const std::string& s2) const; | bool operator () (const std::string& s1, const std::string& s2) const; | |||
}; | }; | |||
typedef std::map<std::string, std::string, ICompare> IStringMap; | typedef std::map<std::string, std::string, ICompare> IStringMap; | |||
IStringMap _map; | IStringMap _map; | |||
std::string _sectionKey; | std::string _sectionKey; | |||
}; | }; | |||
} } // namespace Poco::Util | } } // namespace Poco::Util | |||
#endif // POCO_UTIL_NO_INIFILECONFIGURATION | ||||
#endif // Util_IniFileConfiguration_INCLUDED | #endif // Util_IniFileConfiguration_INCLUDED | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 6 lines changed or added | |||
InputSource.h | InputSource.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX InputSource - A single input source for an XML entity. | // SAX InputSource - A single input source for an XML entity. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_InputSource_INCLUDED | #ifndef SAX_InputSource_INCLUDED | |||
#define SAX_InputSource_INCLUDED | #define SAX_InputSource_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/XML/XMLStream.h" | #include "Poco/XML/XMLStream.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Instantiator.h | Instantiator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Instantiator | // Module: Instantiator | |||
// | // | |||
// Definition of the Instantiator class. | // Definition of the Instantiator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Instantiator_INCLUDED | #ifndef Foundation_Instantiator_INCLUDED | |||
#define Foundation_Instantiator_INCLUDED | #define Foundation_Instantiator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class Base> | template <class Base> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
IntValidator.h | IntValidator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: IntValidator | // Module: IntValidator | |||
// | // | |||
// Definition of the IntValidator class. | // Definition of the IntValidator class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_IntValidator_INCLUDED | #ifndef Util_IntValidator_INCLUDED | |||
#define Util_IntValidator_INCLUDED | #define Util_IntValidator_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Validator.h" | #include "Poco/Util/Validator.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
JSON.h | JSON.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// Package: JSON | // Package: JSON | |||
// Module: JSON | // Module: JSON | |||
// | // | |||
// Basic definitions for the Poco JSON library. | // Basic definitions for the Poco JSON library. | |||
// This file must be the first file included by every other JSON | // This file must be the first file included by every other JSON | |||
// header file. | // header file. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSON_INCLUDED | #ifndef JSON_JSON_INCLUDED | |||
#define JSON_JSON_INCLUDED | #define JSON_JSON_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
// | // | |||
// The following block is the standard way of creating macros which make ex porting | // The following block is the standard way of creating macros which make ex porting | |||
// from a DLL simpler. All files within this DLL are compiled with the JSON _EXPORTS | // from a DLL simpler. All files within this DLL are compiled with the JSON _EXPORTS | |||
skipping to change at line 62 | skipping to change at line 42 | |||
// | // | |||
#if defined(_WIN32) && defined(POCO_DLL) | #if defined(_WIN32) && defined(POCO_DLL) | |||
#if defined(JSON_EXPORTS) | #if defined(JSON_EXPORTS) | |||
#define JSON_API __declspec(dllexport) | #define JSON_API __declspec(dllexport) | |||
#else | #else | |||
#define JSON_API __declspec(dllimport) | #define JSON_API __declspec(dllimport) | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined(JSON_API) | #if !defined(JSON_API) | |||
#define JSON_API | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__ | |||
GNUC__ >= 4) | ||||
#define JSON_API __attribute__ ((visibility ("default"))) | ||||
#else | ||||
#define JSON_API | ||||
#endif | ||||
#endif | #endif | |||
// | // | |||
// Automatically link JSON library. | // Automatically link JSON library. | |||
// | // | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(JSON_EXPORTS) | #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(JSON_EXPORTS) | |||
#pragma comment(lib, "PocoJSON" POCO_LIB_SUFFIX) | #pragma comment(lib, "PocoJSON" POCO_LIB_SUFFIX) | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
JSONConfiguration.h | JSONConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Util | // Package: Util | |||
// Module: JSONConfiguration | // Module: JSONConfiguration | |||
// | // | |||
// Definition of the JSONConfiguration class. | // Definition of the JSONConfiguration class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_JSONConfiguration_INCLUDED | #ifndef Util_JSONConfiguration_INCLUDED | |||
#define Util_JSONConfiguration_INCLUDED | #define Util_JSONConfiguration_INCLUDED | |||
#include <istream> | #include "Poco/Util/Util.h" | |||
#ifndef POCO_UTIL_NO_JSONCONFIGURATION | ||||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include "Poco/JSON/Object.h" | #include "Poco/JSON/Object.h" | |||
#include <istream> | ||||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
class Util_API JSONConfiguration : public AbstractConfiguration | class Util_API JSONConfiguration : public AbstractConfiguration | |||
/// This configuration class extracts configuration properties | /// This configuration class extracts configuration properties | |||
/// from a JSON object. An XPath-like syntax for property | /// from a JSON object. An XPath-like syntax for property | |||
/// names is supported to allow full access to the JSON object. | /// names is supported to allow full access to the JSON object. | |||
/// | /// | |||
/// Given the following JSON object as an example: | /// Given the following JSON object as an example: | |||
skipping to change at line 136 | skipping to change at line 119 | |||
void getIndexes(std::string& name, std::vector<int>& indexes); | void getIndexes(std::string& name, std::vector<int>& indexes); | |||
void setValue(const std::string& key, const Poco::DynamicAny& value) ; | void setValue(const std::string& key, const Poco::DynamicAny& value) ; | |||
JSON::Object::Ptr _object; | JSON::Object::Ptr _object; | |||
}; | }; | |||
} } // namespace Poco::Util | } } // namespace Poco::Util | |||
#endif // POCO_UTIL_NO_JSONCONFIGURATION | ||||
#endif // Util_JSONConfiguration_INCLUDED | #endif // Util_JSONConfiguration_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
JSONException.h | JSONException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: JSONException | // Module: JSONException | |||
// | // | |||
// Definition of the JSONException class. | // Definition of the JSONException class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSONException_INCLUDED | #ifndef JSON_JSONException_INCLUDED | |||
#define JSON_JSONException_INCLUDED | #define JSON_JSONException_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
KeyValueArgs.h | KeyValueArgs.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: KeyValueArgs | // Module: KeyValueArgs | |||
// | // | |||
// Definition of the KeyValueArgs class. | // Definition of the KeyValueArgs class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_KeyValueArgs_INCLUDED | #ifndef Foundation_KeyValueArgs_INCLUDED | |||
#define Foundation_KeyValueArgs_INCLUDED | #define Foundation_KeyValueArgs_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TKey, class TValue> | template <class TKey, class TValue> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LRUCache.h | LRUCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: LRUCache | // Module: LRUCache | |||
// | // | |||
// Definition of the LRUCache class. | // Definition of the LRUCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LRUCache_INCLUDED | #ifndef Foundation_LRUCache_INCLUDED | |||
#define Foundation_LRUCache_INCLUDED | #define Foundation_LRUCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/LRUStrategy.h" | #include "Poco/LRUStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LRUStrategy.h | LRUStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: LRUStrategy | // Module: LRUStrategy | |||
// | // | |||
// Definition of the LRUStrategy class. | // Definition of the LRUStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LRUStrategy_INCLUDED | #ifndef Foundation_LRUStrategy_INCLUDED | |||
#define Foundation_LRUStrategy_INCLUDED | #define Foundation_LRUStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/AbstractStrategy.h" | #include "Poco/AbstractStrategy.h" | |||
#include "Poco/EventArgs.h" | #include "Poco/EventArgs.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Latin1Encoding.h | Latin1Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Latin1Encoding | // Module: Latin1Encoding | |||
// | // | |||
// Definition of the Latin1Encoding class. | // Definition of the Latin1Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Latin1Encoding_INCLUDED | #ifndef Foundation_Latin1Encoding_INCLUDED | |||
#define Foundation_Latin1Encoding_INCLUDED | #define Foundation_Latin1Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Latin2Encoding.h | Latin2Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Latin2Encoding | // Module: Latin2Encoding | |||
// | // | |||
// Definition of the Latin2Encoding class. | // Definition of the Latin2Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Latin2Encoding_INCLUDED | #ifndef Foundation_Latin2Encoding_INCLUDED | |||
#define Foundation_Latin2Encoding_INCLUDED | #define Foundation_Latin2Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Latin9Encoding.h | Latin9Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Latin9Encoding | // Module: Latin9Encoding | |||
// | // | |||
// Definition of the Latin9Encoding class. | // Definition of the Latin9Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Latin9Encoding_INCLUDED | #ifndef Foundation_Latin9Encoding_INCLUDED | |||
#define Foundation_Latin9Encoding_INCLUDED | #define Foundation_Latin9Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LayeredConfiguration.h | LayeredConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: LayeredConfiguration | // Module: LayeredConfiguration | |||
// | // | |||
// Definition of the LayeredConfiguration class. | // Definition of the LayeredConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_LayeredConfiguration_INCLUDED | #ifndef Util_LayeredConfiguration_INCLUDED | |||
#define Util_LayeredConfiguration_INCLUDED | #define Util_LayeredConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include <list> | #include <list> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LexicalHandler.h | LexicalHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX2-ext LexicalHandler Interface. | // SAX2-ext LexicalHandler Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_LexicalHandler_INCLUDED | #ifndef SAX_LexicalHandler_INCLUDED | |||
#define SAX_LexicalHandler_INCLUDED | #define SAX_LexicalHandler_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LineEndingConverter.h | LineEndingConverter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: LineEndingConverter | // Module: LineEndingConverter | |||
// | // | |||
// Definition of the LineEndingConverter class. | // Definition of the LineEndingConverter class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LineEndingConverter_INCLUDED | #ifndef Foundation_LineEndingConverter_INCLUDED | |||
#define Foundation_LineEndingConverter_INCLUDED | #define Foundation_LineEndingConverter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LinearHashTable.h | LinearHashTable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: LinearHashTable | // Module: LinearHashTable | |||
// | // | |||
// Definition of the LinearHashTable class. | // Definition of the LinearHashTable class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LinearHashTable_INCLUDED | #ifndef Foundation_LinearHashTable_INCLUDED | |||
#define Foundation_LinearHashTable_INCLUDED | #define Foundation_LinearHashTable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Hash.h" | #include "Poco/Hash.h" | |||
#include <functional> | #include <functional> | |||
#include <algorithm> | #include <algorithm> | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LocalDateTime.h | LocalDateTime.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: LocalDateTime | // Module: LocalDateTime | |||
// | // | |||
// Definition of the LocalDateTime class. | // Definition of the LocalDateTime class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LocalDateTime_INCLUDED | #ifndef Foundation_LocalDateTime_INCLUDED | |||
#define Foundation_LocalDateTime_INCLUDED | #define Foundation_LocalDateTime_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DateTime.h" | #include "Poco/DateTime.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Locator.h | Locator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX Locator Interface. | // SAX Locator Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_Locator_INCLUDED | #ifndef SAX_Locator_INCLUDED | |||
#define SAX_Locator_INCLUDED | #define SAX_Locator_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LocatorImpl.h | LocatorImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// An implementation of the SAX Locator interface. | // An implementation of the SAX Locator interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_LocatorImpl_INCLUDED | #ifndef SAX_LocatorImpl_INCLUDED | |||
#define SAX_LocatorImpl_INCLUDED | #define SAX_LocatorImpl_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/Locator.h" | #include "Poco/SAX/Locator.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogFile.h | LogFile.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogFile | // Module: LogFile | |||
// | // | |||
// Definition of the LogFile class. | // Definition of the LogFile class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogFile_INCLUDED | #ifndef Foundation_LogFile_INCLUDED | |||
#define Foundation_LogFile_INCLUDED | #define Foundation_LogFile_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | #if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | |||
#include "Poco/LogFile_WIN32U.h" | #include "Poco/LogFile_WIN32U.h" | |||
#elif defined(POCO_OS_FAMILY_WINDOWS) | #elif defined(POCO_OS_FAMILY_WINDOWS) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogFile_STD.h | LogFile_STD.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogFile | // Module: LogFile | |||
// | // | |||
// Definition of the LogFileImpl class using iostreams. | // Definition of the LogFileImpl class using iostreams. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogFile_STD_INCLUDED | #ifndef Foundation_LogFile_STD_INCLUDED | |||
#define Foundation_LogFile_STD_INCLUDED | #define Foundation_LogFile_STD_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/FileStream.h" | #include "Poco/FileStream.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogFile_VMS.h | LogFile_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogFile | // Module: LogFile | |||
// | // | |||
// Definition of the LogFileImpl class using C I/O with OpenVMS extensions. | // Definition of the LogFileImpl class using C I/O with OpenVMS extensions. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogFile_VMS_INCLUDED | #ifndef Foundation_LogFile_VMS_INCLUDED | |||
#define Foundation_LogFile_VMS_INCLUDED | #define Foundation_LogFile_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include <stdio.h> | #include <stdio.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogFile_WIN32.h | LogFile_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogFile | // Module: LogFile | |||
// | // | |||
// Definition of the LogFileImpl class using the Windows file APIs. | // Definition of the LogFileImpl class using the Windows file APIs. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogFile_WIN32_INCLUDED | #ifndef Foundation_LogFile_WIN32_INCLUDED | |||
#define Foundation_LogFile_WIN32_INCLUDED | #define Foundation_LogFile_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogFile_WIN32U.h | LogFile_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogFile | // Module: LogFile | |||
// | // | |||
// Definition of the LogFileImpl class using the Windows file APIs. | // Definition of the LogFileImpl class using the Windows file APIs. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogFile_WIN32U_INCLUDED | #ifndef Foundation_LogFile_WIN32U_INCLUDED | |||
#define Foundation_LogFile_WIN32U_INCLUDED | #define Foundation_LogFile_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LogStream.h | LogStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LogStream | // Module: LogStream | |||
// | // | |||
// Definition of the LogStream class. | // Definition of the LogStream class. | |||
// | // | |||
// Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LogStream_INCLUDED | #ifndef Foundation_LogStream_INCLUDED | |||
#define Foundation_LogStream_INCLUDED | #define Foundation_LogStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Logger.h" | #include "Poco/Logger.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Logger.h | Logger.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Logger | // Module: Logger | |||
// | // | |||
// Definition of the Logger class. | // Definition of the Logger class. | |||
// | // | |||
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Logger_INCLUDED | #ifndef Foundation_Logger_INCLUDED | |||
#define Foundation_Logger_INCLUDED | #define Foundation_Logger_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Message.h" | #include "Poco/Message.h" | |||
#include "Poco/Format.h" | #include "Poco/Format.h" | |||
#include <map> | #include <map> | |||
skipping to change at line 176 | skipping to change at line 156 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void fatal(const std::string& fmt, const Any& value1); | void fatal(const std::string& fmt, const Any& value1); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val ue2); | void fatal(const std::string& fmt, const Any& value1, const Any& val ue2); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | void fatal(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | |||
void fatal(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7); | ||||
void fatal(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8); | ||||
void fatal(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9); | ||||
void fatal(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9, const Any& v | ||||
alue10); | ||||
void critical(const std::string& msg); | void critical(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_CRITICAL, | /// If the Logger's log level is at least PRIO_CRITICAL, | |||
/// creates a Message with priority PRIO_CRITICAL | /// creates a Message with priority PRIO_CRITICAL | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void critical(const std::string& msg, const char* file, int line); | void critical(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_CRITICAL, | /// If the Logger's log level is at least PRIO_CRITICAL, | |||
/// creates a Message with priority PRIO_CRITICAL | /// creates a Message with priority PRIO_CRITICAL | |||
skipping to change at line 199 | skipping to change at line 183 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void critical(const std::string& fmt, const Any& value1); | void critical(const std::string& fmt, const Any& value1); | |||
void critical(const std::string& fmt, const Any& value1, const Any& value2); | void critical(const std::string& fmt, const Any& value1, const Any& value2); | |||
void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3); | void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3); | |||
void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4); | void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4); | |||
void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5); | void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5); | |||
void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6); | void critical(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6); | |||
void critical(const std::string& fmt, const Any& value1, const Any& | ||||
value2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7); | ||||
void critical(const std::string& fmt, const Any& value1, const Any& | ||||
value2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8); | ||||
void critical(const std::string& fmt, const Any& value1, const Any& | ||||
value2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8, const Any& value9); | ||||
void critical(const std::string& fmt, const Any& value1, const Any& | ||||
value2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8, const Any& value9, const Any | ||||
& value10); | ||||
void error(const std::string& msg); | void error(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_ERROR, | /// If the Logger's log level is at least PRIO_ERROR, | |||
/// creates a Message with priority PRIO_ERROR | /// creates a Message with priority PRIO_ERROR | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void error(const std::string& msg, const char* file, int line); | void error(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_ERROR, | /// If the Logger's log level is at least PRIO_ERROR, | |||
/// creates a Message with priority PRIO_ERROR | /// creates a Message with priority PRIO_ERROR | |||
skipping to change at line 222 | skipping to change at line 210 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void error(const std::string& fmt, const Any& value1); | void error(const std::string& fmt, const Any& value1); | |||
void error(const std::string& fmt, const Any& value1, const Any& val ue2); | void error(const std::string& fmt, const Any& value1, const Any& val ue2); | |||
void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | |||
void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | |||
void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | |||
void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | void error(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | |||
void error(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7); | ||||
void error(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8); | ||||
void error(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9); | ||||
void error(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9, const Any& v | ||||
alue10); | ||||
void warning(const std::string& msg); | void warning(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_WARNING, | /// If the Logger's log level is at least PRIO_WARNING, | |||
/// creates a Message with priority PRIO_WARNING | /// creates a Message with priority PRIO_WARNING | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void warning(const std::string& msg, const char* file, int line); | void warning(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_WARNING, | /// If the Logger's log level is at least PRIO_WARNING, | |||
/// creates a Message with priority PRIO_WARNING | /// creates a Message with priority PRIO_WARNING | |||
skipping to change at line 245 | skipping to change at line 237 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void warning(const std::string& fmt, const Any& value1); | void warning(const std::string& fmt, const Any& value1); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v alue2); | void warning(const std::string& fmt, const Any& value1, const Any& v alue2); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3); | void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4); | void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4, const Any& value5); | void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4, const Any& value5); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4, const Any& value5, const Any& value6); | void warning(const std::string& fmt, const Any& value1, const Any& v alue2, const Any& value3, const Any& value4, const Any& value5, const Any& value6); | |||
void warning(const std::string& fmt, const Any& value1, const Any& v | ||||
alue2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7); | ||||
void warning(const std::string& fmt, const Any& value1, const Any& v | ||||
alue2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8); | ||||
void warning(const std::string& fmt, const Any& value1, const Any& v | ||||
alue2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8, const Any& value9); | ||||
void warning(const std::string& fmt, const Any& value1, const Any& v | ||||
alue2, const Any& value3, const Any& value4, const Any& value5, const Any& | ||||
value6, const Any& value7, const Any& value8, const Any& value9, const Any& | ||||
value10); | ||||
void notice(const std::string& msg); | void notice(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_NOTICE, | /// If the Logger's log level is at least PRIO_NOTICE, | |||
/// creates a Message with priority PRIO_NOTICE | /// creates a Message with priority PRIO_NOTICE | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void notice(const std::string& msg, const char* file, int line); | void notice(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_NOTICE, | /// If the Logger's log level is at least PRIO_NOTICE, | |||
/// creates a Message with priority PRIO_NOTICE | /// creates a Message with priority PRIO_NOTICE | |||
skipping to change at line 268 | skipping to change at line 264 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void notice(const std::string& fmt, const Any& value1); | void notice(const std::string& fmt, const Any& value1); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va lue2); | void notice(const std::string& fmt, const Any& value1, const Any& va lue2); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3); | void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4); | void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4, const Any& value5); | void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4, const Any& value5); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v alue6); | void notice(const std::string& fmt, const Any& value1, const Any& va lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v alue6); | |||
void notice(const std::string& fmt, const Any& value1, const Any& va | ||||
lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v | ||||
alue6, const Any& value7); | ||||
void notice(const std::string& fmt, const Any& value1, const Any& va | ||||
lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v | ||||
alue6, const Any& value7, const Any& value8); | ||||
void notice(const std::string& fmt, const Any& value1, const Any& va | ||||
lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v | ||||
alue6, const Any& value7, const Any& value8, const Any& value9); | ||||
void notice(const std::string& fmt, const Any& value1, const Any& va | ||||
lue2, const Any& value3, const Any& value4, const Any& value5, const Any& v | ||||
alue6, const Any& value7, const Any& value8, const Any& value9, const Any& | ||||
value10); | ||||
void information(const std::string& msg); | void information(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_INFORMATION, | /// If the Logger's log level is at least PRIO_INFORMATION, | |||
/// creates a Message with priority PRIO_INFORMATION | /// creates a Message with priority PRIO_INFORMATION | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void information(const std::string& msg, const char* file, int line) ; | void information(const std::string& msg, const char* file, int line) ; | |||
/// If the Logger's log level is at least PRIO_INFORMATION, | /// If the Logger's log level is at least PRIO_INFORMATION, | |||
/// creates a Message with priority PRIO_INFORMATION | /// creates a Message with priority PRIO_INFORMATION | |||
skipping to change at line 291 | skipping to change at line 291 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void information(const std::string& fmt, const Any& value1); | void information(const std::string& fmt, const Any& value1); | |||
void information(const std::string& fmt, const Any& value1, const An y& value2); | void information(const std::string& fmt, const Any& value1, const An y& value2); | |||
void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3); | void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3); | |||
void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4); | void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4); | |||
void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4, const Any& value5); | void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4, const Any& value5); | |||
void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4, const Any& value5, const A ny& value6); | void information(const std::string& fmt, const Any& value1, const An y& value2, const Any& value3, const Any& value4, const Any& value5, const A ny& value6); | |||
void information(const std::string& fmt, const Any& value1, const An | ||||
y& value2, const Any& value3, const Any& value4, const Any& value5, const A | ||||
ny& value6, const Any& value7); | ||||
void information(const std::string& fmt, const Any& value1, const An | ||||
y& value2, const Any& value3, const Any& value4, const Any& value5, const A | ||||
ny& value6, const Any& value7, const Any& value8); | ||||
void information(const std::string& fmt, const Any& value1, const An | ||||
y& value2, const Any& value3, const Any& value4, const Any& value5, const A | ||||
ny& value6, const Any& value7, const Any& value8, const Any& value9); | ||||
void information(const std::string& fmt, const Any& value1, const An | ||||
y& value2, const Any& value3, const Any& value4, const Any& value5, const A | ||||
ny& value6, const Any& value7, const Any& value8, const Any& value9, const | ||||
Any& value10); | ||||
void debug(const std::string& msg); | void debug(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_DEBUG, | /// If the Logger's log level is at least PRIO_DEBUG, | |||
/// creates a Message with priority PRIO_DEBUG | /// creates a Message with priority PRIO_DEBUG | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void debug(const std::string& msg, const char* file, int line); | void debug(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_DEBUG, | /// If the Logger's log level is at least PRIO_DEBUG, | |||
/// creates a Message with priority PRIO_DEBUG | /// creates a Message with priority PRIO_DEBUG | |||
skipping to change at line 314 | skipping to change at line 318 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void debug(const std::string& fmt, const Any& value1); | void debug(const std::string& fmt, const Any& value1); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val ue2); | void debug(const std::string& fmt, const Any& value1, const Any& val ue2); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | void debug(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | |||
void debug(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7); | ||||
void debug(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8); | ||||
void debug(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9); | ||||
void debug(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9, const Any& v | ||||
alue10); | ||||
void trace(const std::string& msg); | void trace(const std::string& msg); | |||
/// If the Logger's log level is at least PRIO_TRACE, | /// If the Logger's log level is at least PRIO_TRACE, | |||
/// creates a Message with priority PRIO_TRACE | /// creates a Message with priority PRIO_TRACE | |||
/// and the given message text and sends it | /// and the given message text and sends it | |||
/// to the attached channel. | /// to the attached channel. | |||
void trace(const std::string& msg, const char* file, int line); | void trace(const std::string& msg, const char* file, int line); | |||
/// If the Logger's log level is at least PRIO_TRACE, | /// If the Logger's log level is at least PRIO_TRACE, | |||
/// creates a Message with priority PRIO_TRACE | /// creates a Message with priority PRIO_TRACE | |||
skipping to change at line 337 | skipping to change at line 345 | |||
/// File must be a static string, such as the value of | /// File must be a static string, such as the value of | |||
/// the __FILE__ macro. The string is not copied | /// the __FILE__ macro. The string is not copied | |||
/// internally for performance reasons. | /// internally for performance reasons. | |||
void trace(const std::string& fmt, const Any& value1); | void trace(const std::string& fmt, const Any& value1); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val ue2); | void trace(const std::string& fmt, const Any& value1, const Any& val ue2); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | void trace(const std::string& fmt, const Any& value1, const Any& val ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va lue6); | |||
void trace(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7); | ||||
void trace(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8); | ||||
void trace(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9); | ||||
void trace(const std::string& fmt, const Any& value1, const Any& val | ||||
ue2, const Any& value3, const Any& value4, const Any& value5, const Any& va | ||||
lue6, const Any& value7, const Any& value8, const Any& value9, const Any& v | ||||
alue10); | ||||
void dump(const std::string& msg, const void* buffer, std::size_t le ngth, Message::Priority prio = Message::PRIO_DEBUG); | void dump(const std::string& msg, const void* buffer, std::size_t le ngth, Message::Priority prio = Message::PRIO_DEBUG); | |||
/// Logs the given message, followed by the data in buffer. | /// Logs the given message, followed by the data in buffer. | |||
/// | /// | |||
/// The data in buffer is written in canonical hex+ASCII for m: | /// The data in buffer is written in canonical hex+ASCII for m: | |||
/// Offset (4 bytes) in hexadecimal, followed by sixteen | /// Offset (4 bytes) in hexadecimal, followed by sixteen | |||
/// space-separated, two column, hexadecimal bytes, | /// space-separated, two column, hexadecimal bytes, | |||
/// followed by the same sixteen bytes as ASCII characters. | /// followed by the same sixteen bytes as ASCII characters. | |||
/// For bytes outside the range 32 .. 127, a dot is printed. | /// For bytes outside the range 32 .. 127, a dot is printed. | |||
skipping to change at line 592 | skipping to change at line 604 | |||
#define poco_information_f2(logger, fmt, arg1, arg2) \ | #define poco_information_f2(logger, fmt, arg1, arg2) \ | |||
if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2)), __FILE__, __LINE__); else (void) 0 | if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2)), __FILE__, __LINE__); else (void) 0 | |||
#define poco_information_f3(logger, fmt, arg1, arg2, arg3) \ | #define poco_information_f3(logger, fmt, arg1, arg2, arg3) \ | |||
if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2), (arg3)), __FILE__, __LINE__); else (void) 0 | if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2), (arg3)), __FILE__, __LINE__); else (void) 0 | |||
#define poco_information_f4(logger, fmt, arg1, arg2, arg3, arg4) \ | #define poco_information_f4(logger, fmt, arg1, arg2, arg3, arg4) \ | |||
if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2), (arg3), (arg4)), __FILE__, __LINE__); else (void) 0 | if ((logger).information()) (logger).information(Poco::format((fmt), (arg1), (arg2), (arg3), (arg4)), __FILE__, __LINE__); else (void) 0 | |||
#if defined(_DEBUG) | #if defined(_DEBUG) || defined(POCO_LOG_DEBUG) | |||
#define poco_debug(logger, msg) \ | #define poco_debug(logger, msg) \ | |||
if ((logger).debug()) (logger).debug(msg, __FILE__, __LINE__ ); else (void) 0 | if ((logger).debug()) (logger).debug(msg, __FILE__, __LINE__ ); else (void) 0 | |||
#define poco_debug_f1(logger, fmt, arg1) \ | #define poco_debug_f1(logger, fmt, arg1) \ | |||
if ((logger).debug()) (logger).debug(Poco::format((fmt), (ar g1)), __FILE__, __LINE__); else (void) 0 | if ((logger).debug()) (logger).debug(Poco::format((fmt), (ar g1)), __FILE__, __LINE__); else (void) 0 | |||
#define poco_debug_f2(logger, fmt, arg1, arg2) \ | #define poco_debug_f2(logger, fmt, arg1, arg2) \ | |||
if ((logger).debug()) (logger).debug(Poco::format((fmt), (ar g1), (arg2)), __FILE__, __LINE__); else (void) 0 | if ((logger).debug()) (logger).debug(Poco::format((fmt), (ar g1), (arg2)), __FILE__, __LINE__); else (void) 0 | |||
#define poco_debug_f3(logger, fmt, arg1, arg2, arg3) \ | #define poco_debug_f3(logger, fmt, arg1, arg2, arg3) \ | |||
skipping to change at line 704 | skipping to change at line 716 | |||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::fatal(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_FATAL); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_FATAL); | |||
} | } | |||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | inline void Logger::fatal(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_FATAL); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_FATAL); | |||
} | } | |||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_FATAL); | ||||
} | ||||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_FATAL); | ||||
} | ||||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_FATAL); | ||||
} | ||||
inline void Logger::fatal(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9, cons | ||||
t Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_FATAL); | ||||
} | ||||
inline void Logger::critical(const std::string& msg) | inline void Logger::critical(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_CRITICAL); | log(msg, Message::PRIO_CRITICAL); | |||
} | } | |||
inline void Logger::critical(const std::string& msg, const char* file, int line) | inline void Logger::critical(const std::string& msg, const char* file, int line) | |||
{ | { | |||
log(msg, Message::PRIO_CRITICAL, file, line); | log(msg, Message::PRIO_CRITICAL, file, line); | |||
} | } | |||
skipping to change at line 744 | skipping to change at line 776 | |||
inline void Logger::critical(const std::string& fmt, const Any& value1, con st Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::critical(const std::string& fmt, const Any& value1, con st Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_CRITICAL); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_CRITICAL); | |||
} | } | |||
inline void Logger::critical(const std::string& fmt, const Any& value1, con st Any& value2, const Any& value3, const Any& value4, const Any& value5, co nst Any& value6) | inline void Logger::critical(const std::string& fmt, const Any& value1, con st Any& value2, const Any& value3, const Any& value4, const Any& value5, co nst Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_CRITICAL); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_CRITICAL); | |||
} | } | |||
inline void Logger::critical(const std::string& fmt, const Any& value1, con | ||||
st Any& value2, const Any& value3, const Any& value4, const Any& value5, co | ||||
nst Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_CRITICAL); | ||||
} | ||||
inline void Logger::critical(const std::string& fmt, const Any& value1, con | ||||
st Any& value2, const Any& value3, const Any& value4, const Any& value5, co | ||||
nst Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_CRITICAL); | ||||
} | ||||
inline void Logger::critical(const std::string& fmt, const Any& value1, con | ||||
st Any& value2, const Any& value3, const Any& value4, const Any& value5, co | ||||
nst Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_CRITICAL); | ||||
} | ||||
inline void Logger::critical(const std::string& fmt, const Any& value1, con | ||||
st Any& value2, const Any& value3, const Any& value4, const Any& value5, co | ||||
nst Any& value6, const Any& value7, const Any& value8, const Any& value9, c | ||||
onst Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_CRITICAL); | ||||
} | ||||
inline void Logger::error(const std::string& msg) | inline void Logger::error(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_ERROR); | log(msg, Message::PRIO_ERROR); | |||
} | } | |||
inline void Logger::error(const std::string& msg, const char* file, int lin e) | inline void Logger::error(const std::string& msg, const char* file, int lin e) | |||
{ | { | |||
log(msg, Message::PRIO_ERROR, file, line); | log(msg, Message::PRIO_ERROR, file, line); | |||
} | } | |||
skipping to change at line 784 | skipping to change at line 836 | |||
inline void Logger::error(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::error(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_ERROR); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_ERROR); | |||
} | } | |||
inline void Logger::error(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | inline void Logger::error(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_ERROR); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_ERROR); | |||
} | } | |||
inline void Logger::error(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_ERROR); | ||||
} | ||||
inline void Logger::error(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_ERROR); | ||||
} | ||||
inline void Logger::error(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_ERROR); | ||||
} | ||||
inline void Logger::error(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9, cons | ||||
t Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_ERROR); | ||||
} | ||||
inline void Logger::warning(const std::string& msg) | inline void Logger::warning(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_WARNING); | log(msg, Message::PRIO_WARNING); | |||
} | } | |||
inline void Logger::warning(const std::string& msg, const char* file, int l ine) | inline void Logger::warning(const std::string& msg, const char* file, int l ine) | |||
{ | { | |||
log(msg, Message::PRIO_WARNING, file, line); | log(msg, Message::PRIO_WARNING, file, line); | |||
} | } | |||
skipping to change at line 824 | skipping to change at line 896 | |||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons t Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::warning(const std::string& fmt, const Any& value1, cons t Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_WARNING); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_WARNING); | |||
} | } | |||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons t Any& value2, const Any& value3, const Any& value4, const Any& value5, con st Any& value6) | inline void Logger::warning(const std::string& fmt, const Any& value1, cons t Any& value2, const Any& value3, const Any& value4, const Any& value5, con st Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_WARNING); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_WARNING); | |||
} | } | |||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons | ||||
t Any& value2, const Any& value3, const Any& value4, const Any& value5, con | ||||
st Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_WARNING); | ||||
} | ||||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons | ||||
t Any& value2, const Any& value3, const Any& value4, const Any& value5, con | ||||
st Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_WARNING); | ||||
} | ||||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons | ||||
t Any& value2, const Any& value3, const Any& value4, const Any& value5, con | ||||
st Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_WARNING); | ||||
} | ||||
inline void Logger::warning(const std::string& fmt, const Any& value1, cons | ||||
t Any& value2, const Any& value3, const Any& value4, const Any& value5, con | ||||
st Any& value6, const Any& value7, const Any& value8, const Any& value9, co | ||||
nst Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_WARNING); | ||||
} | ||||
inline void Logger::notice(const std::string& msg) | inline void Logger::notice(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_NOTICE); | log(msg, Message::PRIO_NOTICE); | |||
} | } | |||
inline void Logger::notice(const std::string& msg, const char* file, int li ne) | inline void Logger::notice(const std::string& msg, const char* file, int li ne) | |||
{ | { | |||
log(msg, Message::PRIO_NOTICE, file, line); | log(msg, Message::PRIO_NOTICE, file, line); | |||
} | } | |||
skipping to change at line 864 | skipping to change at line 956 | |||
inline void Logger::notice(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::notice(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_NOTICE); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_NOTICE); | |||
} | } | |||
inline void Logger::notice(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, cons t Any& value6) | inline void Logger::notice(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, cons t Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_NOTICE); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_NOTICE); | |||
} | } | |||
inline void Logger::notice(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, cons | ||||
t Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_NOTICE); | ||||
} | ||||
inline void Logger::notice(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, cons | ||||
t Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_NOTICE); | ||||
} | ||||
inline void Logger::notice(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, cons | ||||
t Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_NOTICE); | ||||
} | ||||
inline void Logger::notice(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, cons | ||||
t Any& value6, const Any& value7, const Any& value8, const Any& value9, con | ||||
st Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_NOTICE); | ||||
} | ||||
inline void Logger::information(const std::string& msg) | inline void Logger::information(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_INFORMATION); | log(msg, Message::PRIO_INFORMATION); | |||
} | } | |||
inline void Logger::information(const std::string& msg, const char* file, i nt line) | inline void Logger::information(const std::string& msg, const char* file, i nt line) | |||
{ | { | |||
log(msg, Message::PRIO_INFORMATION, file, line); | log(msg, Message::PRIO_INFORMATION, file, line); | |||
} | } | |||
skipping to change at line 904 | skipping to change at line 1016 | |||
inline void Logger::information(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::information(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_INFORMATION); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_INFORMATION); | |||
} | } | |||
inline void Logger::information(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | inline void Logger::information(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_INFORMATION); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_INFORMATION); | |||
} | } | |||
inline void Logger::information(const std::string& fmt, const Any& value1, | ||||
const Any& value2, const Any& value3, const Any& value4, const Any& value5, | ||||
const Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_INFORMATION); | ||||
} | ||||
inline void Logger::information(const std::string& fmt, const Any& value1, | ||||
const Any& value2, const Any& value3, const Any& value4, const Any& value5, | ||||
const Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_INFORMATION); | ||||
} | ||||
inline void Logger::information(const std::string& fmt, const Any& value1, | ||||
const Any& value2, const Any& value3, const Any& value4, const Any& value5, | ||||
const Any& value6, const Any& value7, const Any& value8, const Any& value9 | ||||
) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_INFORMATION); | ||||
} | ||||
inline void Logger::information(const std::string& fmt, const Any& value1, | ||||
const Any& value2, const Any& value3, const Any& value4, const Any& value5, | ||||
const Any& value6, const Any& value7, const Any& value8, const Any& value9 | ||||
, const Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_INFORMATION); | ||||
} | ||||
inline void Logger::debug(const std::string& msg) | inline void Logger::debug(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_DEBUG); | log(msg, Message::PRIO_DEBUG); | |||
} | } | |||
inline void Logger::debug(const std::string& msg, const char* file, int lin e) | inline void Logger::debug(const std::string& msg, const char* file, int lin e) | |||
{ | { | |||
log(msg, Message::PRIO_DEBUG, file, line); | log(msg, Message::PRIO_DEBUG, file, line); | |||
} | } | |||
skipping to change at line 944 | skipping to change at line 1076 | |||
inline void Logger::debug(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::debug(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_DEBUG); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_DEBUG); | |||
} | } | |||
inline void Logger::debug(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | inline void Logger::debug(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_DEBUG); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_DEBUG); | |||
} | } | |||
inline void Logger::debug(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_DEBUG); | ||||
} | ||||
inline void Logger::debug(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_DEBUG); | ||||
} | ||||
inline void Logger::debug(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_DEBUG); | ||||
} | ||||
inline void Logger::debug(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9, cons | ||||
t Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_DEBUG); | ||||
} | ||||
inline void Logger::trace(const std::string& msg) | inline void Logger::trace(const std::string& msg) | |||
{ | { | |||
log(msg, Message::PRIO_TRACE); | log(msg, Message::PRIO_TRACE); | |||
} | } | |||
inline void Logger::trace(const std::string& msg, const char* file, int lin e) | inline void Logger::trace(const std::string& msg, const char* file, int lin e) | |||
{ | { | |||
log(msg, Message::PRIO_TRACE, file, line); | log(msg, Message::PRIO_TRACE, file, line); | |||
} | } | |||
skipping to change at line 984 | skipping to change at line 1136 | |||
inline void Logger::trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | inline void Logger::trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_TRACE); | log(Poco::format(fmt, value1, value2, value3, value4, value5), Messa ge::PRIO_TRACE); | |||
} | } | |||
inline void Logger::trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | inline void Logger::trace(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6) | |||
{ | { | |||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_TRACE); | log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 ), Message::PRIO_TRACE); | |||
} | } | |||
inline void Logger::trace(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7), Message::PRIO_TRACE); | ||||
} | ||||
inline void Logger::trace(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8), Message::PRIO_TRACE); | ||||
} | ||||
inline void Logger::trace(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9), Message::PRIO_TRACE); | ||||
} | ||||
inline void Logger::trace(const std::string& fmt, const Any& value1, const | ||||
Any& value2, const Any& value3, const Any& value4, const Any& value5, const | ||||
Any& value6, const Any& value7, const Any& value8, const Any& value9, cons | ||||
t Any& value10) | ||||
{ | ||||
log(Poco::format(fmt, value1, value2, value3, value4, value5, value6 | ||||
, value7, value8, value9, value10), Message::PRIO_TRACE); | ||||
} | ||||
inline bool Logger::is(int level) const | inline bool Logger::is(int level) const | |||
{ | { | |||
return _level >= level; | return _level >= level; | |||
} | } | |||
inline bool Logger::fatal() const | inline bool Logger::fatal() const | |||
{ | { | |||
return _level >= Message::PRIO_FATAL; | return _level >= Message::PRIO_FATAL; | |||
} | } | |||
End of changes. 18 change blocks. | ||||
33 lines changed or deleted | 371 lines changed or added | |||
LoggingConfigurator.h | LoggingConfigurator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: LoggingConfigurator | // Module: LoggingConfigurator | |||
// | // | |||
// Definition of the LoggingConfigurator class. | // Definition of the LoggingConfigurator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_LoggingConfigurator_INCLUDED | #ifndef Util_LoggingConfigurator_INCLUDED | |||
#define Util_LoggingConfigurator_INCLUDED | #define Util_LoggingConfigurator_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Formatter.h" | #include "Poco/Formatter.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LoggingFactory.h | LoggingFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LoggingFactory | // Module: LoggingFactory | |||
// | // | |||
// Definition of the LoggingFactory class. | // Definition of the LoggingFactory class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LoggingFactory_INCLUDED | #ifndef Foundation_LoggingFactory_INCLUDED | |||
#define Foundation_LoggingFactory_INCLUDED | #define Foundation_LoggingFactory_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DynamicFactory.h" | #include "Poco/DynamicFactory.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Formatter.h" | #include "Poco/Formatter.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LoggingRegistry.h | LoggingRegistry.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: LoggingRegistry | // Module: LoggingRegistry | |||
// | // | |||
// Definition of the LoggingRegistry class. | // Definition of the LoggingRegistry class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_LoggingRegistry_INCLUDED | #ifndef Foundation_LoggingRegistry_INCLUDED | |||
#define Foundation_LoggingRegistry_INCLUDED | #define Foundation_LoggingRegistry_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Formatter.h" | #include "Poco/Formatter.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
LoggingSubsystem.h | LoggingSubsystem.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Application | // Package: Application | |||
// Module: LoggingSubsystem | // Module: LoggingSubsystem | |||
// | // | |||
// Definition of the LoggingSubsystem class. | // Definition of the LoggingSubsystem class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_LoggingSubsystem_INCLUDED | #ifndef Util_LoggingSubsystem_INCLUDED | |||
#define Util_LoggingSubsystem_INCLUDED | #define Util_LoggingSubsystem_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Subsystem.h" | #include "Poco/Util/Subsystem.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MD4Engine.h | MD4Engine.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: MD4Engine | // Module: MD4Engine | |||
// | // | |||
// Definition of class MD4Engine. | // Definition of class MD4Engine. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
// | // | |||
// MD4 (RFC 1320) algorithm: | // MD4 (RFC 1320) algorithm: | |||
// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All | // Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All | |||
// rights reserved. | // rights reserved. | |||
// | // | |||
// License to copy and use this software is granted provided that it | // License to copy and use this software is granted provided that it | |||
// is identified as the "RSA Data Security, Inc. MD4 Message-Digest | // is identified as the "RSA Data Security, Inc. MD4 Message-Digest | |||
// Algorithm" in all material mentioning or referencing this software | // Algorithm" in all material mentioning or referencing this software | |||
// or this function. | // or this function. | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MD5Engine.h | MD5Engine.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: MD5Engine | // Module: MD5Engine | |||
// | // | |||
// Definition of class MD5Engine. | // Definition of class MD5Engine. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
// | // | |||
// MD5 (RFC 1321) algorithm: | // MD5 (RFC 1321) algorithm: | |||
// Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All | // Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All | |||
// rights reserved. | // rights reserved. | |||
// | // | |||
// License to copy and use this software is granted provided that it | // License to copy and use this software is granted provided that it | |||
// is identified as the "RSA Data Security, Inc. MD5 Message-Digest | // is identified as the "RSA Data Security, Inc. MD5 Message-Digest | |||
// Algorithm" in all material mentioning or referencing this software | // Algorithm" in all material mentioning or referencing this software | |||
// or this function. | // or this function. | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MailMessage.h | MailMessage.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Mail | // Package: Mail | |||
// Module: MailMessage | // Module: MailMessage | |||
// | // | |||
// Definition of the MailMessage class. | // Definition of the MailMessage class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MailMessage_INCLUDED | #ifndef Net_MailMessage_INCLUDED | |||
#define Net_MailMessage_INCLUDED | #define Net_MailMessage_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/MessageHeader.h" | #include "Poco/Net/MessageHeader.h" | |||
#include "Poco/Net/MailRecipient.h" | #include "Poco/Net/MailRecipient.h" | |||
#include "Poco/Net/PartStore.h" | ||||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class MediaType; | class MediaType; | |||
class PartSource; | class PartSource; | |||
class PartHandler; | class PartHandler; | |||
class MultipartWriter; | class MultipartWriter; | |||
skipping to change at line 84 | skipping to change at line 65 | |||
}; | }; | |||
enum ContentTransferEncoding | enum ContentTransferEncoding | |||
{ | { | |||
ENCODING_7BIT, | ENCODING_7BIT, | |||
ENCODING_8BIT, | ENCODING_8BIT, | |||
ENCODING_QUOTED_PRINTABLE, | ENCODING_QUOTED_PRINTABLE, | |||
ENCODING_BASE64 | ENCODING_BASE64 | |||
}; | }; | |||
MailMessage(); | struct Part | |||
{ | ||||
std::string name; | ||||
PartSource* pSource; | ||||
ContentDisposition disposition; | ||||
ContentTransferEncoding encoding; | ||||
}; | ||||
typedef std::vector<Part> PartVec; | ||||
MailMessage(PartStoreFactory* pStoreFactory = 0); | ||||
/// Creates an empty MailMessage. | /// Creates an empty MailMessage. | |||
/// | ||||
/// If pStoreFactory is not null, message attachments will b | ||||
e | ||||
/// handled by the object created by the factory. Most | ||||
/// common reason is to temporarily save attachments to | ||||
/// the file system in order to avoid potential memory | ||||
/// exhaustion when attachment files are very large. | ||||
virtual ~MailMessage(); | virtual ~MailMessage(); | |||
/// Destroys the MailMessage. | /// Destroys the MailMessage. | |||
void addRecipient(const MailRecipient& recipient); | void addRecipient(const MailRecipient& recipient); | |||
/// Adds a recipient for the message. | /// Adds a recipient for the message. | |||
void setRecipients(const Recipients& recipient); | void setRecipients(const Recipients& recipient); | |||
/// Clears existing and sets new recipient list for the mess age. | /// Clears existing and sets new recipient list for the mess age. | |||
skipping to change at line 136 | skipping to change at line 133 | |||
void setContent(const std::string& content, ContentTransferEncoding encoding = ENCODING_QUOTED_PRINTABLE); | void setContent(const std::string& content, ContentTransferEncoding encoding = ENCODING_QUOTED_PRINTABLE); | |||
/// Sets the content of the mail message. | /// Sets the content of the mail message. | |||
/// | /// | |||
/// If the content transfer encoding is ENCODING_7BIT or | /// If the content transfer encoding is ENCODING_7BIT or | |||
/// ENCODING_8BIT, the content string must be formatted | /// ENCODING_8BIT, the content string must be formatted | |||
/// according to the rules of an internet email message. | /// according to the rules of an internet email message. | |||
/// | /// | |||
/// The message will be sent as a single-part | /// The message will be sent as a single-part | |||
/// message. | /// message. | |||
/// | ||||
/// Note that single CR or LF characters as line delimiters | ||||
must | ||||
/// not be used. Content lines always should be terminated w | ||||
ith a | ||||
/// proper CRLF sequence. | ||||
const std::string& getContent() const; | const std::string& getContent() const; | |||
/// Returns the content of the mail message. | /// Returns the content of the mail message. | |||
/// | /// | |||
/// A content will only be returned for single-part | /// A content will only be returned for single-part | |||
/// messages. The content of multi-part mail messages | /// messages. The content of multi-part mail messages | |||
/// will be reported through the registered PartHandler. | /// will be reported through the registered PartHandler. | |||
void setContentType(const std::string& mediaType); | void setContentType(const std::string& mediaType); | |||
/// Sets the content type for the message. | /// Sets the content type for the message. | |||
skipping to change at line 162 | skipping to change at line 163 | |||
void setDate(const Poco::Timestamp& dateTime); | void setDate(const Poco::Timestamp& dateTime); | |||
/// Sets the Date header to the given date/time value. | /// Sets the Date header to the given date/time value. | |||
Poco::Timestamp getDate() const; | Poco::Timestamp getDate() const; | |||
/// Returns the value of the Date header. | /// Returns the value of the Date header. | |||
bool isMultipart() const; | bool isMultipart() const; | |||
/// Returns true iff the message is a multipart message. | /// Returns true iff the message is a multipart message. | |||
void addPart(const std::string& name, PartSource* pSource, ContentDi | void addPart(const std::string& name, | |||
sposition disposition, ContentTransferEncoding encoding); | PartSource* pSource, | |||
ContentDisposition disposition, | ||||
ContentTransferEncoding encoding); | ||||
/// Adds a part/attachment to the mail message. | /// Adds a part/attachment to the mail message. | |||
/// | /// | |||
/// The MailMessage takes ownership of the PartSource and de letes it | /// The MailMessage takes ownership of the PartSource and de letes it | |||
/// when it is no longer needed. | /// when it is no longer needed. | |||
/// | /// | |||
/// The MailMessage will be converted to a multipart message | /// The MailMessage will be converted to a multipart message | |||
/// if it is not already one. | /// if it is not already one. | |||
/// | /// | |||
/// The part name, and the filename specified in the part so urce | /// The part name, and the filename specified in the part so urce | |||
/// must not contain any non-ASCII characters. | /// must not contain any non-ASCII characters. | |||
/// To include non-ASCII characters in the part name or file name, | /// To include non-ASCII characters in the part name or file name, | |||
/// use RFC 2047 word encoding (see encodeWord()). | /// use RFC 2047 word encoding (see encodeWord()). | |||
void addContent(PartSource* pSource, ContentTransferEncoding encodin | void addContent(PartSource* pSource, | |||
g = ENCODING_QUOTED_PRINTABLE); | ContentTransferEncoding encoding = ENCODING_QUOTED_PRINTABLE | |||
); | ||||
/// Adds a part to the mail message by calling | /// Adds a part to the mail message by calling | |||
/// addPart("", pSource, CONTENT_INLINE, encoding); | /// addPart("", pSource, CONTENT_INLINE, encoding); | |||
/// | /// | |||
/// The part name, and the filename specified in the part so urce | /// The part name, and the filename specified in the part so urce | |||
/// must not contain any non-ASCII characters. | /// must not contain any non-ASCII characters. | |||
/// To include non-ASCII characters in the part name or file name, | /// To include non-ASCII characters in the part name or file name, | |||
/// use RFC 2047 word encoding (see encodeWord()). | /// use RFC 2047 word encoding (see encodeWord()). | |||
void addAttachment(const std::string& name, PartSource* pSource, Con | void addAttachment(const std::string& name, | |||
tentTransferEncoding encoding = ENCODING_BASE64); | PartSource* pSource, | |||
ContentTransferEncoding encoding = ENCODING_BASE64); | ||||
/// Adds an attachment to the mail message by calling | /// Adds an attachment to the mail message by calling | |||
/// addPart(name, pSource, CONTENT_ATTACHMENT, encoding); | /// addPart(name, pSource, CONTENT_ATTACHMENT, encoding); | |||
/// | /// | |||
/// The part name, and the filename specified in the part so urce | /// The part name, and the filename specified in the part so urce | |||
/// must not contain any non-ASCII characters. | /// must not contain any non-ASCII characters. | |||
/// To include non-ASCII characters in the part name or file name, | /// To include non-ASCII characters in the part name or file name, | |||
/// use RFC 2047 word encoding (see encodeWord()). | /// use RFC 2047 word encoding (see encodeWord()). | |||
PartSource* createPartStore(const std::string& content, | ||||
const std::string& mediaType, | ||||
const std::string& filename = ""); | ||||
/// Returns either default StringPartSource part store or, | ||||
/// if the part store factory was provided during contructio | ||||
n, | ||||
/// the one created by PartStoreFactory. | ||||
/// Returned part store is allocated on the heap; it is call | ||||
er's | ||||
/// responsibility to delete it after use. Typical use is ha | ||||
ndler | ||||
/// passing it back to MailMessage, which takes care of the | ||||
cleanup. | ||||
const PartVec& parts() const; | ||||
/// Returns const reference to the vector containing part st | ||||
ores. | ||||
void read(std::istream& istr, PartHandler& handler); | void read(std::istream& istr, PartHandler& handler); | |||
/// Reads the MailMessage from the given input stream. | /// Reads the MailMessage from the given input stream. | |||
/// | /// | |||
/// If the message has multiple parts, the parts | /// If the message has multiple parts, the parts | |||
/// are reported to the PartHandler. If the message | /// are reported to the PartHandler. If the message | |||
/// is not a multi-part message, the content is stored | /// is not a multi-part message, the content is stored | |||
/// in a string available by calling getContent(). | /// in a string available by calling getContent(). | |||
void read(std::istream& istr); | void read(std::istream& istr); | |||
/// Reads the MailMessage from the given input stream. | /// Reads the MailMessage from the given input stream. | |||
skipping to change at line 221 | skipping to change at line 241 | |||
static std::string encodeWord(const std::string& text, const std::st ring& charset = "UTF-8"); | static std::string encodeWord(const std::string& text, const std::st ring& charset = "UTF-8"); | |||
/// If the given string contains non-ASCII characters, | /// If the given string contains non-ASCII characters, | |||
/// encodes the given string using RFC 2047 "Q" word encodin g. | /// encodes the given string using RFC 2047 "Q" word encodin g. | |||
/// | /// | |||
/// The given text must already be encoded in the character set | /// The given text must already be encoded in the character set | |||
/// given in charset (default is UTF-8). | /// given in charset (default is UTF-8). | |||
/// | /// | |||
/// Returns the encoded string, or the original string if it | /// Returns the encoded string, or the original string if it | |||
/// consists only of ASCII characters. | /// consists only of ASCII characters. | |||
protected: | ||||
struct Part | ||||
{ | ||||
std::string name; | ||||
PartSource* pSource; | ||||
ContentDisposition disposition; | ||||
ContentTransferEncoding encoding; | ||||
}; | ||||
typedef std::vector<Part> PartVec; | ||||
void makeMultipart(); | ||||
void writeHeader(const MessageHeader& header, std::ostream& ostr) co | ||||
nst; | ||||
void writeMultipart(MessageHeader& header, std::ostream& ostr) const | ||||
; | ||||
void writePart(MultipartWriter& writer, const Part& part) const; | ||||
void writeEncoded(std::istream& istr, std::ostream& ostr, ContentTra | ||||
nsferEncoding encoding) const; | ||||
void setRecipientHeaders(MessageHeader& headers) const; | ||||
void readHeader(std::istream& istr); | ||||
void readMultipart(std::istream& istr, PartHandler& handler); | ||||
void readPart(std::istream& istr, const MessageHeader& header, PartH | ||||
andler& handler); | ||||
void handlePart(std::istream& istr, const MessageHeader& header, Par | ||||
tHandler& handler); | ||||
static const std::string& contentTransferEncodingToString(ContentTra | ||||
nsferEncoding encoding); | ||||
static int lineLength(const std::string& str); | ||||
static void appendRecipient(const MailRecipient& recipient, std::str | ||||
ing& str); | ||||
static const std::string HEADER_SUBJECT; | static const std::string HEADER_SUBJECT; | |||
static const std::string HEADER_FROM; | static const std::string HEADER_FROM; | |||
static const std::string HEADER_TO; | static const std::string HEADER_TO; | |||
static const std::string HEADER_CC; | static const std::string HEADER_CC; | |||
static const std::string HEADER_BCC; | static const std::string HEADER_BCC; | |||
static const std::string HEADER_DATE; | static const std::string HEADER_DATE; | |||
static const std::string HEADER_CONTENT_TYPE; | static const std::string HEADER_CONTENT_TYPE; | |||
static const std::string HEADER_CONTENT_TRANSFER_ENCODING; | static const std::string HEADER_CONTENT_TRANSFER_ENCODING; | |||
static const std::string HEADER_CONTENT_DISPOSITION; | static const std::string HEADER_CONTENT_DISPOSITION; | |||
static const std::string HEADER_CONTENT_ID; | ||||
static const std::string HEADER_MIME_VERSION; | static const std::string HEADER_MIME_VERSION; | |||
static const std::string EMPTY_HEADER; | static const std::string EMPTY_HEADER; | |||
static const std::string TEXT_PLAIN; | static const std::string TEXT_PLAIN; | |||
static const std::string CTE_7BIT; | static const std::string CTE_7BIT; | |||
static const std::string CTE_8BIT; | static const std::string CTE_8BIT; | |||
static const std::string CTE_QUOTED_PRINTABLE; | static const std::string CTE_QUOTED_PRINTABLE; | |||
static const std::string CTE_BASE64; | static const std::string CTE_BASE64; | |||
protected: | ||||
void makeMultipart(); | ||||
void writeHeader(const MessageHeader& header, std::ostream& ostr) co | ||||
nst; | ||||
void writeMultipart(MessageHeader& header, std::ostream& ostr) const | ||||
; | ||||
void writePart(MultipartWriter& writer, const Part& part) const; | ||||
void writeEncoded(std::istream& istr, std::ostream& ostr, ContentTra | ||||
nsferEncoding encoding) const; | ||||
void setRecipientHeaders(MessageHeader& headers) const; | ||||
void readHeader(std::istream& istr); | ||||
void readMultipart(std::istream& istr, PartHandler& handler); | ||||
void readPart(std::istream& istr, const MessageHeader& header, PartH | ||||
andler& handler); | ||||
void handlePart(std::istream& istr, const MessageHeader& header, Par | ||||
tHandler& handler); | ||||
static const std::string& contentTransferEncodingToString(ContentTra | ||||
nsferEncoding encoding); | ||||
static int lineLength(const std::string& str); | ||||
static void appendRecipient(const MailRecipient& recipient, std::str | ||||
ing& str); | ||||
private: | private: | |||
MailMessage(const MailMessage&); | MailMessage(const MailMessage&); | |||
MailMessage& operator = (const MailMessage&); | MailMessage& operator = (const MailMessage&); | |||
Recipients _recipients; | Recipients _recipients; | |||
PartVec _parts; | PartVec _parts; | |||
std::string _content; | std::string _content; | |||
ContentTransferEncoding _encoding; | ContentTransferEncoding _encoding; | |||
mutable std::string _boundary; | ||||
PartStoreFactory* _pStoreFactory; | ||||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline const MailMessage::Recipients& MailMessage::recipients() const | inline const MailMessage::Recipients& MailMessage::recipients() const | |||
{ | { | |||
return _recipients; | return _recipients; | |||
} | } | |||
inline const std::string& MailMessage::getContent() const | inline const std::string& MailMessage::getContent() const | |||
{ | { | |||
return _content; | return _content; | |||
} | } | |||
inline const MailMessage::PartVec& MailMessage::parts() const | ||||
{ | ||||
return _parts; | ||||
} | ||||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_MailMessage_INCLUDED | #endif // Net_MailMessage_INCLUDED | |||
End of changes. 14 change blocks. | ||||
70 lines changed or deleted | 85 lines changed or added | |||
MailRecipient.h | MailRecipient.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Mail | // Package: Mail | |||
// Module: MailRecipient | // Module: MailRecipient | |||
// | // | |||
// Definition of the MailRecipient class. | // Definition of the MailRecipient class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MailRecipient_INCLUDED | #ifndef Net_MailRecipient_INCLUDED | |||
#define Net_MailRecipient_INCLUDED | #define Net_MailRecipient_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MailStream.h | MailStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Mail | // Package: Mail | |||
// Module: MailStream | // Module: MailStream | |||
// | // | |||
// Definition of the MailStream class. | // Definition of the MailStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MailStream_INCLUDED | #ifndef Net_MailStream_INCLUDED | |||
#define Net_MailStream_INCLUDED | #define Net_MailStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Manifest.h | Manifest.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: ClassLoader | // Module: ClassLoader | |||
// | // | |||
// Definition of the Manifest class. | // Definition of the Manifest class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Manifest_INCLUDED | #ifndef Foundation_Manifest_INCLUDED | |||
#define Foundation_Manifest_INCLUDED | #define Foundation_Manifest_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/MetaObject.h" | #include "Poco/MetaObject.h" | |||
#include <map> | #include <map> | |||
#include <typeinfo> | #include <typeinfo> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MapConfiguration.h | MapConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: MapConfiguration | // Module: MapConfiguration | |||
// | // | |||
// Definition of the MapConfiguration class. | // Definition of the MapConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_MapConfiguration_INCLUDED | #ifndef Util_MapConfiguration_INCLUDED | |||
#define Util_MapConfiguration_INCLUDED | #define Util_MapConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MediaType.h | MediaType.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: MediaType | // Module: MediaType | |||
// | // | |||
// Definition of the MediaType class. | // Definition of the MediaType class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MediaType_INCLUDED | #ifndef Net_MediaType_INCLUDED | |||
#define Net_MediaType_INCLUDED | #define Net_MediaType_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/NameValueCollection.h" | #include "Poco/Net/NameValueCollection.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MemoryPool.h | MemoryPool.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: MemoryPool | // Module: MemoryPool | |||
// | // | |||
// Definition of the MemoryPool class. | // Definition of the MemoryPool class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_MemoryPool_INCLUDED | #ifndef Foundation_MemoryPool_INCLUDED | |||
#define Foundation_MemoryPool_INCLUDED | #define Foundation_MemoryPool_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <vector> | #include <vector> | |||
#include <cstddef> | #include <cstddef> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MemoryStream.h | MemoryStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: MemoryStream | // Module: MemoryStream | |||
// | // | |||
// Definition of MemoryStreamBuf, MemoryInputStream, MemoryOutputStream | // Definition of MemoryStreamBuf, MemoryInputStream, MemoryOutputStream | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_MemoryStream_INCLUDED | #ifndef Foundation_MemoryStream_INCLUDED | |||
#define Foundation_MemoryStream_INCLUDED | #define Foundation_MemoryStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/StreamUtil.h" | #include "Poco/StreamUtil.h" | |||
#include <streambuf> | #include <streambuf> | |||
#include <iosfwd> | #include <iosfwd> | |||
#include <ios> | #include <ios> | |||
skipping to change at line 83 | skipping to change at line 63 | |||
_bufferSize(bufferSize) | _bufferSize(bufferSize) | |||
{ | { | |||
this->setg(_pBuffer, _pBuffer, _pBuffer + _bufferSize); | this->setg(_pBuffer, _pBuffer, _pBuffer + _bufferSize); | |||
this->setp(_pBuffer, _pBuffer + _bufferSize); | this->setp(_pBuffer, _pBuffer + _bufferSize); | |||
} | } | |||
~BasicMemoryStreamBuf() | ~BasicMemoryStreamBuf() | |||
{ | { | |||
} | } | |||
virtual int_type overflow(int_type c) | virtual int_type overflow(int_type /*c*/) | |||
{ | { | |||
return char_traits::eof(); | return char_traits::eof(); | |||
} | } | |||
virtual int_type underflow() | virtual int_type underflow() | |||
{ | { | |||
return char_traits::eof(); | return char_traits::eof(); | |||
} | } | |||
virtual int sync() | virtual int sync() | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
Message.h | Message.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: Message | // Module: Message | |||
// | // | |||
// Definition of the Message class. | // Definition of the Message class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Message_INCLUDED | #ifndef Foundation_Message_INCLUDED | |||
#define Foundation_Message_INCLUDED | #define Foundation_Message_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 177 | skipping to change at line 157 | |||
/// generating the log message. | /// generating the log message. | |||
/// | /// | |||
/// This is usually the result of the __LINE__ | /// This is usually the result of the __LINE__ | |||
/// macro. | /// macro. | |||
int getSourceLine() const; | int getSourceLine() const; | |||
/// Returns the source file line of the statement | /// Returns the source file line of the statement | |||
/// generating the log message. May be 0 | /// generating the log message. May be 0 | |||
/// if not set. | /// if not set. | |||
bool has(const std::string& param) const; | ||||
/// Returns true if a parameter with the given name exists. | ||||
const std::string& get(const std::string& param) const; | ||||
/// Returns a const reference to the value of the parameter | ||||
/// with the given name. Throws a NotFoundException if the | ||||
/// parameter does not exist. | ||||
const std::string& get(const std::string& param, const std::string& | ||||
defaultValue) const; | ||||
/// Returns a const reference to the value of the parameter | ||||
/// with the given name. If the parameter with the given nam | ||||
e | ||||
/// does not exist, then defaultValue is returned. | ||||
void set(const std::string& param, const std::string& value); | ||||
/// Sets the value for a parameter. If the parameter does | ||||
/// not exist, then it is created. | ||||
const std::string& operator [] (const std::string& param) const; | const std::string& operator [] (const std::string& param) const; | |||
/// Returns a const reference to the value of the parameter | /// Returns a const reference to the value of the parameter | |||
/// with the given name. Throws a NotFoundException if the | /// with the given name. Throws a NotFoundException if the | |||
/// parameter does not exist. | /// parameter does not exist. | |||
std::string& operator [] (const std::string& param); | std::string& operator [] (const std::string& param); | |||
/// Returns a reference to the value of the parameter with t he | /// Returns a reference to the value of the parameter with t he | |||
/// given name. This can be used to set the parameter's valu e. | /// given name. This can be used to set the parameter's valu e. | |||
/// If the parameter does not exist, it is created with an | /// If the parameter does not exist, it is created with an | |||
/// empty string value. | /// empty string value. | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 20 lines changed or added | |||
MessageHeader.h | MessageHeader.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: MessageHeader | // Module: MessageHeader | |||
// | // | |||
// Definition of the MessageHeader class. | // Definition of the MessageHeader class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MessageHeader_INCLUDED | #ifndef Net_MessageHeader_INCLUDED | |||
#define Net_MessageHeader_INCLUDED | #define Net_MessageHeader_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/NameValueCollection.h" | #include "Poco/Net/NameValueCollection.h" | |||
#include <ostream> | #include <ostream> | |||
#include <istream> | #include <istream> | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MetaObject.h | MetaObject.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: ClassLoader | // Module: ClassLoader | |||
// | // | |||
// Definition of the MetaObject class. | // Definition of the MetaObject class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_MetaObject_INCLUDED | #ifndef Foundation_MetaObject_INCLUDED | |||
#define Foundation_MetaObject_INCLUDED | #define Foundation_MetaObject_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/SingletonHolder.h" | #include "Poco/SingletonHolder.h" | |||
#include <set> | #include <set> | |||
skipping to change at line 204 | skipping to change at line 184 | |||
bool canCreate() const | bool canCreate() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
B& instance() const | B& instance() const | |||
{ | { | |||
return *_object.get(); | return *_object.get(); | |||
} | } | |||
bool isAutoDelete(B* pObject) const | bool isAutoDelete(B* /*pObject*/) const | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
private: | private: | |||
mutable SingletonHolder<C> _object; | mutable SingletonHolder<C> _object; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
MetaProgramming.h | MetaProgramming.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: MetaProgramming | // Module: MetaProgramming | |||
// | // | |||
// Common definitions useful for Meta Template Programming | // Common definitions useful for Meta Template Programming | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_MetaProgramming_INCLUDED | #ifndef Foundation_MetaProgramming_INCLUDED | |||
#define Foundation_MetaProgramming_INCLUDED | #define Foundation_MetaProgramming_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <typename T> | template <typename T> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MulticastSocket.h | MulticastSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: MulticastSocket | // Module: MulticastSocket | |||
// | // | |||
// Definition of the MulticastSocket class. | // Definition of the MulticastSocket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MulticastSocket_INCLUDED | #ifndef Net_MulticastSocket_INCLUDED | |||
#define Net_MulticastSocket_INCLUDED | #define Net_MulticastSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#ifdef POCO_NET_HAS_INTERFACE | ||||
#include "Poco/Net/DatagramSocket.h" | #include "Poco/Net/DatagramSocket.h" | |||
#include "Poco/Net/NetworkInterface.h" | #include "Poco/Net/NetworkInterface.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class Net_API MulticastSocket: public DatagramSocket | class Net_API MulticastSocket: public DatagramSocket | |||
/// A MulticastSocket is a special DatagramSocket | /// A MulticastSocket is a special DatagramSocket | |||
/// that can be used to send packets to and receive | /// that can be used to send packets to and receive | |||
/// packets from multicast groups. | /// packets from multicast groups. | |||
skipping to change at line 128 | skipping to change at line 111 | |||
/// Joins the specified multicast group at the default inter face. | /// Joins the specified multicast group at the default inter face. | |||
void joinGroup(const IPAddress& groupAddress, const NetworkInterface & interfc); | void joinGroup(const IPAddress& groupAddress, const NetworkInterface & interfc); | |||
/// Joins the specified multicast group at the given interfa ce. | /// Joins the specified multicast group at the given interfa ce. | |||
void leaveGroup(const IPAddress& groupAddress); | void leaveGroup(const IPAddress& groupAddress); | |||
/// Leaves the specified multicast group at the default inte rface. | /// Leaves the specified multicast group at the default inte rface. | |||
void leaveGroup(const IPAddress& groupAddress, const NetworkInterfac e& interfc); | void leaveGroup(const IPAddress& groupAddress, const NetworkInterfac e& interfc); | |||
/// Leaves the specified multicast group at the given interf ace. | /// Leaves the specified multicast group at the given interf ace. | |||
private: | ||||
static NetworkInterface findFirstInterface(const IPAddress& groupAdd | ||||
ress); | ||||
/// Returns first multicast-eligible network interface. | ||||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // POCO_NET_HAS_INTERFACE | ||||
#endif // Net_MulticastSocket_INCLUDED | #endif // Net_MulticastSocket_INCLUDED | |||
End of changes. 4 change blocks. | ||||
32 lines changed or deleted | 11 lines changed or added | |||
MultipartReader.h | MultipartReader.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: MultipartReader | // Module: MultipartReader | |||
// | // | |||
// Definition of the MultipartReader class. | // Definition of the MultipartReader class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MultipartReader_INCLUDED | #ifndef Net_MultipartReader_INCLUDED | |||
#define Net_MultipartReader_INCLUDED | #define Net_MultipartReader_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MultipartWriter.h | MultipartWriter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: MultipartWriter | // Module: MultipartWriter | |||
// | // | |||
// Definition of the MultipartWriter class. | // Definition of the MultipartWriter class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_MultipartWriter_INCLUDED | #ifndef Net_MultipartWriter_INCLUDED | |||
#define Net_MultipartWriter_INCLUDED | #define Net_MultipartWriter_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
MutationEvent.h | MutationEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOMEvents | // Module: DOMEvents | |||
// | // | |||
// Definition of the DOM MutationEvent class. | // Definition of the DOM MutationEvent class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_MutationEvent_INCLUDED | #ifndef DOM_MutationEvent_INCLUDED | |||
#define DOM_MutationEvent_INCLUDED | #define DOM_MutationEvent_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/Event.h" | #include "Poco/DOM/Event.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Mutex.h | Mutex.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the Mutex and FastMutex classes. | // Definition of the Mutex and FastMutex classes. | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Mutex_INCLUDED | #ifndef Foundation_Mutex_INCLUDED | |||
#define Foundation_Mutex_INCLUDED | #define Foundation_Mutex_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/ScopedLock.h" | #include "Poco/ScopedLock.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Mutex_POSIX.h | Mutex_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the MutexImpl and FastMutexImpl classes for POSIX Threads. | // Definition of the MutexImpl and FastMutexImpl classes for POSIX Threads. | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Mutex_POSIX_INCLUDED | #ifndef Foundation_Mutex_POSIX_INCLUDED | |||
#define Foundation_Mutex_POSIX_INCLUDED | #define Foundation_Mutex_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Mutex_VX.h | Mutex_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the MutexImpl and FastMutexImpl classes for VxWorks. | // Definition of the MutexImpl and FastMutexImpl classes for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Mutex_VX_INCLUDED | #ifndef Foundation_Mutex_VX_INCLUDED | |||
#define Foundation_Mutex_VX_INCLUDED | #define Foundation_Mutex_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <semLib.h> | #include <semLib.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Mutex_WIN32.h | Mutex_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the MutexImpl and FastMutexImpl classes for WIN32. | // Definition of the MutexImpl and FastMutexImpl classes for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Mutex_WIN32_INCLUDED | #ifndef Foundation_Mutex_WIN32_INCLUDED | |||
#define Foundation_Mutex_WIN32_INCLUDED | #define Foundation_Mutex_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Mutex_WINCE.h | Mutex_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the MutexImpl and FastMutexImpl classes for WIN32. | // Definition of the MutexImpl and FastMutexImpl classes for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Mutex_WINCE_INCLUDED | #ifndef Foundation_Mutex_WINCE_INCLUDED | |||
#define Foundation_Mutex_WINCE_INCLUDED | #define Foundation_Mutex_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NObserver.h | NObserver.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: NotificationCenter | // Module: NotificationCenter | |||
// | // | |||
// Definition of the NObserver class template. | // Definition of the NObserver class template. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NObserver_INCLUDED | #ifndef Foundation_NObserver_INCLUDED | |||
#define Foundation_NObserver_INCLUDED | #define Foundation_NObserver_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractObserver.h" | #include "Poco/AbstractObserver.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Name.h | Name.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: Name | // Module: Name | |||
// | // | |||
// Definition of the Name class. | // Definition of the Name class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_Name_INCLUDED | #ifndef XML_Name_INCLUDED | |||
#define XML_Name_INCLUDED | #define XML_Name_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamePool.h | NamePool.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: NamePool | // Module: NamePool | |||
// | // | |||
// Definition of the NamePool class. | // Definition of the NamePool class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_NamePool_INCLUDED | #ifndef XML_NamePool_INCLUDED | |||
#define XML_NamePool_INCLUDED | #define XML_NamePool_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/XML/Name.h" | #include "Poco/XML/Name.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NameValueCollection.h | NameValueCollection.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: NameValueCollection | // Module: NameValueCollection | |||
// | // | |||
// Definition of the NameValueCollection class. | // Definition of the NameValueCollection class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_NameValueCollection_INCLUDED | #ifndef Net_NameValueCollection_INCLUDED | |||
#define Net_NameValueCollection_INCLUDED | #define Net_NameValueCollection_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/String.h" | #include "Poco/String.h" | |||
#include <map> | #include "Poco/ListMap.h" | |||
#include <cstddef> | ||||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class Net_API NameValueCollection | class Net_API NameValueCollection | |||
/// A collection of name-value pairs that are used in | /// A collection of name-value pairs that are used in | |||
/// various internet protocols like HTTP and SMTP. | /// various internet protocols like HTTP and SMTP. | |||
/// | /// | |||
/// The name is case-insensitive. | /// The name is case-insensitive. | |||
/// | /// | |||
/// There can be more than one name-value pair with the | /// There can be more than one name-value pair with the | |||
/// same name. | /// same name. | |||
{ | { | |||
public: | public: | |||
struct ILT | typedef Poco::ListMap<std::string, std::string> HeaderMap; | |||
{ | typedef HeaderMap::Iterator Iterator; | |||
bool operator() (const std::string& s1, const std::string& s | typedef HeaderMap::ConstIterator ConstIterator; | |||
2) const | ||||
{ | ||||
return Poco::icompare(s1, s2) < 0; | ||||
} | ||||
}; | ||||
typedef std::multimap<std::string, std::string, ILT> HeaderMap; | ||||
typedef HeaderMap::iterator Iterator; | ||||
typedef HeaderMap::const_iterator ConstIterator; | ||||
NameValueCollection(); | NameValueCollection(); | |||
/// Creates an empty NameValueCollection. | /// Creates an empty NameValueCollection. | |||
NameValueCollection(const NameValueCollection& nvc); | NameValueCollection(const NameValueCollection& nvc); | |||
/// Creates a NameValueCollection by copying another one. | /// Creates a NameValueCollection by copying another one. | |||
virtual ~NameValueCollection(); | virtual ~NameValueCollection(); | |||
/// Destroys the NameValueCollection. | /// Destroys the NameValueCollection. | |||
skipping to change at line 124 | skipping to change at line 97 | |||
/// Returns an iterator pointing to the begin of | /// Returns an iterator pointing to the begin of | |||
/// the name-value pair collection. | /// the name-value pair collection. | |||
ConstIterator end() const; | ConstIterator end() const; | |||
/// Returns an iterator pointing to the end of | /// Returns an iterator pointing to the end of | |||
/// the name-value pair collection. | /// the name-value pair collection. | |||
bool empty() const; | bool empty() const; | |||
/// Returns true iff the header does not have any content. | /// Returns true iff the header does not have any content. | |||
int size() const; | std::size_t size() const; | |||
/// Returns the number of name-value pairs in the | /// Returns the number of name-value pairs in the | |||
/// collection. | /// collection. | |||
void erase(const std::string& name); | void erase(const std::string& name); | |||
/// Removes all name-value pairs with the given name. | /// Removes all name-value pairs with the given name. | |||
void clear(); | void clear(); | |||
/// Removes all name-value pairs and their values. | /// Removes all name-value pairs and their values. | |||
private: | private: | |||
End of changes. 4 change blocks. | ||||
46 lines changed or deleted | 7 lines changed or added | |||
NamedEvent.h | NamedEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEvent class. | // Definition of the NamedEvent class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_INCLUDED | #ifndef Foundation_NamedEvent_INCLUDED | |||
#define Foundation_NamedEvent_INCLUDED | #define Foundation_NamedEvent_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | #if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | |||
#include "Poco/NamedEvent_WIN32U.h" | #include "Poco/NamedEvent_WIN32U.h" | |||
#elif defined(POCO_OS_FAMILY_WINDOWS) | #elif defined(POCO_OS_FAMILY_WINDOWS) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedEvent_Android.h | NamedEvent_Android.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEventImpl class for Android. | // Definition of the NamedEventImpl class for Android. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_Android_INCLUDED | #ifndef Foundation_NamedEvent_Android_INCLUDED | |||
#define Foundation_NamedEvent_Android_INCLUDED | #define Foundation_NamedEvent_Android_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API NamedEventImpl | class Foundation_API NamedEventImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedEvent_UNIX.h | NamedEvent_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEventImpl class for Unix. | // Definition of the NamedEventImpl class for Unix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_UNIX_INCLUDED | #ifndef Foundation_NamedEvent_UNIX_INCLUDED | |||
#define Foundation_NamedEvent_UNIX_INCLUDED | #define Foundation_NamedEvent_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX __) || defined(_AIX) | #if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX __) || defined(_AIX) | |||
#include <semaphore.h> | #include <semaphore.h> | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedEvent_VMS.h | NamedEvent_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEventImpl class for OpenVMS. | // Definition of the NamedEventImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_VMS_INCLUDED | #ifndef Foundation_NamedEvent_VMS_INCLUDED | |||
#define Foundation_NamedEvent_VMS_INCLUDED | #define Foundation_NamedEvent_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API NamedEventImpl | class Foundation_API NamedEventImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedEvent_WIN32.h | NamedEvent_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEventImpl class for Windows. | // Definition of the NamedEventImpl class for Windows. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_WIN32_INCLUDED | #ifndef Foundation_NamedEvent_WIN32_INCLUDED | |||
#define Foundation_NamedEvent_WIN32_INCLUDED | #define Foundation_NamedEvent_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedEvent_WIN32U.h | NamedEvent_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedEvent | // Module: NamedEvent | |||
// | // | |||
// Definition of the NamedEventImpl class for Windows. | // Definition of the NamedEventImpl class for Windows. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedEvent_WIN32U_INCLUDED | #ifndef Foundation_NamedEvent_WIN32U_INCLUDED | |||
#define Foundation_NamedEvent_WIN32U_INCLUDED | #define Foundation_NamedEvent_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex.h | NamedMutex.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutex class. | // Definition of the NamedMutex class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_INCLUDED | #ifndef Foundation_NamedMutex_INCLUDED | |||
#define Foundation_NamedMutex_INCLUDED | #define Foundation_NamedMutex_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/ScopedLock.h" | #include "Poco/ScopedLock.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | #if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | |||
#include "Poco/NamedMutex_WIN32U.h" | #include "Poco/NamedMutex_WIN32U.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex_Android.h | NamedMutex_Android.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutexImpl class for Android. | // Definition of the NamedMutexImpl class for Android. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_Android_INCLUDED | #ifndef Foundation_NamedMutex_Android_INCLUDED | |||
#define Foundation_NamedMutex_Android_INCLUDED | #define Foundation_NamedMutex_Android_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API NamedMutexImpl | class Foundation_API NamedMutexImpl | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex_UNIX.h | NamedMutex_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutexImpl class for Unix. | // Definition of the NamedMutexImpl class for Unix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_UNIX_INCLUDED | #ifndef Foundation_NamedMutex_UNIX_INCLUDED | |||
#define Foundation_NamedMutex_UNIX_INCLUDED | #define Foundation_NamedMutex_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <sys/types.h> | #include <sys/types.h> | |||
#include <sys/stat.h> | #include <sys/stat.h> | |||
#if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX __) || defined(_AIX) | #if defined(sun) || defined(__APPLE__) || defined(__osf__) || defined(__QNX __) || defined(_AIX) | |||
#include <semaphore.h> | #include <semaphore.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex_VMS.h | NamedMutex_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutexImpl class for OpenVMS. | // Definition of the NamedMutexImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_VMS_INCLUDED | #ifndef Foundation_NamedMutex_VMS_INCLUDED | |||
#define Foundation_NamedMutex_VMS_INCLUDED | #define Foundation_NamedMutex_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <descrip.h> | #include <descrip.h> | |||
#include <lckdef.h> | #include <lckdef.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex_WIN32.h | NamedMutex_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutexImpl class for Windows. | // Definition of the NamedMutexImpl class for Windows. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_WIN32_INCLUDED | #ifndef Foundation_NamedMutex_WIN32_INCLUDED | |||
#define Foundation_NamedMutex_WIN32_INCLUDED | #define Foundation_NamedMutex_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedMutex_WIN32U.h | NamedMutex_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: NamedMutex | // Module: NamedMutex | |||
// | // | |||
// Definition of the NamedMutexImpl class for Windows. | // Definition of the NamedMutexImpl class for Windows. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedMutex_WIN32U_INCLUDED | #ifndef Foundation_NamedMutex_WIN32U_INCLUDED | |||
#define Foundation_NamedMutex_WIN32U_INCLUDED | #define Foundation_NamedMutex_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedNodeMap.h | NamedNodeMap.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM NamedNodeMap interface. | // Definition of the DOM NamedNodeMap interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_NamedNodeMap_INCLUDED | #ifndef DOM_NamedNodeMap_INCLUDED | |||
#define DOM_NamedNodeMap_INCLUDED | #define DOM_NamedNodeMap_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/DOMObject.h" | #include "Poco/DOM/DOMObject.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamedTuple.h | NamedTuple.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: NamedTuple | // Module: NamedTuple | |||
// | // | |||
// Definition of the NamedTuple class. | // Definition of the NamedTuple class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NamedTuple_INCLUDED | #ifndef Foundation_NamedTuple_INCLUDED | |||
#define Foundation_NamedTuple_INCLUDED | #define Foundation_NamedTuple_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Tuple.h" | #include "Poco/Tuple.h" | |||
#include "Poco/TypeList.h" | #include "Poco/TypeList.h" | |||
#include "Poco/DynamicAny.h" | #include "Poco/DynamicAny.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/Format.h" | #include "Poco/Format.h" | |||
namespace Poco { | namespace Poco { | |||
template<class T0, | template<class T0, | |||
class T1 = NullTypeList, | class T1 = NullTypeList, | |||
class T2 = NullTypeList, | class T2 = NullTypeList, | |||
class T3 = NullTypeList, | class T3 = NullTypeList, | |||
class T4 = NullTypeList, | class T4 = NullTypeList, | |||
class T5 = NullTypeList, | class T5 = NullTypeList, | |||
class T6 = NullTypeList, | class T6 = NullTypeList, | |||
class T7 = NullTypeList, | class T7 = NullTypeList, | |||
class T8 = NullTypeList, | class T8 = NullTypeList, | |||
class T9 = NullTypeList, | class T9 = NullTypeList, | |||
class T10 = NullTypeList, | class T10 = NullTypeList, | |||
class T11 = NullTypeList, | class T11 = NullTypeList, | |||
class T12 = NullTypeList, | class T12 = NullTypeList, | |||
class T13 = NullTypeList, | class T13 = NullTypeList, | |||
class T14 = NullTypeList, | class T14 = NullTypeList, | |||
class T15 = NullTypeList, | class T15 = NullTypeList, | |||
class T16 = NullTypeList, | class T16 = NullTypeList, | |||
class T17 = NullTypeList, | class T17 = NullTypeList, | |||
class T18 = NullTypeList, | class T18 = NullTypeList, | |||
class T19 = NullTypeList> | class T19 = NullTypeList> | |||
struct NamedTuple: public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T 13,T14,T15,T16,T17,T18,T19> | struct NamedTuple: public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T 13,T14,T15,T16,T17,T18,T19> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17,T18,T19> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17,T18,T19> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17,T18,T19>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17,T18,T19>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(): _pNames(0) | _pNames = rNames; | |||
{ | } | |||
init(); | ||||
} | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(const NameVecPtr& rNames) | EFAULTVALUE(T1), | |||
{ | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
if (rNames->size() != TupleType::length) | EFAULTVALUE(T2), | |||
throw InvalidArgumentException("Wrong names vector length."); | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T3), | ||||
_pNames = rNames; | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
} | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | EFAULTVALUE(T5), | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
ALUE(T5), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
ALUE(T6), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
ALUE(T7), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
ALUE(T8), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
ALUE(T9), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T16), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T17), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T18), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T19)): | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T15), | ||||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T16), | ||||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T17), | ||||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T18), | ||||
typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T19)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17), | _DEFAULTVALUE(T17), | |||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
TVALUE(T18), | _DEFAULTVALUE(T18), | |||
typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER | |||
TVALUE(T19)): | _DEFAULTVALUE(T19)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
const std::string& n17 = "R", | const std::string& n17 = "R", | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17), | _DEFAULTVALUE(T17), | |||
const std::string& n18 = "S", | const std::string& n18 = "S", | |||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
TVALUE(T18), | _DEFAULTVALUE(T18), | |||
const std::string& n19 = "T", | const std::string& n19 = "T", | |||
typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER_DEFAUL TVALUE(T19)): | typename TypeWrapper<T19>::CONSTTYPE& t19 = POCO_TYPEWRAPPER _DEFAULTVALUE(T19)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18,t19), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17, | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n | |||
n18,n19); | 16,n17,n18,n19); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
case 15: return TupleType::template get<15>(); | case 15: return TupleType::template get<15>(); | |||
case 16: return TupleType::template get<16>(); | case 16: return TupleType::template get<16>(); | |||
case 17: return TupleType::template get<17>(); | case 17: return TupleType::template get<17>(); | |||
case 18: return TupleType::template get<18>(); | case 18: return TupleType::template get<18>(); | |||
case 19: return TupleType::template get<19>(); | case 19: return TupleType::template get<19>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | typename TypeGetter<N, Type>::HeadType& get() | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | template<int N> | |||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | void set(typename TypeGetter<N, Type>::ConstHeadType& val) | |||
{ | { | |||
return TupleType::template set<N>(val); | return TupleType::template set<N>(val); | |||
} | } | |||
const NameVecPtr& names() | const NameVecPtr& names() | |||
{ | { | |||
return _pNames; | return _pNames; | |||
} | } | |||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
const std::string& n17 = "R", | const std::string& n17 = "R", | |||
const std::string& n18 = "S", | const std::string& n18 = "S", | |||
const std::string& n19 = "T") | const std::string& n19 = "T") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
_pNames->push_back(n15); | _pNames->push_back(n15); | |||
_pNames->push_back(n16); | _pNames->push_back(n16); | |||
_pNames->push_back(n17); | _pNames->push_back(n17); | |||
_pNames->push_back(n18); | _pNames->push_back(n18); | |||
_pNames->push_back(n19); | _pNames->push_back(n19); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13, | class T13, | |||
class T14, | class T14, | |||
class T15, | class T15, | |||
class T16, | class T16, | |||
class T17, | class T17, | |||
class T18> | class T18> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,T17,T18,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,T17,T18,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16,T17,T18> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16,T17,T18> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17,T18> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17,T18> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17,T18>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17,T18>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12), | |||
ALUE(T6), | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T13), | |||
ALUE(T7), | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T14), | |||
ALUE(T8), | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T15), | |||
ALUE(T9), | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | _DEFAULTVALUE(T16), | |||
TVALUE(T10), | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | _DEFAULTVALUE(T17), | |||
TVALUE(T11), | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | _DEFAULTVALUE(T18)): | |||
TVALUE(T12), | ||||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13), | ||||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T14), | ||||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T15), | ||||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T16), | ||||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T17), | ||||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T18)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17), | _DEFAULTVALUE(T17), | |||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
TVALUE(T18)): | _DEFAULTVALUE(T18)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
const std::string& n17 = "R", | const std::string& n17 = "R", | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17), | _DEFAULTVALUE(T17), | |||
const std::string& n18 = "S", | const std::string& n18 = "S", | |||
typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T18>::CONSTTYPE& t18 = POCO_TYPEWRAPPER | |||
TVALUE(T18)): | _DEFAULTVALUE(T18)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17,t18), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17, | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n | |||
n18); | 16,n17,n18); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
case 15: return TupleType::template get<15>(); | case 15: return TupleType::template get<15>(); | |||
case 16: return TupleType::template get<16>(); | case 16: return TupleType::template get<16>(); | |||
case 17: return TupleType::template get<17>(); | case 17: return TupleType::template get<17>(); | |||
case 18: return TupleType::template get<18>(); | case 18: return TupleType::template get<18>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
const std::string& n17 = "R", | const std::string& n17 = "R", | |||
const std::string& n18 = "S") | const std::string& n18 = "S") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
_pNames->push_back(n15); | _pNames->push_back(n15); | |||
_pNames->push_back(n16); | _pNames->push_back(n16); | |||
_pNames->push_back(n17); | _pNames->push_back(n17); | |||
_pNames->push_back(n18); | _pNames->push_back(n18); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13, | class T13, | |||
class T14, | class T14, | |||
class T15, | class T15, | |||
class T16, | class T16, | |||
class T17> | class T17> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,T17,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,T17,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16,T17> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16,T17> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16,T17> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16,T17>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(): _pNames(0) | _pNames = rNames; | |||
{ | } | |||
init(); | ||||
} | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(const NameVecPtr& rNames) | EFAULTVALUE(T1), | |||
{ | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
if (rNames->size() != TupleType::length) | EFAULTVALUE(T2), | |||
throw InvalidArgumentException("Wrong names vector length."); | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T3), | ||||
_pNames = rNames; | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
} | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | EFAULTVALUE(T5), | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
ALUE(T5), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
ALUE(T6), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
ALUE(T7), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
ALUE(T8), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
ALUE(T9), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T16), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T17)): | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13), | ||||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T14), | ||||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T15), | ||||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T16), | ||||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T17)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17)): | _DEFAULTVALUE(T17)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16), | _DEFAULTVALUE(T16), | |||
const std::string& n17 = "R", | const std::string& n17 = "R", | |||
typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T17>::CONSTTYPE& t17 = POCO_TYPEWRAPPER | |||
TVALUE(T17)): | _DEFAULTVALUE(T17)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16,t17), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16,n17) | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n | |||
; | 16,n17); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
case 15: return TupleType::template get<15>(); | case 15: return TupleType::template get<15>(); | |||
case 16: return TupleType::template get<16>(); | case 16: return TupleType::template get<16>(); | |||
case 17: return TupleType::template get<17>(); | case 17: return TupleType::template get<17>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
const std::string& n17 = "R") | const std::string& n17 = "R") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
_pNames->push_back(n15); | _pNames->push_back(n15); | |||
_pNames->push_back(n16); | _pNames->push_back(n16); | |||
_pNames->push_back(n17); | _pNames->push_back(n17); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13, | class T13, | |||
class T14, | class T14, | |||
class T15, | class T15, | |||
class T16> | class T16> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 ,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T 16> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15, T16> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15,T16>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12), | |||
ALUE(T6), | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T13), | |||
ALUE(T7), | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T14), | |||
ALUE(T8), | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T15), | |||
ALUE(T9), | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | _DEFAULTVALUE(T16)): | |||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12), | ||||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13), | ||||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T14), | ||||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T15), | ||||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T16)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16)): | _DEFAULTVALUE(T16)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15), | _DEFAULTVALUE(T15), | |||
const std::string& n16 = "Q", | const std::string& n16 = "Q", | |||
typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T16>::CONSTTYPE& t16 = POCO_TYPEWRAPPER | |||
TVALUE(T16)): | _DEFAULTVALUE(T16)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15,t16), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n16); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15,n | |||
} | 16); | |||
} | ||||
const DynamicAny get(const std::string& name) const | ||||
{ | const DynamicAny get(const std::string& name) const | |||
NameVec::const_iterator it = _pNames->begin(); | { | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | ||||
{ | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
if (name == *it) | { | |||
{ | if (name == *it) | |||
switch (counter) | { | |||
{ | switch (counter) | |||
case 0: return TupleType::template get<0>(); | { | |||
case 1: return TupleType::template get<1>(); | case 0: return TupleType::template g | |||
case 2: return TupleType::template get<2>(); | et<0>(); | |||
case 3: return TupleType::template get<3>(); | case 1: return TupleType::template g | |||
case 4: return TupleType::template get<4>(); | et<1>(); | |||
case 5: return TupleType::template get<5>(); | case 2: return TupleType::template g | |||
case 6: return TupleType::template get<6>(); | et<2>(); | |||
case 7: return TupleType::template get<7>(); | case 3: return TupleType::template g | |||
case 8: return TupleType::template get<8>(); | et<3>(); | |||
case 9: return TupleType::template get<9>(); | case 4: return TupleType::template g | |||
et<4>(); | ||||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
case 15: return TupleType::template get<15>(); | case 15: return TupleType::template get<15>(); | |||
case 16: return TupleType::template get<16>(); | case 16: return TupleType::template get<16>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
const std::string& n16 = "Q") | const std::string& n16 = "Q") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
_pNames->push_back(n15); | _pNames->push_back(n15); | |||
_pNames->push_back(n16); | _pNames->push_back(n16); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13, | class T13, | |||
class T14, | class T14, | |||
class T15> | class T15> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,Nul lTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,Nul lTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14,T15>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12), | |||
ALUE(T6), | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T13), | |||
ALUE(T7), | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T14), | |||
ALUE(T8), | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T15)): | |||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12), | ||||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13), | ||||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T14), | ||||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T15)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15)): | _DEFAULTVALUE(T15)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14), | _DEFAULTVALUE(T14), | |||
const std::string& n15 = "P", | const std::string& n15 = "P", | |||
typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T15>::CONSTTYPE& t15 = POCO_TYPEWRAPPER | |||
TVALUE(T15)): | _DEFAULTVALUE(T15)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14, t15), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14,n15); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
case 15: return TupleType::template get<15>(); | case 15: return TupleType::template get<15>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | void set(typename TypeGetter<N, Type>::ConstHeadType& val) | |||
return get(name); | { | |||
} | return TupleType::template set<N>(val); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | const NameVecPtr& names() | |||
{ | { | |||
return TupleType::template get<N>(); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
const std::string& n15 = "P") | const std::string& n15 = "P") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
_pNames->push_back(n15); | _pNames->push_back(n15); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13, | class T13, | |||
class T14> | class T14> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTyp eList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,NullTyp eList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> Tup leType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14> Tup leType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 ,T14>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12), | |||
ALUE(T6), | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T13), | |||
ALUE(T7), | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T14)): | |||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12), | ||||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13), | ||||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T14)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) , | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) , | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14)): | _DEFAULTVALUE(T14)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13), | _DEFAULTVALUE(T13), | |||
const std::string& n14 = "O", | const std::string& n14 = "O", | |||
typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T14>::CONSTTYPE& t14 = POCO_TYPEWRAPPER | |||
TVALUE(T14)): | _DEFAULTVALUE(T14)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) , | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14) , | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13,n14); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
case 14: return TupleType::template get<14>(); | case 14: return TupleType::template get<14>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | { | |||
if (index >= _pNames->size()) | return TupleType::template get<N>(); | |||
throw InvalidArgumentException(format("Invalid index | } | |||
: %z", index)); | ||||
(*_pNames)[index] = name; | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | } | |||
const std::string& getName(std::size_t index) | template<int N> | |||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | ||||
if (index >= _pNames->size()) | ||||
throw InvalidArgumentException(format("Invalid index | ||||
: %z", index)); | ||||
(*_pNames)[index] = name; | ||||
} | ||||
const std::string& getName(std::size_t index) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
const std::string& n14 = "O") | const std::string& n14 = "O") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
_pNames->push_back(n14); | _pNames->push_back(n14); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12, | class T12, | |||
class T13> | class T13> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeLis t>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,NullTypeLis t>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> TupleTy pe; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13> TupleTy pe; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12), | |||
ALUE(T6), | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T13)): | |||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12), | ||||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T13)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13)): | _DEFAULTVALUE(T13)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12), | _DEFAULTVALUE(T12), | |||
const std::string& n13 = "N", | const std::string& n13 = "N", | |||
typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T13>::CONSTTYPE& t13 = POCO_TYPEWRAPPER | |||
TVALUE(T13)): | _DEFAULTVALUE(T13)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12,n13); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
case 13: return TupleType::template get<13>(); | case 13: return TupleType::template get<13>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
return get(name); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | template<int N> | |||
{ | typename TypeGetter<N, Type>::HeadType& get() | |||
return TupleType::template get<N>(); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | template<int N> | |||
{ | void set(typename TypeGetter<N, Type>::ConstHeadType& val) | |||
return TupleType::template get<N>(); | { | |||
} | return TupleType::template set<N>(val); | |||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | const NameVecPtr& names() | |||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M", | const std::string& n12 = "M", | |||
const std::string& n13 = "N") | const std::string& n13 = "N") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
_pNames->push_back(n13); | _pNames->push_back(n13); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11, | class T11, | |||
class T12> | class T12> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::T ype Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12>::T ype Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11), | |||
ALUE(T5), | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T12)): | |||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11), | _DEFAULTVALUE(T11), | |||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | |||
TVALUE(T12)): | _DEFAULTVALUE(T12)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l | |||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(const std::string& n0, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
const std::string& n1 = "B", | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
const std::string& n2 = "C", | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
const std::string& n3 = "D", | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
const std::string& n4 = "E", | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
const std::string& n5 = "F", | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5), | ||||
const std::string& n6 = "G", | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T6), | ||||
const std::string& n7 = "H", | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T7), | ||||
const std::string& n8 = "I", | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T8), | ||||
const std::string& n9 = "J", | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T9), | ||||
const std::string& n10 = "K", | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | ||||
_DEFAULTVALUE(T10), | ||||
const std::string& n11 = "L", | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | ||||
_DEFAULTVALUE(T11), | ||||
const std::string& n12 = "M", | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER | ||||
_DEFAULTVALUE(T12)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12); | ||||
} | ||||
_pNames = rNames; | const DynamicAny get(const std::string& name) const | |||
} | { | |||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
NamedTuple(const std::string& n0, | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | { | |||
const std::string& n1 = "B", | if (name == *it) | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | { | |||
ALUE(T1), | switch (counter) | |||
const std::string& n2 = "C", | { | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | case 0: return TupleType::template g | |||
ALUE(T2), | et<0>(); | |||
const std::string& n3 = "D", | case 1: return TupleType::template g | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | et<1>(); | |||
ALUE(T3), | case 2: return TupleType::template g | |||
const std::string& n4 = "E", | et<2>(); | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | case 3: return TupleType::template g | |||
ALUE(T4), | et<3>(); | |||
const std::string& n5 = "F", | case 4: return TupleType::template g | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | et<4>(); | |||
ALUE(T5), | case 5: return TupleType::template g | |||
const std::string& n6 = "G", | et<5>(); | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | case 6: return TupleType::template g | |||
ALUE(T6), | et<6>(); | |||
const std::string& n7 = "H", | case 7: return TupleType::template g | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | et<7>(); | |||
ALUE(T7), | case 8: return TupleType::template g | |||
const std::string& n8 = "I", | et<8>(); | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | case 9: return TupleType::template g | |||
ALUE(T8), | et<9>(); | |||
const std::string& n9 = "J", | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
const std::string& n10 = "K", | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
const std::string& n11 = "L", | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11), | ||||
const std::string& n12 = "M", | ||||
typename TypeWrapper<T12>::CONSTTYPE& t12 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T12)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11,n12); | ||||
} | ||||
const DynamicAny get(const std::string& name) const | ||||
{ | ||||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | ||||
{ | ||||
if (name == *it) | ||||
{ | ||||
switch (counter) | ||||
{ | ||||
case 0: return TupleType::template get<0>(); | ||||
case 1: return TupleType::template get<1>(); | ||||
case 2: return TupleType::template get<2>(); | ||||
case 3: return TupleType::template get<3>(); | ||||
case 4: return TupleType::template get<4>(); | ||||
case 5: return TupleType::template get<5>(); | ||||
case 6: return TupleType::template get<6>(); | ||||
case 7: return TupleType::template get<7>(); | ||||
case 8: return TupleType::template get<8>(); | ||||
case 9: return TupleType::template get<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
case 12: return TupleType::template get<12>(); | case 12: return TupleType::template get<12>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | typename TypeGetter<N, Type>::HeadType& get() | |||
return get(name); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | template<int N> | |||
{ | void set(typename TypeGetter<N, Type>::ConstHeadType& val) | |||
return TupleType::template get<N>(); | { | |||
} | return TupleType::template set<N>(val); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | const NameVecPtr& names() | |||
{ | { | |||
return TupleType::template get<N>(); | return _pNames; | |||
} | } | |||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
const std::string& n12 = "M") | const std::string& n12 = "M") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
_pNames->push_back(n12); | _pNames->push_back(n12); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10, | class T10, | |||
class T11> | class T11> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10), | |||
ALUE(T4), | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T11)): | |||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10), | ||||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T11)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11)): | _DEFAULTVALUE(T11)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10), | _DEFAULTVALUE(T10), | |||
const std::string& n11 = "L", | const std::string& n11 = "L", | |||
typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T11>::CONSTTYPE& t11 = POCO_TYPEWRAPPER | |||
TVALUE(T11)): | _DEFAULTVALUE(T11)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10,n11); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
case 11: return TupleType::template get<11>(); | case 11: return TupleType::template get<11>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | void set(typename TypeGetter<N, Type>::ConstHeadType& val) | |||
return get(name); | { | |||
} | return TupleType::template set<N>(val); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | const NameVecPtr& names() | |||
{ | { | |||
return TupleType::template get<N>(); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K", | const std::string& n10 = "K", | |||
const std::string& n11 = "L") | const std::string& n11 = "L") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
_pNames->push_back(n11); | _pNames->push_back(n11); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9, | class T9, | |||
class T10> | class T10> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::Type Type ; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10>::Type Type ; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9), | |||
ALUE(T3), | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | _DEFAULTVALUE(T10)): | |||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9), | EFAULTVALUE(T9), | |||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | |||
TVALUE(T10)): | _DEFAULTVALUE(T10)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l | |||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(const std::string& n0, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
const std::string& n1 = "B", | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
const std::string& n2 = "C", | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
const std::string& n3 = "D", | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
const std::string& n4 = "E", | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
const std::string& n5 = "F", | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5), | ||||
const std::string& n6 = "G", | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T6), | ||||
const std::string& n7 = "H", | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T7), | ||||
const std::string& n8 = "I", | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T8), | ||||
const std::string& n9 = "J", | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T9), | ||||
const std::string& n10 = "K", | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER | ||||
_DEFAULTVALUE(T10)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10); | ||||
} | ||||
_pNames = rNames; | const DynamicAny get(const std::string& name) const | |||
} | { | |||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
NamedTuple(const std::string& n0, | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | { | |||
const std::string& n1 = "B", | if (name == *it) | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | { | |||
ALUE(T1), | switch (counter) | |||
const std::string& n2 = "C", | { | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | case 0: return TupleType::template g | |||
ALUE(T2), | et<0>(); | |||
const std::string& n3 = "D", | case 1: return TupleType::template g | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | et<1>(); | |||
ALUE(T3), | case 2: return TupleType::template g | |||
const std::string& n4 = "E", | et<2>(); | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | case 3: return TupleType::template g | |||
ALUE(T4), | et<3>(); | |||
const std::string& n5 = "F", | case 4: return TupleType::template g | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | et<4>(); | |||
ALUE(T5), | case 5: return TupleType::template g | |||
const std::string& n6 = "G", | et<5>(); | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | case 6: return TupleType::template g | |||
ALUE(T6), | et<6>(); | |||
const std::string& n7 = "H", | case 7: return TupleType::template g | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | et<7>(); | |||
ALUE(T7), | case 8: return TupleType::template g | |||
const std::string& n8 = "I", | et<8>(); | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | case 9: return TupleType::template g | |||
ALUE(T8), | et<9>(); | |||
const std::string& n9 = "J", | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9), | ||||
const std::string& n10 = "K", | ||||
typename TypeWrapper<T10>::CONSTTYPE& t10 = POCO_TYPEWRAPPER_DEFAUL | ||||
TVALUE(T10)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9,n10); | ||||
} | ||||
const DynamicAny get(const std::string& name) const | ||||
{ | ||||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | ||||
{ | ||||
if (name == *it) | ||||
{ | ||||
switch (counter) | ||||
{ | ||||
case 0: return TupleType::template get<0>(); | ||||
case 1: return TupleType::template get<1>(); | ||||
case 2: return TupleType::template get<2>(); | ||||
case 3: return TupleType::template get<3>(); | ||||
case 4: return TupleType::template get<4>(); | ||||
case 5: return TupleType::template get<5>(); | ||||
case 6: return TupleType::template get<6>(); | ||||
case 7: return TupleType::template get<7>(); | ||||
case 8: return TupleType::template get<8>(); | ||||
case 9: return TupleType::template get<9>(); | ||||
case 10: return TupleType::template get<10>(); | case 10: return TupleType::template get<10>(); | |||
default: throw RangeException(); | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | } | |||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
const std::string& n10 = "K") | const std::string& n10 = "K") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
_pNames->push_back(n10); | _pNames->push_back(n10); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8, | class T8, | |||
class T9> | class T9> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7), | |||
ALUE(T1), | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T8), | |||
ALUE(T2), | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T9)): | |||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8), | ||||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T9)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9)): | EFAULTVALUE(T9)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | |||
ALUE(T8), | EFAULTVALUE(T8), | |||
const std::string& n9 = "J", | const std::string& n9 = "J", | |||
typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T9>::CONSTTYPE& t9 = POCO_TYPEWRAPPER_D | |||
ALUE(T9)): | EFAULTVALUE(T9)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8,t9), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8,n9); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
case 9: return TupleType::template get<9>(); | et<4>(); | |||
default: throw RangeException(); | case 5: return TupleType::template g | |||
} | et<5>(); | |||
} | case 6: return TupleType::template g | |||
} | et<6>(); | |||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
case 9: return TupleType::template g | ||||
et<9>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I", | const std::string& n8 = "I", | |||
const std::string& n9 = "J") | const std::string& n9 = "J") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
_pNames->push_back(n9); | _pNames->push_back(n9); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7, | class T7, | |||
class T8> | class T8> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8), | ||||
_pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T8)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | NamedTuple(): _pNames(0) | |||
} | { | |||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T8)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8), | ||||
_pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T7), | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T8)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(const std::string& n0, | _pNames = rNames; | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | } | |||
const std::string& n1 = "B", | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | NamedTuple(const std::string& n0, | |||
ALUE(T1), | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n2 = "C", | const std::string& n1 = "B", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T1), | |||
const std::string& n3 = "D", | const std::string& n2 = "C", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T2), | |||
const std::string& n4 = "E", | const std::string& n3 = "D", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T3), | |||
const std::string& n5 = "F", | const std::string& n4 = "E", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T4), | |||
const std::string& n6 = "G", | const std::string& n5 = "F", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T5), | |||
const std::string& n7 = "H", | const std::string& n6 = "G", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T7), | EFAULTVALUE(T6), | |||
const std::string& n8 = "I", | const std::string& n7 = "H", | |||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T8)): | EFAULTVALUE(T7), | |||
const std::string& n8 = "I", | ||||
typename TypeWrapper<T8>::CONSTTYPE& t8 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T8)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7,t8), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7,n8); | init(n0,n1,n2,n3,n4,n5,n6,n7,n8); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
case 8: return TupleType::template get<8>(); | case 4: return TupleType::template g | |||
default: throw RangeException(); | et<4>(); | |||
} | case 5: return TupleType::template g | |||
} | et<5>(); | |||
} | case 6: return TupleType::template g | |||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
case 8: return TupleType::template g | ||||
et<8>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
const std::string& n8 = "I") | const std::string& n8 = "I") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
_pNames->push_back(n8); | _pNames->push_back(n8); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6, | class T6, | |||
class T7> | class T7> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,T7,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6,T7> | public Tuple<T0,T1,T2,T3,T4,T5,T6,T7> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6,T7> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6,T7>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2), | ||||
NamedTuple(const NameVecPtr& rNames) | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T3), | |||
if (rNames->size() != TupleType::length) | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
throw InvalidArgumentException("Wrong names vector length."); | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
_pNames = rNames; | EFAULTVALUE(T5), | |||
} | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T6), | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T7)): | |||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6), | ||||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T7)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7)): | EFAULTVALUE(T7)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7) | TupleType(t0,t1,t2,t3,t4,t5,t6,t7) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T4), | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T5), | EFAULTVALUE(T5), | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
ALUE(T6), | EFAULTVALUE(T6), | |||
const std::string& n7 = "H", | const std::string& n7 = "H", | |||
typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T7>::CONSTTYPE& t7 = POCO_TYPEWRAPPER_D | |||
ALUE(T7)): | EFAULTVALUE(T7)): | |||
TupleType(t0,t1,t2,t3,t4,t5,t6,t7), | TupleType(t0,t1,t2,t3,t4,t5,t6,t7), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4,n5,n6,n7); | init(n0,n1,n2,n3,n4,n5,n6,n7); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
case 5: return TupleType::template get<5>(); | et<2>(); | |||
case 6: return TupleType::template get<6>(); | case 3: return TupleType::template g | |||
case 7: return TupleType::template get<7>(); | et<3>(); | |||
default: throw RangeException(); | case 4: return TupleType::template g | |||
} | et<4>(); | |||
} | case 5: return TupleType::template g | |||
} | et<5>(); | |||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
case 7: return TupleType::template g | ||||
et<7>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | typename TypeGetter<N, Type>::HeadType& get() | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G", | const std::string& n6 = "G", | |||
const std::string& n7 = "H") | const std::string& n7 = "H") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
_pNames->push_back(n7); | _pNames->push_back(n7); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5, | class T5, | |||
class T6> | class T6> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,T6,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5,T6> | public Tuple<T0,T1,T2,T3,T4,T5,T6> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5,T6> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5,T6> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5,T6>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(const NameVecPtr& rNames) | |||
{ | { | |||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6), _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5), | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T6)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
const std::string& n1 = "B", | EFAULTVALUE(T1), | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T2), | |||
const std::string& n2 = "C", | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T3), | |||
ALUE(T2), | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
const std::string& n3 = "D", | EFAULTVALUE(T4), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T5), | |||
const std::string& n4 = "E", | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | EFAULTVALUE(T6)): | |||
ALUE(T4), | TupleType(t0,t1,t2,t3,t4,t5,t6), _pNames(0) | |||
const std::string& n5 = "F", | { | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | init(); | |||
ALUE(T5), | } | |||
const std::string& n6 = "G", | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_DEFAULTV | NamedTuple(const NameVecPtr& rNames, | |||
ALUE(T6)): | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
TupleType(t0,t1,t2,t3,t4,t5,t6), _pNames(0) | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T1), | |||
init(n0,n1,n2,n3,n4,n5,n6); | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
} | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
const DynamicAny get(const std::string& name) const | EFAULTVALUE(T3), | |||
{ | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
NameVec::const_iterator it = _pNames->begin(); | EFAULTVALUE(T4), | |||
NameVec::const_iterator itEnd = _pNames->end(); | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T5), | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | |||
{ | EFAULTVALUE(T6)): | |||
if (name == *it) | TupleType(t0,t1,t2,t3,t4,t5,t6) | |||
{ | { | |||
switch (counter) | if (rNames->size() != TupleType::length) | |||
{ | throw InvalidArgumentException("Wrong names vector l | |||
case 0: return TupleType::template get<0>(); | ength."); | |||
case 1: return TupleType::template get<1>(); | ||||
case 2: return TupleType::template get<2>(); | _pNames = rNames; | |||
case 3: return TupleType::template get<3>(); | } | |||
case 4: return TupleType::template get<4>(); | ||||
case 5: return TupleType::template get<5>(); | NamedTuple(const std::string& n0, | |||
case 6: return TupleType::template get<6>(); | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
default: throw RangeException(); | const std::string& n1 = "B", | |||
} | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
} | EFAULTVALUE(T1), | |||
} | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
const std::string& n3 = "D", | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
const std::string& n4 = "E", | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
const std::string& n5 = "F", | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5), | ||||
const std::string& n6 = "G", | ||||
typename TypeWrapper<T6>::CONSTTYPE& t6 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T6)): | ||||
TupleType(t0,t1,t2,t3,t4,t5,t6), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3,n4,n5,n6); | ||||
} | ||||
const DynamicAny get(const std::string& name) const | ||||
{ | ||||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | ||||
{ | ||||
if (name == *it) | ||||
{ | ||||
switch (counter) | ||||
{ | ||||
case 0: return TupleType::template g | ||||
et<0>(); | ||||
case 1: return TupleType::template g | ||||
et<1>(); | ||||
case 2: return TupleType::template g | ||||
et<2>(); | ||||
case 3: return TupleType::template g | ||||
et<3>(); | ||||
case 4: return TupleType::template g | ||||
et<4>(); | ||||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
case 6: return TupleType::template g | ||||
et<6>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
return get(name); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | template<int N> | |||
{ | typename TypeGetter<N, Type>::HeadType& get() | |||
return TupleType::template get<N>(); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F", | const std::string& n5 = "F", | |||
const std::string& n6 = "G") | const std::string& n6 = "G") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
_pNames->push_back(n6); | _pNames->push_back(n6); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4, | class T4, | |||
class T5> | class T5> | |||
struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,T5,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4,T5> | public Tuple<T0,T1,T2,T3,T4,T5> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4,T5> TupleType; | typedef Tuple<T0,T1,T2,T3,T4,T5> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4,T5>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4,T5>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | NamedTuple(): _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames) | NamedTuple(const NameVecPtr& rNames) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5)): | ||||
TupleType(t0,t1,t2,t3,t4,t5), _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T5)): | ||||
TupleType(t0,t1,t2,t3,t4,t5) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l | |||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5)): | ||||
TupleType(t0,t1,t2,t3,t4,t5), _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
_pNames = rNames; | NamedTuple(const NameVecPtr& rNames, | |||
} | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T4), | ||||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T5)): | ||||
TupleType(t0,t1,t2,t3,t4,t5) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(const std::string& n0, | _pNames = rNames; | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | } | |||
const std::string& n1 = "B", | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | NamedTuple(const std::string& n0, | |||
ALUE(T1), | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n2 = "C", | const std::string& n1 = "B", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T1), | |||
const std::string& n3 = "D", | const std::string& n2 = "C", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T2), | |||
const std::string& n4 = "E", | const std::string& n3 = "D", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T4), | EFAULTVALUE(T3), | |||
const std::string& n5 = "F", | const std::string& n4 = "E", | |||
typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T5)): | EFAULTVALUE(T4), | |||
TupleType(t0,t1,t2,t3,t4,t5), _pNames(0) | const std::string& n5 = "F", | |||
{ | typename TypeWrapper<T5>::CONSTTYPE& t5 = POCO_TYPEWRAPPER_D | |||
init(n0,n1,n2,n3,n4,n5); | EFAULTVALUE(T5)): | |||
} | TupleType(t0,t1,t2,t3,t4,t5), _pNames(0) | |||
{ | ||||
const DynamicAny get(const std::string& name) const | init(n0,n1,n2,n3,n4,n5); | |||
{ | } | |||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | const DynamicAny get(const std::string& name) const | |||
{ | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | NameVec::const_iterator it = _pNames->begin(); | |||
{ | NameVec::const_iterator itEnd = _pNames->end(); | |||
if (name == *it) | ||||
{ | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
switch (counter) | { | |||
{ | if (name == *it) | |||
case 0: return TupleType::template get<0>(); | { | |||
case 1: return TupleType::template get<1>(); | switch (counter) | |||
case 2: return TupleType::template get<2>(); | { | |||
case 3: return TupleType::template get<3>(); | case 0: return TupleType::template g | |||
case 4: return TupleType::template get<4>(); | et<0>(); | |||
case 5: return TupleType::template get<5>(); | case 1: return TupleType::template g | |||
default: throw RangeException(); | et<1>(); | |||
} | case 2: return TupleType::template g | |||
} | et<2>(); | |||
} | case 3: return TupleType::template g | |||
et<3>(); | ||||
case 4: return TupleType::template g | ||||
et<4>(); | ||||
case 5: return TupleType::template g | ||||
et<5>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
const std::string& n5 = "F") | const std::string& n5 = "F") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
_pNames->push_back(n5); | _pNames->push_back(n5); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3, | class T3, | |||
class T4> | class T4> | |||
struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,T4,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3,T4> | public Tuple<T0,T1,T2,T3,T4> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3,T4> TupleType; | typedef Tuple<T0,T1,T2,T3,T4> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3,T4>::Type Type; | typedef typename Tuple<T0,T1,T2,T3,T4>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(): _pNames(0) | _pNames = rNames; | |||
{ | } | |||
init(); | ||||
} | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(const NameVecPtr& rNames) | EFAULTVALUE(T1), | |||
{ | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
if (rNames->size() != TupleType::length) | EFAULTVALUE(T2), | |||
throw InvalidArgumentException("Wrong names vector length."); | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T3), | ||||
_pNames = rNames; | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
} | EFAULTVALUE(T4)): | |||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3), | ||||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T4)): | ||||
TupleType(t0,t1,t2,t3,t4), | TupleType(t0,t1,t2,t3,t4), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4)): | EFAULTVALUE(T4)): | |||
TupleType(t0,t1,t2,t3,t4) | TupleType(t0,t1,t2,t3,t4) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3), | EFAULTVALUE(T3), | |||
const std::string& n4 = "E", | const std::string& n4 = "E", | |||
typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T4>::CONSTTYPE& t4 = POCO_TYPEWRAPPER_D | |||
ALUE(T4)): | EFAULTVALUE(T4)): | |||
TupleType(t0,t1,t2,t3,t4), | TupleType(t0,t1,t2,t3,t4), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2,n3,n4); | init(n0,n1,n2,n3,n4); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
case 3: return TupleType::template get<3>(); | et<1>(); | |||
case 4: return TupleType::template get<4>(); | case 2: return TupleType::template g | |||
default: throw RangeException(); | et<2>(); | |||
} | case 3: return TupleType::template g | |||
} | et<3>(); | |||
} | case 4: return TupleType::template g | |||
et<4>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D", | const std::string& n3 = "D", | |||
const std::string& n4 = "E") | const std::string& n4 = "E") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
_pNames->push_back(n4); | _pNames->push_back(n4); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2, | class T2, | |||
class T3> | class T3> | |||
struct NamedTuple<T0,T1,T2,T3,NullTypeList>: | struct NamedTuple<T0,T1,T2,T3,NullTypeList>: | |||
public Tuple<T0,T1,T2,T3> | public Tuple<T0,T1,T2,T3> | |||
{ | { | |||
typedef Tuple<T0,T1,T2,T3> TupleType; | typedef Tuple<T0,T1,T2,T3> TupleType; | |||
typedef typename Tuple<T0,T1,T2,T3>::Type Type; | typedef typename Tuple<T0,T1,T2,T3>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(): _pNames(0) | _pNames = rNames; | |||
{ | } | |||
init(); | ||||
} | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
NamedTuple(const NameVecPtr& rNames) | EFAULTVALUE(T1), | |||
{ | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
if (rNames->size() != TupleType::length) | EFAULTVALUE(T2), | |||
throw InvalidArgumentException("Wrong names vector length."); | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T3)): | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2), | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T3)): | ||||
TupleType(t0,t1,t2,t3), | TupleType(t0,t1,t2,t3), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2), | EFAULTVALUE(T2), | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | |||
ALUE(T3)): | EFAULTVALUE(T3)): | |||
TupleType(t0,t1,t2,t3) | TupleType(t0,t1,t2,t3) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | ||||
typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
const std::string& n1 = "B", | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1), | ||||
const std::string& n2 = "C", | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T2), | ||||
const std::string& n3 = "D", | ||||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T3)): | ||||
TupleType(t0,t1,t2,t3), _pNames(0) | ||||
{ | ||||
init(n0,n1,n2,n3); | ||||
} | ||||
const DynamicAny get(const std::string& name) const | ||||
{ | ||||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
NamedTuple(const std::string& n0, | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | { | |||
const std::string& n1 = "B", | if (name == *it) | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | { | |||
ALUE(T1), | switch (counter) | |||
const std::string& n2 = "C", | { | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | case 0: return TupleType::template g | |||
ALUE(T2), | et<0>(); | |||
const std::string& n3 = "D", | case 1: return TupleType::template g | |||
typename TypeWrapper<T3>::CONSTTYPE& t3 = POCO_TYPEWRAPPER_DEFAULTV | et<1>(); | |||
ALUE(T3)): | case 2: return TupleType::template g | |||
TupleType(t0,t1,t2,t3), _pNames(0) | et<2>(); | |||
{ | case 3: return TupleType::template g | |||
init(n0,n1,n2,n3); | et<3>(); | |||
} | default: throw RangeException(); | |||
} | ||||
const DynamicAny get(const std::string& name) const | } | |||
{ | } | |||
NameVec::const_iterator it = _pNames->begin(); | ||||
NameVec::const_iterator itEnd = _pNames->end(); | ||||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | ||||
{ | ||||
if (name == *it) | ||||
{ | ||||
switch (counter) | ||||
{ | ||||
case 0: return TupleType::template get<0>(); | ||||
case 1: return TupleType::template get<1>(); | ||||
case 2: return TupleType::template get<2>(); | ||||
case 3: return TupleType::template get<3>(); | ||||
default: throw RangeException(); | ||||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
return get(name); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
const std::string& n3 = "D") | const std::string& n3 = "D") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
_pNames->push_back(n3); | _pNames->push_back(n3); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1, | class T1, | |||
class T2> | class T2> | |||
struct NamedTuple<T0,T1,T2,NullTypeList>: | struct NamedTuple<T0,T1,T2,NullTypeList>: | |||
public Tuple<T0,T1,T2> | public Tuple<T0,T1,T2> | |||
{ | { | |||
typedef Tuple<T0,T1,T2> TupleType; | typedef Tuple<T0,T1,T2> TupleType; | |||
typedef typename Tuple<T0,T1,T2>::Type Type; | typedef typename Tuple<T0,T1,T2>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | ||||
{ | ||||
init(); | ||||
} | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(): _pNames(0) | NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
{ | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
init(); | EFAULTVALUE(T1), | |||
} | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
EFAULTVALUE(T2)): | ||||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | ||||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T1), | ||||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | ||||
ALUE(T2)): | ||||
TupleType(t0,t1,t2), | TupleType(t0,t1,t2), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2)): | EFAULTVALUE(T2)): | |||
TupleType(t0,t1,t2) | TupleType(t0,t1,t2) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1), | EFAULTVALUE(T1), | |||
const std::string& n2 = "C", | const std::string& n2 = "C", | |||
typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T2>::CONSTTYPE& t2 = POCO_TYPEWRAPPER_D | |||
ALUE(T2)): | EFAULTVALUE(T2)): | |||
TupleType(t0,t1,t2), | TupleType(t0,t1,t2), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1,n2); | init(n0,n1,n2); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
case 2: return TupleType::template get<2>(); | case 1: return TupleType::template g | |||
default: throw RangeException(); | et<1>(); | |||
} | case 2: return TupleType::template g | |||
} | et<2>(); | |||
} | default: throw RangeException(); | |||
} | ||||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | const NameVecPtr& names() | |||
{ | { | |||
return get(name); | return _pNames; | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | void setName(std::size_t index, const std::string& name) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
const std::string& n2 = "C") | const std::string& n2 = "C") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
_pNames->push_back(n2); | _pNames->push_back(n2); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0, | template<class T0, | |||
class T1> | class T1> | |||
struct NamedTuple<T0,T1,NullTypeList>: | struct NamedTuple<T0,T1,NullTypeList>: | |||
public Tuple<T0,T1> | public Tuple<T0,T1> | |||
{ | { | |||
typedef Tuple<T0,T1> TupleType; | typedef Tuple<T0,T1> TupleType; | |||
typedef typename Tuple<T0,T1>::Type Type; | typedef typename Tuple<T0,T1>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | NamedTuple(): _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | NamedTuple(const NameVecPtr& rNames) | |||
} | { | |||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | _pNames = rNames; | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | } | |||
ALUE(T1)): | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0, | ||||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | ||||
EFAULTVALUE(T1)): | ||||
TupleType(t0,t1), | TupleType(t0,t1), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1)): | EFAULTVALUE(T1)): | |||
TupleType(t0,t1) | TupleType(t0,t1) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, | NamedTuple(const std::string& n0, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0, | typename TypeWrapper<T0>::CONSTTYPE& t0, | |||
const std::string& n1 = "B", | const std::string& n1 = "B", | |||
typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_DEFAULTV | typename TypeWrapper<T1>::CONSTTYPE& t1 = POCO_TYPEWRAPPER_D | |||
ALUE(T1)): | EFAULTVALUE(T1)): | |||
TupleType(t0,t1), | TupleType(t0,t1), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0,n1); | init(n0,n1); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
case 1: return TupleType::template get<1>(); | et<0>(); | |||
default: throw RangeException(); | case 1: return TupleType::template g | |||
} | et<1>(); | |||
} | default: throw RangeException(); | |||
} | } | |||
} | ||||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | const DynamicAny operator [] (const std::string& name) const | |||
{ | { | |||
return get(name); | return get(name); | |||
} | } | |||
template<int N> | template<int N> | |||
typename TypeGetter<N, Type>::ConstHeadType& get() const | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
{ | { | |||
return TupleType::template get<N>(); | return TupleType::template get<N>(); | |||
} | } | |||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A", | void init(const std::string& n0 = "A", | |||
const std::string& n1 = "B") | const std::string& n1 = "B") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
_pNames->push_back(n1); | _pNames->push_back(n1); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
template<class T0> | template<class T0> | |||
struct NamedTuple<T0,NullTypeList>: | struct NamedTuple<T0,NullTypeList>: | |||
public Tuple<T0> | public Tuple<T0> | |||
{ | { | |||
typedef Tuple<T0> TupleType; | typedef Tuple<T0> TupleType; | |||
typedef typename Tuple<T0>::Type Type; | typedef typename Tuple<T0>::Type Type; | |||
typedef std::vector<std::string> NameVec; | typedef std::vector<std::string> NameVec; | |||
typedef SharedPtr<NameVec> NameVecPtr; | typedef SharedPtr<NameVec> NameVecPtr; | |||
NamedTuple(): _pNames(0) | NamedTuple(): _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames) | ||||
{ | ||||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector length."); | ||||
_pNames = rNames; | NamedTuple(const NameVecPtr& rNames) | |||
} | { | |||
if (rNames->size() != TupleType::length) | ||||
throw InvalidArgumentException("Wrong names vector l | ||||
ength."); | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0): | _pNames = rNames; | |||
} | ||||
NamedTuple(typename TypeWrapper<T0>::CONSTTYPE& t0): | ||||
TupleType(t0), | TupleType(t0), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(); | init(); | |||
} | } | |||
NamedTuple(const NameVecPtr& rNames, | NamedTuple(const NameVecPtr& rNames, | |||
typename TypeWrapper<T0>::CONSTTYPE& t0): | typename TypeWrapper<T0>::CONSTTYPE& t0): | |||
TupleType(t0) | TupleType(t0) | |||
{ | { | |||
if (rNames->size() != TupleType::length) | if (rNames->size() != TupleType::length) | |||
throw InvalidArgumentException("Wrong names vector length."); | throw InvalidArgumentException("Wrong names vector l ength."); | |||
_pNames = rNames; | _pNames = rNames; | |||
} | } | |||
NamedTuple(const std::string& n0, typename TypeWrapper<T0>::CONSTTYPE& t0): | NamedTuple(const std::string& n0, typename TypeWrapper<T0>::CONSTTYP E& t0): | |||
TupleType(t0), | TupleType(t0), | |||
_pNames(0) | _pNames(0) | |||
{ | { | |||
init(n0); | init(n0); | |||
} | } | |||
const DynamicAny get(const std::string& name) const | const DynamicAny get(const std::string& name) const | |||
{ | { | |||
NameVec::const_iterator it = _pNames->begin(); | NameVec::const_iterator it = _pNames->begin(); | |||
NameVec::const_iterator itEnd = _pNames->end(); | NameVec::const_iterator itEnd = _pNames->end(); | |||
for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | for(std::size_t counter = 0; it != itEnd; ++it, ++counter) | |||
{ | { | |||
if (name == *it) | if (name == *it) | |||
{ | { | |||
switch (counter) | switch (counter) | |||
{ | { | |||
case 0: return TupleType::template get<0>(); | case 0: return TupleType::template g | |||
default: throw RangeException(); | et<0>(); | |||
} | default: throw RangeException(); | |||
} | } | |||
} | } | |||
} | ||||
throw NotFoundException("Name not found: " + name); | throw NotFoundException("Name not found: " + name); | |||
} | } | |||
const DynamicAny operator [] (const std::string& name) const | ||||
{ | ||||
return get(name); | ||||
} | ||||
const DynamicAny operator [] (const std::string& name) const | template<int N> | |||
{ | typename TypeGetter<N, Type>::ConstHeadType& get() const | |||
return get(name); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::ConstHeadType& get() const | template<int N> | |||
{ | typename TypeGetter<N, Type>::HeadType& get() | |||
return TupleType::template get<N>(); | { | |||
} | return TupleType::template get<N>(); | |||
} | ||||
template<int N> | ||||
typename TypeGetter<N, Type>::HeadType& get() | ||||
{ | ||||
return TupleType::template get<N>(); | ||||
} | ||||
template<int N> | ||||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | template<int N> | |||
void set(typename TypeGetter<N, Type>::ConstHeadType& val) | ||||
{ | ||||
return TupleType::template set<N>(val); | ||||
} | ||||
const NameVecPtr& names() | ||||
{ | ||||
return _pNames; | ||||
} | ||||
void setName(std::size_t index, const std::string& name) | ||||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
(*_pNames)[index] = name; | (*_pNames)[index] = name; | |||
} | } | |||
const std::string& getName(std::size_t index) | const std::string& getName(std::size_t index) | |||
{ | { | |||
if (index >= _pNames->size()) | if (index >= _pNames->size()) | |||
throw InvalidArgumentException(format("Invalid index : %z", index)); | throw InvalidArgumentException(format("Invalid index : %z", index)); | |||
return (*_pNames)[index]; | return (*_pNames)[index]; | |||
} | } | |||
bool operator == (const NamedTuple& other) const | bool operator == (const NamedTuple& other) const | |||
{ | { | |||
return TupleType(*this) == TupleType(other) && _pNames == other._pN | return TupleType(*this) == TupleType(other) && _pNames == ot | |||
ames; | her._pNames; | |||
} | } | |||
bool operator != (const NamedTuple& other) const | bool operator != (const NamedTuple& other) const | |||
{ | { | |||
return !(*this == other); | return !(*this == other); | |||
} | } | |||
bool operator < (const NamedTuple& other) const | bool operator < (const NamedTuple& other) const | |||
{ | { | |||
TupleType th(*this); | TupleType th(*this); | |||
TupleType oth(other); | TupleType oth(other); | |||
return (th < oth && _pNames == other._pNames) || | return (th < oth && _pNames == other._pNames) || | |||
(th == oth && _pNames < other._pNames) || | (th == oth && _pNames < other._pNames) || | |||
(th < oth && _pNames < other._pNames); | (th < oth && _pNames < other._pNames); | |||
} | } | |||
private: | private: | |||
void init(const std::string& n0 = "A") | void init(const std::string& n0 = "A") | |||
{ | { | |||
if (!_pNames) | if (!_pNames) | |||
{ | { | |||
_pNames = new NameVec; | _pNames = new NameVec; | |||
_pNames->push_back(n0); | _pNames->push_back(n0); | |||
} | } | |||
} | } | |||
NameVecPtr _pNames; | NameVecPtr _pNames; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Tuple_INCLUDED | #endif // Foundation_Tuple_INCLUDED | |||
End of changes. 313 change blocks. | ||||
4148 lines changed or deleted | 4297 lines changed or added | |||
NamespaceStrategy.h | NamespaceStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: NamespaceStrategy | // Module: NamespaceStrategy | |||
// | // | |||
// Definition of the NamespaceStrategy class. | // Definition of the NamespaceStrategy class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_NamespaceStrategy_INCLUDED | #ifndef XML_NamespaceStrategy_INCLUDED | |||
#define XML_NamespaceStrategy_INCLUDED | #define XML_NamespaceStrategy_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/SAX/NamespaceSupport.h" | #include "Poco/SAX/NamespaceSupport.h" | |||
#include "Poco/SAX/AttributesImpl.h" | #include "Poco/SAX/AttributesImpl.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NamespaceSupport.h | NamespaceSupport.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// Namespace support for SAX2. | // Namespace support for SAX2. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_NamespaceSupport_INCLUDED | #ifndef SAX_NamespaceSupport_INCLUDED | |||
#define SAX_NamespaceSupport_INCLUDED | #define SAX_NamespaceSupport_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include <set> | #include <set> | |||
#include <map> | #include <map> | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NestedDiagnosticContext.h | NestedDiagnosticContext.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: NestedDiagnosticContext | // Module: NestedDiagnosticContext | |||
// | // | |||
// Definition of the NestedDiagnosticContext class. | // Definition of the NestedDiagnosticContext class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NestedDiagnosticContext_INCLUDED | #ifndef Foundation_NestedDiagnosticContext_INCLUDED | |||
#define Foundation_NestedDiagnosticContext_INCLUDED | #define Foundation_NestedDiagnosticContext_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 164 | skipping to change at line 144 | |||
NestedDiagnosticContext::current().push(info); | NestedDiagnosticContext::current().push(info); | |||
} | } | |||
inline NDCScope::NDCScope(const std::string& info, int line, const char* fi lename) | inline NDCScope::NDCScope(const std::string& info, int line, const char* fi lename) | |||
{ | { | |||
NestedDiagnosticContext::current().push(info, line, filename); | NestedDiagnosticContext::current().push(info, line, filename); | |||
} | } | |||
inline NDCScope::~NDCScope() | inline NDCScope::~NDCScope() | |||
{ | { | |||
NestedDiagnosticContext::current().pop(); | try | |||
{ | ||||
NestedDiagnosticContext::current().pop(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
// | // | |||
// helper macros | // helper macros | |||
// | // | |||
#define poco_ndc(func) \ | #define poco_ndc(func) \ | |||
Poco::NDCScope _theNdcScope(#func, __LINE__, __FILE__) | Poco::NDCScope _theNdcScope(#func, __LINE__, __FILE__) | |||
#if defined(_DEBUG) | #if defined(_DEBUG) | |||
#define poco_ndc_dbg(func) \ | #define poco_ndc_dbg(func) \ | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 9 lines changed or added | |||
Net.h | Net.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// Package: NetCore | // Package: NetCore | |||
// Module: Net | // Module: Net | |||
// | // | |||
// Basic definitions for the Poco Net library. | // Basic definitions for the Poco Net library. | |||
// This file must be the first file included by every other Net | // This file must be the first file included by every other Net | |||
// header file. | // header file. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_Net_INCLUDED | #ifndef Net_Net_INCLUDED | |||
#define Net_Net_INCLUDED | #define Net_Net_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
// | // | |||
// The following block is the standard way of creating macros which make ex porting | // The following block is the standard way of creating macros which make ex porting | |||
// from a DLL simpler. All files within this DLL are compiled with the Net_ EXPORTS | // from a DLL simpler. All files within this DLL are compiled with the Net_ EXPORTS | |||
skipping to change at line 62 | skipping to change at line 42 | |||
// | // | |||
#if defined(_WIN32) && defined(POCO_DLL) | #if defined(_WIN32) && defined(POCO_DLL) | |||
#if defined(Net_EXPORTS) | #if defined(Net_EXPORTS) | |||
#define Net_API __declspec(dllexport) | #define Net_API __declspec(dllexport) | |||
#else | #else | |||
#define Net_API __declspec(dllimport) | #define Net_API __declspec(dllimport) | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined(Net_API) | #if !defined(Net_API) | |||
#define Net_API | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__ | |||
GNUC__ >= 4) | ||||
#define Net_API __attribute__ ((visibility ("default"))) | ||||
#else | ||||
#define Net_API | ||||
#endif | ||||
#endif | #endif | |||
// | // | |||
// Automatically link Net library. | // Automatically link Net library. | |||
// | // | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Net_EXPORTS) | #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Net_EXPORTS) | |||
#pragma comment(lib, "PocoNet" POCO_LIB_SUFFIX) | #pragma comment(lib, "PocoNet" POCO_LIB_SUFFIX) | |||
#endif | #endif | |||
#endif | #endif | |||
// Default to enabled IPv6 support if not explicitly disabled | ||||
#if !defined(POCO_NET_NO_IPv6) && !defined (POCO_HAVE_IPv6) | ||||
#define POCO_HAVE_IPv6 | ||||
#elif defined(POCO_NET_NO_IPv6) && defined (POCO_HAVE_IPv6) | ||||
#undef POCO_HAVE_IPv6 | ||||
#endif // POCO_NET_NO_IPv6, POCO_HAVE_IPv6 | ||||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
void Net_API initializeNetwork(); | void Net_API initializeNetwork(); | |||
/// Initialize the network subsystem. | /// Initialize the network subsystem. | |||
/// Calls WSAStartup() on Windows, does nothing | /// (Windows only, no-op elsewhere) | |||
/// on other platforms. | ||||
void Net_API uninitializeNetwork(); | void Net_API uninitializeNetwork(); | |||
/// Uninitialize the network subsystem. | /// Uninitialize the network subsystem. | |||
/// Calls WSACleanup() on Windows, does nothing | /// (Windows only, no-op elsewhere) | |||
/// on other platforms. | ||||
} } // namespace Poco::Net | }} // namespace Poco::Net | |||
// Default to enabled IPv6 support if not explicitly disabled | // | |||
#if !defined(POCO_NET_NO_IPv6) && !defined (POCO_HAVE_IPv6) | // Automate network initialization (only relevant on Windows). | |||
#define POCO_HAVE_IPv6 | // | |||
#elif defined(POCO_NET_NO_IPv6) && defined (POCO_HAVE_IPv6) | ||||
#undef POCO_HAVE_IPv6 | ||||
#endif // POCO_NET_NO_IPv6, POCO_HAVE_IPv6 | ||||
#if !defined(s6_addr16) | #if defined(POCO_OS_FAMILY_WINDOWS) && !defined(POCO_NO_AUTOMATIC_LIB_INIT) | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | && !defined(__GNUC__) | |||
#define s6_addr16 u.Word | ||||
#else | extern "C" const struct Net_API NetworkInitializer pocoNetworkInitializer; | |||
#define s6_addr16 __u6_addr.__u6_addr16 | ||||
#endif | ||||
#endif | ||||
#if !defined(s6_addr32) | #if defined(Net_EXPORTS) | |||
#if defined(POCO_OS_FAMILY_UNIX) | #if defined(_WIN64) || defined(_WIN32_WCE) | |||
#if (POCO_OS == POCO_OS_SOLARIS) | #define POCO_NET_FORCE_SYMBOL(s) __pragma(comment (linker, " | |||
#define s6_addr32 _S6_un._S6_u32 | /export:"#s)) | |||
#else | #elif defined(_WIN32) | |||
#define s6_addr32 __u6_addr.__u6_addr32 | #define POCO_NET_FORCE_SYMBOL(s) __pragma(comment (linker, " | |||
#endif | /export:_"#s)) | |||
#endif | #endif | |||
#else // !Net_EXPORTS | ||||
#if defined(_WIN64) || defined(_WIN32_WCE) | ||||
#define POCO_NET_FORCE_SYMBOL(s) __pragma(comment (linker, " | ||||
/include:"#s)) | ||||
#elif defined(_WIN32) | ||||
#define POCO_NET_FORCE_SYMBOL(s) __pragma(comment (linker, " | ||||
/include:_"#s)) | ||||
#endif | ||||
#endif // Net_EXPORTS | ||||
POCO_NET_FORCE_SYMBOL(pocoNetworkInitializer) | ||||
#endif // POCO_OS_FAMILY_WINDOWS | ||||
// | ||||
// Define POCO_NET_HAS_INTERFACE for platforms that have network interface | ||||
detection implemented. | ||||
// | ||||
#if defined(POCO_OS_FAMILY_WINDOWS) || (POCO_OS == POCO_OS_LINUX) || define | ||||
d(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_O | ||||
S_QNX) | ||||
#define POCO_NET_HAS_INTERFACE | ||||
#endif | #endif | |||
#endif // Net_Net_INCLUDED | #endif // Net_Net_INCLUDED | |||
End of changes. 10 change blocks. | ||||
58 lines changed or deleted | 53 lines changed or added | |||
NetException.h | NetException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: NetException | // Module: NetException | |||
// | // | |||
// Definition of the NetException class. | // Definition of the NetException class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_NetException_INCLUDED | #ifndef Net_NetException_INCLUDED | |||
#define Net_NetException_INCLUDED | #define Net_NetException_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 68 | skipping to change at line 48 | |||
POCO_DECLARE_EXCEPTION(Net_API, NoMessageException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, NoMessageException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, MessageException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, MessageException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, MultipartException, MessageException) | POCO_DECLARE_EXCEPTION(Net_API, MultipartException, MessageException) | |||
POCO_DECLARE_EXCEPTION(Net_API, HTTPException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, HTTPException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, NotAuthenticatedException, HTTPException) | POCO_DECLARE_EXCEPTION(Net_API, NotAuthenticatedException, HTTPException) | |||
POCO_DECLARE_EXCEPTION(Net_API, UnsupportedRedirectException, HTTPException ) | POCO_DECLARE_EXCEPTION(Net_API, UnsupportedRedirectException, HTTPException ) | |||
POCO_DECLARE_EXCEPTION(Net_API, FTPException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, FTPException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, SMTPException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, SMTPException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, POP3Exception, NetException) | POCO_DECLARE_EXCEPTION(Net_API, POP3Exception, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, ICMPException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, ICMPException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, NTPException, NetException) | ||||
POCO_DECLARE_EXCEPTION(Net_API, HTMLFormException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, HTMLFormException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, WebSocketException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, WebSocketException, NetException) | |||
POCO_DECLARE_EXCEPTION(Net_API, UnsupportedFamilyException, NetException) | POCO_DECLARE_EXCEPTION(Net_API, UnsupportedFamilyException, NetException) | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_NetException_INCLUDED | #endif // Net_NetException_INCLUDED | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 2 lines changed or added | |||
NetworkInterface.h | NetworkInterface.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: NetworkInterface | // Module: NetworkInterface | |||
// | // | |||
// Definition of the NetworkInterface class. | // Definition of the NetworkInterface class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_NetworkInterface_INCLUDED | #ifndef Net_NetworkInterface_INCLUDED | |||
#define Net_NetworkInterface_INCLUDED | #define Net_NetworkInterface_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#ifdef POCO_NET_HAS_INTERFACE | ||||
#include "Poco/Net/IPAddress.h" | #include "Poco/Net/IPAddress.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Tuple.h" | #include "Poco/Tuple.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class NetworkInterfaceImpl; | class NetworkInterfaceImpl; | |||
class Net_API NetworkInterface | class Net_API NetworkInterface | |||
/// This class represents a network interface. | /// This class represents a network interface. | |||
/// | /// | |||
/// NetworkInterface is used with MulticastSocket to specify | /// NetworkInterface is used with MulticastSocket to specify | |||
/// multicast interfaces for sending and receiving multicast | /// multicast interfaces for sending and receiving multicast | |||
/// messages. | /// messages. | |||
/// | /// | |||
/// The class also provides static member functions for | /// The class also provides static member functions for | |||
/// enumerating or searching network interfaces and their | /// enumerating or searching network interfaces and their | |||
/// respective configuration values. | /// respective configuration values. | |||
/// | ||||
/// On Windows, detection capabilities vary depending on the | ||||
/// OS version/service pack. Although the best effort is made | ||||
/// not to attempt access to non-existent features through a | ||||
/// combination of compile/runtime checks, when running binaries | ||||
/// compiled on a newer version of the OS on an older one | ||||
/// problems may occur; if possible, it is best to run | ||||
/// binaries on the OS version where they were compiled. | ||||
/// This particularly applies to OS versions older than Vista | ||||
/// and XP. | ||||
{ | { | |||
public: | public: | |||
typedef std::vector<NetworkInterface> List; | typedef std::vector<NetworkInterface> List; | |||
typedef List NetworkInterfac eList;//@deprecated | typedef List NetworkInterfac eList;//@deprecated | |||
typedef std::map<unsigned, NetworkInterface> Map; | typedef std::map<unsigned, NetworkInterface> Map; | |||
typedef Poco::Tuple<IPAddress, IPAddress, IPAddress> AddressTuple; | typedef Poco::Tuple<IPAddress, IPAddress, IPAddress> AddressTuple; | |||
typedef std::vector<AddressTuple> AddressList; | typedef std::vector<AddressTuple> AddressList; | |||
typedef AddressList::iterator AddressIterator ; | typedef AddressList::iterator AddressIterator ; | |||
typedef AddressList::const_iterator ConstAddressIte rator; | typedef AddressList::const_iterator ConstAddressIte rator; | |||
typedef std::vector<unsigned char> MACAddress; | typedef std::vector<unsigned char> MACAddress; | |||
skipping to change at line 148 | skipping to change at line 141 | |||
const std::string& displayName() const; | const std::string& displayName() const; | |||
/// Returns the interface display name. | /// Returns the interface display name. | |||
/// | /// | |||
/// On Windows platforms, this is currently the network adap ter | /// On Windows platforms, this is currently the network adap ter | |||
/// name. This may change to the "friendly name" of the netw ork | /// name. This may change to the "friendly name" of the netw ork | |||
/// connection in a future version, however. | /// connection in a future version, however. | |||
/// | /// | |||
/// On other platforms this is the same as name(). | /// On other platforms this is the same as name(). | |||
const std::string& adapterName() const; | ||||
/// Returns the interface adapter name. | ||||
/// | ||||
/// On Windows platforms, this is the network adapter LUID. | ||||
/// The adapter name is used by some Windows Net APIs like D | ||||
hcp. | ||||
/// | ||||
/// On other platforms this is the same as name(). | ||||
const IPAddress& firstAddress(IPAddress::Family family) const; | const IPAddress& firstAddress(IPAddress::Family family) const; | |||
/// Returns the first IP address bound to the interface. | /// Returns the first IP address bound to the interface. | |||
/// Throws NotFoundException if the address family is not | ||||
/// configured on the interface. | ||||
void firstAddress(IPAddress& addr, IPAddress::Family family = IPAddr | ||||
ess::IPv4) const; | ||||
/// Returns the first IP address bound to the interface. | ||||
/// If the address family is not configured on the interface | ||||
, | ||||
/// the address returned in addr will be unspecified (wildca | ||||
rd). | ||||
const IPAddress& address(unsigned index = 0) const; | const IPAddress& address(unsigned index = 0) const; | |||
/// Returns the IP address bound to the interface at index p osition. | /// Returns the IP address bound to the interface at index p osition. | |||
void addAddress(const IPAddress& address); | void addAddress(const IPAddress& address); | |||
/// Adds address to the interface. | /// Adds address to the interface. | |||
void addAddress(const IPAddress& address, const IPAddress& subnetMas k, const IPAddress& broadcastAddress); | void addAddress(const IPAddress& address, const IPAddress& subnetMas k, const IPAddress& broadcastAddress); | |||
/// Adds address to the interface. | /// Adds address to the interface. | |||
const AddressList& addressList() const; | const AddressList& addressList() const; | |||
/// Returns the list of IP addresses bound to the interface. | /// Returns the list of IP addresses bound to the interface. | |||
const IPAddress& subnetMask(unsigned index) const; | const IPAddress& subnetMask(unsigned index = 0) const; | |||
/// Returns the subnet mask for this network interface. | /// Returns the subnet mask for this network interface. | |||
const IPAddress& broadcastAddress(unsigned index) const; | const IPAddress& broadcastAddress(unsigned index = 0) const; | |||
/// Returns the broadcast address for this network interface . | /// Returns the broadcast address for this network interface . | |||
const IPAddress& destAddress(unsigned index) const; | const IPAddress& destAddress(unsigned index = 0) const; | |||
/// Returns the IPv4 point-to-point destiation address for t his network interface. | /// Returns the IPv4 point-to-point destiation address for t his network interface. | |||
const MACAddress& macAddress() const; | const MACAddress& macAddress() const; | |||
/// Returns MAC (Media Access Control) address for the inter face. | /// Returns MAC (Media Access Control) address for the inter face. | |||
unsigned mtu() const; | unsigned mtu() const; | |||
/// Returns the MTU for this interface. | /// Returns the MTU for this interface. | |||
NetworkInterface::Type type() const; | NetworkInterface::Type type() const; | |||
/// returns the MIB IfType of the interface. | /// returns the MIB IfType of the interface. | |||
skipping to change at line 232 | skipping to change at line 240 | |||
/// or whether the caller does not care (IPv4_OR_IPv6). | /// or whether the caller does not care (IPv4_OR_IPv6). | |||
static NetworkInterface forAddress(const IPAddress& address); | static NetworkInterface forAddress(const IPAddress& address); | |||
/// Returns the NetworkInterface for the given IP address. | /// Returns the NetworkInterface for the given IP address. | |||
/// | /// | |||
/// Throws an InterfaceNotFoundException if an interface | /// Throws an InterfaceNotFoundException if an interface | |||
/// with the give address does not exist. | /// with the give address does not exist. | |||
static NetworkInterface forIndex(unsigned index); | static NetworkInterface forIndex(unsigned index); | |||
/// Returns the NetworkInterface for the given interface ind ex. | /// Returns the NetworkInterface for the given interface ind ex. | |||
/// If an index of 0 is specified, a NetworkInterface instan | ||||
ce | ||||
/// representing the default interface (empty name and | ||||
/// wildcard address) is returned. | ||||
/// | /// | |||
/// Throws an InterfaceNotFoundException if an interface | /// Throws an InterfaceNotFoundException if an interface | |||
/// with the given index does not exist (or IPv6 is not | /// with the given index does not exist (or IPv6 is not | |||
/// available). | /// available). | |||
static List list(bool ipOnly = true, bool upOnly = true); | static List list(bool ipOnly = true, bool upOnly = true); | |||
/// Returns a list with all network interfaces | /// Returns a list with all network interfaces | |||
/// on the system. | /// on the system. | |||
/// | /// | |||
/// If ipOnly is true, only interfaces supporting IP | /// If ipOnly is true, only interfaces supporting IP | |||
skipping to change at line 271 | skipping to change at line 276 | |||
/// are returned. | /// are returned. | |||
/// | /// | |||
/// If upOnly is true, only interfaces being up are returned . | /// If upOnly is true, only interfaces being up are returned . | |||
/// Otherwise, both interfaces being up and down are returne d. | /// Otherwise, both interfaces being up and down are returne d. | |||
/// | /// | |||
/// If there are multiple addresses bound to one interface, | /// If there are multiple addresses bound to one interface, | |||
/// they are contained within the NetworkInterface (second) | /// they are contained within the NetworkInterface (second) | |||
/// member of the pair. | /// member of the pair. | |||
protected: | protected: | |||
NetworkInterface(const std::string& name, const std::string& display Name, const IPAddress& address, unsigned index); | NetworkInterface(const std::string& name, const std::string& display Name, const std::string& adapterName, const IPAddress& address, unsigned in dex, MACAddress* pMACAddress = 0); | |||
/// Creates the NetworkInterface. | /// Creates the NetworkInterface. | |||
NetworkInterface(const std::string& name, const std::string& display Name, unsigned index); | NetworkInterface(const std::string& name, const std::string& display Name, const std::string& adapterName, unsigned index, MACAddress* pMACAddre ss = 0); | |||
/// Creates the NetworkInterface. | /// Creates the NetworkInterface. | |||
NetworkInterface(const std::string& name, const IPAddress& address, unsigned index); | NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress = 0); | |||
/// Creates the NetworkInterface. | /// Creates the NetworkInterface. | |||
NetworkInterface(const std::string& name, const std::string& display | NetworkInterface(const std::string& name, | |||
Name, const IPAddress& address, const IPAddress& subnetMask, const IPAddres | const std::string& displayName, | |||
s& broadcastAddress, unsigned index); | const std::string& adapterName, | |||
const IPAddress& address, | ||||
const IPAddress& subnetMask, | ||||
const IPAddress& broadcastAddress, | ||||
unsigned index, | ||||
MACAddress* pMACAddress = 0); | ||||
/// Creates the NetworkInterface. | /// Creates the NetworkInterface. | |||
NetworkInterface(const std::string& name, const IPAddress& address, | NetworkInterface(const std::string& name, | |||
const IPAddress& subnetMask, const IPAddress& broadcastAddress, unsigned in | const IPAddress& address, | |||
dex); | const IPAddress& subnetMask, | |||
const IPAddress& broadcastAddress, | ||||
unsigned index, | ||||
MACAddress* pMACAddress = 0); | ||||
/// Creates the NetworkInterface. | /// Creates the NetworkInterface. | |||
IPAddress interfaceNameToAddress(const std::string& interfaceName) c onst; | IPAddress interfaceNameToAddress(const std::string& interfaceName) c onst; | |||
/// Determines the IPAddress bound to the interface with the given name. | /// Determines the IPAddress bound to the interface with the given name. | |||
unsigned interfaceNameToIndex(const std::string& interfaceName) cons t; | unsigned interfaceNameToIndex(const std::string& interfaceName) cons t; | |||
/// Determines the interface index of the interface with the given name. | /// Determines the interface index of the interface with the given name. | |||
NetworkInterfaceImpl& impl() { return *_pImpl; }; | NetworkInterfaceImpl& impl() { return *_pImpl; }; | |||
skipping to change at line 318 | skipping to change at line 335 | |||
inline bool NetworkInterface::operator == (const NetworkInterface& other) c onst | inline bool NetworkInterface::operator == (const NetworkInterface& other) c onst | |||
{ | { | |||
return this->index() == other.index(); | return this->index() == other.index(); | |||
} | } | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
Net_API std::ostream& operator<<(std::ostream& os, const Poco::Net::Network Interface::MACAddress& mac); | Net_API std::ostream& operator<<(std::ostream& os, const Poco::Net::Network Interface::MACAddress& mac); | |||
#endif // POCO_NET_HAS_INTERFACE | ||||
#endif // Net_NetworkInterface_INCLUDED | #endif // Net_NetworkInterface_INCLUDED | |||
End of changes. 15 change blocks. | ||||
48 lines changed or deleted | 55 lines changed or added | |||
Node.h | Node.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Node interface. | // Definition of the DOM Node interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Node_INCLUDED | #ifndef DOM_Node_INCLUDED | |||
#define DOM_Node_INCLUDED | #define DOM_Node_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/EventTarget.h" | #include "Poco/DOM/EventTarget.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
#include "Poco/SAX/NamespaceSupport.h" | #include "Poco/SAX/NamespaceSupport.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NodeAppender.h | NodeAppender.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: NodeAppender | // Module: NodeAppender | |||
// | // | |||
// Definition of the NodeAppender class. | // Definition of the NodeAppender class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_NodeAppender_INCLUDED | #ifndef DOM_NodeAppender_INCLUDED | |||
#define DOM_NodeAppender_INCLUDED | #define DOM_NodeAppender_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/Node.h" | #include "Poco/DOM/Node.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NodeFilter.h | NodeFilter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: NodeFilter | // Module: NodeFilter | |||
// | // | |||
// Definition of the DOM NodeFilter interface. | // Definition of the DOM NodeFilter interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_NodeFilter_INCLUDED | #ifndef DOM_NodeFilter_INCLUDED | |||
#define DOM_NodeFilter_INCLUDED | #define DOM_NodeFilter_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NodeIterator.h | NodeIterator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: NodeIterator | // Module: NodeIterator | |||
// | // | |||
// Definition of the DOM NodeIterator class. | // Definition of the DOM NodeIterator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_NodeIterator_INCLUDED | #ifndef DOM_NodeIterator_INCLUDED | |||
#define DOM_NodeIterator_INCLUDED | #define DOM_NodeIterator_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NodeList.h | NodeList.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM NodeList interface. | // Definition of the DOM NodeList interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_NodeList_INCLUDED | #ifndef DOM_NodeList_INCLUDED | |||
#define DOM_NodeList_INCLUDED | #define DOM_NodeList_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/DOMObject.h" | #include "Poco/DOM/DOMObject.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Notation.h | Notation.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Notation class. | // Definition of the DOM Notation class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Notation_INCLUDED | #ifndef DOM_Notation_INCLUDED | |||
#define DOM_Notation_INCLUDED | #define DOM_Notation_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Notification.h | Notification.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: Notification | // Module: Notification | |||
// | // | |||
// Definition of the Notification class. | // Definition of the Notification class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Notification_INCLUDED | #ifndef Foundation_Notification_INCLUDED | |||
#define Foundation_Notification_INCLUDED | #define Foundation_Notification_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NotificationCenter.h | NotificationCenter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: NotificationCenter | // Module: NotificationCenter | |||
// | // | |||
// Definition of the NotificationCenter class. | // Definition of the NotificationCenter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NotificationCenter_INCLUDED | #ifndef Foundation_NotificationCenter_INCLUDED | |||
#define Foundation_NotificationCenter_INCLUDED | #define Foundation_NotificationCenter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NotificationQueue.h | NotificationQueue.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: NotificationQueue | // Module: NotificationQueue | |||
// | // | |||
// Definition of the NotificationQueue class. | // Definition of the NotificationQueue class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NotificationQueue_INCLUDED | #ifndef Foundation_NotificationQueue_INCLUDED | |||
#define Foundation_NotificationQueue_INCLUDED | #define Foundation_NotificationQueue_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include <deque> | #include <deque> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NotificationStrategy.h | NotificationStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: NotificationStrategy | // Module: NotificationStrategy | |||
// | // | |||
// Definition of the NotificationStrategy interface. | // Definition of the NotificationStrategy interface. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NotificationStrategy_INCLUDED | #ifndef Foundation_NotificationStrategy_INCLUDED | |||
#define Foundation_NotificationStrategy_INCLUDED | #define Foundation_NotificationStrategy_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs, class TDelegate> | template <class TArgs, class TDelegate> | |||
class NotificationStrategy | class NotificationStrategy | |||
/// The interface that all notification strategies must implement. | /// The interface that all notification strategies must implement. | |||
/// | /// | |||
/// Note: Event is based on policy-driven design, so every strategy implementation | /// Note: Event is based on policy-driven design, so every strategy implementation | |||
/// must provide all the methods from this interface (otherwise: com pile errors) | /// must provide all the methods from this interface (otherwise: com pile errors) | |||
/// but does not need to inherit from NotificationStrategy. | /// but does not need to inherit from NotificationStrategy. | |||
{ | { | |||
public: | public: | |||
typedef TDelegate* DelegateHandle; | ||||
NotificationStrategy() | NotificationStrategy() | |||
{ | { | |||
} | } | |||
virtual ~NotificationStrategy() | virtual ~NotificationStrategy() | |||
{ | { | |||
} | } | |||
virtual void notify(const void* sender, TArgs& arguments) = 0; | virtual void notify(const void* sender, TArgs& arguments) = 0; | |||
/// Sends a notification to all registered delegates. | /// Sends a notification to all registered delegates. | |||
virtual void add(const TDelegate& delegate) = 0; | virtual DelegateHandle add(const TDelegate& delegate) = 0; | |||
/// Adds a delegate to the strategy. | ||||
virtual void remove(const TDelegate& delegate) = 0; | ||||
/// Removes a delegate from the strategy, if found. | ||||
/// Does nothing if the delegate has not been added. | ||||
virtual void remove(DelegateHandle delegateHandle) = 0; | ||||
/// Removes a delegate from the strategy, if found. | ||||
/// Does nothing if the delegate has not been added. | ||||
virtual void clear() = 0; | ||||
/// Removes all delegates from the strategy. | ||||
virtual bool empty() const = 0; | ||||
/// Returns false if the strategy contains at least one dele | ||||
gate. | ||||
}; | ||||
template <class TDelegate> | ||||
class NotificationStrategy<void, TDelegate> | ||||
/// The interface that all notification strategies must implement. | ||||
/// | ||||
/// Note: Event is based on policy-driven design, so every strategy | ||||
implementation | ||||
/// must provide all the methods from this interface (otherwise: com | ||||
pile errors) | ||||
/// but does not need to inherit from NotificationStrategy. | ||||
{ | ||||
public: | ||||
typedef TDelegate* DelegateHandle; | ||||
NotificationStrategy() | ||||
{ | ||||
} | ||||
virtual ~NotificationStrategy() | ||||
{ | ||||
} | ||||
virtual void notify(const void* sender) = 0; | ||||
/// Sends a notification to all registered delegates. | ||||
virtual DelegateHandle add(const TDelegate& delegate) = 0; | ||||
/// Adds a delegate to the strategy. | /// Adds a delegate to the strategy. | |||
virtual void remove(const TDelegate& delegate) = 0; | virtual void remove(const TDelegate& delegate) = 0; | |||
/// Removes a delegate from the strategy, if found. | /// Removes a delegate from the strategy, if found. | |||
/// Does nothing if the delegate has not been added. | /// Does nothing if the delegate has not been added. | |||
virtual void remove(DelegateHandle delegateHandle) = 0; | ||||
/// Removes a delegate from the strategy, if found. | ||||
/// Does nothing if the delegate has not been added. | ||||
virtual void clear() = 0; | virtual void clear() = 0; | |||
/// Removes all delegates from the strategy. | /// Removes all delegates from the strategy. | |||
virtual bool empty() const = 0; | virtual bool empty() const = 0; | |||
/// Returns false if the strategy contains at least one dele gate. | /// Returns false if the strategy contains at least one dele gate. | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_NotificationStrategy_INCLUDED | #endif // Foundation_NotificationStrategy_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 51 lines changed or added | |||
NullChannel.h | NullChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: NullChannel | // Module: NullChannel | |||
// | // | |||
// Definition of the NullChannel class. | // Definition of the NullChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NullChannel_INCLUDED | #ifndef Foundation_NullChannel_INCLUDED | |||
#define Foundation_NullChannel_INCLUDED | #define Foundation_NullChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NullPartHandler.h | NullPartHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: NullPartHandler | // Module: NullPartHandler | |||
// | // | |||
// Definition of the NullPartHandler class. | // Definition of the NullPartHandler class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_NullPartHandler_INCLUDED | #ifndef Net_NullPartHandler_INCLUDED | |||
#define Net_NullPartHandler_INCLUDED | #define Net_NullPartHandler_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/PartHandler.h" | #include "Poco/Net/PartHandler.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NullStream.h | NullStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: NullStream | // Module: NullStream | |||
// | // | |||
// Definition of the NullStreamBuf, NullInputStream and NullOutputStream cl asses. | // Definition of the NullStreamBuf, NullInputStream and NullOutputStream cl asses. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NullStream_INCLUDED | #ifndef Foundation_NullStream_INCLUDED | |||
#define Foundation_NullStream_INCLUDED | #define Foundation_NullStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Nullable.h | Nullable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Nullable | // Module: Nullable | |||
// | // | |||
// Definition of the Nullable template class. | // Definition of the Nullable template class. | |||
// | // | |||
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Nullable_INCLUDED | #ifndef Foundation_Nullable_INCLUDED | |||
#define Foundation_Nullable_INCLUDED | #define Foundation_Nullable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <algorithm> | #include <algorithm> | |||
#include <iostream> | #include <iostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
NumberFormatter.h | NumberFormatter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: NumberFormatter | // Module: NumberFormatter | |||
// | // | |||
// Definition of the NumberFormatter class. | // Definition of the NumberFormatter class. | |||
// | // | |||
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NumberFormatter_INCLUDED | #ifndef Foundation_NumberFormatter_INCLUDED | |||
#define Foundation_NumberFormatter_INCLUDED | #define Foundation_NumberFormatter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/NumericString.h" | ||||
namespace Poco { | namespace Poco { | |||
class Foundation_API NumberFormatter | class Foundation_API NumberFormatter | |||
/// The NumberFormatter class provides static methods | /// The NumberFormatter class provides static methods | |||
/// for formatting numeric values into strings. | /// for formatting numeric values into strings. | |||
/// | /// | |||
/// There are two kind of static member functions: | /// There are two kind of static member functions: | |||
/// * format* functions return a std::string containing | /// * format* functions return a std::string containing | |||
/// the formatted value. | /// the formatted value. | |||
/// * append* functions append the formatted value to | /// * append* functions append the formatted value to | |||
/// an existing string. | /// an existing string. | |||
/// | ||||
/// Internally, std::sprintf() is used to do the actual | ||||
/// formatting. | ||||
{ | { | |||
public: | public: | |||
enum BoolFormat | enum BoolFormat | |||
{ | { | |||
FMT_TRUE_FALSE, | FMT_TRUE_FALSE, | |||
FMT_YES_NO, | FMT_YES_NO, | |||
FMT_ON_OFF | FMT_ON_OFF | |||
}; | }; | |||
static const unsigned NF_MAX_INT_STRING_LEN = 32; // increase for 64 | ||||
-bit binary formatting support | ||||
static const unsigned NF_MAX_FLT_STRING_LEN = POCO_MAX_FLT_STRING_LE | ||||
N; | ||||
static std::string format(int value); | static std::string format(int value); | |||
/// Formats an integer value in decimal notation. | /// Formats an integer value in decimal notation. | |||
static std::string format(int value, int width); | static std::string format(int value, int width); | |||
/// Formats an integer value in decimal notation, | /// Formats an integer value in decimal notation, | |||
/// right justified in a field having at least | /// right justified in a field having at least | |||
/// the specified width. | /// the specified width. | |||
static std::string format0(int value, int width); | static std::string format0(int value, int width); | |||
/// Formats an integer value in decimal notation, | /// Formats an integer value in decimal notation, | |||
/// right justified and zero-padded in a field | /// right justified and zero-padded in a field | |||
/// having at least the specified width. | /// having at least the specified width. | |||
static std::string formatHex(int value); | static std::string formatHex(int value, bool prefix = false); | |||
/// Formats an int value in hexadecimal notation. | /// Formats an int value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
static std::string formatHex(int value, int width); | static std::string formatHex(int value, int width, bool prefix = fal se); | |||
/// Formats a int value in hexadecimal notation, | /// Formats a int value in hexadecimal notation, | |||
/// right justified and zero-padded in | /// right justified and zero-padded in | |||
/// a field having at least the specified width. | /// a field having at least the specified width. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
static std::string format(unsigned value); | static std::string format(unsigned value); | |||
/// Formats an unsigned int value in decimal notation. | /// Formats an unsigned int value in decimal notation. | |||
static std::string format(unsigned value, int width); | static std::string format(unsigned value, int width); | |||
/// Formats an unsigned long int in decimal notation, | /// Formats an unsigned long int in decimal notation, | |||
/// right justified in a field having at least the | /// right justified in a field having at least the | |||
/// specified width. | /// specified width. | |||
static std::string format0(unsigned int value, int width); | static std::string format0(unsigned int value, int width); | |||
/// Formats an unsigned int value in decimal notation, | /// Formats an unsigned int value in decimal notation, | |||
/// right justified and zero-padded in a field having at | /// right justified and zero-padded in a field having at | |||
/// least the specified width. | /// least the specified width. | |||
static std::string formatHex(unsigned value); | static std::string formatHex(unsigned value, bool prefix = false); | |||
/// Formats an unsigned int value in hexadecimal notation. | /// Formats an unsigned int value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
static std::string formatHex(unsigned value, int width); | static std::string formatHex(unsigned value, int width, bool prefix = false); | |||
/// Formats a int value in hexadecimal notation, | /// Formats a int value in hexadecimal notation, | |||
/// right justified and zero-padded in | /// right justified and zero-padded in | |||
/// a field having at least the specified width. | /// a field having at least the specified width. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
static std::string format(long value); | static std::string format(long value); | |||
/// Formats a long value in decimal notation. | /// Formats a long value in decimal notation. | |||
static std::string format(long value, int width); | static std::string format(long value, int width); | |||
/// Formats a long value in decimal notation, | /// Formats a long value in decimal notation, | |||
/// right justified in a field having at least the | /// right justified in a field having at least the | |||
/// specified width. | /// specified width. | |||
static std::string format0(long value, int width); | static std::string format0(long value, int width); | |||
/// Formats a long value in decimal notation, | /// Formats a long value in decimal notation, | |||
/// right justified and zero-padded in a field | /// right justified and zero-padded in a field | |||
/// having at least the specified width. | /// having at least the specified width. | |||
static std::string formatHex(long value); | static std::string formatHex(long value, bool prefix = false); | |||
/// Formats an unsigned long value in hexadecimal notation. | /// Formats an unsigned long value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
static std::string formatHex(long value, int width); | static std::string formatHex(long value, int width, bool prefix = fa lse); | |||
/// Formats an unsigned long value in hexadecimal notation, | /// Formats an unsigned long value in hexadecimal notation, | |||
/// right justified and zero-padded in a field having at lea st the | /// right justified and zero-padded in a field having at lea st the | |||
/// specified width. | /// specified width. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
static std::string format(unsigned long value); | static std::string format(unsigned long value); | |||
/// Formats an unsigned long value in decimal notation. | /// Formats an unsigned long value in decimal notation. | |||
static std::string format(unsigned long value, int width); | static std::string format(unsigned long value, int width); | |||
/// Formats an unsigned long value in decimal notation, | /// Formats an unsigned long value in decimal notation, | |||
/// right justified in a field having at least the specified | /// right justified in a field having at least the specified | |||
/// width. | /// width. | |||
static std::string format0(unsigned long value, int width); | static std::string format0(unsigned long value, int width); | |||
/// Formats an unsigned long value in decimal notation, | /// Formats an unsigned long value in decimal notation, | |||
/// right justified and zero-padded | /// right justified and zero-padded | |||
/// in a field having at least the specified width. | /// in a field having at least the specified width. | |||
static std::string formatHex(unsigned long value); | static std::string formatHex(unsigned long value, bool prefix = fals e); | |||
/// Formats an unsigned long value in hexadecimal notation. | /// Formats an unsigned long value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
static std::string formatHex(unsigned long value, int width); | static std::string formatHex(unsigned long value, int width, bool pr efix = false); | |||
/// Formats an unsigned long value in hexadecimal notation, | /// Formats an unsigned long value in hexadecimal notation, | |||
/// right justified and zero-padded in a field having at lea st the | /// right justified and zero-padded in a field having at lea st the | |||
/// specified width. | /// specified width. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
#if defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | #if defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | |||
static std::string format(Int64 value); | static std::string format(Int64 value); | |||
/// Formats a 64-bit integer value in decimal notation. | /// Formats a 64-bit integer value in decimal notation. | |||
static std::string format(Int64 value, int width); | static std::string format(Int64 value, int width); | |||
/// Formats a 64-bit integer value in decimal notation, | /// Formats a 64-bit integer value in decimal notation, | |||
/// right justified in a field having at least the specified width. | /// right justified in a field having at least the specified width. | |||
static std::string format0(Int64 value, int width); | static std::string format0(Int64 value, int width); | |||
/// Formats a 64-bit integer value in decimal notation, | /// Formats a 64-bit integer value in decimal notation, | |||
/// right justified and zero-padded in a field having at lea st | /// right justified and zero-padded in a field having at lea st | |||
/// the specified width. | /// the specified width. | |||
static std::string formatHex(Int64 value); | static std::string formatHex(Int64 value, bool prefix = false); | |||
/// Formats a 64-bit integer value in hexadecimal notation. | /// Formats a 64-bit integer value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
static std::string formatHex(Int64 value, int width); | static std::string formatHex(Int64 value, int width, bool prefix = f alse); | |||
/// Formats a 64-bit integer value in hexadecimal notation, | /// Formats a 64-bit integer value in hexadecimal notation, | |||
/// right justified and zero-padded in a field having at lea st | /// right justified and zero-padded in a field having at lea st | |||
/// the specified width. | /// the specified width. | |||
/// The value is treated as unsigned. | /// The value is treated as unsigned. | |||
/// If prefix is true, "0x" prefix is prepended to the resul ting string. | ||||
static std::string format(UInt64 value); | static std::string format(UInt64 value); | |||
/// Formats an unsigned 64-bit integer value in decimal nota tion. | /// Formats an unsigned 64-bit integer value in decimal nota tion. | |||
static std::string format(UInt64 value, int width); | static std::string format(UInt64 value, int width); | |||
/// Formats an unsigned 64-bit integer value in decimal nota tion, | /// Formats an unsigned 64-bit integer value in decimal nota tion, | |||
/// right justified in a field having at least the specified width. | /// right justified in a field having at least the specified width. | |||
static std::string format0(UInt64 value, int width); | static std::string format0(UInt64 value, int width); | |||
/// Formats an unsigned 64-bit integer value in decimal nota tion, | /// Formats an unsigned 64-bit integer value in decimal nota tion, | |||
/// right justified and zero-padded in a field having at lea st the | /// right justified and zero-padded in a field having at lea st the | |||
/// specified width. | /// specified width. | |||
static std::string formatHex(UInt64 value); | static std::string formatHex(UInt64 value, bool prefix = false); | |||
/// Formats a 64-bit integer value in hexadecimal notation. | /// Formats a 64-bit integer value in hexadecimal notation. | |||
/// If prefix is true, "0x" prefix is prepended to the | ||||
/// resulting string. | ||||
static std::string formatHex(UInt64 value, int width); | static std::string formatHex(UInt64 value, int width, bool prefix = false); | |||
/// Formats a 64-bit integer value in hexadecimal notation, | /// Formats a 64-bit integer value in hexadecimal notation, | |||
/// right justified and zero-padded in a field having at lea st | /// right justified and zero-padded in a field having at lea st | |||
/// the specified width. | /// the specified width. If prefix is true, "0x" prefix is | |||
/// prepended to the resulting string. | ||||
#endif // defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | #endif // defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | |||
static std::string format(float value); | static std::string format(float value); | |||
/// Formats a float value in decimal floating-point notation , | /// Formats a float value in decimal floating-point notation , | |||
/// according to std::printf's %g format with a precision of 8 fractional digits. | /// according to std::printf's %g format with a precision of 8 fractional digits. | |||
static std::string format(double value); | static std::string format(double value); | |||
/// Formats a double value in decimal floating-point notatio n, | /// Formats a double value in decimal floating-point notatio n, | |||
/// according to std::printf's %g format with a precision of 16 fractional digits. | /// according to std::printf's %g format with a precision of 16 fractional digits. | |||
skipping to change at line 381 | skipping to change at line 384 | |||
static void append(std::string& str, double value, int width, int pr ecision); | static void append(std::string& str, double value, int width, int pr ecision); | |||
/// Formats a double value in decimal floating-point notatio n, | /// Formats a double value in decimal floating-point notatio n, | |||
/// right justified in a field of the specified width, | /// right justified in a field of the specified width, | |||
/// with the number of fractional digits given in precision. | /// with the number of fractional digits given in precision. | |||
static void append(std::string& str, const void* ptr); | static void append(std::string& str, const void* ptr); | |||
/// Formats a pointer in an eight (32-bit architectures) or | /// Formats a pointer in an eight (32-bit architectures) or | |||
/// sixteen (64-bit architectures) characters wide | /// sixteen (64-bit architectures) characters wide | |||
/// field in hexadecimal notation. | /// field in hexadecimal notation. | |||
private: | ||||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline std::string NumberFormatter::format(int value) | inline std::string NumberFormatter::format(int value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | intToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(int value, int width) | inline std::string NumberFormatter::format(int value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | intToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(int value, int width) | inline std::string NumberFormatter::format0(int value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | intToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(int value) | inline std::string NumberFormatter::formatHex(int value, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(static_cast<unsigned int>(value), 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(int value, int width) | inline std::string NumberFormatter::formatHex(int value, int width, bool pr efix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(static_cast<unsigned int>(value), 0x10, result, prefix, wi dth, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(unsigned value) | inline std::string NumberFormatter::format(unsigned value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | uIntToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(unsigned value, int width) | inline std::string NumberFormatter::format(unsigned value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | uIntToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(unsigned int value, int width) | inline std::string NumberFormatter::format0(unsigned int value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | uIntToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(unsigned value) | inline std::string NumberFormatter::formatHex(unsigned value, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(value, 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(unsigned value, int width) | inline std::string NumberFormatter::formatHex(unsigned value, int width, bo ol prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(value, 0x10, result, prefix, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(long value) | inline std::string NumberFormatter::format(long value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | intToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(long value, int width) | inline std::string NumberFormatter::format(long value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | intToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(long value, int width) | inline std::string NumberFormatter::format0(long value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | intToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(long value) | inline std::string NumberFormatter::formatHex(long value, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(static_cast<unsigned long>(value), 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(long value, int width) | inline std::string NumberFormatter::formatHex(long value, int width, bool p refix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(static_cast<unsigned long>(value), 0x10, result, prefix, w idth, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(unsigned long value) | inline std::string NumberFormatter::format(unsigned long value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | uIntToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(unsigned long value, int width) | inline std::string NumberFormatter::format(unsigned long value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | uIntToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(unsigned long value, int width) | inline std::string NumberFormatter::format0(unsigned long value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | uIntToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(unsigned long value) | inline std::string NumberFormatter::formatHex(unsigned long value, bool pre fix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(value, 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(unsigned long value, int widt h) | inline std::string NumberFormatter::formatHex(unsigned long value, int widt h, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(value, 0x10, result, prefix, width, '0'); | |||
return result; | return result; | |||
} | } | |||
#if defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | #if defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | |||
inline std::string NumberFormatter::format(Int64 value) | inline std::string NumberFormatter::format(Int64 value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | intToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(Int64 value, int width) | inline std::string NumberFormatter::format(Int64 value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | intToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(Int64 value, int width) | inline std::string NumberFormatter::format0(Int64 value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | intToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(Int64 value) | inline std::string NumberFormatter::formatHex(Int64 value, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(static_cast<UInt64>(value), 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(Int64 value, int width) | inline std::string NumberFormatter::formatHex(Int64 value, int width, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(static_cast<UInt64>(value), 0x10, result, prefix, width, ' 0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(UInt64 value) | inline std::string NumberFormatter::format(UInt64 value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | uIntToStr(value, 10, result); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(UInt64 value, int width) | inline std::string NumberFormatter::format(UInt64 value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width); | uIntToStr(value, 10, result, false, width, ' '); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format0(UInt64 value, int width) | inline std::string NumberFormatter::format0(UInt64 value, int width) | |||
{ | { | |||
std::string result; | std::string result; | |||
append0(result, value, width); | uIntToStr(value, 10, result, false, width, '0'); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(UInt64 value) | inline std::string NumberFormatter::formatHex(UInt64 value, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value); | uIntToStr(value, 0x10, result, prefix); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::formatHex(UInt64 value, int width) | inline std::string NumberFormatter::formatHex(UInt64 value, int width, bool prefix) | |||
{ | { | |||
std::string result; | std::string result; | |||
appendHex(result, value, width); | uIntToStr(value, 0x10, result, prefix, width, '0'); | |||
return result; | return result; | |||
} | } | |||
#endif // defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | #endif // defined(POCO_HAVE_INT64) && !defined(POCO_LONG_IS_64_BIT) | |||
inline std::string NumberFormatter::format(float value) | inline std::string NumberFormatter::format(float value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | floatToStr(result, value); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(double value) | inline std::string NumberFormatter::format(double value) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value); | doubleToStr(result, value); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(double value, int precision) | inline std::string NumberFormatter::format(double value, int precision) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, precision); | doubleToStr(result, value, precision); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(double value, int width, int pre cision) | inline std::string NumberFormatter::format(double value, int width, int pre cision) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, value, width, precision); | doubleToStr(result, value, precision, width); | |||
return result; | return result; | |||
} | } | |||
inline std::string NumberFormatter::format(const void* ptr) | inline std::string NumberFormatter::format(const void* ptr) | |||
{ | { | |||
std::string result; | std::string result; | |||
append(result, ptr); | append(result, ptr); | |||
return result; | return result; | |||
} | } | |||
End of changes. 76 change blocks. | ||||
94 lines changed or deleted | 91 lines changed or added | |||
NumberParser.h | NumberParser.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: NumberParser | // Module: NumberParser | |||
// | // | |||
// Definition of the NumberParser class. | // Definition of the NumberParser class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NumberParser_INCLUDED | #ifndef Foundation_NumberParser_INCLUDED | |||
#define Foundation_NumberParser_INCLUDED | #define Foundation_NumberParser_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <string> | #include <string> | |||
#undef min | #undef min | |||
#undef max | #undef max | |||
#include <limits> | #include <limits> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API NumberParser | class Foundation_API NumberParser | |||
/// The NumberParser class provides static methods | /// The NumberParser class provides static methods | |||
/// for parsing numbers out of strings. | /// for parsing numbers out of strings. | |||
/// | ||||
/// Note that leading or trailing whitespace is not allowed | ||||
/// in the string. Poco::trim() or Poco::trimInPlace() | ||||
/// can be used to remove leading or trailing whitespace. | ||||
{ | { | |||
public: | public: | |||
static const unsigned short NUM_BASE_OCT = 010; | static const unsigned short NUM_BASE_OCT = 010; | |||
static const unsigned short NUM_BASE_DEC = 10; | static const unsigned short NUM_BASE_DEC = 10; | |||
static const unsigned short NUM_BASE_HEX = 0x10; | static const unsigned short NUM_BASE_HEX = 0x10; | |||
static int parse(const std::string& s, char thousandSeparator = ',') ; | static int parse(const std::string& s, char thousandSeparator = ',') ; | |||
/// Parses an integer value in decimal notation from the giv en string. | /// Parses an integer value in decimal notation from the giv en string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | |||
static bool tryParse(const std::string& s, int& value, char thousand Separator = ','); | static bool tryParse(const std::string& s, int& value, char thousand Separator = ','); | |||
/// Parses an integer value in decimal notation from the giv en string. | /// Parses an integer value in decimal notation from the giv en string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static unsigned parseUnsigned(const std::string& s, char thousandSep arator = ','); | static unsigned parseUnsigned(const std::string& s, char thousandSep arator = ','); | |||
/// Parses an unsigned integer value in decimal notation fro m the given string. | /// Parses an unsigned integer value in decimal notation fro m the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | |||
static bool tryParseUnsigned(const std::string& s, unsigned& value, char thousandSeparator = ','); | static bool tryParseUnsigned(const std::string& s, unsigned& value, char thousandSeparator = ','); | |||
/// Parses an unsigned integer value in decimal notation fro m the given string. | /// Parses an unsigned integer value in decimal notation fro m the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static unsigned parseHex(const std::string& s); | static unsigned parseHex(const std::string& s); | |||
/// Parses an integer value in hexadecimal notation from the given string. | /// Parses an integer value in hexadecimal notation from the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in | /// Throws a SyntaxException if the string does not hold a n umber in | |||
/// hexadecimal notation. | /// hexadecimal notation. | |||
static bool tryParseHex(const std::string& s, unsigned& value); | static bool tryParseHex(const std::string& s, unsigned& value); | |||
/// Parses an unsigned integer value in hexadecimal notation from the given string. | /// Parses an unsigned integer value in hexadecimal notation from the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static unsigned parseOct(const std::string& s); | static unsigned parseOct(const std::string& s); | |||
/// Parses an integer value in octal notation from the given string. | /// Parses an integer value in octal notation from the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in | /// Throws a SyntaxException if the string does not hold a n umber in | |||
/// hexadecimal notation. | /// hexadecimal notation. | |||
static bool tryParseOct(const std::string& s, unsigned& value); | static bool tryParseOct(const std::string& s, unsigned& value); | |||
/// Parses an unsigned integer value in octal notation from the given string. | /// Parses an unsigned integer value in octal notation from the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
static Int64 parse64(const std::string& s, char thousandSeparator = ','); | static Int64 parse64(const std::string& s, char thousandSeparator = ','); | |||
/// Parses a 64-bit integer value in decimal notation from t he given string. | /// Parses a 64-bit integer value in decimal notation from t he given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | |||
static bool tryParse64(const std::string& s, Int64& value, char thou sandSeparator = ','); | static bool tryParse64(const std::string& s, Int64& value, char thou sandSeparator = ','); | |||
/// Parses a 64-bit integer value in decimal notation from t he given string. | /// Parses a 64-bit integer value in decimal notation from t he given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static UInt64 parseUnsigned64(const std::string& s, char thousandSep arator = ','); | static UInt64 parseUnsigned64(const std::string& s, char thousandSep arator = ','); | |||
/// Parses an unsigned 64-bit integer value in decimal notat ion from the given string. | /// Parses an unsigned 64-bit integer value in decimal notat ion from the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in decimal notation. | |||
static bool tryParseUnsigned64(const std::string& s, UInt64& value, char thousandSeparator = ','); | static bool tryParseUnsigned64(const std::string& s, UInt64& value, char thousandSeparator = ','); | |||
/// Parses an unsigned 64-bit integer value in decimal notat ion from the given string. | /// Parses an unsigned 64-bit integer value in decimal notat ion from the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static UInt64 parseHex64(const std::string& s); | static UInt64 parseHex64(const std::string& s); | |||
/// Parses a 64 bit-integer value in hexadecimal notation fr om the given string. | /// Parses a 64 bit-integer value in hexadecimal notation fr om the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in hexadecimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in hexadecimal notation. | |||
static bool tryParseHex64(const std::string& s, UInt64& value); | static bool tryParseHex64(const std::string& s, UInt64& value); | |||
/// Parses an unsigned 64-bit integer value in hexadecimal n otation from the given string. | /// Parses an unsigned 64-bit integer value in hexadecimal n otation from the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static UInt64 parseOct64(const std::string& s); | static UInt64 parseOct64(const std::string& s); | |||
/// Parses a 64 bit-integer value in octal notation from the given string. | /// Parses a 64 bit-integer value in octal notation from the given string. | |||
/// Throws a SyntaxException if the string does not hold a n umber in hexadecimal notation. | /// Throws a SyntaxException if the string does not hold a n umber in hexadecimal notation. | |||
static bool tryParseOct64(const std::string& s, UInt64& value); | static bool tryParseOct64(const std::string& s, UInt64& value); | |||
/// Parses an unsigned 64-bit integer value in octal notatio n from the given string. | /// Parses an unsigned 64-bit integer value in octal notatio n from the given string. | |||
/// Returns true if a valid integer has been found, false ot herwise. | /// Returns true if a valid integer has been found, false ot herwise. | |||
/// If parsing was not successful, value is undefined. | ||||
#endif // defined(POCO_HAVE_INT64) | #endif // defined(POCO_HAVE_INT64) | |||
static double parseFloat(const std::string& s, char decimalSeparator = '.', char thousandSeparator = ','); | static double parseFloat(const std::string& s, char decimalSeparator = '.', char thousandSeparator = ','); | |||
/// Parses a double value in decimal floating point notation | /// Parses a double value in decimal floating point notation | |||
/// from the given string. | /// from the given string. | |||
/// Throws a SyntaxException if the string does not hold a f loating-point | /// Throws a SyntaxException if the string does not hold a f loating-point | |||
/// number in decimal notation. | /// number in decimal notation. | |||
static bool tryParseFloat(const std::string& s, double& value, char decimalSeparator = '.', char thousandSeparator = ','); | static bool tryParseFloat(const std::string& s, double& value, char decimalSeparator = '.', char thousandSeparator = ','); | |||
/// Parses a double value in decimal floating point notation | /// Parses a double value in decimal floating point notation | |||
/// from the given string. | /// from the given string. | |||
/// Returns true if a valid floating point number has been f ound, | /// Returns true if a valid floating point number has been f ound, | |||
/// false otherwise. | /// false otherwise. | |||
/// If parsing was not successful, value is undefined. | ||||
static bool parseBool(const std::string& s); | static bool parseBool(const std::string& s); | |||
/// Parses a bool value in decimal or string notation | /// Parses a bool value in decimal or string notation | |||
/// from the given string. | /// from the given string. | |||
/// Valid forms are: "0", "1", "true", "on", false", "yes", "no", "off". | /// Valid forms are: "0", "1", "true", "on", false", "yes", "no", "off". | |||
/// String forms are NOT case sensitive. | /// String forms are NOT case sensitive. | |||
/// Throws a SyntaxException if the string does not hold a v alid bool number | /// Throws a SyntaxException if the string does not hold a v alid bool number | |||
static bool tryParseBool(const std::string& s, bool& value); | static bool tryParseBool(const std::string& s, bool& value); | |||
/// Parses a bool value in decimal or string notation | /// Parses a bool value in decimal or string notation | |||
/// from the given string. | /// from the given string. | |||
/// Valid forms are: "0", "1", "true", "on", false", "yes", "no", "off". | /// Valid forms are: "0", "1", "true", "on", false", "yes", "no", "off". | |||
/// String forms are NOT case sensitive. | /// String forms are NOT case sensitive. | |||
/// Returns true if a valid bool number has been found, | /// Returns true if a valid bool number has been found, | |||
/// false otherwise. | /// false otherwise. | |||
/// If parsing was not successful, value is undefined. | ||||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_NumberParser_INCLUDED | #endif // Foundation_NumberParser_INCLUDED | |||
End of changes. 12 change blocks. | ||||
32 lines changed or deleted | 15 lines changed or added | |||
NumericString.h | NumericString.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: NumericString | // Module: NumericString | |||
// | // | |||
// Numeric string utility functions. | // Numeric string utility functions. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_NumericString_INCLUDED | #ifndef Foundation_NumericString_INCLUDED | |||
#define Foundation_NumericString_INCLUDED | #define Foundation_NumericString_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Buffer.h" | ||||
#include "Poco/FPEnvironment.h" | #include "Poco/FPEnvironment.h" | |||
#ifdef min | #ifdef min | |||
#undef min | #undef min | |||
#endif | #endif | |||
#ifdef max | #ifdef max | |||
#undef max | #undef max | |||
#endif | #endif | |||
#include <limits> | #include <limits> | |||
#include <cmath> | #include <cmath> | |||
#if !defined(POCO_NO_LOCALE) | #if !defined(POCO_NO_LOCALE) | |||
#include <locale> | #include <locale> | |||
#endif | #endif | |||
// binary numbers are supported, thus 64 (bits) + 1 (string terminating zer | ||||
o) | ||||
#define POCO_MAX_INT_STRING_LEN 65 | ||||
// value from strtod.cc (double_conversion::kMaxSignificantDecimalDigits) | ||||
#define POCO_MAX_FLT_STRING_LEN 780 | ||||
#define POCO_FLT_INF "inf" | ||||
#define POCO_FLT_NAN "nan" | ||||
#define POCO_FLT_EXP 'e' | ||||
namespace Poco { | namespace Poco { | |||
inline char decimalSeparator() | inline char decimalSeparator() | |||
/// Returns decimal separator from global locale or | /// Returns decimal separator from global locale or | |||
/// default '.' for platforms where locale is unavailable. | /// default '.' for platforms where locale is unavailable. | |||
{ | { | |||
#if !defined(POCO_NO_LOCALE) | #if !defined(POCO_NO_LOCALE) | |||
return std::use_facet<std::numpunct<char> >(std::locale()).decimal_p oint(); | return std::use_facet<std::numpunct<char> >(std::locale()).decimal_p oint(); | |||
#else | #else | |||
return '.'; | return '.'; | |||
skipping to change at line 79 | skipping to change at line 69 | |||
/// Returns thousand separator from global locale or | /// Returns thousand separator from global locale or | |||
/// default ',' for platforms where locale is unavailable. | /// default ',' for platforms where locale is unavailable. | |||
{ | { | |||
#if !defined(POCO_NO_LOCALE) | #if !defined(POCO_NO_LOCALE) | |||
return std::use_facet<std::numpunct<char> >(std::locale()).thousands _sep(); | return std::use_facet<std::numpunct<char> >(std::locale()).thousands _sep(); | |||
#else | #else | |||
return ','; | return ','; | |||
#endif | #endif | |||
} | } | |||
// | ||||
// String to Number Conversions | ||||
// | ||||
template <typename I> | template <typename I> | |||
bool strToInt(const char* pStr, I& result, short base, char thSep = ',') | bool strToInt(const char* pStr, I& result, short base, char thSep = ',') | |||
/// Converts zero-terminated character array to integer number; | /// Converts zero-terminated character array to integer number; | |||
/// Thousand separators are recognized for base10 and current locale ; | /// Thousand separators are recognized for base10 and current locale ; | |||
/// it is silently skipped but not verified for correct positioning. | /// it is silently skipped but not verified for correct positioning. | |||
/// Function returns true if succesful. If parsing was unsuccesful, | /// Function returns true if succesful. If parsing was unsuccesful, | |||
/// the return value is false with the result value undetermined. | /// the return value is false with the result value undetermined. | |||
{ | { | |||
if (!pStr) return false; | if (!pStr) return false; | |||
while (isspace(*pStr)) ++pStr; | while (isspace(*pStr)) ++pStr; | |||
if (*pStr == '\0') return false; | if (*pStr == '\0') return false; | |||
char sign = 1; | short sign = 1; | |||
if ((base == 10) && (*pStr == '-')) | if ((base == 10) && (*pStr == '-')) | |||
{ | { | |||
// Unsigned types can't be negative so abort parsing | ||||
if (std::numeric_limits<I>::min() >= 0) return false; | ||||
sign = -1; | sign = -1; | |||
++pStr; | ++pStr; | |||
} | } | |||
else if (*pStr == '+') ++pStr; | else if (*pStr == '+') ++pStr; | |||
// parser states: | // parser states: | |||
const char STATE_SIGNIFICANT_DIGITS = 1; | const char STATE_SIGNIFICANT_DIGITS = 1; | |||
char state = 0; | char state = 0; | |||
result = 0; | result = 0; | |||
skipping to change at line 193 | skipping to change at line 189 | |||
template <typename I> | template <typename I> | |||
bool strToInt(const std::string& str, I& result, short base, char thSep = ' ,') | bool strToInt(const std::string& str, I& result, short base, char thSep = ' ,') | |||
/// Converts string to integer number; | /// Converts string to integer number; | |||
/// This is a wrapper function, for details see see the | /// This is a wrapper function, for details see see the | |||
/// bool strToInt(const char*, I&, short, char) implementation. | /// bool strToInt(const char*, I&, short, char) implementation. | |||
{ | { | |||
return strToInt(str.c_str(), result, base, thSep); | return strToInt(str.c_str(), result, base, thSep); | |||
} | } | |||
// | ||||
// Number to String Conversions | ||||
// | ||||
namespace Impl { | namespace Impl { | |||
static char DUMMY_EXP_UNDERFLOW = 0; // dummy default val | class Ptr | |||
/// Utility char pointer wrapper class. | ||||
/// Class ensures increment/decrement remain within boundari | ||||
es. | ||||
{ | ||||
public: | ||||
Ptr(char* ptr, std::size_t offset): _beg(ptr), _cur(ptr), _e | ||||
nd(ptr + offset) | ||||
{ | ||||
} | ||||
} | char*& operator ++ () // prefix | |||
{ | ||||
check(_cur + 1); | ||||
return ++_cur; | ||||
} | ||||
template <typename F> | char* operator ++ (int) // postfix | |||
bool strToFloat (const char* pStr, F& result, char& eu = Impl::DUMMY_EXP_UN | { | |||
DERFLOW, char decSep = '.', char thSep = ',') | check(_cur + 1); | |||
/// Converts zero-terminated array to floating-point number; | char* tmp = _cur++; | |||
/// Returns true if succesful. Exponent underflow (i.e. loss of prec | return tmp; | |||
ision) | } | |||
/// is signalled in eu. Thousand separators are recognized for the l | ||||
ocale | ||||
/// and silently skipped but not verified for correct positioning. | ||||
/// | ||||
/// If parsing was unsuccesful, the return value is false with | ||||
/// result and eu values undetermined. | ||||
{ | ||||
poco_assert (decSep != thSep); | ||||
if (pStr == 0 || *pStr == '\0') return false; | char*& operator -- () // prefix | |||
{ | ||||
check(_cur - 1); | ||||
return --_cur; | ||||
} | ||||
// parser states: | char* operator -- (int) // postfix | |||
const char STATE_LEADING_SPACES = 0; | { | |||
const char STATE_DIGITS_BEFORE_DEC_POINT = 1; | check(_cur - 1); | |||
const char STATE_DIGITS_AFTER_DEC_POINT = 2; | char* tmp = _cur--; | |||
const char STATE_EXP_CHAR = 3; | return tmp; | |||
const char STATE_EXP_DIGITS = 4; | } | |||
const char STATE_SUFFIX = 5; // 'f' suffix | ||||
char*& operator += (int incr) | ||||
char numSign = 1, expSign = 1; | { | |||
char state = STATE_LEADING_SPACES; | check(_cur + incr); | |||
F mantissa = 0.0, exponent = 0.0; | return _cur += incr; | |||
F pow10 = 1.; | } | |||
result = 0.0; | ||||
eu = 0; | char*& operator -= (int decr) | |||
for (; *pStr != '\0'; ++pStr) | { | |||
check(_cur - decr); | ||||
return _cur -= decr; | ||||
} | ||||
operator char* () const | ||||
{ | ||||
return _cur; | ||||
} | ||||
std::size_t span() const | ||||
{ | ||||
return _end - _beg; | ||||
} | ||||
private: | ||||
void check(char* ptr) | ||||
{ | ||||
if (ptr > _end) throw RangeException(); | ||||
} | ||||
const char* _beg; | ||||
char* _cur; | ||||
const char* _end; | ||||
}; | ||||
} // namespace Impl | ||||
template <typename T> | ||||
bool intToStr(T value, | ||||
unsigned short base, | ||||
char* result, | ||||
std::size_t& size, | ||||
bool prefix = false, | ||||
int width = -1, | ||||
char fill = ' ', | ||||
char thSep = 0) | ||||
/// Converts integer to string. Numeric bases from binary to hexadec | ||||
imal are supported. | ||||
/// If width is non-zero, it pads the return value with fill charact | ||||
er to the specified width. | ||||
/// When padding is zero character ('0'), it is prepended to the num | ||||
ber itself; all other | ||||
/// paddings are prepended to the formatted result with minus sign o | ||||
r base prefix included | ||||
/// If prefix is true and base is octal or hexadecimal, respective p | ||||
refix ('0' for octal, | ||||
/// "0x" for hexadecimal) is prepended. For all other bases, prefix | ||||
argument is ignored. | ||||
/// Formatted string has at least [width] total length. | ||||
{ | ||||
if (base < 2 || base > 0x10) | ||||
{ | { | |||
switch (*pStr) | *result = '\0'; | |||
return false; | ||||
} | ||||
Impl::Ptr ptr(result, size); | ||||
int thCount = 0; | ||||
T tmpVal; | ||||
do | ||||
{ | ||||
tmpVal = value; | ||||
value /= base; | ||||
*ptr++ = "FEDCBA9876543210123456789ABCDEF"[15 + (tmpVal - va | ||||
lue * base)]; | ||||
if (thSep && (base == 10) && (++thCount == 3)) | ||||
{ | { | |||
case '.': | *ptr++ = thSep; | |||
if (decSep == '.') | thCount = 0; | |||
{ | } | |||
if (state >= STATE_DIGITS_AFTER_DEC_POINT) r | } while (value); | |||
eturn false; | ||||
state = STATE_DIGITS_AFTER_DEC_POINT; | ||||
break; | ||||
} | ||||
else if ((thSep == '.') && (state == STATE_DIGITS_BE | ||||
FORE_DEC_POINT)) | ||||
break; | ||||
else | ||||
return false; | ||||
case ',': | if ('0' == fill) | |||
if (decSep == ',') | { | |||
{ | if (tmpVal < 0) --width; | |||
if (state >= STATE_DIGITS_AFTER_DEC_POINT) r | if (prefix && base == 010) --width; | |||
eturn false; | if (prefix && base == 0x10) width -= 2; | |||
state = STATE_DIGITS_AFTER_DEC_POINT; | while ((ptr - result) < width) *ptr++ = fill; | |||
break; | } | |||
} | ||||
else if ((thSep == ',') && (state == STATE_DIGITS_BE | ||||
FORE_DEC_POINT)) | ||||
break; | ||||
else | ||||
return false; | ||||
case ' ': // space (SPC) | ||||
if ((thSep == ' ') && (state == STATE_DIGITS_BEFORE_ | ||||
DEC_POINT)) break; | ||||
case '\t': // horizontal tab (TAB) | ||||
case '\n': // line feed (LF) | ||||
case '\v': // vertical tab (VT) | ||||
case '\f': // form feed (FF) | ||||
case '\r': // carriage return (CR) | ||||
if ((state >= STATE_DIGITS_AFTER_DEC_POINT) || (stat | ||||
e >= STATE_EXP_DIGITS)) | ||||
break; | ||||
else if ((state > STATE_LEADING_SPACES) && (state < | ||||
STATE_DIGITS_AFTER_DEC_POINT)) | ||||
return false; | ||||
break; | ||||
case '-': | if (prefix && base == 010) *ptr++ = '0'; | |||
if (state == STATE_LEADING_SPACES) | else if (prefix && base == 0x10) | |||
numSign = -1; | { | |||
else if (state == STATE_EXP_CHAR) // exponential cha | *ptr++ = 'x'; | |||
r | *ptr++ = '0'; | |||
expSign = -1; | } | |||
else return false; | ||||
case '+': | ||||
break; | ||||
case '0': | if (tmpVal < 0) *ptr++ = '-'; | |||
case '1': | ||||
case '2': | ||||
case '3': | ||||
case '4': | ||||
case '5': | ||||
case '6': | ||||
case '7': | ||||
case '8': | ||||
case '9': | ||||
if (state >= STATE_SUFFIX) return false; // constant | ||||
suffix | ||||
if (state <= STATE_DIGITS_BEFORE_DEC_POINT) // integ | ||||
ral part digits | ||||
{ | ||||
result = result * 10 + (*pStr - '0'); | ||||
state = STATE_DIGITS_BEFORE_DEC_POINT; | ||||
} | ||||
else if (state <= STATE_DIGITS_AFTER_DEC_POINT) // f | ||||
ractional part digits | ||||
{ | ||||
mantissa += (*pStr - '0') / (pow10 *= 10.); | ||||
state = STATE_DIGITS_AFTER_DEC_POINT; | ||||
} | ||||
else if (state <= STATE_EXP_DIGITS) // exponent digi | ||||
ts | ||||
{ | ||||
exponent = exponent * 10 + (*pStr - '0'); | ||||
state = STATE_EXP_DIGITS; | ||||
} | ||||
else return false; | ||||
break; | ||||
case 'E': | if ('0' != fill) | |||
case 'e': | { | |||
if (state > STATE_DIGITS_AFTER_DEC_POINT) return fal | while ((ptr - result) < width) *ptr++ = fill; | |||
se; | } | |||
state = STATE_EXP_CHAR; | ||||
break; | ||||
case 'F': | size = ptr - result; | |||
case 'f': | poco_assert_dbg (size <= ptr.span()); | |||
state = STATE_SUFFIX; | poco_assert_dbg ((-1 == width) || (size >= size_t(width))); | |||
break; | *ptr-- = '\0'; | |||
char* ptrr = result; | ||||
char tmp; | ||||
while(ptrr < ptr) | ||||
{ | ||||
tmp = *ptr; | ||||
*ptr-- = *ptrr; | ||||
*ptrr++ = tmp; | ||||
} | ||||
default: | return true; | |||
return false; | } | |||
template <typename T> | ||||
bool uIntToStr(T value, | ||||
unsigned short base, | ||||
char* result, | ||||
std::size_t& size, | ||||
bool prefix = false, | ||||
int width = -1, | ||||
char fill = ' ', | ||||
char thSep = 0) | ||||
/// Converts unsigned integer to string. Numeric bases from binary t | ||||
o hexadecimal are supported. | ||||
/// If width is non-zero, it pads the return value with fill charact | ||||
er to the specified width. | ||||
/// When padding is zero character ('0'), it is prepended to the num | ||||
ber itself; all other | ||||
/// paddings are prepended to the formatted result with minus sign o | ||||
r base prefix included | ||||
/// If prefix is true and base is octal or hexadecimal, respective p | ||||
refix ('0' for octal, | ||||
/// "0x" for hexadecimal) is prepended. For all other bases, prefix | ||||
argument is ignored. | ||||
/// Formatted string has at least [width] total length. | ||||
{ | ||||
if (base < 2 || base > 0x10) | ||||
{ | ||||
*result = '\0'; | ||||
return false; | ||||
} | ||||
Impl::Ptr ptr(result, size); | ||||
int thCount = 0; | ||||
T tmpVal; | ||||
do | ||||
{ | ||||
tmpVal = value; | ||||
value /= base; | ||||
*ptr++ = "FEDCBA9876543210123456789ABCDEF"[15 + (tmpVal - va | ||||
lue * base)]; | ||||
if (thSep && (base == 10) && (++thCount == 3)) | ||||
{ | ||||
*ptr++ = thSep; | ||||
thCount = 0; | ||||
} | } | |||
} while (value); | ||||
if ('0' == fill) | ||||
{ | ||||
if (prefix && base == 010) --width; | ||||
if (prefix && base == 0x10) width -= 2; | ||||
while ((ptr - result) < width) *ptr++ = fill; | ||||
} | } | |||
if (exponent > std::numeric_limits<F>::max_exponent10) | if (prefix && base == 010) *ptr++ = '0'; | |||
else if (prefix && base == 0x10) | ||||
{ | { | |||
eu = expSign; | *ptr++ = 'x'; | |||
exponent = std::numeric_limits<F>::max_exponent10; | *ptr++ = '0'; | |||
} | } | |||
result += mantissa; | if ('0' != fill) | |||
if (numSign != 1) result *= numSign; | ||||
if (exponent > 1.0) | ||||
{ | { | |||
F scale = std::pow(10., exponent); | while ((ptr - result) < width) *ptr++ = fill; | |||
result = (expSign < 0) ? (result / scale) : (result * scale) | ||||
; | ||||
} | } | |||
return (state != STATE_LEADING_SPACES) && // empty/zero-length strin | size = ptr - result; | |||
g | poco_assert_dbg (size <= ptr.span()); | |||
!FPEnvironment::isInfinite(result) && | poco_assert_dbg ((-1 == width) || (size >= size_t(width))); | |||
!FPEnvironment::isNaN(result); | *ptr-- = '\0'; | |||
char* ptrr = result; | ||||
char tmp; | ||||
while(ptrr < ptr) | ||||
{ | ||||
tmp = *ptr; | ||||
*ptr-- = *ptrr; | ||||
*ptrr++ = tmp; | ||||
} | ||||
return true; | ||||
} | } | |||
template <typename F> | template <typename T> | |||
bool strToFloat (const std::string& s, F& result, char& eu = Impl::DUMMY_EX | bool intToStr (T number, unsigned short base, std::string& result, bool pre | |||
P_UNDERFLOW, char decSep = '.', char thSep = ',') | fix = false, int width = -1, char fill = ' ', char thSep = 0) | |||
/// Converts string to floating-point number; | /// Converts integer to string; This is a wrapper function, for deta | |||
/// This is a wrapper function, for details see see the | ils see see the | |||
/// bool strToFloat(const char*, F&, char&, char, char) implementati | /// bool intToStr(T, unsigned short, char*, int, int, char, char) im | |||
on. | plementation. | |||
{ | ||||
char res[POCO_MAX_INT_STRING_LEN] = {0}; | ||||
std::size_t size = POCO_MAX_INT_STRING_LEN; | ||||
bool ret = intToStr(number, base, res, size, prefix, width, fill, th | ||||
Sep); | ||||
result.assign(res, size); | ||||
return ret; | ||||
} | ||||
template <typename T> | ||||
bool uIntToStr (T number, unsigned short base, std::string& result, bool pr | ||||
efix = false, int width = -1, char fill = ' ', char thSep = 0) | ||||
/// Converts unsigned integer to string; This is a wrapper function, | ||||
for details see see the | ||||
/// bool uIntToStr(T, unsigned short, char*, int, int, char, char) i | ||||
mplementation. | ||||
{ | { | |||
return strToFloat(s.c_str(), result, eu, decSep, thSep); | char res[POCO_MAX_INT_STRING_LEN] = {0}; | |||
std::size_t size = POCO_MAX_INT_STRING_LEN; | ||||
bool ret = uIntToStr(number, base, res, size, prefix, width, fill, t | ||||
hSep); | ||||
result.assign(res, size); | ||||
return ret; | ||||
} | } | |||
// | ||||
// Wrappers for double-conversion library (http://code.google.com/p/double- | ||||
conversion/). | ||||
// | ||||
// Library is the implementation of the algorithm described in Florian Loit | ||||
sch's paper: | ||||
// http://florian.loitsch.com/publications/dtoa-pldi2010.pdf | ||||
// | ||||
Foundation_API void floatToStr(char* buffer, | ||||
int bufferSize, | ||||
float value, | ||||
int lowDec = -std::numeric_limits<double>::digits10, | ||||
int highDec = std::numeric_limits<double>::digits10); | ||||
/// Converts a float value to string. Converted string must be short | ||||
er than bufferSize. | ||||
/// Conversion is done by computing the shortest string of digits th | ||||
at correctly represents | ||||
/// the input number. Depending on lowDec and highDec values, the fu | ||||
nction returns | ||||
/// decimal or exponential representation. | ||||
Foundation_API std::string& floatToStr(std::string& str, | ||||
float value, | ||||
int precision = -1, | ||||
int width = 0, | ||||
char thSep = 0, | ||||
char decSep = 0); | ||||
/// Converts a float value, assigns it to the supplied string and re | ||||
turns the reference. | ||||
/// This function calls floatToStr(char*, int, float, int, int) and | ||||
formats the result according to | ||||
/// precision (total number of digits after the decimal point, -1 me | ||||
ans ignore precision argument) | ||||
/// and width (total length of formatted string). | ||||
Foundation_API void doubleToStr(char* buffer, | ||||
int bufferSize, | ||||
double value, | ||||
int lowDec = -std::numeric_limits<double>::digits10, | ||||
int highDec = std::numeric_limits<double>::digits10); | ||||
/// Converts a double value to string. Converted string must be shor | ||||
ter than bufferSize. | ||||
/// Conversion is done by computing the shortest string of digits th | ||||
at correctly represents | ||||
/// the input number. Depending on lowDec and highDec values, the fu | ||||
nction returns | ||||
/// decimal or exponential representation. | ||||
Foundation_API std::string& doubleToStr(std::string& str, | ||||
double value, | ||||
int precision = -1, | ||||
int width = 0, | ||||
char thSep = 0, | ||||
char decSep = 0); | ||||
/// Converts a double value, assigns it to the supplied string and r | ||||
eturns the reference. | ||||
/// This function calls doubleToStr(char*, int, float, int, int) and | ||||
formats the result according to | ||||
/// precision (total number of digits after the decimal point, -1 me | ||||
ans ignore precision argument) | ||||
/// and width (total length of formatted string). | ||||
Foundation_API float strToFloat(const char* str); | ||||
/// Converts the string of characters into single-precision floating | ||||
point number. | ||||
/// Function uses double_convesrion::DoubleToStringConverter to do t | ||||
he conversion. | ||||
Foundation_API bool strToFloat(const std::string&, float& result, char decS | ||||
ep = '.', char thSep = ','); | ||||
/// Converts the string of characters into single-precision floating | ||||
point number. | ||||
/// The conversion result is assigned to the result parameter. | ||||
/// If decimal separator and/or thousand separator are different fro | ||||
m defaults, they should be | ||||
/// supplied to ensure proper conversion. | ||||
/// | ||||
/// Returns true if succesful, false otherwise. | ||||
Foundation_API double strToDouble(const char* str); | ||||
/// Converts the string of characters into double-precision floating | ||||
point number. | ||||
Foundation_API bool strToDouble(const std::string& str, double& result, cha | ||||
r decSep = '.', char thSep = ','); | ||||
/// Converts the string of characters into double-precision floating | ||||
point number. | ||||
/// The conversion result is assigned to the result parameter. | ||||
/// If decimal separator and/or thousand separator are different fro | ||||
m defaults, they should be | ||||
/// supplied to ensure proper conversion. | ||||
/// | ||||
/// Returns true if succesful, false otherwise. | ||||
// | ||||
// end double-conversion functions declarations | ||||
// | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_NumericString_INCLUDED | #endif // Foundation_NumericString_INCLUDED | |||
End of changes. 30 change blocks. | ||||
183 lines changed or deleted | 366 lines changed or added | |||
Object.h | Object.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Object | // Module: Object | |||
// | // | |||
// Definition of the Object class. | // Definition of the Object class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_Object_INCLUDED | #ifndef JSON_Object_INCLUDED | |||
#define JSON_Object_INCLUDED | #define JSON_Object_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/JSON/Array.h" | #include "Poco/JSON/Array.h" | |||
#include "Poco/JSON/Stringifier.h" | ||||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/Dynamic/Struct.h" | ||||
#include "Poco/Nullable.h" | ||||
#include <map> | #include <map> | |||
#include <vector> | #include <vector> | |||
#include <deque> | ||||
#include <iostream> | #include <iostream> | |||
#include <sstream> | #include <sstream> | |||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
class JSON_API Object | class JSON_API Object | |||
/// Represents a JSON object. | /// Represents a JSON object. JSON object provides a representation | |||
/// based on shared pointers and optimized for performance. It is po | ||||
ssible to | ||||
/// convert object to DynamicStruct. Conversion requires copying and | ||||
therefore | ||||
/// has performance penalty; the benefit is in improved syntax, eg: | ||||
/// | ||||
/// std::string json = "{ \"test\" : { \"property\" : \"value\" } | ||||
}"; | ||||
/// Parser parser; | ||||
/// Var result = parser.parse(json); | ||||
/// | ||||
/// // use pointers to avoid copying | ||||
/// Object::Ptr object = result.extract<Object::Ptr>(); | ||||
/// Var test = object->get("test"); // holds { "property" : "valu | ||||
e" } | ||||
/// Object::Ptr subObject = test.extract<Object::Ptr>(); | ||||
/// test = subObject->get("property"); | ||||
/// std::string val = test.toString(); // val holds "value" | ||||
/// | ||||
/// // copy/convert to Poco::DynamicStruct | ||||
/// Poco::DynamicStruct ds = *object; | ||||
/// val = ds["test"]["property"]; // val holds "value" | ||||
/// | ||||
{ | { | |||
public: | public: | |||
typedef SharedPtr<Object> Ptr; | typedef SharedPtr<Object> Ptr; | |||
typedef std::map<std::string, Dynamic::Var> ValueMap; | ||||
Object(); | typedef ValueMap::value_type ValueType; | |||
/// Default constructor | typedef ValueMap::iterator Iterator; | |||
typedef ValueMap::const_iterator ConstIterator; | ||||
Object(bool preserveInsertionOrder = false); | ||||
/// Default constructor. If preserveInsertionOrder, object | ||||
/// will preserve the items insertion order. Otherwise, item | ||||
s | ||||
/// will be sorted by keys. | ||||
Object(const Object& copy); | Object(const Object& copy); | |||
/// Copy constructor | /// Copy constructor. Struct is not copied to keep the opera | |||
tion as | ||||
/// efficient as possible (when needed, it will be generated | ||||
upon request). | ||||
virtual ~Object(); | virtual ~Object(); | |||
/// Destructor | /// Destroys Object. | |||
Iterator begin() | ||||
{ | ||||
return _values.begin(); | ||||
} | ||||
ConstIterator begin() const | ||||
{ | ||||
return _values.begin(); | ||||
} | ||||
Iterator end() | ||||
{ | ||||
return _values.end(); | ||||
} | ||||
ConstIterator end() const | ||||
{ | ||||
return _values.end(); | ||||
} | ||||
Dynamic::Var get(const std::string& key) const; | Dynamic::Var get(const std::string& key) const; | |||
/// Retrieves a property. An empty value is | /// Retrieves a property. An empty value is | |||
/// returned when the property doesn't exist. | /// returned when the property doesn't exist. | |||
Array::Ptr getArray(const std::string& key) const; | Array::Ptr getArray(const std::string& key) const; | |||
/// Returns a SharedPtr to an array when the property | /// Returns a SharedPtr to an array when the property | |||
/// is an array. An empty SharedPtr is returned when | /// is an array. An empty SharedPtr is returned when | |||
/// the element doesn't exist or is not an array. | /// the element doesn't exist or is not an array. | |||
skipping to change at line 94 | skipping to change at line 124 | |||
/// Retrieves the property with the given name and will | /// Retrieves the property with the given name and will | |||
/// try to convert the value to the given template type. | /// try to convert the value to the given template type. | |||
/// The convert<T> method of Dynamic is called | /// The convert<T> method of Dynamic is called | |||
/// which can also throw exceptions for invalid values. | /// which can also throw exceptions for invalid values. | |||
/// Note: This will not work for an array or an object. | /// Note: This will not work for an array or an object. | |||
{ | { | |||
Dynamic::Var value = get(key); | Dynamic::Var value = get(key); | |||
return value.convert<T>(); | return value.convert<T>(); | |||
} | } | |||
template<typename T> | ||||
Poco::Nullable<T> getNullableValue(const std::string& key) const | ||||
/// Retrieves the property with the given name and will | ||||
/// try to convert the value to the given template type. | ||||
/// Returns null if isNull. | ||||
/// The convert<T> method of Dynamic is called | ||||
/// which can also throw exceptions for invalid values. | ||||
/// Note: This will not work for an array or an object. | ||||
{ | ||||
if (isNull(key)) | ||||
return Poco::Nullable<T>(); | ||||
Dynamic::Var value = get(key); | ||||
return value.convert<T>(); | ||||
} | ||||
void getNames(std::vector<std::string>& names) const; | void getNames(std::vector<std::string>& names) const; | |||
/// Returns all property names | /// Returns all property names | |||
bool has(const std::string& key) const; | bool has(const std::string& key) const; | |||
/// Returns true when the given property exists | /// Returns true when the given property exists | |||
bool isArray(const std::string& key) const; | bool isArray(const std::string& key) const; | |||
/// Returns true when the given property contains an array | /// Returns true when the given property contains an array | |||
bool isArray(ConstIterator& it) const; | ||||
/// Returns true when the given property contains an array | ||||
bool isNull(const std::string& key) const; | bool isNull(const std::string& key) const; | |||
/// Returns true when the given property contains a null val ue | /// Returns true when the given property contains a null val ue | |||
bool isObject(const std::string& key) const; | bool isObject(const std::string& key) const; | |||
/// Returns true when the given property contains an object | /// Returns true when the given property contains an object | |||
bool isObject(ConstIterator& it) const; | ||||
/// Returns true when the given property contains an object | ||||
template<typename T> | template<typename T> | |||
T optValue(const std::string& key, const T& def) const | T optValue(const std::string& key, const T& def) const | |||
/// Returns the value of a property when the property exists | /// Returns the value of a property when the property exists | |||
/// and can be converted to the given type. Otherwise | /// and can be converted to the given type. Otherwise | |||
/// def will be returned. | /// def will be returned. | |||
{ | { | |||
T value = def; | T value = def; | |||
ValueMap::const_iterator it = _values.find(key); | ValueMap::const_iterator it = _values.find(key); | |||
if ( it != _values.end() | if (it != _values.end() && ! it->second.isEmpty() ) | |||
&& ! it->second.isEmpty() ) | ||||
{ | { | |||
try | try | |||
{ | { | |||
value = it->second.convert<T>(); | value = it->second.convert<T>(); | |||
} | } | |||
catch(...) | catch(...) | |||
{ | { | |||
// The default value will be returned | // The default value will be returned | |||
} | } | |||
} | } | |||
return value; | return value; | |||
} | } | |||
unsigned int size() const; | std::size_t size() const; | |||
/// Returns the number of properties | /// Returns the number of properties | |||
void set(const std::string& key, const Dynamic::Var& value); | void set(const std::string& key, const Dynamic::Var& value); | |||
/// Sets a new value | /// Sets a new value | |||
void stringify(std::ostream& out, unsigned int indent = 0) const; | void stringify(std::ostream& out, unsigned int indent = 0, int step = -1) const; | |||
/// Prints the object to out. When indent is 0, the object | /// Prints the object to out. When indent is 0, the object | |||
/// will be printed on one line without indentation. | /// will be printed on a single line without indentation. | |||
void remove(const std::string& key); | void remove(const std::string& key); | |||
/// Removes the property with the given key | /// Removes the property with the given key | |||
static Poco::DynamicStruct makeStruct(const Object::Ptr& obj); | ||||
/// Utility function for creation of struct. | ||||
operator const Poco::DynamicStruct& () const; | ||||
/// Cast operator to Poco::DynamiStruct. | ||||
void clear(); | ||||
/// Clears the contents of the object. Insertion order | ||||
/// preservation property is left intact. | ||||
private: | private: | |||
typedef std::map<std::string, Dynamic::Var> ValueMap; | template <typename C> | |||
ValueMap _values; | void doStringify(const C& container, std::ostream& out, unsigned int | |||
indent, unsigned int step) const | ||||
{ | ||||
out << '{'; | ||||
if (indent > 0) out << std::endl; | ||||
typename C::const_iterator it = container.begin(); | ||||
typename C::const_iterator end = container.end(); | ||||
for (; it != end;) | ||||
{ | ||||
for(unsigned int i = 0; i < indent; i++) out << ' '; | ||||
Stringifier::stringify(getKey(it), out); | ||||
out << ((indent > 0) ? " : " : ":"); | ||||
Stringifier::stringify(getValue(it), out, indent + s | ||||
tep, step); | ||||
if (++it != container.end()) out << ','; | ||||
if (step > 0) out << std::endl; | ||||
} | ||||
if (indent >= step) indent -= step; | ||||
for (unsigned int i = 0; i < indent; i++) | ||||
out << ' '; | ||||
out << '}'; | ||||
} | ||||
typedef std::deque<Dynamic::Var*> KeyPtrList; | ||||
typedef Poco::DynamicStruct::Ptr StructPtr; | ||||
const std::string& getKey(ValueMap::const_iterator& it) const; | ||||
const Dynamic::Var& getValue(ValueMap::const_iterator& it) const; | ||||
const std::string& getKey(KeyPtrList::const_iterator& it) const; | ||||
const Dynamic::Var& getValue(KeyPtrList::const_iterator& it) const; | ||||
ValueMap _values; | ||||
KeyPtrList _keys; | ||||
bool _preserveInsOrder; | ||||
mutable StructPtr _pStruct; | ||||
}; | }; | |||
inline bool Object::has(const std::string& key) const | inline bool Object::has(const std::string& key) const | |||
{ | { | |||
ValueMap::const_iterator it = _values.find(key); | ValueMap::const_iterator it = _values.find(key); | |||
return it != _values.end(); | return it != _values.end(); | |||
} | } | |||
inline bool Object::isArray(const std::string& key) const | inline bool Object::isArray(const std::string& key) const | |||
{ | { | |||
ValueMap::const_iterator it = _values.find(key); | ValueMap::const_iterator it = _values.find(key); | |||
return it != _values.end() || it->second.type() == typeid(Array::Ptr | return isArray(it); | |||
); | } | |||
inline bool Object::isArray(ConstIterator& it) const | ||||
{ | ||||
return it != _values.end() && it->second.type() == typeid(Array::Ptr | ||||
); | ||||
} | } | |||
inline bool Object::isNull(const std::string& key) const | inline bool Object::isNull(const std::string& key) const | |||
{ | { | |||
ValueMap::const_iterator it = _values.find(key); | ValueMap::const_iterator it = _values.find(key); | |||
return it == _values.end() || it->second.isEmpty(); | return it == _values.end() || it->second.isEmpty(); | |||
} | } | |||
inline bool Object::isObject(const std::string& key) const | inline bool Object::isObject(const std::string& key) const | |||
{ | { | |||
ValueMap::const_iterator it = _values.find(key); | ValueMap::const_iterator it = _values.find(key); | |||
return it != _values.end() || it->second.type() == typeid(Object::Pt r); | return isObject(it); | |||
} | } | |||
inline void Object::set(const std::string& key, const Dynamic::Var& value) | inline bool Object::isObject(ConstIterator& it) const | |||
{ | { | |||
_values[key] = value; | return it != _values.end() && it->second.type() == typeid(Object::Pt r); | |||
} | } | |||
inline unsigned int Object::size() const | inline std::size_t Object::size() const | |||
{ | { | |||
return _values.size(); | return static_cast<std::size_t>(_values.size()); | |||
} | } | |||
inline void Object::remove(const std::string& key) | inline void Object::remove(const std::string& key) | |||
{ | { | |||
_values.erase(key); | _values.erase(key); | |||
} | } | |||
inline const std::string& Object::getKey(ValueMap::const_iterator& it) cons | ||||
t | ||||
{ | ||||
return it->first; | ||||
} | ||||
inline const Dynamic::Var& Object::getValue(ValueMap::const_iterator& it) c | ||||
onst | ||||
{ | ||||
return it->second; | ||||
} | ||||
inline const Dynamic::Var& Object::getValue(KeyPtrList::const_iterator& it) | ||||
const | ||||
{ | ||||
return **it; | ||||
} | ||||
}} // Namespace Poco::JSON | }} // Namespace Poco::JSON | |||
namespace Poco { | namespace Poco { | |||
namespace Dynamic { | namespace Dynamic { | |||
template <> | template <> | |||
class VarHolderImpl<JSON::Object::Ptr>: public VarHolder | class VarHolderImpl<JSON::Object::Ptr>: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(const JSON::Object::Ptr& val): _val(val) | VarHolderImpl(const JSON::Object::Ptr& val): _val(val) | |||
skipping to change at line 278 | skipping to change at line 400 | |||
throw BadCastException(); | throw BadCastException(); | |||
} | } | |||
void convert(std::string& s) const | void convert(std::string& s) const | |||
{ | { | |||
std::ostringstream oss; | std::ostringstream oss; | |||
_val->stringify(oss, 2); | _val->stringify(oss, 2); | |||
s = oss.str(); | s = oss.str(); | |||
} | } | |||
void convert(DateTime& val) const | void convert(DateTime& /*val*/) const | |||
{ | { | |||
//TODO: val = _val; | //TODO: val = _val; | |||
throw NotImplementedException("Conversion not implemented: J SON:Object => DateTime"); | ||||
} | } | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& /*ldt*/) const | |||
{ | { | |||
//TODO: ldt = _val.timestamp(); | //TODO: ldt = _val.timestamp(); | |||
throw NotImplementedException("Conversion not implemented: J SON:Object => LocalDateTime"); | ||||
} | } | |||
void convert(Timestamp& ts) const | void convert(Timestamp& /*ts*/) const | |||
{ | { | |||
//TODO: ts = _val.timestamp(); | //TODO: ts = _val.timestamp(); | |||
throw NotImplementedException("Conversion not implemented: J SON:Object => Timestamp"); | ||||
} | } | |||
VarHolderImpl* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const JSON::Object::Ptr& value() const | const JSON::Object::Ptr& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 332 | skipping to change at line 457 | |||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
JSON::Object::Ptr _val; | JSON::Object::Ptr _val; | |||
}; | }; | |||
template <> | ||||
class VarHolderImpl<JSON::Object>: public VarHolder | ||||
{ | ||||
public: | ||||
VarHolderImpl(const JSON::Object& val): _val(val) | ||||
{ | ||||
} | ||||
~VarHolderImpl() | ||||
{ | ||||
} | ||||
const std::type_info& type() const | ||||
{ | ||||
return typeid(JSON::Object); | ||||
} | ||||
void convert(Int8&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(Int16&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(Int32&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(Int64&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(UInt8&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(UInt16&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(UInt32&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(UInt64&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(bool& value) const | ||||
{ | ||||
value = _val.size() > 0; | ||||
} | ||||
void convert(float&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(double&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(char&) const | ||||
{ | ||||
throw BadCastException(); | ||||
} | ||||
void convert(std::string& s) const | ||||
{ | ||||
std::ostringstream oss; | ||||
_val.stringify(oss, 2); | ||||
s = oss.str(); | ||||
} | ||||
void convert(DateTime& /*val*/) const | ||||
{ | ||||
//TODO: val = _val; | ||||
throw NotImplementedException("Conversion not implemented: J | ||||
SON:Object => DateTime"); | ||||
} | ||||
void convert(LocalDateTime& /*ldt*/) const | ||||
{ | ||||
//TODO: ldt = _val.timestamp(); | ||||
throw NotImplementedException("Conversion not implemented: J | ||||
SON:Object => LocalDateTime"); | ||||
} | ||||
void convert(Timestamp& /*ts*/) const | ||||
{ | ||||
//TODO: ts = _val.timestamp(); | ||||
throw NotImplementedException("Conversion not implemented: J | ||||
SON:Object => Timestamp"); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | ||||
return cloneHolder(pVarHolder, _val); | ||||
} | ||||
const JSON::Object& value() const | ||||
{ | ||||
return _val; | ||||
} | ||||
bool isArray() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isInteger() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isSigned() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isNumeric() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | ||||
{ | ||||
return false; | ||||
} | ||||
private: | ||||
JSON::Object _val; | ||||
}; | ||||
}} // namespace Poco::JSON | }} // namespace Poco::JSON | |||
#endif // JSON_Object_INCLUDED | #endif // JSON_Object_INCLUDED | |||
End of changes. 33 change blocks. | ||||
58 lines changed or deleted | 328 lines changed or added | |||
ObjectPool.h | ObjectPool.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: ObjectPool | // Module: ObjectPool | |||
// | // | |||
// Definition of the ObjectPool template class and friends. | // Definition of the ObjectPool template class and friends. | |||
// | // | |||
// Copyright (c) 2010-2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2010-2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ObjectPool_INCLUDED | #ifndef Foundation_ObjectPool_INCLUDED | |||
#define Foundation_ObjectPool_INCLUDED | #define Foundation_ObjectPool_INCLUDED | |||
#include "Poco/Poco.h" | #include "Poco/Poco.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include <vector> | #include <vector> | |||
skipping to change at line 210 | skipping to change at line 190 | |||
_capacity(capacity), | _capacity(capacity), | |||
_peakCapacity(peakCapacity), | _peakCapacity(peakCapacity), | |||
_size(0) | _size(0) | |||
{ | { | |||
poco_assert (capacity <= peakCapacity); | poco_assert (capacity <= peakCapacity); | |||
} | } | |||
~ObjectPool() | ~ObjectPool() | |||
/// Destroys the ObjectPool. | /// Destroys the ObjectPool. | |||
{ | { | |||
for (typename std::vector<P>::iterator it = _pool.begin(); i | try | |||
t != _pool.end(); ++it) | { | |||
for (typename std::vector<P>::iterator it = _pool.be | ||||
gin(); it != _pool.end(); ++it) | ||||
{ | ||||
_factory.destroyObject(*it); | ||||
} | ||||
} | ||||
catch (...) | ||||
{ | { | |||
_factory.destroyObject(*it); | poco_unexpected(); | |||
} | } | |||
} | } | |||
P borrowObject() | P borrowObject() | |||
/// Obtains an object from the pool, or creates a new object if | /// Obtains an object from the pool, or creates a new object if | |||
/// possible. | /// possible. | |||
/// | /// | |||
/// Returns null if no object is available. | /// Returns null if no object is available. | |||
/// | /// | |||
/// If activating the object fails, the object is destroyed and | /// If activating the object fails, the object is destroyed and | |||
End of changes. 3 change blocks. | ||||
35 lines changed or deleted | 11 lines changed or added | |||
Observer.h | Observer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: NotificationCenter | // Module: NotificationCenter | |||
// | // | |||
// Definition of the Observer class template. | // Definition of the Observer class template. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Observer_INCLUDED | #ifndef Foundation_Observer_INCLUDED | |||
#define Foundation_Observer_INCLUDED | #define Foundation_Observer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractObserver.h" | #include "Poco/AbstractObserver.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
OpcomChannel.h | OpcomChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: OpcomChannel | // Module: OpcomChannel | |||
// | // | |||
// Definition of the OpcomChannel class specific to OpenVMS. | // Definition of the OpcomChannel class specific to OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_OpcomChannel_INCLUDED | #ifndef Foundation_OpcomChannel_INCLUDED | |||
#define Foundation_OpcomChannel_INCLUDED | #define Foundation_OpcomChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Option.h | Option.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: Option | // Module: Option | |||
// | // | |||
// Definition of the Option class. | // Definition of the Option class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_Option_INCLUDED | #ifndef Util_Option_INCLUDED | |||
#define Util_Option_INCLUDED | #define Util_Option_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/OptionCallback.h" | #include "Poco/Util/OptionCallback.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
OptionCallback.h | OptionCallback.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: OptionCallback | // Module: OptionCallback | |||
// | // | |||
// Definition of the OptionCallback class. | // Definition of the OptionCallback class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_OptionCallback_INCLUDED | #ifndef Util_OptionCallback_INCLUDED | |||
#define Util_OptionCallback_INCLUDED | #define Util_OptionCallback_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
OptionException.h | OptionException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: OptionException | // Module: OptionException | |||
// | // | |||
// Definition of the OptionException class. | // Definition of the OptionException class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_OptionException_INCLUDED | #ifndef Util_OptionException_INCLUDED | |||
#define Util_OptionException_INCLUDED | #define Util_OptionException_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
OptionProcessor.h | OptionProcessor.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: OptionProcessor | // Module: OptionProcessor | |||
// | // | |||
// Definition of the OptionProcessor class. | // Definition of the OptionProcessor class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_OptionProcessor_INCLUDED | #ifndef Util_OptionProcessor_INCLUDED | |||
#define Util_OptionProcessor_INCLUDED | #define Util_OptionProcessor_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include <set> | #include <set> | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
OptionSet.h | OptionSet.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: OptionSet | // Module: OptionSet | |||
// | // | |||
// Definition of the OptionSet class. | // Definition of the OptionSet class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_OptionSet_INCLUDED | #ifndef Util_OptionSet_INCLUDED | |||
#define Util_OptionSet_INCLUDED | #define Util_OptionSet_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Option.h" | #include "Poco/Util/Option.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
POP3ClientSession.h | POP3ClientSession.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Mail | // Package: Mail | |||
// Module: POP3ClientSession | // Module: POP3ClientSession | |||
// | // | |||
// Definition of the POP3ClientSession class. | // Definition of the POP3ClientSession class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_POP3ClientSession_INCLUDED | #ifndef Net_POP3ClientSession_INCLUDED | |||
#define Net_POP3ClientSession_INCLUDED | #define Net_POP3ClientSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/DialogSocket.h" | #include "Poco/Net/DialogSocket.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include <ostream> | #include <ostream> | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Pair.h | Pair.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: Pair | // Module: Pair | |||
// | // | |||
// Definition of the Pair class. | // Definition of the Pair class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Pair_INCLUDED | #ifndef Foundation_Pair_INCLUDED | |||
#define Foundation_Pair_INCLUDED | #define Foundation_Pair_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/Dynamic/VarHolder.h" | #include "Poco/Dynamic/VarHolder.h" | |||
#include <utility> | #include <utility> | |||
skipping to change at line 72 | skipping to change at line 52 | |||
/// Creates the Pair from another pair. | /// Creates the Pair from another pair. | |||
{ | { | |||
} | } | |||
Pair(const Data& val): _data(val) | Pair(const Data& val): _data(val) | |||
/// Creates the Pair from the given value. | /// Creates the Pair from the given value. | |||
{ | { | |||
} | } | |||
template <typename T> | template <typename T> | |||
Pair(const std::pair<K, T>& val): _data(std::make_pair(val.first, Va r(val.second))) | Pair(const std::pair<K, T>& val): _data(std::make_pair(val.first, va l.second)) | |||
/// Creates Pair form standard pair. | /// Creates Pair form standard pair. | |||
{ | { | |||
} | } | |||
template <typename T> | template <typename T> | |||
Pair(const K& first, const T& second): _data(std::make_pair(first, V ar(second))) | Pair(const K& first, const T& second): _data(std::make_pair(first, s econd)) | |||
/// Creates pair from two values. | /// Creates pair from two values. | |||
{ | { | |||
} | } | |||
virtual ~Pair() | virtual ~Pair() | |||
/// Destroys the Pair. | /// Destroys the Pair. | |||
{ | { | |||
} | } | |||
Pair& swap(Pair& other) | Pair& swap(Pair& other) | |||
skipping to change at line 114 | skipping to change at line 94 | |||
{ | { | |||
return _data.first; | return _data.first; | |||
} | } | |||
inline const Var& second() const | inline const Var& second() const | |||
/// Returns the second member of the pair. | /// Returns the second member of the pair. | |||
{ | { | |||
return _data.second; | return _data.second; | |||
} | } | |||
std::string toString() | ||||
{ | ||||
std::string str; | ||||
Var(*this).convert<std::string>(str); | ||||
return str; | ||||
} | ||||
private: | private: | |||
Data _data; | Data _data; | |||
}; | }; | |||
template <> | template <> | |||
class VarHolderImpl<Pair<std::string> >: public VarHolder | class VarHolderImpl<Pair<std::string> >: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(const Pair<std::string>& val): _val(val) | VarHolderImpl(const Pair<std::string>& val): _val(val) | |||
{ | { | |||
skipping to change at line 201 | skipping to change at line 188 | |||
{ | { | |||
throw BadCastException("Cannot cast Pair type to char"); | throw BadCastException("Cannot cast Pair type to char"); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
// Serialize in JSON format: equals an object | // Serialize in JSON format: equals an object | |||
// JSON format definition: { string ':' value } string:value pair n-times, sep. by ',' | // JSON format definition: { string ':' value } string:value pair n-times, sep. by ',' | |||
val.append("{ "); | val.append("{ "); | |||
Var key(_val.first()); | Var key(_val.first()); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, _val.second()); | Impl::appendJSONValue(val, _val.second()); | |||
val.append(" }"); | val.append(" }"); | |||
} | } | |||
void convert(Poco::DateTime&) const | void convert(Poco::DateTime&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::DateTime"); | throw BadCastException("Pair -> Poco::DateTime"); | |||
} | } | |||
void convert(Poco::LocalDateTime&) const | void convert(Poco::LocalDateTime&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::LocalDateTime"); | throw BadCastException("Pair -> Poco::LocalDateTime"); | |||
} | } | |||
void convert(Poco::Timestamp&) const | void convert(Poco::Timestamp&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::Timestamp"); | throw BadCastException("Pair -> Poco::Timestamp"); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Pair<std::string>& value() const | const Pair<std::string>& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 349 | skipping to change at line 336 | |||
{ | { | |||
throw BadCastException("Cannot cast Pair type to char"); | throw BadCastException("Cannot cast Pair type to char"); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
// Serialize in JSON format: equals an object | // Serialize in JSON format: equals an object | |||
// JSON format definition: { string ':' value } string:value pair n-times, sep. by ',' | // JSON format definition: { string ':' value } string:value pair n-times, sep. by ',' | |||
val.append("{ "); | val.append("{ "); | |||
Var key(_val.first()); | Var key(_val.first()); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, _val.second()); | Impl::appendJSONValue(val, _val.second()); | |||
val.append(" }"); | val.append(" }"); | |||
} | } | |||
void convert(Poco::DateTime&) const | void convert(Poco::DateTime&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::DateTime"); | throw BadCastException("Pair -> Poco::DateTime"); | |||
} | } | |||
void convert(Poco::LocalDateTime&) const | void convert(Poco::LocalDateTime&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::LocalDateTime"); | throw BadCastException("Pair -> Poco::LocalDateTime"); | |||
} | } | |||
void convert(Poco::Timestamp&) const | void convert(Poco::Timestamp&) const | |||
{ | { | |||
throw BadCastException("Pair -> Poco::Timestamp"); | throw BadCastException("Pair -> Poco::Timestamp"); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Pair<int>& value() const | const Pair<int>& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
End of changes. 12 change blocks. | ||||
42 lines changed or deleted | 18 lines changed or added | |||
Parser.h | Parser.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Parser | // Module: Parser | |||
// | // | |||
// Definition of the Parser class. | // Definition of the Parser class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
/* | ||||
Copyright (c) 2005 JSON.org | ||||
Permission is hereby granted, free of charge, to any person obtaining a cop | ||||
y | ||||
of this software and associated documentation files (the "Software"), to de | ||||
al | ||||
in the Software without restriction, including without limitation the right | ||||
s | ||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||
copies of the Software, and to permit persons to whom the Software is | ||||
furnished to do so, subject to the following conditions: | ||||
The above copyright notice and this permission notice shall be included in | ||||
all | ||||
copies or substantial portions of the Software. | ||||
The Software shall be used for Good, not Evil. | ||||
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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FRO | ||||
M, | ||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN T | ||||
HE | ||||
SOFTWARE. | ||||
*/ | ||||
#ifndef JSON_JSONParser_INCLUDED | #ifndef JSON_JSONParser_INCLUDED | |||
#define JSON_JSONParser_INCLUDED | #define JSON_JSONParser_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/JSON/Object.h" | #include "Poco/JSON/Object.h" | |||
#include "Poco/JSON/Array.h" | #include "Poco/JSON/Array.h" | |||
#include "Poco/JSON/Handler.h" | #include "Poco/JSON/ParseHandler.h" | |||
#include "Poco/JSON/JSONException.h" | ||||
#include "Poco/UTF8Encoding.h" | ||||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/StreamTokenizer.h" | #include <string> | |||
#include <istream> | ||||
#include <sstream> | ||||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
class JSON_API Parser | class JSON_API Parser | |||
/// A class for passing JSON strings or streams. | /// A RFC 4627 compatible class for parsing JSON strings or streams. | |||
/// | ||||
/// See http://www.ietf.org/rfc/rfc4627.txt for specification. | ||||
/// | ||||
/// Usage example: | ||||
/// | ||||
/// std::string json = "{ \"name\" : \"Franky\", \"children\" : [ | ||||
\"Jonas\", \"Ellen\" ] }"; | ||||
/// Parser parser; | ||||
/// Var result = parser.parse(json); | ||||
/// // ... use result | ||||
/// parser.reset(); | ||||
/// std::ostringstream ostr; | ||||
/// PrintHandler::Ptr pHandler = new PrintHandler(ostr); | ||||
/// parser.setHandler(pHandler); | ||||
/// parser.parse(json); // ostr.str() == json | ||||
/// | ||||
{ | { | |||
public: | public: | |||
typedef std::char_traits<char> CharTraits; | ||||
typedef CharTraits::int_type CharIntType; | ||||
Parser(); | enum Classes | |||
/// Constructor. | { | |||
C_SPACE, /* space */ | ||||
C_WHITE, /* other whitespace */ | ||||
C_LCURB, /* { */ | ||||
C_RCURB, /* } */ | ||||
C_LSQRB, /* [ */ | ||||
C_RSQRB, /* ] */ | ||||
C_COLON, /* : */ | ||||
C_COMMA, /* , */ | ||||
C_QUOTE, /* " */ | ||||
C_BACKS, /* \ */ | ||||
C_SLASH, /* / */ | ||||
C_PLUS, /* + */ | ||||
C_MINUS, /* - */ | ||||
C_POINT, /* . */ | ||||
C_ZERO , /* 0 */ | ||||
C_DIGIT, /* 123456789 */ | ||||
C_LOW_A, /* a */ | ||||
C_LOW_B, /* b */ | ||||
C_LOW_C, /* c */ | ||||
C_LOW_D, /* d */ | ||||
C_LOW_E, /* e */ | ||||
C_LOW_F, /* f */ | ||||
C_LOW_L, /* l */ | ||||
C_LOW_N, /* n */ | ||||
C_LOW_R, /* r */ | ||||
C_LOW_S, /* s */ | ||||
C_LOW_T, /* t */ | ||||
C_LOW_U, /* u */ | ||||
C_ABCDF, /* ABCDF */ | ||||
C_E, /* E */ | ||||
C_ETC, /* everything else */ | ||||
C_STAR, /* * */ | ||||
NR_CLASSES | ||||
}; | ||||
enum States | ||||
/// State codes | ||||
{ | ||||
GO, /* start */ | ||||
OK, /* ok */ | ||||
OB, /* object */ | ||||
KE, /* key */ | ||||
CO, /* colon */ | ||||
VA, /* value */ | ||||
AR, /* array */ | ||||
ST, /* string */ | ||||
EC, /* escape */ | ||||
U1, /* u1 */ | ||||
U2, /* u2 */ | ||||
U3, /* u3 */ | ||||
U4, /* u4 */ | ||||
MI, /* minus */ | ||||
ZE, /* zero */ | ||||
IT, /* integer */ | ||||
FR, /* fraction */ | ||||
E1, /* e */ | ||||
E2, /* ex */ | ||||
E3, /* exp */ | ||||
T1, /* tr */ | ||||
T2, /* tru */ | ||||
T3, /* true */ | ||||
F1, /* fa */ | ||||
F2, /* fal */ | ||||
F3, /* fals */ | ||||
F4, /* false */ | ||||
N1, /* nu */ | ||||
N2, /* nul */ | ||||
N3, /* null */ | ||||
C1, /* / */ | ||||
C2, /* / * */ | ||||
C3, /* * */ | ||||
FX, /* *.* *eE* */ | ||||
D1, /* second UTF-16 character decoding started by \ */ | ||||
D2, /* second UTF-16 character proceeded by u */ | ||||
NR_STATES | ||||
}; | ||||
enum Modes | ||||
/// Modes that can be pushed on the _pStack. | ||||
{ | ||||
MODE_ARRAY = 1, | ||||
MODE_DONE = 2, | ||||
MODE_KEY = 3, | ||||
MODE_OBJECT = 4 | ||||
}; | ||||
enum Actions | ||||
{ | ||||
CB = -10, /* _comment begin */ | ||||
CE = -11, /* _comment end */ | ||||
FA = -12, /* 0 */ | ||||
TR = -13, /* 0 */ | ||||
NU = -14, /* null */ | ||||
DE = -15, /* double detected by exponent e E */ | ||||
DF = -16, /* double detected by fraction . */ | ||||
SB = -17, /* string begin */ | ||||
MX = -18, /* integer detected by minus */ | ||||
ZX = -19, /* integer detected by zero */ | ||||
IX = -20, /* integer detected by 1-9 */ | ||||
EX = -21, /* next char is _escaped */ | ||||
UC = -22 /* Unicode character read */ | ||||
}; | ||||
enum JSONType | ||||
{ | ||||
JSON_T_NONE = 0, | ||||
JSON_T_INTEGER, | ||||
JSON_T_FLOAT, | ||||
JSON_T_NULL, | ||||
JSON_T_TRUE, | ||||
JSON_T_FALSE, | ||||
JSON_T_STRING, | ||||
JSON_T_MAX | ||||
}; | ||||
static const std::size_t JSON_PARSE_BUFFER_SIZE = 4096; | ||||
static const std::size_t JSON_PARSER_STACK_SIZE = 128; | ||||
static const int JSON_UNLIMITED_DEPTH = -1; | ||||
Parser(const Handler::Ptr& pHandler = new ParseHandler, std::size_t | ||||
bufSize = JSON_PARSE_BUFFER_SIZE); | ||||
/// Creates JSON Parser. | ||||
virtual ~Parser(); | virtual ~Parser(); | |||
/// Destructor. | /// Destroys JSON Parser. | |||
void reset(); | ||||
/// Resets the parser. | ||||
void setAllowComments(bool comments); | ||||
/// Allow comments. By default, comments are not allowed. | ||||
void parse(const std::string& source); | bool getAllowComments() const; | |||
/// Returns true if comments are allowed, false otherwise. | ||||
/// By default, comments are not allowed. | ||||
void setAllowNullByte(bool nullByte); | ||||
/// Allow null byte in strings. By default, null byte is all | ||||
owed. | ||||
bool getAllowNullByte() const; | ||||
/// Returns true if null byte is allowed, false otherwise. | ||||
/// By default, null bytes are allowed. | ||||
void setDepth(std::size_t depth); | ||||
/// Sets the allowed JSON depth. | ||||
std::size_t getDepth() const; | ||||
/// Returns the allowed JSON depth. | ||||
Dynamic::Var parse(const std::string& json); | ||||
/// Parses a string. | /// Parses a string. | |||
void parse(std::istream& in); | Dynamic::Var parse(std::istream& in); | |||
/// Parses a JSON from the input stream. | /// Parses a JSON from the input stream. | |||
void setHandler(Handler* handler); | void setHandler(const Handler::Ptr& pHandler); | |||
/// Set the handler. | /// Set the handler. | |||
Handler* getHandler(); | const Handler::Ptr& getHandler(); | |||
/// Returns the handler. | /// Returns the handler. | |||
Dynamic::Var asVar() const; | ||||
/// Returns the result of parsing; | ||||
Dynamic::Var result() const; | ||||
/// Returns the result of parsing as Dynamic::Var; | ||||
private: | private: | |||
const Token* nextToken(); | Parser(const Parser&); | |||
/// Returns the next token. | Parser& operator = (const Parser&); | |||
void readObject(); | typedef Poco::Buffer<char> BufType; | |||
/// Starts reading an object. | ||||
void readArray(); | bool push(int mode); | |||
/// Starts reading an array. | /// Push a mode onto the _pStack. Return false if there is o | |||
verflow. | ||||
bool readRow(bool firstCall = false); | bool pop(int mode); | |||
/// Reads a property value pair. Returns true when a next ro | /// Pops the stack, assuring that the current mode matches t | |||
w is expected. | he expectation. | |||
/// Returns false if there is underflow or if the modes mism | ||||
atch. | ||||
void growBuffer(); | ||||
void clearBuffer(); | ||||
void parseBufferPushBackChar(char c); | ||||
void parseBufferPopBackChar(); | ||||
void addCharToParseBuffer(CharIntType nextChar, int nextClass); | ||||
void addEscapedCharToParseBuffer(CharIntType nextChar); | ||||
CharIntType decodeUnicodeChar(); | ||||
void assertNotStringNullBool(); | ||||
void assertNonContainer(); | ||||
void parseBuffer(); | ||||
template <typename IT> | ||||
class Source | ||||
{ | ||||
public: | ||||
Source(const IT& it, const IT& end) : _it(it), _end(end) | ||||
{ | ||||
} | ||||
~Source() | ||||
{ | ||||
} | ||||
bool nextChar(CharIntType& c) | ||||
{ | ||||
if (_it == _end) return false; | ||||
c = *_it; | ||||
++_it; | ||||
return true; | ||||
} | ||||
private: | ||||
IT _it; | ||||
IT _end; | ||||
}; | ||||
template <typename S> | ||||
bool parseChar(CharIntType nextChar, S& source) | ||||
/// Called for each character (or partial character) in JSON | ||||
string. | ||||
/// It accepts UTF-8, UTF-16, or UTF-32. If the character is | ||||
accepted, | ||||
/// it returns true, otherwise false. | ||||
{ | ||||
CharIntType nextClass, nextState; | ||||
unsigned char ch = static_cast<unsigned char>(CharTraits::to | ||||
_char_type(nextChar)); | ||||
// Determine the character's class. | ||||
if ((!_allowNullByte && ch == 0)) return false; | ||||
if (ch >= 0x80) | ||||
{ | ||||
nextClass = C_ETC; | ||||
CharIntType count = utf8CheckFirst(nextChar); | ||||
if (!count) | ||||
{ | ||||
throw Poco::JSON::JSONException("Bad charact | ||||
er."); | ||||
} | ||||
char buffer[4]; | ||||
buffer[0] = nextChar; | ||||
for(int i = 1; i < count; ++i) | ||||
{ | ||||
int c = 0; | ||||
if (!source.nextChar(c)) throw Poco::JSON::J | ||||
SONException("Invalid UTF8 sequence found"); | ||||
buffer[i] = c; | ||||
} | ||||
if (!Poco::UTF8Encoding::isLegal((unsigned char*) bu | ||||
ffer, count)) | ||||
{ | ||||
throw Poco::JSON::JSONException("No legal UT | ||||
F8 found"); | ||||
} | ||||
for(int i = 0; i < count; ++i) | ||||
{ | ||||
parseBufferPushBackChar(buffer[i]); | ||||
} | ||||
return true; | ||||
} | ||||
else | ||||
{ | ||||
nextClass = _asciiClass[nextChar]; | ||||
if (nextClass <= xx) return false; | ||||
} | ||||
addCharToParseBuffer(nextChar, nextClass); | ||||
// Get the next _state from the _state transition table. | ||||
nextState = _stateTransitionTable[_state][nextClass]; | ||||
if (nextState >= 0) | ||||
{ | ||||
_state = nextState; | ||||
} | ||||
else | ||||
{ | ||||
// Or perform one of the actions. | ||||
switch (nextState) | ||||
{ | ||||
// Unicode character | ||||
case UC: | ||||
if(!decodeUnicodeChar()) return false; | ||||
// check if we need to read a second UTF-16 | ||||
char | ||||
if (_utf16HighSurrogate) _state = D1; | ||||
else _state = ST; | ||||
break; | ||||
// _escaped char | ||||
case EX: | ||||
_escaped = 1; | ||||
_state = EC; | ||||
break; | ||||
// integer detected by minus | ||||
case MX: | ||||
_type = JSON_T_INTEGER; | ||||
_state = MI; | ||||
break; | ||||
// integer detected by zero | ||||
case ZX: | ||||
_type = JSON_T_INTEGER; | ||||
_state = ZE; | ||||
break; | ||||
// integer detected by 1-9 | ||||
case IX: | ||||
_type = JSON_T_INTEGER; | ||||
_state = IT; | ||||
break; | ||||
// floating point number detected by exponent | ||||
case DE: | ||||
assertNotStringNullBool(); | ||||
_type = JSON_T_FLOAT; | ||||
_state = E1; | ||||
break; | ||||
// floating point number detected by fraction | ||||
case DF: | ||||
assertNotStringNullBool(); | ||||
_type = JSON_T_FLOAT; | ||||
_state = FX; | ||||
break; | ||||
// string begin " | ||||
case SB: | ||||
clearBuffer(); | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_type = JSON_T_STRING; | ||||
_state = ST; | ||||
break; | ||||
// n | ||||
case NU: | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_type = JSON_T_NULL; | ||||
_state = N1; | ||||
break; | ||||
// f | ||||
case FA: | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_type = JSON_T_FALSE; | ||||
_state = F1; | ||||
break; | ||||
// t | ||||
case TR: | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_type = JSON_T_TRUE; | ||||
_state = T1; | ||||
break; | ||||
// closing comment | ||||
case CE: | ||||
_comment = 0; | ||||
poco_assert(_parseBuffer.size() == 0); | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_state = _beforeCommentState; | ||||
break; | ||||
// opening comment | ||||
case CB: | ||||
if (!_allowComments) return false; | ||||
parseBufferPopBackChar(); | ||||
parseBuffer(); | ||||
poco_assert(_parseBuffer.size() == 0); | ||||
poco_assert(_type != JSON_T_STRING); | ||||
switch (_stack[_top]) | ||||
{ | ||||
case MODE_ARRAY: | ||||
case MODE_OBJECT: | ||||
switch(_state) | ||||
{ | ||||
case VA: | ||||
case AR: | ||||
_beforeCommentState | ||||
= _state; | ||||
break; | ||||
default: | ||||
_beforeCommentState | ||||
= OK; | ||||
break; | ||||
} | ||||
break; | ||||
default: | ||||
_beforeCommentState | ||||
= _state; | ||||
break; | ||||
} | ||||
_type = JSON_T_NONE; | ||||
_state = C1; | ||||
_comment = 1; | ||||
break; | ||||
// empty } | ||||
case -9: | ||||
{ | ||||
clearBuffer(); | ||||
if (_pHandler) _pHandler->endObject( | ||||
); | ||||
if (!pop(MODE_KEY)) return false; | ||||
_state = OK; | ||||
break; | ||||
} | ||||
// } | ||||
case -8: | ||||
{ | ||||
parseBufferPopBackChar(); | ||||
parseBuffer(); | ||||
if (_pHandler) _pHandler->endObject( | ||||
); | ||||
if (!pop(MODE_OBJECT)) return false; | ||||
_type = JSON_T_NONE; | ||||
_state = OK; | ||||
break; | ||||
} | ||||
// ] | ||||
case -7: | ||||
{ | ||||
parseBufferPopBackChar(); | ||||
parseBuffer(); | ||||
if (_pHandler) _pHandler->endArray() | ||||
; | ||||
if (!pop(MODE_ARRAY)) return false; | ||||
_type = JSON_T_NONE; | ||||
_state = OK; | ||||
break; | ||||
} | ||||
// { | ||||
case -6: | ||||
{ | ||||
parseBufferPopBackChar(); | ||||
if (_pHandler) _pHandler->startObjec | ||||
t(); | ||||
if (!push(MODE_KEY)) return false; | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_state = OB; | ||||
break; | ||||
} | ||||
// [ | ||||
case -5: | ||||
{ | ||||
parseBufferPopBackChar(); | ||||
if (_pHandler) _pHandler->startArray | ||||
(); | ||||
if (!push(MODE_ARRAY)) return false; | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_state = AR; | ||||
break; | ||||
} | ||||
// string end " | ||||
case -4: | ||||
parseBufferPopBackChar(); | ||||
switch (_stack[_top]) | ||||
{ | ||||
case MODE_KEY: | ||||
{ | ||||
poco_assert(_type == JSON_T_ | ||||
STRING); | ||||
_type = JSON_T_NONE; | ||||
_state = CO; | ||||
if (_pHandler) | ||||
{ | ||||
_pHandler->key(std:: | ||||
string(_parseBuffer.begin(), _parseBuffer.size())); | ||||
} | ||||
clearBuffer(); | ||||
break; | ||||
} | ||||
case MODE_ARRAY: | ||||
case MODE_OBJECT: | ||||
poco_assert(_type == JSON_T_ | ||||
STRING); | ||||
parseBuffer(); | ||||
_type = JSON_T_NONE; | ||||
_state = OK; | ||||
break; | ||||
default: | ||||
return false; | ||||
} | ||||
break; | ||||
// , | ||||
case -3: | ||||
{ | ||||
parseBufferPopBackChar(); | ||||
parseBuffer(); | ||||
switch (_stack[_top]) | ||||
{ | ||||
case MODE_OBJECT: | ||||
//A comma causes a flip from | ||||
object mode to key mode. | ||||
if (!pop(MODE_OBJECT) || !pu | ||||
sh(MODE_KEY)) return false; | ||||
poco_assert(_type != JSON_T_ | ||||
STRING); | ||||
_type = JSON_T_NONE; | ||||
_state = KE; | ||||
break; | ||||
case MODE_ARRAY: | ||||
poco_assert(_type != JSON_T_ | ||||
STRING); | ||||
_type = JSON_T_NONE; | ||||
_state = VA; | ||||
break; | ||||
default: | ||||
return false; | ||||
} | ||||
break; | ||||
} | ||||
// : | ||||
case -2: | ||||
// A colon causes a flip from key mo | ||||
de to object mode. | ||||
parseBufferPopBackChar(); | ||||
if (!pop(MODE_KEY) || !push(MODE_OBJ | ||||
ECT)) return false; | ||||
poco_assert(_type == JSON_T_NONE); | ||||
_state = VA; | ||||
break; | ||||
//Bad action. | ||||
default: | ||||
return false; | ||||
} | ||||
} | ||||
return true; | ||||
} | ||||
bool done(); | ||||
static CharIntType utf8CheckFirst(char byte); | ||||
static const int _asciiClass[128]; | ||||
/// This array maps the 128 ASCII characters into character | ||||
classes. | ||||
/// The remaining Unicode characters should be mapped to C_E | ||||
TC. | ||||
/// Non-whitespace control characters are errors. | ||||
static const int _stateTransitionTable[NR_STATES][NR_CLASSES]; | ||||
static const int xx = -1; | ||||
bool isHighSurrogate(unsigned uc); | ||||
bool isLowSurrogate(unsigned uc); | ||||
unsigned decodeSurrogatePair(unsigned hi, unsigned lo); | ||||
Handler::Ptr _pHandler; | ||||
signed char _state; | ||||
signed char _beforeCommentState; | ||||
JSONType _type; | ||||
signed char _escaped; | ||||
signed char _comment; | ||||
unsigned short _utf16HighSurrogate; | ||||
int _depth; | ||||
int _top; | ||||
BufType _stack; | ||||
BufType _parseBuffer; | ||||
char _decimalPoint; | ||||
bool _allowNullByte; | ||||
bool _allowComments; | ||||
}; | ||||
void readValue(const Token* token); | inline void Parser::setAllowComments(bool comments) | |||
/// Read a value from the token. | { | |||
_allowComments = comments; | ||||
} | ||||
bool readElements(bool firstCall = false); | inline bool Parser::getAllowComments() const | |||
/// Read all elements of an array. | { | |||
return _allowComments; | ||||
} | ||||
StreamTokenizer _tokenizer; | inline void Parser::setAllowNullByte(bool nullByte) | |||
Handler* _handler; | { | |||
}; | _allowNullByte = nullByte; | |||
} | ||||
inline bool Parser::getAllowNullByte() const | ||||
{ | ||||
return _allowNullByte; | ||||
} | ||||
inline void Parser::setDepth(std::size_t depth) | ||||
{ | ||||
_depth = static_cast<int>(depth); | ||||
} | ||||
inline std::size_t Parser::getDepth() const | ||||
{ | ||||
return static_cast<int>(_depth); | ||||
} | ||||
inline void Parser::setHandler(const Handler::Ptr& pHandler) | ||||
{ | ||||
_pHandler = pHandler; | ||||
} | ||||
inline const Handler::Ptr& Parser::getHandler() | ||||
{ | ||||
return _pHandler; | ||||
} | ||||
inline Dynamic::Var Parser::result() const | ||||
{ | ||||
return _pHandler->asVar(); | ||||
} | ||||
inline Dynamic::Var Parser::asVar() const | ||||
{ | ||||
if (_pHandler) return _pHandler->asVar(); | ||||
return Dynamic::Var(); | ||||
} | ||||
inline bool Parser::done() | ||||
{ | ||||
return _state == OK && pop(MODE_DONE); | ||||
} | ||||
inline void Parser::assertNotStringNullBool() | ||||
{ | ||||
poco_assert(_type != JSON_T_FALSE && | ||||
_type != JSON_T_TRUE && | ||||
_type != JSON_T_NULL && | ||||
_type != JSON_T_STRING); | ||||
} | ||||
inline void Parser::assertNonContainer() | ||||
{ | ||||
poco_assert(_type == JSON_T_NULL || | ||||
_type == JSON_T_FALSE || | ||||
_type == JSON_T_TRUE || | ||||
_type == JSON_T_FLOAT || | ||||
_type == JSON_T_INTEGER || | ||||
_type == JSON_T_STRING); | ||||
} | ||||
inline void Parser::growBuffer() | ||||
{ | ||||
_parseBuffer.setCapacity(_parseBuffer.size() * 2, true); | ||||
} | ||||
inline void Parser::parse(const std::string& source) | inline bool Parser::isHighSurrogate(unsigned uc) | |||
{ | { | |||
std::istringstream is(source); | return (uc & 0xFC00) == 0xD800; | |||
parse(is); | ||||
} | } | |||
inline void Parser::setHandler(Handler* handler) | inline bool Parser::isLowSurrogate(unsigned uc) | |||
{ | { | |||
_handler = handler; | return (uc & 0xFC00) == 0xDC00; | |||
} | } | |||
inline Handler* Parser::getHandler() | inline unsigned Parser::decodeSurrogatePair(unsigned hi, unsigned lo) | |||
{ | { | |||
return _handler; | return ((hi & 0x3FF) << 10) + (lo & 0x3FF) + 0x10000; | |||
} | } | |||
}} // namespace Poco::JSON | }} // namespace Poco::JSON | |||
#endif // JSON_JSONParser_INCLUDED | #endif // JSON_JSONParser_INCLUDED | |||
End of changes. 26 change blocks. | ||||
67 lines changed or deleted | 696 lines changed or added | |||
ParserEngine.h | ParserEngine.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: ParserEngine | // Module: ParserEngine | |||
// | // | |||
// Definition of the ParseEngine class. | // Definition of the ParseEngine class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
#ifndef XML_ParserEngine_INCLUDED | #ifndef XML_ParserEngine_INCLUDED | |||
#define XML_ParserEngine_INCLUDED | #define XML_ParserEngine_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#if defined(POCO_UNBUNDLED) | #if defined(POCO_UNBUNDLED) | |||
#include <expat.h> | #include <expat.h> | |||
#else | #else | |||
#include "Poco/XML/expat.h" | #include "Poco/XML/expat.h" | |||
#endif | #endif | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PartHandler.h | PartHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: PartHandler | // Module: PartHandler | |||
// | // | |||
// Definition of the PartHandler class. | // Definition of the PartHandler class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_PartHandler_INCLUDED | #ifndef Net_PartHandler_INCLUDED | |||
#define Net_PartHandler_INCLUDED | #define Net_PartHandler_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PartSource.h | PartSource.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: PartSource | // Module: PartSource | |||
// | // | |||
// Definition of the PartSource class. | // Definition of the PartSource class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_PartSource_INCLUDED | #ifndef Net_PartSource_INCLUDED | |||
#define Net_PartSource_INCLUDED | #define Net_PartSource_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/MessageHeader.h" | #include "Poco/Net/MessageHeader.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 59 | skipping to change at line 39 | |||
/// This abstract class is used for adding parts or attachments | /// This abstract class is used for adding parts or attachments | |||
/// to mail messages, as well as for uploading files as part of a HT ML form. | /// to mail messages, as well as for uploading files as part of a HT ML form. | |||
{ | { | |||
public: | public: | |||
virtual std::istream& stream() = 0; | virtual std::istream& stream() = 0; | |||
/// Returns an input stream for reading the | /// Returns an input stream for reading the | |||
/// part data. | /// part data. | |||
/// | /// | |||
/// Subclasses must override this method. | /// Subclasses must override this method. | |||
virtual const std::string& filename(); | virtual const std::string& filename() const; | |||
/// Returns the filename for the part or attachment. | /// Returns the filename for the part or attachment. | |||
/// | /// | |||
/// May be overridded by subclasses. The default | /// May be overridded by subclasses. The default | |||
/// implementation returns an empty string. | /// implementation returns an empty string. | |||
const std::string& mediaType() const; | const std::string& mediaType() const; | |||
/// Returns the MIME media type for this part or attachment. | /// Returns the MIME media type for this part or attachment. | |||
MessageHeader& headers(); | MessageHeader& headers(); | |||
/// Returns a MessageHeader containing additional header | /// Returns a MessageHeader containing additional header | |||
/// fields for the part. | /// fields for the part. | |||
const MessageHeader& headers() const; | const MessageHeader& headers() const; | |||
/// Returns a MessageHeader containing additional header | /// Returns a MessageHeader containing additional header | |||
/// fields for the part. | /// fields for the part. | |||
virtual std::streamsize getContentLength() const; | ||||
/// Returns the content length for this part | ||||
/// which may be UNKNOWN_CONTENT_LENGTH if | ||||
/// not available. | ||||
virtual ~PartSource(); | virtual ~PartSource(); | |||
/// Destroys the PartSource. | /// Destroys the PartSource. | |||
static const int UNKNOWN_CONTENT_LENGTH; | ||||
protected: | protected: | |||
PartSource(); | PartSource(); | |||
/// Creates the PartSource, using | /// Creates the PartSource, using | |||
/// the application/octet-stream MIME type. | /// the application/octet-stream MIME type. | |||
PartSource(const std::string& mediaType); | PartSource(const std::string& mediaType); | |||
/// Creates the PartSource, using the | /// Creates the PartSource, using the | |||
/// given MIME type. | /// given MIME type. | |||
private: | private: | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 8 lines changed or added | |||
Path.h | Path.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the Path class. | // Definition of the Path class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_INCLUDED | #ifndef Foundation_Path_INCLUDED | |||
#define Foundation_Path_INCLUDED | #define Foundation_Path_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Path_UNIX.h | Path_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the PathImpl class fo rUnix. | // Definition of the PathImpl class fo rUnix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_UNIX_INCLUDED | #ifndef Foundation_Path_UNIX_INCLUDED | |||
#define Foundation_Path_UNIX_INCLUDED | #define Foundation_Path_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Path_VMS.h | Path_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the PathImpl class for OpenVMS. | // Definition of the PathImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_VMS_INCLUDED | #ifndef Foundation_Path_VMS_INCLUDED | |||
#define Foundation_Path_VMS_INCLUDED | #define Foundation_Path_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Path_WIN32.h | Path_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the PathImpl class for WIN32. | // Definition of the PathImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_WIN32_INCLUDED | #ifndef Foundation_Path_WIN32_INCLUDED | |||
#define Foundation_Path_WIN32_INCLUDED | #define Foundation_Path_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API PathImpl | class Foundation_API PathImpl | |||
{ | { | |||
public: | public: | |||
static std::string currentImpl(); | static std::string currentImpl(); | |||
static std::string homeImpl(); | static std::string homeImpl(); | |||
static std::string tempImpl(); | static std::string tempImpl(); | |||
static std::string nullImpl(); | static std::string nullImpl(); | |||
static std::string systemImpl(); | ||||
static std::string expandImpl(const std::string& path); | static std::string expandImpl(const std::string& path); | |||
static void listRootsImpl(std::vector<std::string>& roots); | static void listRootsImpl(std::vector<std::string>& roots); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Path_WIN32_INCLUDED | #endif // Foundation_Path_WIN32_INCLUDED | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 2 lines changed or added | |||
Path_WIN32U.h | Path_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the PathImpl class for WIN32. | // Definition of the PathImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_WIN32U_INCLUDED | #ifndef Foundation_Path_WIN32U_INCLUDED | |||
#define Foundation_Path_WIN32U_INCLUDED | #define Foundation_Path_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API PathImpl | class Foundation_API PathImpl | |||
{ | { | |||
public: | public: | |||
static std::string currentImpl(); | static std::string currentImpl(); | |||
static std::string homeImpl(); | static std::string homeImpl(); | |||
static std::string tempImpl(); | static std::string tempImpl(); | |||
static std::string nullImpl(); | static std::string nullImpl(); | |||
static std::string systemImpl(); | ||||
static std::string expandImpl(const std::string& path); | static std::string expandImpl(const std::string& path); | |||
static void listRootsImpl(std::vector<std::string>& roots); | static void listRootsImpl(std::vector<std::string>& roots); | |||
enum | enum | |||
{ | { | |||
MAX_PATH_LEN = 32767 | MAX_PATH_LEN = 32767 | |||
}; | }; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 2 lines changed or added | |||
Path_WINCE.h | Path_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: Path | // Module: Path | |||
// | // | |||
// Definition of the PathImpl class for WIN32. | // Definition of the PathImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Path_WINCE_INCLUDED | #ifndef Foundation_Path_WINCE_INCLUDED | |||
#define Foundation_Path_WINCE_INCLUDED | #define Foundation_Path_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API PathImpl | class Foundation_API PathImpl | |||
{ | { | |||
public: | public: | |||
static std::string currentImpl(); | static std::string currentImpl(); | |||
// Returns the root directory | // Returns the root directory | |||
static std::string homeImpl(); | static std::string homeImpl(); | |||
static std::string tempImpl(); | static std::string tempImpl(); | |||
static std::string nullImpl(); | static std::string nullImpl(); | |||
static std::string systemImpl(); | ||||
static std::string expandImpl(const std::string& path); | static std::string expandImpl(const std::string& path); | |||
static void listRootsImpl(std::vector<std::string>& roots); | static void listRootsImpl(std::vector<std::string>& roots); | |||
enum | enum | |||
{ | { | |||
MAX_PATH_LEN = 32767 | MAX_PATH_LEN = 32767 | |||
}; | }; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 2 lines changed or added | |||
PatternFormatter.h | PatternFormatter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: PatternFormatter | // Module: PatternFormatter | |||
// | // | |||
// Definition of the PatternFormatter class. | // Definition of the PatternFormatter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PatternFormatter_INCLUDED | #ifndef Foundation_PatternFormatter_INCLUDED | |||
#define Foundation_PatternFormatter_INCLUDED | #define Foundation_PatternFormatter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Formatter.h" | #include "Poco/Formatter.h" | |||
#include "Poco/Message.h" | #include "Poco/Message.h" | |||
#include <vector> | ||||
namespace Poco { | namespace Poco { | |||
class Foundation_API PatternFormatter: public Formatter | class Foundation_API PatternFormatter: public Formatter | |||
/// This Formatter allows for custom formatting of | /// This Formatter allows for custom formatting of | |||
/// log messages based on format patterns. | /// log messages based on format patterns. | |||
/// | /// | |||
/// The format pattern is used as a template to format the message a nd | /// The format pattern is used as a template to format the message a nd | |||
/// is copied character by character except for the following specia l characters, | /// is copied character by character except for the following specia l characters, | |||
/// which are replaced by the corresponding value. | /// which are replaced by the corresponding value. | |||
/// | /// | |||
skipping to change at line 89 | skipping to change at line 71 | |||
/// * %h - message date/time hour (00 .. 12) | /// * %h - message date/time hour (00 .. 12) | |||
/// * %a - message date/time am/pm | /// * %a - message date/time am/pm | |||
/// * %A - message date/time AM/PM | /// * %A - message date/time AM/PM | |||
/// * %M - message date/time minute (00 .. 59) | /// * %M - message date/time minute (00 .. 59) | |||
/// * %S - message date/time second (00 .. 59) | /// * %S - message date/time second (00 .. 59) | |||
/// * %i - message date/time millisecond (000 .. 999) | /// * %i - message date/time millisecond (000 .. 999) | |||
/// * %c - message date/time centisecond (0 .. 9) | /// * %c - message date/time centisecond (0 .. 9) | |||
/// * %F - message date/time fractional seconds/microseconds (0000 00 - 999999) | /// * %F - message date/time fractional seconds/microseconds (0000 00 - 999999) | |||
/// * %z - time zone differential in ISO 8601 format (Z or +NN.NN) | /// * %z - time zone differential in ISO 8601 format (Z or +NN.NN) | |||
/// * %Z - time zone differential in RFC format (GMT or +NNNN) | /// * %Z - time zone differential in RFC format (GMT or +NNNN) | |||
/// * %L - convert time to local time (must be specified before an y date/time specifier; does not itself output anything) | ||||
/// * %E - epoch time (UTC, seconds since midnight, January 1, 197 0) | /// * %E - epoch time (UTC, seconds since midnight, January 1, 197 0) | |||
/// * %v[width] - the message source (%s) but text length is padde d/cropped to 'width' | ||||
/// * %[name] - the value of the message parameter with the given name | /// * %[name] - the value of the message parameter with the given name | |||
/// * %% - percent sign | /// * %% - percent sign | |||
{ | { | |||
public: | public: | |||
PatternFormatter(); | PatternFormatter(); | |||
/// Creates a PatternFormatter. | /// Creates a PatternFormatter. | |||
/// The format pattern must be specified with | /// The format pattern must be specified with | |||
/// a call to setProperty. | /// a call to setProperty. | |||
skipping to change at line 137 | skipping to change at line 121 | |||
/// name is not recognized. | /// name is not recognized. | |||
static const std::string PROP_PATTERN; | static const std::string PROP_PATTERN; | |||
static const std::string PROP_TIMES; | static const std::string PROP_TIMES; | |||
protected: | protected: | |||
static const std::string& getPriorityName(int); | static const std::string& getPriorityName(int); | |||
/// Returns a string for the given priority value. | /// Returns a string for the given priority value. | |||
private: | private: | |||
bool _localTime; | struct PatternAction | |||
{ | ||||
PatternAction(): key(0), length(0) | ||||
{ | ||||
} | ||||
char key; | ||||
int length; | ||||
std::string property; | ||||
std::string prepend; | ||||
}; | ||||
void parsePattern(); | ||||
/// Will parse the _pattern string into the vector of Patter | ||||
nActions, | ||||
/// which contains the message key, any text that needs to b | ||||
e written first | ||||
/// a proprety in case of %[] and required length. | ||||
std::vector<PatternAction> _patternActions; | ||||
bool _localTime; | ||||
std::string _pattern; | std::string _pattern; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_PatternFormatter_INCLUDED | #endif // Foundation_PatternFormatter_INCLUDED | |||
End of changes. 5 change blocks. | ||||
33 lines changed or deleted | 26 lines changed or added | |||
Pipe.h | Pipe.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Pipe | // Module: Pipe | |||
// | // | |||
// Definition of the Pipe class. | // Definition of the Pipe class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Pipe_INCLUDED | #ifndef Foundation_Pipe_INCLUDED | |||
#define Foundation_Pipe_INCLUDED | #define Foundation_Pipe_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/PipeImpl.h" | #include "Poco/PipeImpl.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PipeImpl.h | PipeImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: PipeImpl | // Module: PipeImpl | |||
// | // | |||
// Definition of the PipeImpl class. | // Definition of the PipeImpl class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PipeImpl_INCLUDED | #ifndef Foundation_PipeImpl_INCLUDED | |||
#define Foundation_PipeImpl_INCLUDED | #define Foundation_PipeImpl_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#if defined(_WIN32_WCE) | #if defined(_WIN32_WCE) | |||
#include "PipeImpl_DUMMY.h" | #include "PipeImpl_DUMMY.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PipeImpl_DUMMY.h | PipeImpl_DUMMY.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: PipeImpl | // Module: PipeImpl | |||
// | // | |||
// Definition of the PipeImpl_DUMMY class. | // Definition of the PipeImpl_DUMMY class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PipeImpl_DUMMY_INCLUDED | #ifndef Foundation_PipeImpl_DUMMY_INCLUDED | |||
#define Foundation_PipeImpl_DUMMY_INCLUDED | #define Foundation_PipeImpl_DUMMY_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PipeImpl_POSIX.h | PipeImpl_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: PipeImpl | // Module: PipeImpl | |||
// | // | |||
// Definition of the PipeImpl class for POSIX. | // Definition of the PipeImpl class for POSIX. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PipeImpl_POSIX_INCLUDED | #ifndef Foundation_PipeImpl_POSIX_INCLUDED | |||
#define Foundation_PipeImpl_POSIX_INCLUDED | #define Foundation_PipeImpl_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PipeImpl_WIN32.h | PipeImpl_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: PipeImpl | // Module: PipeImpl | |||
// | // | |||
// Definition of the PipeImpl class for WIN32. | // Definition of the PipeImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PipeImpl_WIN32_INCLUDED | #ifndef Foundation_PipeImpl_WIN32_INCLUDED | |||
#define Foundation_PipeImpl_WIN32_INCLUDED | #define Foundation_PipeImpl_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PipeStream.h | PipeStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: PipeStream | // Module: PipeStream | |||
// | // | |||
// Definition of the PipeStream class. | // Definition of the PipeStream class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PipeStream_INCLUDED | #ifndef Foundation_PipeStream_INCLUDED | |||
#define Foundation_PipeStream_INCLUDED | #define Foundation_PipeStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Pipe.h" | #include "Poco/Pipe.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Platform.h | Platform.h | |||
---|---|---|---|---|
// | // | |||
// Platform.h | // Platform.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/Platform.h#4 $ | // $Id: //poco/1.4/Foundation/include/Poco/Platform.h#5 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Platform | // Module: Platform | |||
// | // | |||
// Platform and architecture identification macros. | // Platform and architecture identification macros. | |||
// | // | |||
// NOTE: This file may be included from both C++ and C code, so it | // NOTE: This file may be included from both C++ and C code, so it | |||
// must not contain any C++ specific things. | // must not contain any C++ specific things. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Platform_INCLUDED | #ifndef Foundation_Platform_INCLUDED | |||
#define Foundation_Platform_INCLUDED | #define Foundation_Platform_INCLUDED | |||
// | // | |||
// Platform Identification | // Platform Identification | |||
// | // | |||
#define POCO_OS_FREE_BSD 0x0001 | #define POCO_OS_FREE_BSD 0x0001 | |||
#define POCO_OS_AIX 0x0002 | #define POCO_OS_AIX 0x0002 | |||
skipping to change at line 72 | skipping to change at line 52 | |||
#define POCO_OS_WINDOWS_CE 0x1011 | #define POCO_OS_WINDOWS_CE 0x1011 | |||
#define POCO_OS_VMS 0x2001 | #define POCO_OS_VMS 0x2001 | |||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS_FAMILY_BSD 1 | #define POCO_OS_FAMILY_BSD 1 | |||
#define POCO_OS POCO_OS_FREE_BSD | #define POCO_OS POCO_OS_FREE_BSD | |||
#elif defined(_AIX) || defined(__TOS_AIX__) | #elif defined(_AIX) || defined(__TOS_AIX__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_AIX | #define POCO_OS POCO_OS_AIX | |||
#elif defined(hpux) || defined(_hpux) | #elif defined(hpux) || defined(_hpux) || defined(__hpux) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_HPUX | #define POCO_OS POCO_OS_HPUX | |||
#elif defined(__digital__) || defined(__osf__) | #elif defined(__digital__) || defined(__osf__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_TRU64 | #define POCO_OS POCO_OS_TRU64 | |||
#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(_ _TOS_LINUX__) | #elif defined(linux) || defined(__linux) || defined(__linux__) || defined(_ _TOS_LINUX__) || defined(EMSCRIPTEN) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_LINUX | #define POCO_OS POCO_OS_LINUX | |||
#elif defined(__APPLE__) || defined(__TOS_MACOS__) | #elif defined(__APPLE__) || defined(__TOS_MACOS__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS_FAMILY_BSD 1 | #define POCO_OS_FAMILY_BSD 1 | |||
#define POCO_OS POCO_OS_MAC_OS_X | #define POCO_OS POCO_OS_MAC_OS_X | |||
#elif defined(__NetBSD__) | #elif defined(__NetBSD__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS_FAMILY_BSD 1 | #define POCO_OS_FAMILY_BSD 1 | |||
#define POCO_OS POCO_OS_NET_BSD | #define POCO_OS POCO_OS_NET_BSD | |||
skipping to change at line 102 | skipping to change at line 82 | |||
#define POCO_OS POCO_OS_OPEN_BSD | #define POCO_OS POCO_OS_OPEN_BSD | |||
#elif defined(sgi) || defined(__sgi) | #elif defined(sgi) || defined(__sgi) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_IRIX | #define POCO_OS POCO_OS_IRIX | |||
#elif defined(sun) || defined(__sun) | #elif defined(sun) || defined(__sun) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_SOLARIS | #define POCO_OS POCO_OS_SOLARIS | |||
#elif defined(__QNX__) | #elif defined(__QNX__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_QNX | #define POCO_OS POCO_OS_QNX | |||
#elif defined(__CYGWIN__) | ||||
#define POCO_OS_FAMILY_UNIX 1 | ||||
#define POCO_OS POCO_OS_CYGWIN | ||||
#elif defined(POCO_VXWORKS) | ||||
#define POCO_OS_FAMILY_UNIX 1 | ||||
#define POCO_OS POCO_OS_VXWORKS | ||||
#elif defined(unix) || defined(__unix) || defined(__unix__) | #elif defined(unix) || defined(__unix) || defined(__unix__) | |||
#define POCO_OS_FAMILY_UNIX 1 | #define POCO_OS_FAMILY_UNIX 1 | |||
#define POCO_OS POCO_OS_UNKNOWN_UNIX | #define POCO_OS POCO_OS_UNKNOWN_UNIX | |||
#elif defined(_WIN32_WCE) | #elif defined(_WIN32_WCE) | |||
#define POCO_OS_FAMILY_WINDOWS 1 | #define POCO_OS_FAMILY_WINDOWS 1 | |||
#define POCO_OS POCO_OS_WINDOWS_CE | #define POCO_OS POCO_OS_WINDOWS_CE | |||
#elif defined(_WIN32) || defined(_WIN64) | #elif defined(_WIN32) || defined(_WIN64) | |||
#define POCO_OS_FAMILY_WINDOWS 1 | #define POCO_OS_FAMILY_WINDOWS 1 | |||
#define POCO_OS POCO_OS_WINDOWS_NT | #define POCO_OS POCO_OS_WINDOWS_NT | |||
#elif defined(__CYGWIN__) | ||||
#define POCO_OS_FAMILY_UNIX 1 | ||||
#define POCO_OS POCO_OS_CYGWIN | ||||
#elif defined(__VMS) | #elif defined(__VMS) | |||
#define POCO_OS_FAMILY_VMS 1 | #define POCO_OS_FAMILY_VMS 1 | |||
#define POCO_OS POCO_OS_VMS | #define POCO_OS POCO_OS_VMS | |||
#elif defined(POCO_VXWORKS) | #endif | |||
#define POCO_OS_FAMILY_UNIX 1 | ||||
#define POCO_OS POCO_OS_VXWORKS | #if !defined(POCO_OS) | |||
#error "Unknown Platform." | ||||
#endif | ||||
#ifndef POCO_OS_FAMILY_UNIX | ||||
#define GCC_DIAG_OFF(x) | ||||
#define GCC_DIAG_ON(x) | ||||
#endif | #endif | |||
// | // | |||
// Hardware Architecture and Byte Order | // Hardware Architecture and Byte Order | |||
// | // | |||
#define POCO_ARCH_ALPHA 0x01 | #define POCO_ARCH_ALPHA 0x01 | |||
#define POCO_ARCH_IA32 0x02 | #define POCO_ARCH_IA32 0x02 | |||
#define POCO_ARCH_IA64 0x03 | #define POCO_ARCH_IA64 0x03 | |||
#define POCO_ARCH_MIPS 0x04 | #define POCO_ARCH_MIPS 0x04 | |||
#define POCO_ARCH_HPPA 0x05 | #define POCO_ARCH_HPPA 0x05 | |||
#define POCO_ARCH_PPC 0x06 | #define POCO_ARCH_PPC 0x06 | |||
#define POCO_ARCH_POWER 0x07 | #define POCO_ARCH_POWER 0x07 | |||
#define POCO_ARCH_SPARC 0x08 | #define POCO_ARCH_SPARC 0x08 | |||
#define POCO_ARCH_AMD64 0x09 | #define POCO_ARCH_AMD64 0x09 | |||
#define POCO_ARCH_ARM 0x0a | #define POCO_ARCH_ARM 0x0a | |||
#define POCO_ARCH_M68K 0x0b | #define POCO_ARCH_M68K 0x0b | |||
#define POCO_ARCH_S390 0x0c | #define POCO_ARCH_S390 0x0c | |||
#define POCO_ARCH_SH 0x0d | #define POCO_ARCH_SH 0x0d | |||
#define POCO_ARCH_NIOS2 0x0e | #define POCO_ARCH_NIOS2 0x0e | |||
#define POCO_ARCH_AARCH64 0x0f | ||||
#if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_ M_ALPHA) | #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_ M_ALPHA) | |||
#define POCO_ARCH POCO_ARCH_ALPHA | #define POCO_ARCH POCO_ARCH_ALPHA | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_I X86) | #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_I X86) || defined(EMSCRIPTEN) | |||
#define POCO_ARCH POCO_ARCH_IA32 | #define POCO_ARCH POCO_ARCH_IA32 | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#elif defined(_IA64) || defined(__IA64__) || defined(__ia64__) || defined(_ _ia64) || defined(_M_IA64) | #elif defined(_IA64) || defined(__IA64__) || defined(__ia64__) || defined(_ _ia64) || defined(_M_IA64) | |||
#define POCO_ARCH POCO_ARCH_IA64 | #define POCO_ARCH POCO_ARCH_IA64 | |||
#if defined(hpux) || defined(_hpux) | #if defined(hpux) || defined(_hpux) | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#else | #else | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#endif | #endif | |||
#elif defined(__x86_64__) || defined(_M_X64) | #elif defined(__x86_64__) || defined(_M_X64) | |||
#define POCO_ARCH POCO_ARCH_AMD64 | #define POCO_ARCH POCO_ARCH_AMD64 | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined( _M_MRX000) | #elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined( _M_MRX000) | |||
#define POCO_ARCH POCO_ARCH_MIPS | #define POCO_ARCH POCO_ARCH_MIPS | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
// Is this OK? Supports windows only little endian?? | ||||
#define POCO_ARCH_LITTLE_ENDIAN 1 | ||||
#elif defined(__MIPSEB__) || defined(_MIPSEB) || defined(__MIPSEB) | ||||
#define POCO_ARCH_BIG_ENDIAN 1 | ||||
#elif defined(__MIPSEL__) || defined(_MIPSEL) || defined(__MIPSEL) | ||||
#define POCO_ARCH_LITTLE_ENDIAN 1 | ||||
#else | ||||
#error "MIPS but neither MIPSEL nor MIPSEB?" | ||||
#endif | ||||
#elif defined(__hppa) || defined(__hppa__) | #elif defined(__hppa) || defined(__hppa__) | |||
#define POCO_ARCH POCO_ARCH_HPPA | #define POCO_ARCH POCO_ARCH_HPPA | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#elif defined(__PPC) || defined(__POWERPC__) || defined(__powerpc) || defin ed(__PPC__) || \ | #elif defined(__PPC) || defined(__POWERPC__) || defined(__powerpc) || defin ed(__PPC__) || \ | |||
defined(__powerpc__) || defined(__ppc__) || defined(__ppc) || defined (_ARCH_PPC) || defined(_M_PPC) | defined(__powerpc__) || defined(__ppc__) || defined(__ppc) || defined (_ARCH_PPC) || defined(_M_PPC) | |||
#define POCO_ARCH POCO_ARCH_PPC | #define POCO_ARCH POCO_ARCH_PPC | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#elif defined(_POWER) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defin ed(_ARCH_PWR3) || \ | #elif defined(_POWER) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defin ed(_ARCH_PWR3) || \ | |||
defined(_ARCH_PWR4) || defined(__THW_RS6000) | defined(_ARCH_PWR4) || defined(__THW_RS6000) | |||
#define POCO_ARCH POCO_ARCH_POWER | #define POCO_ARCH POCO_ARCH_POWER | |||
skipping to change at line 180 | skipping to change at line 180 | |||
#elif defined(__sparc__) || defined(__sparc) || defined(sparc) | #elif defined(__sparc__) || defined(__sparc) || defined(sparc) | |||
#define POCO_ARCH POCO_ARCH_SPARC | #define POCO_ARCH POCO_ARCH_SPARC | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#elif defined(__arm__) || defined(__arm) || defined(ARM) || defined(_ARM_) || defined(__ARM__) || defined(_M_ARM) | #elif defined(__arm__) || defined(__arm) || defined(ARM) || defined(_ARM_) || defined(__ARM__) || defined(_M_ARM) | |||
#define POCO_ARCH POCO_ARCH_ARM | #define POCO_ARCH POCO_ARCH_ARM | |||
#if defined(__ARMEB__) | #if defined(__ARMEB__) | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#else | #else | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#endif | #endif | |||
#elif defined(__arm64__) || defined(__arm64) | ||||
#define POCO_ARCH POCO_ARCH_ARM64 | ||||
#if defined(__ARMEB__) | ||||
#define POCO_ARCH_BIG_ENDIAN 1 | ||||
#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __ | ||||
BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ | ||||
#define POCO_ARCH_BIG_ENDIAN 1 | ||||
#else | ||||
#define POCO_ARCH_LITTLE_ENDIAN 1 | ||||
#endif | ||||
#elif defined(__m68k__) | #elif defined(__m68k__) | |||
#define POCO_ARCH POCO_ARCH_M68K | #define POCO_ARCH POCO_ARCH_M68K | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#elif defined(__s390__) | #elif defined(__s390__) | |||
#define POCO_ARCH POCO_ARCH_S390 | #define POCO_ARCH POCO_ARCH_S390 | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#elif defined(__sh__) || defined(__sh) | #elif defined(__sh__) || defined(__sh) || defined(SHx) || defined(_SHX_) | |||
#define POCO_ARCH POCO_ARCH_SH | #define POCO_ARCH POCO_ARCH_SH | |||
#if defined(__LITTLE_ENDIAN__) | #if defined(__LITTLE_ENDIAN__) || (POCO_OS == POCO_OS_WINDOWS_CE) | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#else | #else | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#endif | #endif | |||
#elif defined (nios2) || defined(__nios2) || defined(__nios2__) | #elif defined (nios2) || defined(__nios2) || defined(__nios2__) | |||
#define POCO_ARCH POCO_ARCH_NIOS2 | #define POCO_ARCH POCO_ARCH_NIOS2 | |||
#if defined(__nios2_little_endian) || defined(nios2_little_endian) || d | #if defined(__nios2_little_endian) || defined(nios2_little_endian) | | |||
efined(__nios2_little_endian__) | | defined(__nios2_little_endian__) | |||
#define POCO_ARCH_LITTLE_ENDIAN 1 | #define POCO_ARCH_LITTLE_ENDIAN 1 | |||
#else | #else | |||
#define POCO_ARCH_BIG_ENDIAN 1 | #define POCO_ARCH_BIG_ENDIAN 1 | |||
#endif | #endif | |||
#elif defined(__AARCH64EL__) | ||||
#define POCO_ARCH POCO_ARCH_AARCH64 | ||||
#define POCO_ARCH_LITTLE_ENDIAN 1 | ||||
#elif defined(__AARCH64EB__) | ||||
#define POCO_ARCH POCO_ARCH_AARCH64 | ||||
#define POCO_ARCH_BIG_ENDIAN 1 | ||||
#endif | ||||
#if defined(_MSC_VER) | ||||
#define POCO_COMPILER_MSVC | ||||
#elif defined(__clang__) | ||||
#define POCO_COMPILER_CLANG | ||||
#elif defined (__GNUC__) | ||||
#define POCO_COMPILER_GCC | ||||
#elif defined (__MINGW32__) || defined (__MINGW64__) | ||||
#define POCO_COMPILER_MINGW | ||||
#elif defined (__INTEL_COMPILER) || defined(__ICC) || defined(__ECC) || def | ||||
ined(__ICL) | ||||
#define POCO_COMPILER_INTEL | ||||
#elif defined (__SUNPRO_CC) | ||||
#define POCO_COMPILER_SUN | ||||
#elif defined (__MWERKS__) || defined(__CWCC__) | ||||
#define POCO_COMPILER_CODEWARRIOR | ||||
#elif defined (__sgi) || defined(sgi) | ||||
#define POCO_COMPILER_SGI | ||||
#elif defined (__HP_aCC) | ||||
#define POCO_COMPILER_HP_ACC | ||||
#elif defined (__BORLANDC__) || defined(__CODEGEARC__) | ||||
#define POCO_COMPILER_CBUILDER | ||||
#elif defined (__DMC__) | ||||
#define POCO_COMPILER_DMARS | ||||
#elif defined (__HP_aCC) | ||||
#define POCO_COMPILER_HP_ACC | ||||
#elif (defined (__xlc__) || defined (__xlC__)) && defined(__IBMCPP__) | ||||
#define POCO_COMPILER_IBM_XLC // IBM XL C++ | ||||
#elif defined (__IBMCPP__) && defined(__COMPILER_VER__) | ||||
#define POCO_COMPILER_IBM_XLC_ZOS // IBM z/OS C++ | ||||
#endif | ||||
#if !defined(POCO_ARCH) | ||||
#error "Unknown Hardware Architecture." | ||||
#endif | ||||
#if defined(POCO_OS_FAMILY_WINDOWS) | ||||
#define POCO_DEFAULT_NEWLINE_CHARS "\r\n" | ||||
#else | ||||
#define POCO_DEFAULT_NEWLINE_CHARS "\n" | ||||
#endif | #endif | |||
#endif // Foundation_Platform_INCLUDED | #endif // Foundation_Platform_INCLUDED | |||
End of changes. 16 change blocks. | ||||
48 lines changed or deleted | 93 lines changed or added | |||
Platform_POSIX.h | Platform_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Platform | // Module: Platform | |||
// | // | |||
// Platform and architecture identification macros | // Platform and architecture identification macros | |||
// and platform-specific definitions for various POSIX platforms | // and platform-specific definitions for various POSIX platforms | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Platform_POSIX_INCLUDED | #ifndef Foundation_Platform_POSIX_INCLUDED | |||
#define Foundation_Platform_POSIX_INCLUDED | #define Foundation_Platform_POSIX_INCLUDED | |||
// | // | |||
// PA-RISC based HP-UX platforms have some issues... | // PA-RISC based HP-UX platforms have some issues... | |||
// | // | |||
#if defined(hpux) || defined(_hpux) | #if defined(hpux) || defined(_hpux) | |||
#if defined(__hppa) || defined(__hppa__) | #if defined(__hppa) || defined(__hppa__) | |||
#define POCO_NO_SYS_SELECT_H 1 | #define POCO_NO_SYS_SELECT_H 1 | |||
#if defined(__HP_aCC) | #if defined(__HP_aCC) | |||
#define POCO_NO_TEMPLATE_ICOMPARE 1 | #define POCO_NO_TEMPLATE_ICOMPARE 1 | |||
#endif | #endif | |||
#endif | #endif | |||
#endif | #endif | |||
// | ||||
// Thread-safety of local static initialization | ||||
// | ||||
#if __cplusplus >= 201103L || __GNUC__ >= 4 || defined(__clang__) | ||||
#ifndef POCO_LOCAL_STATIC_INIT_IS_THREADSAFE | ||||
#define POCO_LOCAL_STATIC_INIT_IS_THREADSAFE 1 | ||||
#endif | ||||
#endif | ||||
#ifdef __GNUC__ | ||||
#ifndef __THROW | ||||
#ifndef __GNUC_PREREQ | ||||
#define __GNUC_PREREQ(maj, min) (0) | ||||
#endif | ||||
#if defined __cplusplus && __GNUC_PREREQ (2,8) | ||||
#define __THROW throw () | ||||
#else | ||||
#define __THROW | ||||
#endif | ||||
#endif | ||||
// | ||||
// GCC diagnostics enable/disable by Patrick Horgan, see | ||||
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html | ||||
// use example: GCC_DIAG_OFF(unused-variable) | ||||
// | ||||
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 4 | ||||
06) | ||||
#ifdef GCC_DIAG_OFF | ||||
#undef GCC_DIAG_OFF | ||||
#endif | ||||
#ifdef GCC_DIAG_ON | ||||
#undef GCC_DIAG_ON | ||||
#endif | ||||
#define GCC_DIAG_STR(s) #s | ||||
#define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y) | ||||
#define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) | ||||
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) | ||||
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 | ||||
#define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) \ | ||||
GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x)) | ||||
#define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) | ||||
#else | ||||
#define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOI | ||||
NSTR(-W,x)) | ||||
#define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_DIAG_JOI | ||||
NSTR(-W,x)) | ||||
#endif | ||||
#else | ||||
#define GCC_DIAG_OFF(x) | ||||
#define GCC_DIAG_ON(x) | ||||
#endif | ||||
#endif // __GNUC__ | ||||
// | ||||
// No syslog.h on QNX/BB10 | ||||
// | ||||
#if defined(__QNXNTO__) | ||||
#define POCO_NO_SYSLOGCHANNEL | ||||
#endif | ||||
#endif // Foundation_Platform_POSIX_INCLUDED | #endif // Foundation_Platform_POSIX_INCLUDED | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 64 lines changed or added | |||
Platform_VMS.h | Platform_VMS.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Platform | // Module: Platform | |||
// | // | |||
// Platform and architecture identification macros | // Platform and architecture identification macros | |||
// and platform-specific definitions for OpenVMS. | // and platform-specific definitions for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Platform_VMS_INCLUDED | #ifndef Foundation_Platform_VMS_INCLUDED | |||
#define Foundation_Platform_VMS_INCLUDED | #define Foundation_Platform_VMS_INCLUDED | |||
// Define the POCO_DESCRIPTOR_STRING and POCO_DESCRIPTOR_LITERAL | // Define the POCO_DESCRIPTOR_STRING and POCO_DESCRIPTOR_LITERAL | |||
// macros which we use instead of $DESCRIPTOR and $DESCRIPTOR64. | // macros which we use instead of $DESCRIPTOR and $DESCRIPTOR64. | |||
// Our macros work with both 32bit and 64bit pointer sizes. | // Our macros work with both 32bit and 64bit pointer sizes. | |||
#if __INITIAL_POINTER_SIZE != 64 | #if __INITIAL_POINTER_SIZE != 64 | |||
#define POCO_DESCRIPTOR_STRING(name, string) \ | #define POCO_DESCRIPTOR_STRING(name, string) \ | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Platform_VX.h | Platform_VX.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Platform | // Module: Platform | |||
// | // | |||
// Platform and architecture identification macros | // Platform and architecture identification macros | |||
// and platform-specific definitions for VxWorks | // and platform-specific definitions for VxWorks | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Platform_VX_INCLUDED | #ifndef Foundation_Platform_VX_INCLUDED | |||
#define Foundation_Platform_VX_INCLUDED | #define Foundation_Platform_VX_INCLUDED | |||
#define POCO_NO_SYS_SELECT_H | #define POCO_NO_SYS_SELECT_H | |||
#define POCO_NO_FPENVIRONMENT | #define POCO_NO_FPENVIRONMENT | |||
#define POCO_NO_WSTRING | #define POCO_NO_WSTRING | |||
#define POCO_NO_SHAREDMEMORY | #define POCO_NO_SHAREDMEMORY | |||
#define POCO_NO_SYSLOGCHANNEL | #define POCO_NO_SYSLOGCHANNEL | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Platform_WIN32.h | Platform_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 16 | skipping to change at line 16 | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Platform | // Module: Platform | |||
// | // | |||
// Platform and architecture identification macros | // Platform and architecture identification macros | |||
// and platform-specific definitions for Windows. | // and platform-specific definitions for Windows. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Platform_WIN32_INCLUDED | #ifndef Foundation_Platform_WIN32_INCLUDED | |||
#define Foundation_Platform_WIN32_INCLUDED | #define Foundation_Platform_WIN32_INCLUDED | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
// determine the real version | #ifndef POCO_FORCE_MIN_WINDOWS_OS_SUPPORT | |||
#if defined(_WIN32_WINNT_WIN7) | // Determine the real version. | |||
//Windows 7 _WIN32_WINNT_WIN7 (0x0601) | // This setting can be forced from UnWindows.h | |||
#ifdef _WIN32_WINNT | #if defined (_WIN32_WINNT_WINBLUE) | |||
#undef _WIN32_WINNT | //Windows 8.1 _WIN32_WINNT_WINBLUE (0x0602) | |||
#endif | #ifdef _WIN32_WINNT | |||
#define _WIN32_WINNT _WIN32_WINNT_WIN7 | #undef _WIN32_WINNT | |||
#elif defined (_WIN32_WINNT_WS08) | #endif | |||
//Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) | #define _WIN32_WINNT _WIN32_WINNT_WINBLUE | |||
#ifdef _WIN32_WINNT | #ifdef NTDDI_VERSION | |||
#undef _WIN32_WINNT | #undef NTDDI_VERSION | |||
#endif | #endif | |||
#define _WIN32_WINNT _WIN32_WINNT_WS08 | #define NTDDI_VERSION NTDDI_WINBLUE | |||
#elif defined (_WIN32_WINNT_VISTA) | #elif defined (_WIN32_WINNT_WIN8) | |||
//Windows Vista _WIN32_WINNT_VISTA (0x0600) | //Windows 8 _WIN32_WINNT_WIN8 (0x0602) | |||
#ifdef _WIN32_WINNT | #ifdef _WIN32_WINNT | |||
#undef _WIN32_WINNT | #undef _WIN32_WINNT | |||
#endif | #endif | |||
#define _WIN32_WINNT _WIN32_WINNT_VISTA | #define _WIN32_WINNT _WIN32_WINNT_WIN8 | |||
#elif defined (_WIN32_WINNT_LONGHORN) | #ifdef NTDDI_VERSION | |||
//Windows Vista and server 2008 Development _WIN32_WINNT_LONGHORN (0 | #undef NTDDI_VERSION | |||
x0600) | #endif | |||
#ifdef _WIN32_WINNT | #define NTDDI_VERSION NTDDI_WIN8 | |||
#undef _WIN32_WINNT | #elif defined (_WIN32_WINNT_WIN7) | |||
#endif | //Windows 7 _WIN32_WINNT_WIN7 (0x0601) | |||
#define _WIN32_WINNT _WIN32_WINNT_LONGHORN | #ifdef _WIN32_WINNT | |||
#elif defined (_WIN32_WINNT_WS03) | #undef _WIN32_WINNT | |||
//Windows Server 2003 with SP1, | #endif | |||
//Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) | #define _WIN32_WINNT _WIN32_WINNT_WIN7 | |||
#ifdef _WIN32_WINNT | #ifdef NTDDI_VERSION | |||
#undef _WIN32_WINNT | #undef NTDDI_VERSION | |||
#endif | ||||
#define NTDDI_VERSION NTDDI_WIN7 | ||||
#elif defined (_WIN32_WINNT_WS08) | ||||
//Windows Server 2008 _WIN32_WINNT_WS08 (0x0600) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WS08 | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION NTDDI_WS08 | ||||
#elif defined (_WIN32_WINNT_VISTA) | ||||
//Windows Vista _WIN32_WINNT_VISTA (0x0600) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_VISTA | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION NTDDI_VISTA | ||||
#elif defined (_WIN32_WINNT_LONGHORN) | ||||
//Windows Vista and server 2008 Development _WIN32_WINNT_LON | ||||
GHORN (0x0600) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_LONGHORN | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION 0x06000000 // hardcoded, VS90 can't fi | ||||
nd NTDDI_* macros | ||||
#elif defined (_WIN32_WINNT_WS03) | ||||
//Windows Server 2003 with SP1, | ||||
//Windows XP with SP2 _WIN32_WINNT_WS03 (0x0502) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WS03 | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION NTDDI_WS03 | ||||
#elif defined (_WIN32_WINNT_WINXP) | ||||
//Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501 | ||||
) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WINXP | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION NTDDI_WINXP | ||||
#elif defined (_WIN32_WINNT_WIN2K) | ||||
//Windows 2000 _WIN32_WINNT_WIN2K (0x0500) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WIN2K | ||||
#elif defined (WINVER) | ||||
// fail back on WINVER | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT WINVER | ||||
#elif !defined(_WIN32_WINNT) | ||||
// last resort = Win XP, SP1 is minimum supported | ||||
#define _WIN32_WINNT 0x0501 | ||||
#ifdef NTDDI_VERSION | ||||
#undef NTDDI_VERSION | ||||
#endif | ||||
#define NTDDI_VERSION 0x05010100 | ||||
#endif | #endif | |||
#define _WIN32_WINNT _WIN32_WINNT_WS03 | #endif // POCO_FORCE_MIN_WINDOWS_OS_SUPPORT | |||
#elif defined (_WIN32_WINNT_WINXP) | ||||
//Windows Server 2003, Windows XP _WIN32_WINNT_WINXP (0x0501) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WINXP | ||||
#elif defined (_WIN32_WINNT_WIN2K) | ||||
//Windows 2000 _WIN32_WINNT_WIN2K (0x0500) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT _WIN32_WINNT_WIN2K | ||||
#elif defined (WINVER) | ||||
#ifdef _WIN32_WINNT | ||||
#undef _WIN32_WINNT | ||||
#endif | ||||
#define _WIN32_WINNT WINVER | ||||
#endif | ||||
#if defined(_MSC_VER) && !defined(POCO_MSVC_SECURE_WARNINGS) && !defined(_C RT_SECURE_NO_DEPRECATE) | #if defined(_MSC_VER) && !defined(POCO_MSVC_SECURE_WARNINGS) && !defined(_C RT_SECURE_NO_DEPRECATE) | |||
#define _CRT_SECURE_NO_DEPRECATE | #define _CRT_SECURE_NO_DEPRECATE | |||
#endif | #endif | |||
// Verify that we're built with the multithreaded | // Verify that we're built with the multithreaded | |||
// versions of the runtime libraries | // versions of the runtime libraries | |||
#if defined(_MSC_VER) && !defined(_MT) | #if defined(_MSC_VER) && !defined(_MT) | |||
#error Must compile with /MD, /MDd, /MT or /MTd | #error Must compile with /MD, /MDd, /MT or /MTd | |||
#endif | #endif | |||
// Check debug/release settings consistency | // Check debug/release settings consistency | |||
#if defined(NDEBUG) && defined(_DEBUG) | #if defined(NDEBUG) && defined(_DEBUG) | |||
#error Inconsistent build settings (check for /MD[d]) | #error Inconsistent build settings (check for /MD[d]) | |||
#endif | #endif | |||
#if (_MSC_VER >= 1300) && (_MSC_VER < 1400) // Visual Studio 2003, MSVC++ 7 .1 | #if (_MSC_VER >= 1300) && (_MSC_VER < 1400) // Visual Studio 2003, MSVC++ 7.1 | |||
#define POCO_MSVS_VERSION 2003 | #define POCO_MSVS_VERSION 2003 | |||
#define POCO_MSVC_VERSION 71 | #define POCO_MSVC_VERSION 71 | |||
#elif (_MSC_VER >= 1400) && (_MSC_VER < 1500) // Visual Studio 2005, MSVC++ 8.0 | #elif (_MSC_VER >= 1400) && (_MSC_VER < 1500) // Visual Studio 2005, MSVC++ 8.0 | |||
#define POCO_MSVS_VERSION 2005 | #define POCO_MSVS_VERSION 2005 | |||
#define POCO_MSVC_VERSION 80 | #define POCO_MSVC_VERSION 80 | |||
#elif (_MSC_VER >= 1500) && (_MSC_VER < 1600) // Visual Studio 2008, MSVC++ 9.0 | #elif (_MSC_VER >= 1500) && (_MSC_VER < 1600) // Visual Studio 2008, MSVC++ 9.0 | |||
#define POCO_MSVS_VERSION 2008 | #define POCO_MSVS_VERSION 2008 | |||
#define POCO_MSVC_VERSION 90 | #define POCO_MSVC_VERSION 90 | |||
#elif (_MSC_VER >= 1600) && (_MSC_VER < 1700) // Visual Studio 2010, MSVC++ 10.0 | #elif (_MSC_VER >= 1600) && (_MSC_VER < 1700) // Visual Studio 2010, MSVC++ 10.0 | |||
#define POCO_MSVS_VERSION 2010 | #define POCO_MSVS_VERSION 2010 | |||
#define POCO_MSVC_VERSION 100 | #define POCO_MSVC_VERSION 100 | |||
#elif (_MSC_VER >= 1700) && (_MSC_VER < 1800) // Visual Studio 2011, MSVC++ | #elif (_MSC_VER >= 1700) && (_MSC_VER < 1800) // Visual Studio 2012, MSVC++ | |||
11.0 | 11.0 | |||
#define POCO_MSVS_VERSION 2011 | #define POCO_MSVS_VERSION 2012 | |||
#define POCO_MSVC_VERSION 110 | #define POCO_MSVC_VERSION 110 | |||
#elif (_MSC_VER >= 1800) && (_MSC_VER < 1900) // Visual Studio 2013, MSVC++ | ||||
12.0 | ||||
#define POCO_MSVS_VERSION 2013 | ||||
#define POCO_MSVC_VERSION 120 | ||||
#endif | #endif | |||
// Unicode Support | // Unicode Support | |||
#if defined(UNICODE) && !defined(POCO_WIN32_UTF8) | #if defined(UNICODE) && !defined(POCO_WIN32_UTF8) | |||
#define POCO_WIN32_UTF8 | #define POCO_WIN32_UTF8 | |||
#endif | #endif | |||
#if !defined(POCO_WIN32_UTF8) | ||||
#pragma message("Compiling POCO on Windows without #define POCO_WIN3 | ||||
2_UTF8 is deprecated.") | ||||
#endif | ||||
// Turn off some annoying warnings | // Turn off some annoying warnings | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#pragma warning(disable:4018) // signed/unsigned comparison | #pragma warning(disable:4018) // signed/unsigned comparison | |||
#pragma warning(disable:4250) // VC++ 11.0: inheriting from std st ream classes produces C4250 warning; | #pragma warning(disable:4250) // VC++ 11.0: inheriting from std st ream classes produces C4250 warning; | |||
// s ee <http://connect.microsoft.com/VisualStudio/feedback/details/733720/inher iting-from-std-fstream-produces-c4250-warning> | // s ee <http://connect.microsoft.com/VisualStudio/feedback/details/733720/inher iting-from-std-fstream-produces-c4250-warning> | |||
#pragma warning(disable:4251) // ... needs to have dll-interface w arning | #pragma warning(disable:4251) // ... needs to have dll-interface w arning | |||
#pragma warning(disable:4275) // non dll-interface class 'std::exc eption' used as base for dll-interface class 'Poco::Exception' | #pragma warning(disable:4275) // non dll-interface class 'std::exc eption' used as base for dll-interface class 'Poco::Exception' | |||
#pragma warning(disable:4344) // behavior change: use of explicit template arguments results in call to '...' but '...' is a better match | #pragma warning(disable:4344) // behavior change: use of explicit template arguments results in call to '...' but '...' is a better match | |||
#pragma warning(disable:4351) // new behavior: elements of array ' ...' will be default initialized | #pragma warning(disable:4351) // new behavior: elements of array ' ...' will be default initialized | |||
#pragma warning(disable:4355) // 'this' : used in base member init ializer list | #pragma warning(disable:4355) // 'this' : used in base member init ializer list | |||
#pragma warning(disable:4675) // resolved overload was found by ar gument-dependent lookup | #pragma warning(disable:4675) // resolved overload was found by ar gument-dependent lookup | |||
#pragma warning(disable:4996) // VC++ 8.0 deprecation warnings | #pragma warning(disable:4996) // VC++ 8.0 deprecation warnings | |||
#endif | #endif | |||
// Enable C++11 support for VS 2010 and newer | // Enable C++11 support for VS 2010 and newer | |||
#if defined(_MSC_VER) && (_MSC_VER >= 1600) && !defined(POCO_ENABLE_CPP11) | #if defined(_MSC_VER) && (_MSC_VER >= 1700) && !defined(POCO_ENABLE_CPP11) | |||
#define POCO_ENABLE_CPP11 | #define POCO_ENABLE_CPP11 | |||
#endif | #endif | |||
#if defined(__INTEL_COMPILER) | #if defined(__INTEL_COMPILER) | |||
#pragma warning(disable:1738) // base class dllexport/dllimport spec ification differs from that of the derived class | #pragma warning(disable:1738) // base class dllexport/dllimport spec ification differs from that of the derived class | |||
#pragma warning(disable:1478) // function ... was declared "deprecat ed" | #pragma warning(disable:1478) // function ... was declared "deprecat ed" | |||
#pragma warning(disable:1744) // field of class type without a DLL i nterface used in a class with a DLL interface | #pragma warning(disable:1744) // field of class type without a DLL i nterface used in a class with a DLL interface | |||
#endif | #endif | |||
#endif // Foundation_Platform_WIN32_INCLUDED | #endif // Foundation_Platform_WIN32_INCLUDED | |||
End of changes. 8 change blocks. | ||||
87 lines changed or deleted | 122 lines changed or added | |||
Poco.h | Poco.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Foundation | // Module: Foundation | |||
// | // | |||
// Basic definitions for the POCO libraries. | // Basic definitions for the POCO libraries. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Poco_INCLUDED | #ifndef Foundation_Poco_INCLUDED | |||
#define Foundation_Poco_INCLUDED | #define Foundation_Poco_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#endif // Foundation_Poco_INCLUDED | #endif // Foundation_Poco_INCLUDED | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PriorityDelegate.h | PriorityDelegate.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: PriorityDelegate | // Module: PriorityDelegate | |||
// | // | |||
// Implementation of the PriorityDelegate template. | // Implementation of the PriorityDelegate template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PriorityDelegate_INCLUDED | #ifndef Foundation_PriorityDelegate_INCLUDED | |||
#define Foundation_PriorityDelegate_INCLUDED | #define Foundation_PriorityDelegate_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AbstractPriorityDelegate.h" | #include "Poco/AbstractPriorityDelegate.h" | |||
#include "Poco/PriorityExpire.h" | #include "Poco/PriorityExpire.h" | |||
#include "Poco/FunctionPriorityDelegate.h" | #include "Poco/FunctionPriorityDelegate.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
skipping to change at line 195 | skipping to change at line 175 | |||
protected: | protected: | |||
TObj* _receiverObject; | TObj* _receiverObject; | |||
NotifyMethod _receiverMethod; | NotifyMethod _receiverMethod; | |||
Mutex _mutex; | Mutex _mutex; | |||
private: | private: | |||
PriorityDelegate(); | PriorityDelegate(); | |||
}; | }; | |||
template <class TObj> | ||||
class PriorityDelegate<TObj, void, true>: public AbstractPriorityDelegate<v | ||||
oid> | ||||
{ | ||||
public: | ||||
typedef void (TObj::*NotifyMethod)(const void*); | ||||
PriorityDelegate(TObj* obj, NotifyMethod method, int prio): | ||||
AbstractPriorityDelegate<void>(prio), | ||||
_receiverObject(obj), | ||||
_receiverMethod(method) | ||||
{ | ||||
} | ||||
PriorityDelegate(const PriorityDelegate& delegate): | ||||
AbstractPriorityDelegate<void>(delegate), | ||||
_receiverObject(delegate._receiverObject), | ||||
_receiverMethod(delegate._receiverMethod) | ||||
{ | ||||
} | ||||
PriorityDelegate& operator = (const PriorityDelegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_pTarget = delegate._pTarget; | ||||
this->_receiverObject = delegate._receiverObject; | ||||
this->_receiverMethod = delegate._receiverMethod; | ||||
this->_priority = delegate._priority; | ||||
} | ||||
return *this; | ||||
} | ||||
~PriorityDelegate() | ||||
{ | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_receiverObject) | ||||
{ | ||||
(_receiverObject->*_receiverMethod)(sender); | ||||
return true; | ||||
} | ||||
else return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const PriorityDelegate* pOtherDelegate = dynamic_cast<const | ||||
PriorityDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && this->priority() == pOtherDelegate- | ||||
>priority() && _receiverObject == pOtherDelegate->_receiverObject && _recei | ||||
verMethod == pOtherDelegate->_receiverMethod; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new PriorityDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_receiverObject = 0; | ||||
} | ||||
protected: | ||||
TObj* _receiverObject; | ||||
NotifyMethod _receiverMethod; | ||||
Mutex _mutex; | ||||
private: | ||||
PriorityDelegate(); | ||||
}; | ||||
template <class TObj> | ||||
class PriorityDelegate<TObj, void, false>: public AbstractPriorityDelegate< | ||||
void> | ||||
{ | ||||
public: | ||||
typedef void (TObj::*NotifyMethod)(); | ||||
PriorityDelegate(TObj* obj, NotifyMethod method, int prio): | ||||
AbstractPriorityDelegate<void>(prio), | ||||
_receiverObject(obj), | ||||
_receiverMethod(method) | ||||
{ | ||||
} | ||||
PriorityDelegate(const PriorityDelegate& delegate): | ||||
AbstractPriorityDelegate<void>(delegate), | ||||
_receiverObject(delegate._receiverObject), | ||||
_receiverMethod(delegate._receiverMethod) | ||||
{ | ||||
} | ||||
PriorityDelegate& operator = (const PriorityDelegate& delegate) | ||||
{ | ||||
if (&delegate != this) | ||||
{ | ||||
this->_pTarget = delegate._pTarget; | ||||
this->_receiverObject = delegate._receiverObject; | ||||
this->_receiverMethod = delegate._receiverMethod; | ||||
this->_priority = delegate._priority; | ||||
} | ||||
return *this; | ||||
} | ||||
~PriorityDelegate() | ||||
{ | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
if (_receiverObject) | ||||
{ | ||||
(_receiverObject->*_receiverMethod)(); | ||||
return true; | ||||
} | ||||
return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
const PriorityDelegate* pOtherDelegate = dynamic_cast<const | ||||
PriorityDelegate*>(other.unwrap()); | ||||
return pOtherDelegate && this->priority() == pOtherDelegate- | ||||
>priority() && _receiverObject == pOtherDelegate->_receiverObject && _recei | ||||
verMethod == pOtherDelegate->_receiverMethod; | ||||
} | ||||
AbstractDelegate<void>* clone() const | ||||
{ | ||||
return new PriorityDelegate(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
Mutex::ScopedLock lock(_mutex); | ||||
_receiverObject = 0; | ||||
} | ||||
protected: | ||||
TObj* _receiverObject; | ||||
NotifyMethod _receiverMethod; | ||||
Mutex _mutex; | ||||
private: | ||||
PriorityDelegate(); | ||||
}; | ||||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static PriorityDelegate<TObj, TArgs, true> priorityDelegate(TObj* pObj, voi d (TObj::*NotifyMethod)(const void*, TArgs&), int prio) | static PriorityDelegate<TObj, TArgs, true> priorityDelegate(TObj* pObj, voi d (TObj::*NotifyMethod)(const void*, TArgs&), int prio) | |||
{ | { | |||
return PriorityDelegate<TObj, TArgs, true>(pObj, NotifyMethod, prio) ; | return PriorityDelegate<TObj, TArgs, true>(pObj, NotifyMethod, prio) ; | |||
} | } | |||
template <class TObj, class TArgs> | template <class TObj, class TArgs> | |||
static PriorityDelegate<TObj, TArgs, false> priorityDelegate(TObj* pObj, vo id (TObj::*NotifyMethod)(TArgs&), int prio) | static PriorityDelegate<TObj, TArgs, false> priorityDelegate(TObj* pObj, vo id (TObj::*NotifyMethod)(TArgs&), int prio) | |||
{ | { | |||
return PriorityDelegate<TObj, TArgs, false>(pObj, NotifyMethod, prio ); | return PriorityDelegate<TObj, TArgs, false>(pObj, NotifyMethod, prio ); | |||
skipping to change at line 255 | skipping to change at line 381 | |||
{ | { | |||
return FunctionPriorityDelegate<TArgs, true, false>(NotifyMethod, pr io); | return FunctionPriorityDelegate<TArgs, true, false>(NotifyMethod, pr io); | |||
} | } | |||
template <class TArgs> | template <class TArgs> | |||
static FunctionPriorityDelegate<TArgs, false> priorityDelegate(void (*Notif yMethod)(TArgs&), int prio) | static FunctionPriorityDelegate<TArgs, false> priorityDelegate(void (*Notif yMethod)(TArgs&), int prio) | |||
{ | { | |||
return FunctionPriorityDelegate<TArgs, false>(NotifyMethod, prio); | return FunctionPriorityDelegate<TArgs, false>(NotifyMethod, prio); | |||
} | } | |||
template <class TObj> | ||||
static PriorityDelegate<TObj, void, true> priorityDelegate(TObj* pObj, void | ||||
(TObj::*NotifyMethod)(const void*), int prio) | ||||
{ | ||||
return PriorityDelegate<TObj, void, true>(pObj, NotifyMethod, prio); | ||||
} | ||||
template <class TObj> | ||||
static PriorityDelegate<TObj, void, false> priorityDelegate(TObj* pObj, voi | ||||
d (TObj::*NotifyMethod)(), int prio) | ||||
{ | ||||
return PriorityDelegate<TObj, void, false>(pObj, NotifyMethod, prio) | ||||
; | ||||
} | ||||
template <class TObj> | ||||
static PriorityExpire<void> priorityDelegate(TObj* pObj, void (TObj::*Notif | ||||
yMethod)(const void*), int prio, Timestamp::TimeDiff expireMilliSec) | ||||
{ | ||||
return PriorityExpire<void>(PriorityDelegate<TObj, void, true>(pObj, | ||||
NotifyMethod, prio), expireMilliSec); | ||||
} | ||||
template <class TObj> | ||||
static PriorityExpire<void> priorityDelegate(TObj* pObj, void (TObj::*Notif | ||||
yMethod)(), int prio, Timestamp::TimeDiff expireMilliSec) | ||||
{ | ||||
return PriorityExpire<void>(PriorityDelegate<TObj, void, false>(pObj | ||||
, NotifyMethod, prio), expireMilliSec); | ||||
} | ||||
inline PriorityExpire<void> priorityDelegate(void (*NotifyMethod)(const voi | ||||
d*), int prio, Timestamp::TimeDiff expireMilliSec) | ||||
{ | ||||
return PriorityExpire<void>(FunctionPriorityDelegate<void, true, tru | ||||
e>(NotifyMethod, prio), expireMilliSec); | ||||
} | ||||
inline PriorityExpire<void> priorityDelegate(void (*NotifyMethod)(void*), i | ||||
nt prio, Timestamp::TimeDiff expireMilliSec) | ||||
{ | ||||
return PriorityExpire<void>(FunctionPriorityDelegate<void, true, fal | ||||
se>(NotifyMethod, prio), expireMilliSec); | ||||
} | ||||
inline PriorityExpire<void> priorityDelegate(void (*NotifyMethod)(), int pr | ||||
io, Timestamp::TimeDiff expireMilliSec) | ||||
{ | ||||
return PriorityExpire<void>(FunctionPriorityDelegate<void, false>(No | ||||
tifyMethod, prio), expireMilliSec); | ||||
} | ||||
inline FunctionPriorityDelegate<void, true, true> priorityDelegate(void (*N | ||||
otifyMethod)(const void*), int prio) | ||||
{ | ||||
return FunctionPriorityDelegate<void, true, true>(NotifyMethod, prio | ||||
); | ||||
} | ||||
inline FunctionPriorityDelegate<void, true, false> priorityDelegate(void (* | ||||
NotifyMethod)(void*), int prio) | ||||
{ | ||||
return FunctionPriorityDelegate<void, true, false>(NotifyMethod, pri | ||||
o); | ||||
} | ||||
inline FunctionPriorityDelegate<void, false> priorityDelegate(void (*Notify | ||||
Method)(), int prio) | ||||
{ | ||||
return FunctionPriorityDelegate<void, false>(NotifyMethod, prio); | ||||
} | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_PriorityDelegate_INCLUDED | #endif // Foundation_PriorityDelegate_INCLUDED | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 227 lines changed or added | |||
PriorityEvent.h | PriorityEvent.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: PriorityEvent | // Module: PriorityEvent | |||
// | // | |||
// Implementation of the PriorityEvent template. | // Implementation of the PriorityEvent template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PriorityEvent_INCLUDED | #ifndef Foundation_PriorityEvent_INCLUDED | |||
#define Foundation_PriorityEvent_INCLUDED | #define Foundation_PriorityEvent_INCLUDED | |||
#include "Poco/AbstractEvent.h" | #include "Poco/AbstractEvent.h" | |||
#include "Poco/PriorityStrategy.h" | #include "Poco/PriorityStrategy.h" | |||
#include "Poco/AbstractPriorityDelegate.h" | #include "Poco/AbstractPriorityDelegate.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PriorityExpire.h | PriorityExpire.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: PriorityExpire | // Module: PriorityExpire | |||
// | // | |||
// Implementation of the PriorityExpire template. | // Implementation of the PriorityExpire template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PriorityExpire_INCLUDED | #ifndef Foundation_PriorityExpire_INCLUDED | |||
#define Foundation_PriorityExpire_INCLUDED | #define Foundation_PriorityExpire_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/AbstractPriorityDelegate.h" | #include "Poco/AbstractPriorityDelegate.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 128 | skipping to change at line 108 | |||
} | } | |||
AbstractPriorityDelegate<TArgs>* _pDelegate; | AbstractPriorityDelegate<TArgs>* _pDelegate; | |||
Timestamp::TimeDiff _expire; | Timestamp::TimeDiff _expire; | |||
Timestamp _creationTime; | Timestamp _creationTime; | |||
private: | private: | |||
PriorityExpire(); | PriorityExpire(); | |||
}; | }; | |||
template <> | ||||
class PriorityExpire<void>: public AbstractPriorityDelegate<void> | ||||
/// Decorator for AbstractPriorityDelegate adding automatic | ||||
/// expiring of registrations to AbstractPriorityDelegate. | ||||
{ | ||||
public: | ||||
PriorityExpire(const AbstractPriorityDelegate<void>& p, Timestamp::T | ||||
imeDiff expireMilliSec): | ||||
AbstractPriorityDelegate<void>(p), | ||||
_pDelegate(static_cast<AbstractPriorityDelegate<void>*>(p.cl | ||||
one())), | ||||
_expire(expireMilliSec*1000) | ||||
{ | ||||
} | ||||
PriorityExpire(const PriorityExpire& expire): | ||||
AbstractPriorityDelegate<void>(expire), | ||||
_pDelegate(static_cast<AbstractPriorityDelegate<void>*>(expi | ||||
re._pDelegate->clone())), | ||||
_expire(expire._expire), | ||||
_creationTime(expire._creationTime) | ||||
{ | ||||
} | ||||
~PriorityExpire() | ||||
{ | ||||
delete _pDelegate; | ||||
} | ||||
PriorityExpire& operator = (const PriorityExpire& expire) | ||||
{ | ||||
if (&expire != this) | ||||
{ | ||||
delete this->_pDelegate; | ||||
this->_pDelegate = static_cast<AbstractPriorityDe | ||||
legate<void>*>(expire._pDelegate->clone()); | ||||
this->_expire = expire._expire; | ||||
this->_creationTime = expire._creationTime; | ||||
} | ||||
return *this; | ||||
} | ||||
bool notify(const void* sender) | ||||
{ | ||||
if (!expired()) | ||||
return this->_pDelegate->notify(sender); | ||||
else | ||||
return false; | ||||
} | ||||
bool equals(const AbstractDelegate<void>& other) const | ||||
{ | ||||
return other.equals(*_pDelegate); | ||||
} | ||||
AbstractPriorityDelegate<void>* clone() const | ||||
{ | ||||
return new PriorityExpire(*this); | ||||
} | ||||
void disable() | ||||
{ | ||||
_pDelegate->disable(); | ||||
} | ||||
const AbstractPriorityDelegate<void>* unwrap() const | ||||
{ | ||||
return this->_pDelegate; | ||||
} | ||||
protected: | ||||
bool expired() const | ||||
{ | ||||
return _creationTime.isElapsed(_expire); | ||||
} | ||||
AbstractPriorityDelegate<void>* _pDelegate; | ||||
Timestamp::TimeDiff _expire; | ||||
Timestamp _creationTime; | ||||
private: | ||||
PriorityExpire(); | ||||
}; | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_PriorityExpire_INCLUDED | #endif // Foundation_PriorityExpire_INCLUDED | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 85 lines changed or added | |||
PriorityNotificationQueue.h | PriorityNotificationQueue.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: PriorityNotificationQueue | // Module: PriorityNotificationQueue | |||
// | // | |||
// Definition of the PriorityNotificationQueue class. | // Definition of the PriorityNotificationQueue class. | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PriorityNotificationQueue_INCLUDED | #ifndef Foundation_PriorityNotificationQueue_INCLUDED | |||
#define Foundation_PriorityNotificationQueue_INCLUDED | #define Foundation_PriorityNotificationQueue_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include <map> | #include <map> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PriorityStrategy.h | PriorityStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Events | // Package: Events | |||
// Module: PrioritytStrategy | // Module: PrioritytStrategy | |||
// | // | |||
// Implementation of the DefaultStrategy template. | // Implementation of the DefaultStrategy template. | |||
// | // | |||
// Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PriorityStrategy_INCLUDED | #ifndef Foundation_PriorityStrategy_INCLUDED | |||
#define Foundation_PriorityStrategy_INCLUDED | #define Foundation_PriorityStrategy_INCLUDED | |||
#include "Poco/NotificationStrategy.h" | #include "Poco/NotificationStrategy.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
template <class TArgs, class TDelegate> | template <class TArgs, class TDelegate> | |||
class PriorityStrategy: public NotificationStrategy<TArgs, TDelegate> | class PriorityStrategy: public NotificationStrategy<TArgs, TDelegate> | |||
/// NotificationStrategy for PriorityEvent. | /// NotificationStrategy for PriorityEvent. | |||
/// | /// | |||
/// Delegates are kept in a std::vector<>, ordered | /// Delegates are kept in a std::vector<>, ordered | |||
/// by their priority. | /// by their priority. | |||
{ | { | |||
public: | public: | |||
typedef TDelegate* DelegateHandle; | ||||
typedef SharedPtr<TDelegate> DelegatePtr; | typedef SharedPtr<TDelegate> DelegatePtr; | |||
typedef std::vector<DelegatePtr> Delegates; | typedef std::vector<DelegatePtr> Delegates; | |||
typedef typename Delegates::iterator Iterator; | typedef typename Delegates::iterator Iterator; | |||
public: | public: | |||
PriorityStrategy() | PriorityStrategy() | |||
{ | { | |||
} | } | |||
PriorityStrategy(const PriorityStrategy& s): | PriorityStrategy(const PriorityStrategy& s): | |||
skipping to change at line 81 | skipping to change at line 62 | |||
} | } | |||
void notify(const void* sender, TArgs& arguments) | void notify(const void* sender, TArgs& arguments) | |||
{ | { | |||
for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | |||
{ | { | |||
(*it)->notify(sender, arguments); | (*it)->notify(sender, arguments); | |||
} | } | |||
} | } | |||
void add(const TDelegate& delegate) | DelegateHandle add(const TDelegate& delegate) | |||
{ | { | |||
for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | |||
{ | { | |||
if ((*it)->priority() > delegate.priority()) | if ((*it)->priority() > delegate.priority()) | |||
{ | { | |||
_delegates.insert(it, DelegatePtr(static_cas | DelegatePtr pDelegate(static_cast<TDelegate* | |||
t<TDelegate*>(delegate.clone()))); | >(delegate.clone())); | |||
_delegates.insert(it, pDelegate); | ||||
return pDelegate.get(); | ||||
} | ||||
} | ||||
DelegatePtr pDelegate(static_cast<TDelegate*>(delegate.clone | ||||
())); | ||||
_delegates.push_back(pDelegate); | ||||
return pDelegate.get(); | ||||
} | ||||
void remove(const TDelegate& delegate) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (delegate.equals(**it)) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
void remove(DelegateHandle delegateHandle) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (*it == delegateHandle) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | return; | |||
} | } | |||
} | } | |||
_delegates.push_back(DelegatePtr(static_cast<TDelegate*>(del | } | |||
egate.clone()))); | ||||
PriorityStrategy& operator = (const PriorityStrategy& s) | ||||
{ | ||||
if (this != &s) | ||||
{ | ||||
_delegates = s._delegates; | ||||
} | ||||
return *this; | ||||
} | ||||
void clear() | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
(*it)->disable(); | ||||
} | ||||
_delegates.clear(); | ||||
} | ||||
bool empty() const | ||||
{ | ||||
return _delegates.empty(); | ||||
} | ||||
protected: | ||||
Delegates _delegates; | ||||
}; | ||||
template <class TDelegate> | ||||
class PriorityStrategy<void, TDelegate> | ||||
/// NotificationStrategy for PriorityEvent. | ||||
/// | ||||
/// Delegates are kept in a std::vector<>, ordered | ||||
/// by their priority. | ||||
{ | ||||
public: | ||||
typedef TDelegate* DelegateHandle; | ||||
typedef SharedPtr<TDelegate> DelegatePtr; | ||||
typedef std::vector<DelegatePtr> Delegates; | ||||
typedef typename Delegates::iterator Iterator; | ||||
public: | ||||
void notify(const void* sender) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
(*it)->notify(sender); | ||||
} | ||||
} | ||||
DelegateHandle add(const TDelegate& delegate) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if ((*it)->priority() > delegate.priority()) | ||||
{ | ||||
DelegatePtr pDelegate(static_cast<TDelegate* | ||||
>(delegate.clone())); | ||||
_delegates.insert(it, pDelegate); | ||||
return pDelegate.get(); | ||||
} | ||||
} | ||||
DelegatePtr pDelegate(static_cast<TDelegate*>(delegate.clone | ||||
())); | ||||
_delegates.push_back(pDelegate); | ||||
return pDelegate.get(); | ||||
} | } | |||
void remove(const TDelegate& delegate) | void remove(const TDelegate& delegate) | |||
{ | { | |||
for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | for (Iterator it = _delegates.begin(); it != _delegates.end( ); ++it) | |||
{ | { | |||
if (delegate.equals(**it)) | if (delegate.equals(**it)) | |||
{ | { | |||
(*it)->disable(); | (*it)->disable(); | |||
_delegates.erase(it); | _delegates.erase(it); | |||
return; | return; | |||
} | } | |||
} | } | |||
} | } | |||
void remove(DelegateHandle delegateHandle) | ||||
{ | ||||
for (Iterator it = _delegates.begin(); it != _delegates.end( | ||||
); ++it) | ||||
{ | ||||
if (*it == delegateHandle) | ||||
{ | ||||
(*it)->disable(); | ||||
_delegates.erase(it); | ||||
return; | ||||
} | ||||
} | ||||
} | ||||
PriorityStrategy& operator = (const PriorityStrategy& s) | PriorityStrategy& operator = (const PriorityStrategy& s) | |||
{ | { | |||
if (this != &s) | if (this != &s) | |||
{ | { | |||
_delegates = s._delegates; | _delegates = s._delegates; | |||
} | } | |||
return *this; | return *this; | |||
} | } | |||
void clear() | void clear() | |||
End of changes. 6 change blocks. | ||||
37 lines changed or deleted | 123 lines changed or added | |||
Process.h | Process.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the Process class. | // Definition of the Process class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_INCLUDED | #ifndef Foundation_Process_INCLUDED | |||
#define Foundation_Process_INCLUDED | #define Foundation_Process_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | #if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) | |||
#if defined(_WIN32_WCE) | #if defined(_WIN32_WCE) | |||
#include "Process_WINCE.h" | #include "Process_WINCE.h" | |||
skipping to change at line 233 | skipping to change at line 213 | |||
/// The process starts executing in the specified initial di rectory. | /// The process starts executing in the specified initial di rectory. | |||
/// If inPipe, outPipe or errPipe is non-null, the correspon ding | /// If inPipe, outPipe or errPipe is non-null, the correspon ding | |||
/// standard input, standard output or standard error stream | /// standard input, standard output or standard error stream | |||
/// of the launched process is redirected to the Pipe. | /// of the launched process is redirected to the Pipe. | |||
/// The launched process is given the specified environment variables. | /// The launched process is given the specified environment variables. | |||
static int wait(const ProcessHandle& handle); | static int wait(const ProcessHandle& handle); | |||
/// Waits for the process specified by handle to terminate | /// Waits for the process specified by handle to terminate | |||
/// and returns the exit code of the process. | /// and returns the exit code of the process. | |||
static void kill(const ProcessHandle& handle); | static bool isRunning(const ProcessHandle& handle); | |||
/// check if the process specified by handle is running or n | ||||
ot | ||||
/// | ||||
/// This is preferable on Windows where process IDs | ||||
/// may be reused. | ||||
static bool isRunning(PID pid); | ||||
/// Check if the process specified by given pid is running o | ||||
r not. | ||||
static void kill(ProcessHandle& handle); | ||||
/// Kills the process specified by handle. | /// Kills the process specified by handle. | |||
/// | /// | |||
/// This is preferable on Windows where process IDs | /// This is preferable on Windows where process IDs | |||
/// may be reused. | /// may be reused. | |||
static void kill(PID pid); | static void kill(PID pid); | |||
/// Kills the process with the given pid. | /// Kills the process with the given pid. | |||
static void requestTermination(PID pid); | static void requestTermination(PID pid); | |||
/// Requests termination of the process with the give PID. | /// Requests termination of the process with the give PID. | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 13 lines changed or added | |||
Process_UNIX.h | Process_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for Unix. | // Definition of the ProcessImpl class for Unix. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_UNIX_INCLUDED | #ifndef Foundation_Process_UNIX_INCLUDED | |||
#define Foundation_Process_UNIX_INCLUDED | #define Foundation_Process_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <unistd.h> | #include <unistd.h> | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
skipping to change at line 81 | skipping to change at line 61 | |||
static PIDImpl idImpl(); | static PIDImpl idImpl(); | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
private: | private: | |||
static ProcessHandleImpl* launchByForkExecImpl( | static ProcessHandleImpl* launchByForkExecImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 4 lines changed or added | |||
Process_VMS.h | Process_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for OpenVMS. | // Definition of the ProcessImpl class for OpenVMS. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_VMS_INCLUDED | #ifndef Foundation_Process_VMS_INCLUDED | |||
#define Foundation_Process_VMS_INCLUDED | #define Foundation_Process_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include <unistd.h> | #include <unistd.h> | |||
skipping to change at line 82 | skipping to change at line 62 | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static int waitImpl(PIDImpl pid); | static int waitImpl(PIDImpl pid); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Process_VMS_INCLUDED | #endif // Foundation_Process_VMS_INCLUDED | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 4 lines changed or added | |||
Process_VX.h | Process_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for VxWorks. | // Definition of the ProcessImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-20011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-20011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_VX_INCLUDED | #ifndef Foundation_Process_VX_INCLUDED | |||
#define Foundation_Process_VX_INCLUDED | #define Foundation_Process_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
skipping to change at line 82 | skipping to change at line 62 | |||
static PIDImpl idImpl(); | static PIDImpl idImpl(); | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Process_UNIX_INCLUDED | #endif // Foundation_Process_UNIX_INCLUDED | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 4 lines changed or added | |||
Process_WIN32.h | Process_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for WIN32. | // Definition of the ProcessImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_WIN32_INCLUDED | #ifndef Foundation_Process_WIN32_INCLUDED | |||
#define Foundation_Process_WIN32_INCLUDED | #define Foundation_Process_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
skipping to change at line 60 | skipping to change at line 40 | |||
class Foundation_API ProcessHandleImpl: public RefCountedObject | class Foundation_API ProcessHandleImpl: public RefCountedObject | |||
{ | { | |||
public: | public: | |||
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | |||
~ProcessHandleImpl(); | ~ProcessHandleImpl(); | |||
UInt32 id() const; | UInt32 id() const; | |||
HANDLE process() const; | HANDLE process() const; | |||
int wait() const; | int wait() const; | |||
void closeHandle(); | ||||
private: | private: | |||
HANDLE _hProcess; | HANDLE _hProcess; | |||
UInt32 _pid; | UInt32 _pid; | |||
ProcessHandleImpl(const ProcessHandleImpl&); | ProcessHandleImpl(const ProcessHandleImpl&); | |||
ProcessHandleImpl& operator = (const ProcessHandleImpl&); | ProcessHandleImpl& operator = (const ProcessHandleImpl&); | |||
}; | }; | |||
class Foundation_API ProcessImpl | class Foundation_API ProcessImpl | |||
skipping to change at line 86 | skipping to change at line 67 | |||
static PIDImpl idImpl(); | static PIDImpl idImpl(); | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
static std::string terminationEventName(PIDImpl pid); | static std::string terminationEventName(PIDImpl pid); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Process_WIN32_INCLUDED | #endif // Foundation_Process_WIN32_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 5 lines changed or added | |||
Process_WIN32U.h | Process_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for WIN32. | // Definition of the ProcessImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_WIN32U_INCLUDED | #ifndef Foundation_Process_WIN32U_INCLUDED | |||
#define Foundation_Process_WIN32U_INCLUDED | #define Foundation_Process_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
skipping to change at line 60 | skipping to change at line 40 | |||
class Foundation_API ProcessHandleImpl: public RefCountedObject | class Foundation_API ProcessHandleImpl: public RefCountedObject | |||
{ | { | |||
public: | public: | |||
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | |||
~ProcessHandleImpl(); | ~ProcessHandleImpl(); | |||
UInt32 id() const; | UInt32 id() const; | |||
HANDLE process() const; | HANDLE process() const; | |||
int wait() const; | int wait() const; | |||
void closeHandle(); | ||||
private: | private: | |||
HANDLE _hProcess; | HANDLE _hProcess; | |||
UInt32 _pid; | UInt32 _pid; | |||
ProcessHandleImpl(const ProcessHandleImpl&); | ProcessHandleImpl(const ProcessHandleImpl&); | |||
ProcessHandleImpl& operator = (const ProcessHandleImpl&); | ProcessHandleImpl& operator = (const ProcessHandleImpl&); | |||
}; | }; | |||
class Foundation_API ProcessImpl | class Foundation_API ProcessImpl | |||
skipping to change at line 86 | skipping to change at line 67 | |||
static PIDImpl idImpl(); | static PIDImpl idImpl(); | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
static std::string terminationEventName(PIDImpl pid); | static std::string terminationEventName(PIDImpl pid); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Process_WIN32U_INCLUDED | #endif // Foundation_Process_WIN32U_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 5 lines changed or added | |||
Process_WINCE.h | Process_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: Process | // Module: Process | |||
// | // | |||
// Definition of the ProcessImpl class for WIN32. | // Definition of the ProcessImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Process_WINCE_INCLUDED | #ifndef Foundation_Process_WINCE_INCLUDED | |||
#define Foundation_Process_WINCE_INCLUDED | #define Foundation_Process_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include <vector> | #include <vector> | |||
#include <map> | #include <map> | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
skipping to change at line 60 | skipping to change at line 40 | |||
class Foundation_API ProcessHandleImpl: public RefCountedObject | class Foundation_API ProcessHandleImpl: public RefCountedObject | |||
{ | { | |||
public: | public: | |||
ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | ProcessHandleImpl(HANDLE _hProcess, UInt32 pid); | |||
~ProcessHandleImpl(); | ~ProcessHandleImpl(); | |||
UInt32 id() const; | UInt32 id() const; | |||
HANDLE process() const; | HANDLE process() const; | |||
int wait() const; | int wait() const; | |||
void closeHandle(); | ||||
private: | private: | |||
HANDLE _hProcess; | HANDLE _hProcess; | |||
UInt32 _pid; | UInt32 _pid; | |||
ProcessHandleImpl(const ProcessHandleImpl&); | ProcessHandleImpl(const ProcessHandleImpl&); | |||
ProcessHandleImpl& operator = (const ProcessHandleImpl&); | ProcessHandleImpl& operator = (const ProcessHandleImpl&); | |||
}; | }; | |||
class Foundation_API ProcessImpl | class Foundation_API ProcessImpl | |||
skipping to change at line 86 | skipping to change at line 67 | |||
static PIDImpl idImpl(); | static PIDImpl idImpl(); | |||
static void timesImpl(long& userTime, long& kernelTime); | static void timesImpl(long& userTime, long& kernelTime); | |||
static ProcessHandleImpl* launchImpl( | static ProcessHandleImpl* launchImpl( | |||
const std::string& command, | const std::string& command, | |||
const ArgsImpl& args, | const ArgsImpl& args, | |||
const std::string& initialDirectory, | const std::string& initialDirectory, | |||
Pipe* inPipe, | Pipe* inPipe, | |||
Pipe* outPipe, | Pipe* outPipe, | |||
Pipe* errPipe, | Pipe* errPipe, | |||
const EnvImpl& env); | const EnvImpl& env); | |||
static void killImpl(const ProcessHandleImpl& handle); | static void killImpl(ProcessHandleImpl& handle); | |||
static void killImpl(PIDImpl pid); | static void killImpl(PIDImpl pid); | |||
static bool isRunningImpl(const ProcessHandleImpl& handle); | ||||
static bool isRunningImpl(PIDImpl pid); | ||||
static void requestTerminationImpl(PIDImpl pid); | static void requestTerminationImpl(PIDImpl pid); | |||
static std::string terminationEventName(PIDImpl pid); | static std::string terminationEventName(PIDImpl pid); | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Process_WINCE_INCLUDED | #endif // Foundation_Process_WINCE_INCLUDED | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 5 lines changed or added | |||
ProcessingInstruction.h | ProcessingInstruction.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM ProcessingInstruction class. | // Definition of the DOM ProcessingInstruction class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_ProcessingInstruction_INCLUDED | #ifndef DOM_ProcessingInstruction_INCLUDED | |||
#define DOM_ProcessingInstruction_INCLUDED | #define DOM_ProcessingInstruction_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/AbstractNode.h" | #include "Poco/DOM/AbstractNode.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PropertyFileConfiguration.h | PropertyFileConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: PropertyFileConfiguration | // Module: PropertyFileConfiguration | |||
// | // | |||
// Definition of the PropertyFileConfiguration class. | // Definition of the PropertyFileConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_PropertyFileConfiguration_INCLUDED | #ifndef Util_PropertyFileConfiguration_INCLUDED | |||
#define Util_PropertyFileConfiguration_INCLUDED | #define Util_PropertyFileConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/MapConfiguration.h" | #include "Poco/Util/MapConfiguration.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
PurgeStrategy.h | PurgeStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: FileChannel | // Module: FileChannel | |||
// | // | |||
// Definition of the PurgeStrategy class. | // Definition of the PurgeStrategy class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_PurgeStrategy_INCLUDED | #ifndef Foundation_PurgeStrategy_INCLUDED | |||
#define Foundation_PurgeStrategy_INCLUDED | #define Foundation_PurgeStrategy_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/File.h" | #include "Poco/File.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Query.h | Query.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Query | // Module: Query | |||
// | // | |||
// Definition of the Query class. | // Definition of the Query class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSONQuery_INCLUDED | #ifndef JSON_JSONQuery_INCLUDED | |||
#define JSON_JSONQuery_INCLUDED | #define JSON_JSONQuery_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/JSON/Object.h" | #include "Poco/JSON/Object.h" | |||
#include "Poco/JSON/Array.h" | #include "Poco/JSON/Array.h" | |||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
class JSON_API Query | class JSON_API Query | |||
/// Class that can be used to search for a value in a JSON object or array. | /// Class that can be used to search for a value in a JSON object or array. | |||
{ | { | |||
public: | public: | |||
Query(const Dynamic::Var& source); | Query(const Dynamic::Var& source); | |||
/// Constructor. Pass the start object/array. | /// Creates the Query; source must be JSON Object, Array, Ob | |||
ject::Ptr, | ||||
/// Array::Ptr or empty Var. Any other type will trigger thr | ||||
owing of | ||||
/// InvalidArgumentException. | ||||
/// Creating Query holding Ptr will typically result in fast | ||||
er | ||||
/// performance. | ||||
virtual ~Query(); | virtual ~Query(); | |||
/// Destructor | /// Destructor | |||
Object::Ptr findObject(const std::string& path) const; | Object::Ptr findObject(const std::string& path) const; | |||
/// Search for an object. When the object can't be found, an | /// Search for an object. When the object can't be found, a | |||
empty | zero Ptr | |||
/// SharedPtr is returned. | /// is returned; otherwise, a shared pointer to internally h | |||
eld object | ||||
/// is returned. | ||||
/// If object (as opposed to a pointer to object) is held | ||||
/// internally, a shared pointer to new (heap-allocated) Obj | ||||
ect is | ||||
/// returned; this may be expensive operation. | ||||
Object& findObject(const std::string& path, Object& obj) const; | ||||
/// Search for an object. If object is found, it is assigned | ||||
to the | ||||
/// Object through the reference passed in. When the object | ||||
can't be | ||||
/// found, the provided Object is emptied and returned. | ||||
Array::Ptr findArray(const std::string& path) const; | Array::Ptr findArray(const std::string& path) const; | |||
/// Search for an array. When the array can't be found, an e | /// Search for an array. When the array can't be found, a ze | |||
mpty | ro Ptr | |||
/// SharedPtr is returned. | /// is returned; otherwise, a shared pointer to internally h | |||
eld array | ||||
/// is returned. | ||||
/// If array (as opposed to a pointer to array) is held | ||||
/// internally, a shared pointer to new (heap-allocated) Obj | ||||
ect is | ||||
/// returned; this may be expensive operation. | ||||
Array& findArray(const std::string& path, Array& obj) const; | ||||
/// Search for an array. If array is found, it is assigned t | ||||
o the | ||||
/// Object through the reference passed in. When the array c | ||||
an't be | ||||
/// found, the provided Object is emptied and returned. | ||||
Dynamic::Var find(const std::string& path) const; | Dynamic::Var find(const std::string& path) const; | |||
/// Searches a value | /// Searches a value | |||
/// For example: "person.children[0].name" will return the | /// For example: "person.children[0].name" will return the | |||
/// the name of the first child. When the value can't be fou nd | /// the name of the first child. When the value can't be fou nd | |||
/// an empty value is returned. | /// an empty value is returned. | |||
template<typename T> | template<typename T> | |||
T findValue(const std::string& path, const T& def) const | T findValue(const std::string& path, const T& def) const | |||
/// Searches for a value will convert it to the given type. | /// Searches for a value will convert it to the given type. | |||
End of changes. 4 change blocks. | ||||
39 lines changed or deleted | 41 lines changed or added | |||
QuotedPrintableDecoder.h | QuotedPrintableDecoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: QuotedPrintableDecoder | // Module: QuotedPrintableDecoder | |||
// | // | |||
// Definition of the QuotedPrintableDecoder class. | // Definition of the QuotedPrintableDecoder class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_QuotedPrintableDecoder_INCLUDED | #ifndef Net_QuotedPrintableDecoder_INCLUDED | |||
#define Net_QuotedPrintableDecoder_INCLUDED | #define Net_QuotedPrintableDecoder_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
QuotedPrintableEncoder.h | QuotedPrintableEncoder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: QuotedPrintableEncoder | // Module: QuotedPrintableEncoder | |||
// | // | |||
// Definition of the QuotedPrintableEncoder class. | // Definition of the QuotedPrintableEncoder class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_QuotedPrintableEncoder_INCLUDED | #ifndef Net_QuotedPrintableEncoder_INCLUDED | |||
#define Net_QuotedPrintableEncoder_INCLUDED | #define Net_QuotedPrintableEncoder_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RWLock.h | RWLock.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLock class. | // Definition of the RWLock class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_INCLUDED | #ifndef Foundation_RWLock_INCLUDED | |||
#define Foundation_RWLock_INCLUDED | #define Foundation_RWLock_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#if defined(_WIN32_WCE) | #if defined(_WIN32_WCE) | |||
skipping to change at line 175 | skipping to change at line 155 | |||
inline ScopedRWLock::ScopedRWLock(RWLock& rwl, bool write): _rwl(rwl) | inline ScopedRWLock::ScopedRWLock(RWLock& rwl, bool write): _rwl(rwl) | |||
{ | { | |||
if (write) | if (write) | |||
_rwl.writeLock(); | _rwl.writeLock(); | |||
else | else | |||
_rwl.readLock(); | _rwl.readLock(); | |||
} | } | |||
inline ScopedRWLock::~ScopedRWLock() | inline ScopedRWLock::~ScopedRWLock() | |||
{ | { | |||
_rwl.unlock(); | try | |||
{ | ||||
_rwl.unlock(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
inline ScopedReadRWLock::ScopedReadRWLock(RWLock& rwl): ScopedRWLock(rwl, f alse) | inline ScopedReadRWLock::ScopedReadRWLock(RWLock& rwl): ScopedRWLock(rwl, f alse) | |||
{ | { | |||
} | } | |||
inline ScopedReadRWLock::~ScopedReadRWLock() | inline ScopedReadRWLock::~ScopedReadRWLock() | |||
{ | { | |||
} | } | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 9 lines changed or added | |||
RWLock_Android.h | RWLock_Android.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLockImpl class for Android Threads. | // Definition of the RWLockImpl class for Android Threads. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_Android_INCLUDED | #ifndef Foundation_RWLock_Android_INCLUDED | |||
#define Foundation_RWLock_Android_INCLUDED | #define Foundation_RWLock_Android_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RWLock_POSIX.h | RWLock_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLockImpl class for POSIX Threads. | // Definition of the RWLockImpl class for POSIX Threads. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_POSIX_INCLUDED | #ifndef Foundation_RWLock_POSIX_INCLUDED | |||
#define Foundation_RWLock_POSIX_INCLUDED | #define Foundation_RWLock_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RWLock_VX.h | RWLock_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLockImpl class for POSIX Threads (VxWorks). | // Definition of the RWLockImpl class for POSIX Threads (VxWorks). | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_VX_INCLUDED | #ifndef Foundation_RWLock_VX_INCLUDED | |||
#define Foundation_RWLock_VX_INCLUDED | #define Foundation_RWLock_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RWLock_WIN32.h | RWLock_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLockImpl class for WIN32. | // Definition of the RWLockImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_WIN32_INCLUDED | #ifndef Foundation_RWLock_WIN32_INCLUDED | |||
#define Foundation_RWLock_WIN32_INCLUDED | #define Foundation_RWLock_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RWLock_WINCE.h | RWLock_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: RWLock | // Module: RWLock | |||
// | // | |||
// Definition of the RWLockImpl class for WINCE. | // Definition of the RWLockImpl class for WINCE. | |||
// | // | |||
// Copyright (c) 2009-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RWLock_WINCE_INCLUDED | #ifndef Foundation_RWLock_WINCE_INCLUDED | |||
#define Foundation_RWLock_WINCE_INCLUDED | #define Foundation_RWLock_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Random.h | Random.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: Random | // Module: Random | |||
// | // | |||
// Definition of class Random. | // Definition of class Random. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
// | // | |||
// Based on the FreeBSD random number generator. | // Based on the FreeBSD random number generator. | |||
// src/lib/libc/stdlib/random.c,v 1.25 | // src/lib/libc/stdlib/random.c,v 1.25 | |||
// | // | |||
// Copyright (c) 1983, 1993 | // Copyright (c) 1983, 1993 | |||
// The Regents of the University of California. All rights reserved. | // The Regents of the University of California. All rights reserved. | |||
// Redistribution and use in source and binary forms, with or without | // Redistribution and use in source and binary forms, with or without | |||
// modification, are permitted provided that the following conditions | // modification, are permitted provided that the following conditions | |||
// are met: | // are met: | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RandomStream.h | RandomStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Crypt | // Package: Crypt | |||
// Module: RandomStream | // Module: RandomStream | |||
// | // | |||
// Definition of class RandomInputStream. | // Definition of class RandomInputStream. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RandomStream_INCLUDED | #ifndef Foundation_RandomStream_INCLUDED | |||
#define Foundation_RandomStream_INCLUDED | #define Foundation_RandomStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/BufferedStreamBuf.h" | #include "Poco/BufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RawSocket.h | RawSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: RawSocket | // Module: RawSocket | |||
// | // | |||
// Definition of the RawSocket class. | // Definition of the RawSocket class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_RawSocket_INCLUDED | #ifndef Net_RawSocket_INCLUDED | |||
#define Net_RawSocket_INCLUDED | #define Net_RawSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 88 | skipping to change at line 68 | |||
/// Assignment operator. | /// Assignment operator. | |||
/// | /// | |||
/// Releases the socket's SocketImpl and | /// Releases the socket's SocketImpl and | |||
/// attaches the SocketImpl from the other socket and | /// attaches the SocketImpl from the other socket and | |||
/// increments the reference count of the SocketImpl. | /// increments the reference count of the SocketImpl. | |||
void connect(const SocketAddress& address); | void connect(const SocketAddress& address); | |||
/// Restricts incoming and outgoing | /// Restricts incoming and outgoing | |||
/// packets to the specified address. | /// packets to the specified address. | |||
/// | /// | |||
/// Cannot be used together with bind(). | /// Calls to connect() cannot come before calls to bind(). | |||
void bind(const SocketAddress& address, bool reuseAddress = false); | void bind(const SocketAddress& address, bool reuseAddress = false); | |||
/// Bind a local address to the socket. | /// Bind a local address to the socket. | |||
/// | /// | |||
/// This is usually only done when establishing a server | /// This is usually only done when establishing a server | |||
/// socket. | /// socket. | |||
/// | /// | |||
/// If reuseAddress is true, sets the SO_REUSEADDR | /// If reuseAddress is true, sets the SO_REUSEADDR | |||
/// socket option. | /// socket option. | |||
/// | /// | |||
/// Cannot be used together with connect(). | /// Calls to connect() cannot come before calls to bind(). | |||
int sendBytes(const void* buffer, int length, int flags = 0); | int sendBytes(const void* buffer, int length, int flags = 0); | |||
/// Sends the contents of the given buffer through | /// Sends the contents of the given buffer through | |||
/// the socket. | /// the socket. | |||
/// | /// | |||
/// Returns the number of bytes sent, which may be | /// Returns the number of bytes sent, which may be | |||
/// less than the number of bytes specified. | /// less than the number of bytes specified. | |||
int receiveBytes(void* buffer, int length, int flags = 0); | int receiveBytes(void* buffer, int length, int flags = 0); | |||
/// Receives data from the socket and stores it | /// Receives data from the socket and stores it | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
RawSocketImpl.h | RawSocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: RawSocketImpl | // Module: RawSocketImpl | |||
// | // | |||
// Definition of the RawSocketImpl class. | // Definition of the RawSocketImpl class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_RawSocketImpl_INCLUDED | #ifndef Net_RawSocketImpl_INCLUDED | |||
#define Net_RawSocketImpl_INCLUDED | #define Net_RawSocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketImpl.h" | #include "Poco/Net/SocketImpl.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RefCountedObject.h | RefCountedObject.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: RefCountedObject | // Module: RefCountedObject | |||
// | // | |||
// Definition of the RefCountedObject class. | // Definition of the RefCountedObject class. | |||
// | // | |||
// Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RefCountedObject_INCLUDED | #ifndef Foundation_RefCountedObject_INCLUDED | |||
#define Foundation_RefCountedObject_INCLUDED | #define Foundation_RefCountedObject_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/AtomicCounter.h" | #include "Poco/AtomicCounter.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 61 | skipping to change at line 41 | |||
/// by copying and assignment. | /// by copying and assignment. | |||
{ | { | |||
public: | public: | |||
RefCountedObject(); | RefCountedObject(); | |||
/// Creates the RefCountedObject. | /// Creates the RefCountedObject. | |||
/// The initial reference count is one. | /// The initial reference count is one. | |||
void duplicate() const; | void duplicate() const; | |||
/// Increments the object's reference count. | /// Increments the object's reference count. | |||
void release() const; | void release() const throw(); | |||
/// Decrements the object's reference count | /// Decrements the object's reference count | |||
/// and deletes the object if the count | /// and deletes the object if the count | |||
/// reaches zero. | /// reaches zero. | |||
int referenceCount() const; | int referenceCount() const; | |||
/// Returns the reference count. | /// Returns the reference count. | |||
protected: | protected: | |||
virtual ~RefCountedObject(); | virtual ~RefCountedObject(); | |||
/// Destroys the RefCountedObject. | /// Destroys the RefCountedObject. | |||
skipping to change at line 93 | skipping to change at line 73 | |||
inline int RefCountedObject::referenceCount() const | inline int RefCountedObject::referenceCount() const | |||
{ | { | |||
return _counter.value(); | return _counter.value(); | |||
} | } | |||
inline void RefCountedObject::duplicate() const | inline void RefCountedObject::duplicate() const | |||
{ | { | |||
++_counter; | ++_counter; | |||
} | } | |||
inline void RefCountedObject::release() const | inline void RefCountedObject::release() const throw() | |||
{ | { | |||
if (--_counter == 0) delete this; | try | |||
{ | ||||
if (--_counter == 0) delete this; | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_RefCountedObject_INCLUDED | #endif // Foundation_RefCountedObject_INCLUDED | |||
End of changes. 4 change blocks. | ||||
35 lines changed or deleted | 11 lines changed or added | |||
RegExpValidator.h | RegExpValidator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: RegExpValidator | // Module: RegExpValidator | |||
// | // | |||
// Definition of the RegExpValidator class. | // Definition of the RegExpValidator class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_RegExpValidator_INCLUDED | #ifndef Util_RegExpValidator_INCLUDED | |||
#define Util_RegExpValidator_INCLUDED | #define Util_RegExpValidator_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Validator.h" | #include "Poco/Util/Validator.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RegularExpression.h | RegularExpression.h | |||
---|---|---|---|---|
skipping to change at line 18 | skipping to change at line 18 | |||
// Module: RegularExpression | // Module: RegularExpression | |||
// | // | |||
// Definitions of class RegularExpression. | // Definitions of class RegularExpression. | |||
// | // | |||
// A wrapper class for Philip Hazel's PCRE - Perl Compatible Regular Expres sions | // A wrapper class for Philip Hazel's PCRE - Perl Compatible Regular Expres sions | |||
// library (http://www.pcre.org). | // library (http://www.pcre.org). | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RegularExpression_INCLUDED | #ifndef Foundation_RegularExpression_INCLUDED | |||
#define Foundation_RegularExpression_INCLUDED | #define Foundation_RegularExpression_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
// | // | |||
// Copy these definitions from pcre.h | // Copy these definitions from pcre.h | |||
// to avoid pulling in the entire header file | // to avoid pulling in the entire header file | |||
// | // | |||
extern "C" | extern "C" | |||
{ | { | |||
struct real_pcre; | struct real_pcre8_or_16; /* declaration; the definit | |||
typedef struct real_pcre pcre; | ion is private */ | |||
typedef struct real_pcre8_or_16 pcre; | ||||
struct pcre_extra; | struct pcre_extra; | |||
} | } | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API RegularExpression | class Foundation_API RegularExpression | |||
/// A class for working with regular expressions. | /// A class for working with regular expressions. | |||
/// Implemented using PCRE, the Perl Compatible | /// Implemented using PCRE, the Perl Compatible | |||
/// Regular Expressions library by Philip Hazel | /// Regular Expressions library by Philip Hazel | |||
/// (see http://www.pcre.org). | /// (see http://www.pcre.org). | |||
End of changes. 2 change blocks. | ||||
34 lines changed or deleted | 4 lines changed or added | |||
RemoteSyslogChannel.h | RemoteSyslogChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Logging | // Package: Logging | |||
// Module: RemoteSyslogChannel | // Module: RemoteSyslogChannel | |||
// | // | |||
// Definition of the RemoteSyslogChannel class. | // Definition of the RemoteSyslogChannel class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_RemoteSyslogChannel_INCLUDED | #ifndef Net_RemoteSyslogChannel_INCLUDED | |||
#define Net_RemoteSyslogChannel_INCLUDED | #define Net_RemoteSyslogChannel_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Net/DatagramSocket.h" | #include "Poco/Net/DatagramSocket.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RemoteSyslogListener.h | RemoteSyslogListener.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Logging | // Package: Logging | |||
// Module: RemoteSyslogListener | // Module: RemoteSyslogListener | |||
// | // | |||
// Definition of the RemoteSyslogListener class. | // Definition of the RemoteSyslogListener class. | |||
// | // | |||
// Copyright (c) 2007-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_RemoteSyslogListener_INCLUDED | #ifndef Net_RemoteSyslogListener_INCLUDED | |||
#define Net_RemoteSyslogListener_INCLUDED | #define Net_RemoteSyslogListener_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/ThreadPool.h" | #include "Poco/ThreadPool.h" | |||
#include "Poco/SplitterChannel.h" | #include "Poco/SplitterChannel.h" | |||
#include "Poco/NotificationQueue.h" | #include "Poco/NotificationQueue.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class RemoteUDPListener; | class RemoteUDPListener; | |||
class SyslogParser; | class SyslogParser; | |||
class Net_API RemoteSyslogListener: public Poco::SplitterChannel | class Net_API RemoteSyslogListener: public Poco::SplitterChannel | |||
/// RemoteSyslogListener implents listening for syslog messages | /// RemoteSyslogListener implements listening for syslog messages | |||
/// sent over UDP, according to RFC 5424 "The Syslog Protocol" | /// sent over UDP, according to RFC 5424 "The Syslog Protocol" | |||
/// and RFC 5426 "Transmission of syslog messages over UDP". | /// and RFC 5426 "Transmission of syslog messages over UDP". | |||
/// | /// | |||
/// In addition, RemoteSyslogListener also supports the "old" BSD sy slog | /// In addition, RemoteSyslogListener also supports the "old" BSD sy slog | |||
/// protocol, as described in RFC 3164. | /// protocol, as described in RFC 3164. | |||
/// | /// | |||
/// The RemoteSyslogListener is a subclass of Poco::SplitterChannel. | /// The RemoteSyslogListener is a subclass of Poco::SplitterChannel. | |||
/// Every received log message is sent to the channels registered | /// Every received log message is sent to the channels registered | |||
/// with addChannel() or the "channel" property. | /// with addChannel() or the "channel" property. | |||
/// | /// | |||
skipping to change at line 116 | skipping to change at line 96 | |||
void enqueueMessage(const std::string& messageText, const Poco::Net: :SocketAddress& senderAddress); | void enqueueMessage(const std::string& messageText, const Poco::Net: :SocketAddress& senderAddress); | |||
/// Enqueues a single line of text containing a syslog messa ge | /// Enqueues a single line of text containing a syslog messa ge | |||
/// for asynchronous processing by a parser thread. | /// for asynchronous processing by a parser thread. | |||
static void registerChannel(); | static void registerChannel(); | |||
/// Registers the channel with the global LoggingFactory. | /// Registers the channel with the global LoggingFactory. | |||
static const std::string PROP_PORT; | static const std::string PROP_PORT; | |||
static const std::string PROP_THREADS; | static const std::string PROP_THREADS; | |||
static const std::string LOG_PROP_APP; | ||||
static const std::string LOG_PROP_HOST; | ||||
protected: | protected: | |||
~RemoteSyslogListener(); | ~RemoteSyslogListener(); | |||
/// Destroys the RemoteSyslogListener. | /// Destroys the RemoteSyslogListener. | |||
private: | private: | |||
RemoteUDPListener* _pListener; | RemoteUDPListener* _pListener; | |||
SyslogParser* _pParser; | SyslogParser* _pParser; | |||
Poco::ThreadPool _threadPool; | Poco::ThreadPool _threadPool; | |||
Poco::NotificationQueue _queue; | Poco::NotificationQueue _queue; | |||
Poco::UInt16 _port; | Poco::UInt16 _port; | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 5 lines changed or added | |||
RotateStrategy.h | RotateStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: FileChannel | // Module: FileChannel | |||
// | // | |||
// Definition of the RotateStrategy class and subclasses. | // Definition of the RotateStrategy class and subclasses. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RotateStrategy_INCLUDED | #ifndef Foundation_RotateStrategy_INCLUDED | |||
#define Foundation_RotateStrategy_INCLUDED | #define Foundation_RotateStrategy_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/LogFile.h" | #include "Poco/LogFile.h" | |||
skipping to change at line 112 | skipping to change at line 92 | |||
default: | default: | |||
throw InvalidArgumentException("Invalid rotation tim e specified."); | throw InvalidArgumentException("Invalid rotation tim e specified."); | |||
} | } | |||
getNextRollover(); | getNextRollover(); | |||
} | } | |||
~RotateAtTimeStrategy() | ~RotateAtTimeStrategy() | |||
{ | { | |||
} | } | |||
bool mustRotate(LogFile* pFile) | bool mustRotate(LogFile* /*pFile*/) | |||
{ | { | |||
if (DT() >= _threshold) | if (DT() >= _threshold) | |||
{ | { | |||
getNextRollover(); | getNextRollover(); | |||
return true; | return true; | |||
} | } | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
Runnable.h | Runnable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the Runnable class. | // Definition of the Runnable class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Runnable_INCLUDED | #ifndef Foundation_Runnable_INCLUDED | |||
#define Foundation_Runnable_INCLUDED | #define Foundation_Runnable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Runnable | class Foundation_API Runnable | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
RunnableAdapter.h | RunnableAdapter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the RunnableAdapter template class. | // Definition of the RunnableAdapter template class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_RunnableAdapter_INCLUDED | #ifndef Foundation_RunnableAdapter_INCLUDED | |||
#define Foundation_RunnableAdapter_INCLUDED | #define Foundation_RunnableAdapter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SAXException.h | SAXException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX exception classes. | // SAX exception classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_SAXException_INCLUDED | #ifndef SAX_SAXException_INCLUDED | |||
#define SAX_SAXException_INCLUDED | #define SAX_SAXException_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLException.h" | #include "Poco/XML/XMLException.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SAXParser.h | SAXParser.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// Implementation of the XMLReader interface. | // Implementation of the XMLReader interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_SAXParser_INCLUDED | #ifndef SAX_SAXParser_INCLUDED | |||
#define SAX_SAXParser_INCLUDED | #define SAX_SAXParser_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/XMLReader.h" | #include "Poco/SAX/XMLReader.h" | |||
#include "Poco/XML/ParserEngine.h" | #include "Poco/XML/ParserEngine.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SHA1Engine.h | SHA1Engine.h | |||
---|---|---|---|---|
skipping to change at line 21 | skipping to change at line 21 | |||
// | // | |||
// Secure Hash Standard SHA-1 algorithm | // Secure Hash Standard SHA-1 algorithm | |||
// (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm) | // (FIPS 180-1, see http://www.itl.nist.gov/fipspubs/fip180-1.htm) | |||
// | // | |||
// Based on the public domain implementation by Peter C. Gutmann | // Based on the public domain implementation by Peter C. Gutmann | |||
// on 2 Sep 1992, modified by Carl Ellison to be SHA-1. | // on 2 Sep 1992, modified by Carl Ellison to be SHA-1. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SHA1Engine_INCLUDED | #ifndef Foundation_SHA1Engine_INCLUDED | |||
#define Foundation_SHA1Engine_INCLUDED | #define Foundation_SHA1Engine_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/DigestEngine.h" | #include "Poco/DigestEngine.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SMTPChannel.h | SMTPChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Logging | // Package: Logging | |||
// Module: SMTPChannel | // Module: SMTPChannel | |||
// | // | |||
// Definition of the SMTPChannel class. | // Definition of the SMTPChannel class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SMTPChannel_INCLUDED | #ifndef Net_SMTPChannel_INCLUDED | |||
#define Net_SMTPChannel_INCLUDED | #define Net_SMTPChannel_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/String.h" | #include "Poco/String.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SMTPClientSession.h | SMTPClientSession.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Mail | // Package: Mail | |||
// Module: SMTPClientSession | // Module: SMTPClientSession | |||
// | // | |||
// Definition of the SMTPClientSession class. | // Definition of the SMTPClientSession class. | |||
// | // | |||
// Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SMTPClientSession_INCLUDED | #ifndef Net_SMTPClientSession_INCLUDED | |||
#define Net_SMTPClientSession_INCLUDED | #define Net_SMTPClientSession_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/DialogSocket.h" | #include "Poco/Net/DialogSocket.h" | |||
#include "Poco/DigestEngine.h" | #include "Poco/DigestEngine.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
skipping to change at line 146 | skipping to change at line 126 | |||
void sendMessage(const MailMessage& message, const Recipients& recip ients); | void sendMessage(const MailMessage& message, const Recipients& recip ients); | |||
/// Sends the given mail message by sending a MAIL FROM comm and, | /// Sends the given mail message by sending a MAIL FROM comm and, | |||
/// a RCPT TO command for every recipient, and a DATA comman d with | /// a RCPT TO command for every recipient, and a DATA comman d with | |||
/// the message headers and content. Using this function res ults in | /// the message headers and content. Using this function res ults in | |||
/// message header being generated from the supplied recipie nts list. | /// message header being generated from the supplied recipie nts list. | |||
/// | /// | |||
/// Throws a SMTPException in case of a SMTP-specific error, or a | /// Throws a SMTPException in case of a SMTP-specific error, or a | |||
/// NetException in case of a general network communication failure. | /// NetException in case of a general network communication failure. | |||
void sendMessage(std::istream& istr); | ||||
/// Sends the mail message from the supplied stream. Content | ||||
of the stream | ||||
/// is copied without any checking. Only the completion stat | ||||
us is checked and, | ||||
/// if not valid, SMTPExcpetion is thrown. | ||||
int sendCommand(const std::string& command, std::string& response); | int sendCommand(const std::string& command, std::string& response); | |||
/// Sends the given command verbatim to the server | /// Sends the given command verbatim to the server | |||
/// and waits for a response. | /// and waits for a response. | |||
/// | /// | |||
/// Throws a SMTPException in case of a SMTP-specific error, or a | /// Throws a SMTPException in case of a SMTP-specific error, or a | |||
/// NetException in case of a general network communication failure. | /// NetException in case of a general network communication failure. | |||
int sendCommand(const std::string& command, const std::string& arg, std::string& response); | int sendCommand(const std::string& command, const std::string& arg, std::string& response); | |||
/// Sends the given command verbatim to the server | /// Sends the given command verbatim to the server | |||
/// and waits for a response. | /// and waits for a response. | |||
/// | /// | |||
/// Throws a SMTPException in case of a SMTP-specific error, or a | /// Throws a SMTPException in case of a SMTP-specific error, or a | |||
/// NetException in case of a general network communication failure. | /// NetException in case of a general network communication failure. | |||
void sendAddresses(const std::string& from, const Recipients& recipi | ||||
ents); | ||||
/// Sends the message preamble by sending a MAIL FROM comman | ||||
d, | ||||
/// and a RCPT TO command for every recipient. | ||||
/// | ||||
/// Throws a SMTPException in case of a SMTP-specific error, | ||||
or a | ||||
/// NetException in case of a general network communication | ||||
failure. | ||||
void sendData(); | ||||
/// Sends the message preamble by sending a DATA command. | ||||
/// | ||||
/// Throws a SMTPException in case of a SMTP-specific error, | ||||
or a | ||||
/// NetException in case of a general network communication | ||||
failure. | ||||
protected: | protected: | |||
enum StatusClass | enum StatusClass | |||
{ | { | |||
SMTP_POSITIVE_COMPLETION = 2, | SMTP_POSITIVE_COMPLETION = 2, | |||
SMTP_POSITIVE_INTERMEDIATE = 3, | SMTP_POSITIVE_INTERMEDIATE = 3, | |||
SMTP_TRANSIENT_NEGATIVE = 4, | SMTP_TRANSIENT_NEGATIVE = 4, | |||
SMTP_PERMANENT_NEGATIVE = 5 | SMTP_PERMANENT_NEGATIVE = 5 | |||
}; | }; | |||
enum | enum | |||
{ | { | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 27 lines changed or added | |||
ScopedLock.h | ScopedLock.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the ScopedLock template class. | // Definition of the ScopedLock template class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ScopedLock_INCLUDED | #ifndef Foundation_ScopedLock_INCLUDED | |||
#define Foundation_ScopedLock_INCLUDED | #define Foundation_ScopedLock_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class M> | template <class M> | |||
skipping to change at line 66 | skipping to change at line 46 | |||
_mutex.lock(); | _mutex.lock(); | |||
} | } | |||
ScopedLock(M& mutex, long milliseconds): _mutex(mutex) | ScopedLock(M& mutex, long milliseconds): _mutex(mutex) | |||
{ | { | |||
_mutex.lock(milliseconds); | _mutex.lock(milliseconds); | |||
} | } | |||
~ScopedLock() | ~ScopedLock() | |||
{ | { | |||
_mutex.unlock(); | try | |||
{ | ||||
_mutex.unlock(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
private: | private: | |||
M& _mutex; | M& _mutex; | |||
ScopedLock(); | ScopedLock(); | |||
ScopedLock(const ScopedLock&); | ScopedLock(const ScopedLock&); | |||
ScopedLock& operator = (const ScopedLock&); | ScopedLock& operator = (const ScopedLock&); | |||
}; | }; | |||
skipping to change at line 100 | skipping to change at line 87 | |||
_pMutex->lock(); | _pMutex->lock(); | |||
} | } | |||
ScopedLockWithUnlock(M& mutex, long milliseconds): _pMutex(&mutex) | ScopedLockWithUnlock(M& mutex, long milliseconds): _pMutex(&mutex) | |||
{ | { | |||
_pMutex->lock(milliseconds); | _pMutex->lock(milliseconds); | |||
} | } | |||
~ScopedLockWithUnlock() | ~ScopedLockWithUnlock() | |||
{ | { | |||
unlock(); | try | |||
{ | ||||
unlock(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
void unlock() | void unlock() | |||
{ | { | |||
if (_pMutex) | if (_pMutex) | |||
{ | { | |||
_pMutex->unlock(); | _pMutex->unlock(); | |||
_pMutex = 0; | _pMutex = 0; | |||
} | } | |||
} | } | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 17 lines changed or added | |||
ScopedUnlock.h | ScopedUnlock.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Mutex | // Module: Mutex | |||
// | // | |||
// Definition of the ScopedUnlock template class. | // Definition of the ScopedUnlock template class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ScopedUnlock_INCLUDED | #ifndef Foundation_ScopedUnlock_INCLUDED | |||
#define Foundation_ScopedUnlock_INCLUDED | #define Foundation_ScopedUnlock_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class M> | template <class M> | |||
skipping to change at line 60 | skipping to change at line 40 | |||
/// The destructor locks the mutex. | /// The destructor locks the mutex. | |||
{ | { | |||
public: | public: | |||
inline ScopedUnlock(M& mutex, bool unlockNow = true): _mutex(mutex) | inline ScopedUnlock(M& mutex, bool unlockNow = true): _mutex(mutex) | |||
{ | { | |||
if (unlockNow) | if (unlockNow) | |||
_mutex.unlock(); | _mutex.unlock(); | |||
} | } | |||
inline ~ScopedUnlock() | inline ~ScopedUnlock() | |||
{ | { | |||
_mutex.lock(); | try | |||
{ | ||||
_mutex.lock(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
private: | private: | |||
M& _mutex; | M& _mutex; | |||
ScopedUnlock(); | ScopedUnlock(); | |||
ScopedUnlock(const ScopedUnlock&); | ScopedUnlock(const ScopedUnlock&); | |||
ScopedUnlock& operator = (const ScopedUnlock&); | ScopedUnlock& operator = (const ScopedUnlock&); | |||
}; | }; | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 9 lines changed or added | |||
Semaphore.h | Semaphore.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Semaphore | // Module: Semaphore | |||
// | // | |||
// Definition of the Semaphore class. | // Definition of the Semaphore class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Semaphore_INCLUDED | #ifndef Foundation_Semaphore_INCLUDED | |||
#define Foundation_Semaphore_INCLUDED | #define Foundation_Semaphore_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#include "Poco/Semaphore_WIN32.h" | #include "Poco/Semaphore_WIN32.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Semaphore_POSIX.h | Semaphore_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Semaphore | // Module: Semaphore | |||
// | // | |||
// Definition of the SemaphoreImpl class for POSIX Threads. | // Definition of the SemaphoreImpl class for POSIX Threads. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Semaphore_POSIX_INCLUDED | #ifndef Foundation_Semaphore_POSIX_INCLUDED | |||
#define Foundation_Semaphore_POSIX_INCLUDED | #define Foundation_Semaphore_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <pthread.h> | #include <pthread.h> | |||
#include <errno.h> | #include <errno.h> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Semaphore_VX.h | Semaphore_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Semaphore | // Module: Semaphore | |||
// | // | |||
// Definition of the SemaphoreImpl class for VxWorks. | // Definition of the SemaphoreImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-20011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-20011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Semaphore_VX_INCLUDED | #ifndef Foundation_Semaphore_VX_INCLUDED | |||
#define Foundation_Semaphore_VX_INCLUDED | #define Foundation_Semaphore_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <semLib.h> | #include <semLib.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Semaphore_WIN32.h | Semaphore_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Semaphore | // Module: Semaphore | |||
// | // | |||
// Definition of the SemaphoreImpl class for WIN32. | // Definition of the SemaphoreImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Semaphore_WIN32_INCLUDED | #ifndef Foundation_Semaphore_WIN32_INCLUDED | |||
#define Foundation_Semaphore_WIN32_INCLUDED | #define Foundation_Semaphore_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ServerApplication.h | ServerApplication.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Application | // Package: Application | |||
// Module: ServerApplication | // Module: ServerApplication | |||
// | // | |||
// Definition of the ServerApplication class. | // Definition of the ServerApplication class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_ServerApplication_INCLUDED | #ifndef Util_ServerApplication_INCLUDED | |||
#define Util_ServerApplication_INCLUDED | #define Util_ServerApplication_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/Application.h" | #include "Poco/Util/Application.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#include "Poco/NamedEvent.h" | #include "Poco/NamedEvent.h" | |||
skipping to change at line 195 | skipping to change at line 175 | |||
#endif | #endif | |||
private: | private: | |||
#if defined(POCO_VXWORKS) | #if defined(POCO_VXWORKS) | |||
static Poco::Event _terminate; | static Poco::Event _terminate; | |||
#elif defined(POCO_OS_FAMILY_UNIX) | #elif defined(POCO_OS_FAMILY_UNIX) | |||
void handleDaemon(const std::string& name, const std::string& value) ; | void handleDaemon(const std::string& name, const std::string& value) ; | |||
void handlePidFile(const std::string& name, const std::string& value ); | void handlePidFile(const std::string& name, const std::string& value ); | |||
bool isDaemon(int argc, char** argv); | bool isDaemon(int argc, char** argv); | |||
void beDaemon(); | void beDaemon(); | |||
#if defined(POCO_ANDROID) | ||||
static Poco::Event _terminate; | ||||
#endif | ||||
#elif defined(POCO_OS_FAMILY_WINDOWS) | #elif defined(POCO_OS_FAMILY_WINDOWS) | |||
#if !defined(_WIN32_WCE) | #if !defined(_WIN32_WCE) | |||
enum Action | enum Action | |||
{ | { | |||
SRV_RUN, | SRV_RUN, | |||
SRV_REGISTER, | SRV_REGISTER, | |||
SRV_UNREGISTER | SRV_UNREGISTER | |||
}; | }; | |||
static BOOL __stdcall ConsoleCtrlHandler(DWORD ctrlType); | static BOOL __stdcall ConsoleCtrlHandler(DWORD ctrlType); | |||
static void __stdcall ServiceControlHandler(DWORD control); | static void __stdcall ServiceControlHandler(DWORD control); | |||
skipping to change at line 244 | skipping to change at line 227 | |||
} } // namespace Poco::Util | } } // namespace Poco::Util | |||
// | // | |||
// Macro to implement main() | // Macro to implement main() | |||
// | // | |||
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) | #if defined(_WIN32) && defined(POCO_WIN32_UTF8) | |||
#define POCO_SERVER_MAIN(App) \ | #define POCO_SERVER_MAIN(App) \ | |||
int wmain(int argc, wchar_t** argv) \ | int wmain(int argc, wchar_t** argv) \ | |||
{ \ | { \ | |||
App app; \ | try \ | |||
return app.run(argc, argv); \ | { | |||
\ | ||||
App app; \ | ||||
return app.run(argc, argv); \ | ||||
} | ||||
\ | ||||
catch (Poco::Exception& exc) \ | ||||
{ | ||||
\ | ||||
std::cerr << exc.displayText() << std::endl; \ | ||||
return Poco::Util::Application::EXIT_SOFTWARE; \ | ||||
} | ||||
\ | ||||
} | } | |||
#elif defined(POCO_VXWORKS) | #elif defined(POCO_VXWORKS) | |||
#define POCO_SERVER_MAIN(App) \ | #define POCO_SERVER_MAIN(App) \ | |||
int pocoSrvMain(const char* appName, ...) \ | int pocoSrvMain(const char* appName, ...) | |||
{ \ | \ | |||
std::vector<std::string> args; \ | { | |||
args.push_back(std::string(appName)); \ | \ | |||
va_list vargs; \ | std::vector<std::string> args; | |||
va_start(vargs, appName); \ | \ | |||
const char* arg = va_arg(vargs, const char*); \ | args.push_back(std::string(appName)); | |||
while (arg) \ | \ | |||
{ \ | va_list vargs; | |||
args.push_back(std::string(arg)); \ | \ | |||
arg = va_arg(vargs, const char*); \ | va_start(vargs, appName); | |||
} \ | \ | |||
va_end(vargs); \ | const char* arg = va_arg(vargs, const char*); \ | |||
App app; \ | while (arg) | |||
return app.run(args); \ | \ | |||
{ | ||||
\ | ||||
args.push_back(std::string(arg)); | ||||
\ | ||||
arg = va_arg(vargs, const char*); | ||||
\ | ||||
} | ||||
\ | ||||
va_end(vargs); | ||||
\ | ||||
try | ||||
\ | ||||
{ | ||||
\ | ||||
App app; | ||||
\ | ||||
return app.run(args); | ||||
\ | ||||
} | ||||
\ | ||||
catch (Poco::Exception& exc) | ||||
\ | ||||
{ | ||||
\ | ||||
std::cerr << exc.displayText() << std::endl; \ | ||||
return Poco::Util::Application::EXIT_SOFTWARE; \ | ||||
} | ||||
\ | ||||
} | } | |||
#else | #else | |||
#define POCO_SERVER_MAIN(App) \ | #define POCO_SERVER_MAIN(App) \ | |||
int main(int argc, char** argv) \ | int main(int argc, char** argv) \ | |||
{ \ | { \ | |||
App app; \ | try \ | |||
return app.run(argc, argv); \ | { | |||
\ | ||||
App app; \ | ||||
return app.run(argc, argv); \ | ||||
} | ||||
\ | ||||
catch (Poco::Exception& exc) \ | ||||
{ | ||||
\ | ||||
std::cerr << exc.displayText() << std::endl; \ | ||||
return Poco::Util::Application::EXIT_SOFTWARE; \ | ||||
} | ||||
\ | ||||
} | } | |||
#endif | #endif | |||
#endif // Util_ServerApplication_INCLUDED | #endif // Util_ServerApplication_INCLUDED | |||
End of changes. 5 change blocks. | ||||
51 lines changed or deleted | 75 lines changed or added | |||
ServerSocket.h | ServerSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: ServerSocket | // Module: ServerSocket | |||
// | // | |||
// Definition of the ServerSocket class. | // Definition of the ServerSocket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ServerSocket_INCLUDED | #ifndef Net_ServerSocket_INCLUDED | |||
#define Net_ServerSocket_INCLUDED | #define Net_ServerSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ServerSocketImpl.h | ServerSocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: ServerSocketImpl | // Module: ServerSocketImpl | |||
// | // | |||
// Definition of the ServerSocketImpl class. | // Definition of the ServerSocketImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_ServerSocketImpl_INCLUDED | #ifndef Net_ServerSocketImpl_INCLUDED | |||
#define Net_ServerSocketImpl_INCLUDED | #define Net_ServerSocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketImpl.h" | #include "Poco/Net/SocketImpl.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary.h | SharedLibrary.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibrary class. | // Definition of the SharedLibrary class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_INCLUDED | #ifndef Foundation_SharedLibrary_INCLUDED | |||
#define Foundation_SharedLibrary_INCLUDED | #define Foundation_SharedLibrary_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(hpux) || defined(_hpux) | #if defined(hpux) || defined(_hpux) | |||
#include "Poco/SharedLibrary_HPUX.h" | #include "Poco/SharedLibrary_HPUX.h" | |||
#elif defined(POCO_VXWORKS) | #elif defined(POCO_VXWORKS) | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_HPUX.h | SharedLibrary_HPUX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for HP-UX. | // Definition of the SharedLibraryImpl class for HP-UX. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_HPUX_INCLUDED | #ifndef Foundation_SharedLibrary_HPUX_INCLUDED | |||
#define Foundation_SharedLibrary_HPUX_INCLUDED | #define Foundation_SharedLibrary_HPUX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <dl.h> | #include <dl.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_UNIX.h | SharedLibrary_UNIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for UNIX (dlopen). | // Definition of the SharedLibraryImpl class for UNIX (dlopen). | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_UNIX_INCLUDED | #ifndef Foundation_SharedLibrary_UNIX_INCLUDED | |||
#define Foundation_SharedLibrary_UNIX_INCLUDED | #define Foundation_SharedLibrary_UNIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_VMS.h | SharedLibrary_VMS.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for VMS (dlopen). | // Definition of the SharedLibraryImpl class for VMS (dlopen). | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_VMS_INCLUDED | #ifndef Foundation_SharedLibrary_VMS_INCLUDED | |||
#define Foundation_SharedLibrary_VMS_INCLUDED | #define Foundation_SharedLibrary_VMS_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_VX.h | SharedLibrary_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for VxWorks. | // Definition of the SharedLibraryImpl class for VxWorks. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_VX_INCLUDED | #ifndef Foundation_SharedLibrary_VX_INCLUDED | |||
#define Foundation_SharedLibrary_VX_INCLUDED | #define Foundation_SharedLibrary_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <moduleLib.h> | #include <moduleLib.h> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_WIN32.h | SharedLibrary_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for Win32. | // Definition of the SharedLibraryImpl class for Win32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_WIN32_INCLUDED | #ifndef Foundation_SharedLibrary_WIN32_INCLUDED | |||
#define Foundation_SharedLibrary_WIN32_INCLUDED | #define Foundation_SharedLibrary_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedLibrary_WIN32U.h | SharedLibrary_WIN32U.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: SharedLibrary | // Package: SharedLibrary | |||
// Module: SharedLibrary | // Module: SharedLibrary | |||
// | // | |||
// Definition of the SharedLibraryImpl class for Win32. | // Definition of the SharedLibraryImpl class for Win32. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedLibrary_WIN32U_INCLUDED | #ifndef Foundation_SharedLibrary_WIN32U_INCLUDED | |||
#define Foundation_SharedLibrary_WIN32U_INCLUDED | #define Foundation_SharedLibrary_WIN32U_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedMemory.h | SharedMemory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: SharedMemory | // Module: SharedMemory | |||
// | // | |||
// Definition of the SharedMemory class. | // Definition of the SharedMemory class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedMemory_INCLUDED | #ifndef Foundation_SharedMemory_INCLUDED | |||
#define Foundation_SharedMemory_INCLUDED | #define Foundation_SharedMemory_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <algorithm> | #include <algorithm> | |||
#include <cstddef> | #include <cstddef> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedMemory_DUMMY.h | SharedMemory_DUMMY.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: SharedMemoryImpl | // Module: SharedMemoryImpl | |||
// | // | |||
// Definition of the SharedMemoryImpl class. | // Definition of the SharedMemoryImpl class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedMemoryImpl_INCLUDED | #ifndef Foundation_SharedMemoryImpl_INCLUDED | |||
#define Foundation_SharedMemoryImpl_INCLUDED | #define Foundation_SharedMemoryImpl_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/SharedMemory.h" | #include "Poco/SharedMemory.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedMemory_POSIX.h | SharedMemory_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: SharedMemoryImpl | // Module: SharedMemoryImpl | |||
// | // | |||
// Definition of the SharedMemoryImpl class. | // Definition of the SharedMemoryImpl class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedMemoryImpl_INCLUDED | #ifndef Foundation_SharedMemoryImpl_INCLUDED | |||
#define Foundation_SharedMemoryImpl_INCLUDED | #define Foundation_SharedMemoryImpl_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/SharedMemory.h" | #include "Poco/SharedMemory.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedMemory_WIN32.h | SharedMemory_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Processes | // Package: Processes | |||
// Module: SharedMemoryImpl | // Module: SharedMemoryImpl | |||
// | // | |||
// Definition of the SharedMemoryImpl class. | // Definition of the SharedMemoryImpl class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedMemoryImpl_INCLUDED | #ifndef Foundation_SharedMemoryImpl_INCLUDED | |||
#define Foundation_SharedMemoryImpl_INCLUDED | #define Foundation_SharedMemoryImpl_INCLUDED | |||
#include "Poco/Poco.h" | #include "Poco/Poco.h" | |||
#include "Poco/SharedMemory.h" | #include "Poco/SharedMemory.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SharedPtr.h | SharedPtr.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: SharedPtr | // Module: SharedPtr | |||
// | // | |||
// Definition of the SharedPtr template class. | // Definition of the SharedPtr template class. | |||
// | // | |||
// Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SharedPtr_INCLUDED | #ifndef Foundation_SharedPtr_INCLUDED | |||
#define Foundation_SharedPtr_INCLUDED | #define Foundation_SharedPtr_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/AtomicCounter.h" | #include "Poco/AtomicCounter.h" | |||
#include <algorithm> | #include <algorithm> | |||
skipping to change at line 135 | skipping to change at line 115 | |||
/// SharedPtr results in a NullPointerException being thrown. | /// SharedPtr results in a NullPointerException being thrown. | |||
/// SharedPtr also implements all relational operators and | /// SharedPtr also implements all relational operators and | |||
/// a cast operator in case dynamic casting of the encapsulated data types | /// a cast operator in case dynamic casting of the encapsulated data types | |||
/// is required. | /// is required. | |||
{ | { | |||
public: | public: | |||
SharedPtr(): _pCounter(new RC), _ptr(0) | SharedPtr(): _pCounter(new RC), _ptr(0) | |||
{ | { | |||
} | } | |||
SharedPtr(C* ptr): _pCounter(new RC), _ptr(ptr) | SharedPtr(C* ptr) | |||
try: | ||||
_pCounter(new RC), | ||||
_ptr(ptr) | ||||
{ | ||||
} | ||||
catch (...) | ||||
{ | { | |||
RP::release(ptr); | ||||
} | } | |||
template <class Other, class OtherRP> | template <class Other, class OtherRP> | |||
SharedPtr(const SharedPtr<Other, RC, OtherRP>& ptr): _pCounter(ptr._ pCounter), _ptr(const_cast<Other*>(ptr.get())) | SharedPtr(const SharedPtr<Other, RC, OtherRP>& ptr): _pCounter(ptr._ pCounter), _ptr(const_cast<Other*>(ptr.get())) | |||
{ | { | |||
_pCounter->duplicate(); | _pCounter->duplicate(); | |||
} | } | |||
SharedPtr(const SharedPtr& ptr): _pCounter(ptr._pCounter), _ptr(ptr. _ptr) | SharedPtr(const SharedPtr& ptr): _pCounter(ptr._pCounter), _ptr(ptr. _ptr) | |||
{ | { | |||
_pCounter->duplicate(); | _pCounter->duplicate(); | |||
} | } | |||
~SharedPtr() | ~SharedPtr() | |||
{ | { | |||
release(); | try | |||
{ | ||||
release(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
SharedPtr& assign(C* ptr) | SharedPtr& assign(C* ptr) | |||
{ | { | |||
if (get() != ptr) | if (get() != ptr) | |||
{ | { | |||
RC* pTmp = new RC; | SharedPtr tmp(ptr); | |||
release(); | swap(tmp); | |||
_pCounter = pTmp; | ||||
_ptr = ptr; | ||||
} | } | |||
return *this; | return *this; | |||
} | } | |||
SharedPtr& assign(const SharedPtr& ptr) | SharedPtr& assign(const SharedPtr& ptr) | |||
{ | { | |||
if (&ptr != this) | if (&ptr != this) | |||
{ | { | |||
SharedPtr tmp(ptr); | SharedPtr tmp(ptr); | |||
swap(tmp); | swap(tmp); | |||
End of changes. 5 change blocks. | ||||
38 lines changed or deleted | 19 lines changed or added | |||
SignalHandler.h | SignalHandler.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: SignalHandler | // Module: SignalHandler | |||
// | // | |||
// Definition of the SignalHandler class. | // Definition of the SignalHandler class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SignalHandler_INCLUDED | #ifndef Foundation_SignalHandler_INCLUDED | |||
#define Foundation_SignalHandler_INCLUDED | #define Foundation_SignalHandler_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SimpleFileChannel.h | SimpleFileChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: SimpleFileChannel | // Module: SimpleFileChannel | |||
// | // | |||
// Definition of the SimpleFileChannel class. | // Definition of the SimpleFileChannel class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SimpleFileChannel_INCLUDED | #ifndef Foundation_SimpleFileChannel_INCLUDED | |||
#define Foundation_SimpleFileChannel_INCLUDED | #define Foundation_SimpleFileChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SimpleHashTable.h | SimpleHashTable.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Hashing | // Package: Hashing | |||
// Module: SimpleHashTable | // Module: SimpleHashTable | |||
// | // | |||
// Definition of the SimpleHashTable class. | // Definition of the SimpleHashTable class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SimpleHashTable_INCLUDED | #ifndef Foundation_SimpleHashTable_INCLUDED | |||
#define Foundation_SimpleHashTable_INCLUDED | #define Foundation_SimpleHashTable_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include "Poco/HashFunction.h" | #include "Poco/HashFunction.h" | |||
#include "Poco/HashStatistic.h" | #include "Poco/HashStatistic.h" | |||
#include <vector> | #include <vector> | |||
skipping to change at line 388 | skipping to change at line 368 | |||
UInt32 totalSize = 0; | UInt32 totalSize = 0; | |||
#endif | #endif | |||
for (int i=0; i < _capacity; ++i) | for (int i=0; i < _capacity; ++i) | |||
{ | { | |||
if (_entries[i]) | if (_entries[i]) | |||
{ | { | |||
maxEntriesPerHash = 1; | maxEntriesPerHash = 1; | |||
UInt32 size = 1; | UInt32 size = 1; | |||
if (details) | if (details) | |||
detailedEntriesPerHash.push_back(siz e); | detailedEntriesPerHash.push_back(siz e); | |||
#ifdef DEBUG | #ifdef _DEBUG | |||
totalSize += size; | totalSize += size; | |||
#endif | #endif | |||
} | } | |||
else | else | |||
{ | { | |||
numZeroEntries++; | numZeroEntries++; | |||
if (details) | if (details) | |||
detailedEntriesPerHash.push_back(0); | detailedEntriesPerHash.push_back(0); | |||
} | } | |||
} | } | |||
#ifdef _DEBUG | ||||
poco_assert_dbg(totalSize == numberOfEntries); | poco_assert_dbg(totalSize == numberOfEntries); | |||
#endif | ||||
return HashStatistic(_capacity, numberOfEntries, numZeroEntr ies, maxEntriesPerHash, detailedEntriesPerHash); | return HashStatistic(_capacity, numberOfEntries, numZeroEntr ies, maxEntriesPerHash, detailedEntriesPerHash); | |||
} | } | |||
private: | private: | |||
HashTableVector _entries; | HashTableVector _entries; | |||
std::size_t _size; | std::size_t _size; | |||
UInt32 _capacity; | UInt32 _capacity; | |||
KeyHashFunction _hash; | KeyHashFunction _hash; | |||
}; | }; | |||
End of changes. 4 change blocks. | ||||
34 lines changed or deleted | 4 lines changed or added | |||
SingletonHolder.h | SingletonHolder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: SingletonHolder | // Module: SingletonHolder | |||
// | // | |||
// Definition of the SingletonHolder template. | // Definition of the SingletonHolder template. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SingletonHolder_INCLUDED | #ifndef Foundation_SingletonHolder_INCLUDED | |||
#define Foundation_SingletonHolder_INCLUDED | #define Foundation_SingletonHolder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Socket.h | Socket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: Socket | // Module: Socket | |||
// | // | |||
// Definition of the Socket class. | // Definition of the Socket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_Socket_INCLUDED | #ifndef Net_Socket_INCLUDED | |||
#define Net_Socket_INCLUDED | #define Net_Socket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketImpl.h" | #include "Poco/Net/SocketImpl.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SocketAcceptor.h | SocketAcceptor.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Reactor | // Package: Reactor | |||
// Module: SocketAcceptor | // Module: SocketAcceptor | |||
// | // | |||
// Definition of the SocketAcceptor class. | // Definition of the SocketAcceptor class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketAcceptor_INCLUDED | #ifndef Net_SocketAcceptor_INCLUDED | |||
#define Net_SocketAcceptor_INCLUDED | #define Net_SocketAcceptor_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketNotification.h" | #include "Poco/Net/SocketNotification.h" | |||
#include "Poco/Net/ServerSocket.h" | #include "Poco/Net/ServerSocket.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Observer.h" | #include "Poco/Observer.h" | |||
skipping to change at line 91 | skipping to change at line 71 | |||
/// | /// | |||
/// When the ServiceHandler is done, it must destroy itself. | /// When the ServiceHandler is done, it must destroy itself. | |||
/// | /// | |||
/// Subclasses can override the createServiceHandler() factory metho d | /// Subclasses can override the createServiceHandler() factory metho d | |||
/// if special steps are necessary to create a ServiceHandler object . | /// if special steps are necessary to create a ServiceHandler object . | |||
{ | { | |||
public: | public: | |||
explicit SocketAcceptor(ServerSocket& socket): | explicit SocketAcceptor(ServerSocket& socket): | |||
_socket(socket), | _socket(socket), | |||
_pReactor(0) | _pReactor(0) | |||
/// Creates an SocketAcceptor, using the given ServerSocket. | /// Creates a SocketAcceptor, using the given ServerSocket. | |||
{ | { | |||
} | } | |||
SocketAcceptor(ServerSocket& socket, SocketReactor& reactor): | SocketAcceptor(ServerSocket& socket, SocketReactor& reactor): | |||
_socket(socket), | _socket(socket), | |||
_pReactor(0) | _pReactor(&reactor) | |||
/// Creates an SocketAcceptor, using the given ServerSocket. | /// Creates a SocketAcceptor, using the given ServerSocket. | |||
/// The SocketAcceptor registers itself with the given Socke tReactor. | /// The SocketAcceptor registers itself with the given Socke tReactor. | |||
{ | { | |||
registerAcceptor(reactor); | _pReactor->addEventHandler(_socket, Poco::Observer<SocketAcc | |||
eptor, | ||||
ReadableNotification>(*this, &SocketAcceptor::onAcce | ||||
pt)); | ||||
} | } | |||
virtual ~SocketAcceptor() | virtual ~SocketAcceptor() | |||
/// Destroys the SocketAcceptor. | /// Destroys the SocketAcceptor. | |||
{ | { | |||
unregisterAcceptor(); | try | |||
{ | ||||
if (_pReactor) | ||||
{ | ||||
_pReactor->removeEventHandler(_socket, Poco: | ||||
:Observer<SocketAcceptor, | ||||
ReadableNotification>(*this, &Socket | ||||
Acceptor::onAccept)); | ||||
} | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | ||||
void setReactor(SocketReactor& reactor) | ||||
/// Sets the reactor for this acceptor. | ||||
{ | ||||
_pReactor = &reactor; | ||||
if (!_pReactor->hasEventHandler(_socket, Poco::Observer<Sock | ||||
etAcceptor, | ||||
ReadableNotification>(*this, &SocketAcceptor::onAcce | ||||
pt))) | ||||
{ | ||||
registerAcceptor(reactor); | ||||
} | ||||
} | } | |||
virtual void registerAcceptor(SocketReactor& reactor) | virtual void registerAcceptor(SocketReactor& reactor) | |||
/// Registers the SocketAcceptor with a SocketReactor. | /// Registers the SocketAcceptor with a SocketReactor. | |||
/// | /// | |||
/// A subclass can override this and, for example, also regi | /// A subclass can override this function to e.g. | |||
ster | /// register an event handler for timeout event. | |||
/// an event handler for a timeout event. | ||||
/// | /// | |||
/// The overriding method must call the baseclass implementa | /// If acceptor was constructed without providing reactor to | |||
tion first. | it, | |||
/// the override of this method must either call the base cl | ||||
ass | ||||
/// implementation or directly register the accept handler w | ||||
ith | ||||
/// the reactor. | ||||
{ | { | |||
if (_pReactor) | ||||
throw Poco::InvalidAccessException("Acceptor already | ||||
registered."); | ||||
_pReactor = &reactor; | _pReactor = &reactor; | |||
_pReactor->addEventHandler(_socket, Poco::Observer<SocketAcc eptor, ReadableNotification>(*this, &SocketAcceptor::onAccept)); | _pReactor->addEventHandler(_socket, Poco::Observer<SocketAcc eptor, ReadableNotification>(*this, &SocketAcceptor::onAccept)); | |||
} | } | |||
virtual void unregisterAcceptor() | virtual void unregisterAcceptor() | |||
/// Unregisters the SocketAcceptor. | /// Unregisters the SocketAcceptor. | |||
/// | /// | |||
/// A subclass can override this and, for example, also unre | /// A subclass can override this function to e.g. | |||
gister | /// unregister its event handler for a timeout event. | |||
/// its event handler for a timeout event. | ||||
/// | /// | |||
/// The overriding method must call the baseclass implementa | /// If the accept handler was registered with the reactor, | |||
tion first. | /// the overriding method must either call the base class | |||
/// implementation or directly unregister the accept handler | ||||
. | ||||
{ | { | |||
if (_pReactor) | if (_pReactor) | |||
{ | { | |||
_pReactor->removeEventHandler(_socket, Poco::Observe r<SocketAcceptor, ReadableNotification>(*this, &SocketAcceptor::onAccept)); | _pReactor->removeEventHandler(_socket, Poco::Observe r<SocketAcceptor, ReadableNotification>(*this, &SocketAcceptor::onAccept)); | |||
} | } | |||
} | } | |||
void onAccept(ReadableNotification* pNotification) | void onAccept(ReadableNotification* pNotification) | |||
/// Accepts connection and creates event handler. | ||||
{ | { | |||
pNotification->release(); | pNotification->release(); | |||
StreamSocket sock = _socket.acceptConnection(); | StreamSocket sock = _socket.acceptConnection(); | |||
_pReactor->wakeUp(); | ||||
createServiceHandler(sock); | createServiceHandler(sock); | |||
} | } | |||
protected: | protected: | |||
virtual ServiceHandler* createServiceHandler(StreamSocket& socket) | virtual ServiceHandler* createServiceHandler(StreamSocket& socket) | |||
/// Create and initialize a new ServiceHandler instance. | /// Create and initialize a new ServiceHandler instance. | |||
/// | /// | |||
/// Subclasses can override this method. | /// Subclasses can override this method. | |||
{ | { | |||
return new ServiceHandler(socket, *_pReactor); | return new ServiceHandler(socket, *_pReactor); | |||
End of changes. 12 change blocks. | ||||
47 lines changed or deleted | 56 lines changed or added | |||
SocketAddress.h | SocketAddress.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: SocketAddress | // Module: SocketAddress | |||
// | // | |||
// Definition of the SocketAddress class. | // Definition of the SocketAddress class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketAddress_INCLUDED | #ifndef Net_SocketAddress_INCLUDED | |||
#define Net_SocketAddress_INCLUDED | #define Net_SocketAddress_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketDefs.h" | #include "Poco/Net/SocketAddressImpl.h" | |||
#include "Poco/Net/IPAddress.h" | ||||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
class IPAddress; | class IPAddress; | |||
class SocketAddressImpl; | ||||
class Net_API SocketAddress | class Net_API SocketAddress | |||
/// This class represents an internet (IP) endpoint/socket | /// This class represents an internet (IP) endpoint/socket | |||
/// address. The address can belong either to the | /// address. The address can belong either to the | |||
/// IPv4 or the IPv6 address family and consists of a | /// IPv4 or the IPv6 address family and consists of a | |||
/// host address and a port number. | /// host address and a port number. | |||
{ | { | |||
public: | public: | |||
SocketAddress(); | SocketAddress(); | |||
/// Creates a wildcard (all zero) IPv4 SocketAddress. | /// Creates a wildcard (all zero) IPv4 SocketAddress. | |||
SocketAddress(const IPAddress& host, Poco::UInt16 port); | SocketAddress(const IPAddress& hostAddress, Poco::UInt16 portNumber) | |||
/// Creates a SocketAddress from an IP address and a port nu | ; | |||
mber. | /// Creates a SocketAddress from an IP address and given por | |||
t number. | ||||
SocketAddress(const std::string& host, Poco::UInt16 port); | SocketAddress(Poco::UInt16 port); | |||
/// Creates a SocketAddress from an IP address and a port nu | /// Creates a SocketAddress with unspecified (wildcard) IP a | |||
mber. | ddress | |||
/// and given port number. | ||||
SocketAddress(const std::string& hostAddress, Poco::UInt16 portNumbe | ||||
r); | ||||
/// Creates a SocketAddress from an IP address and given por | ||||
t number. | ||||
/// | /// | |||
/// The IP address must either be a domain name, or it must | /// The IP address must either be a domain name, or it must | |||
/// be in dotted decimal (IPv4) or hex string (IPv6) format. | /// be in dotted decimal (IPv4) or hex string (IPv6) format. | |||
SocketAddress(const std::string& host, const std::string& port); | SocketAddress(const std::string& hostAddress, const std::string& por | |||
/// Creates a SocketAddress from an IP address and a | tNumber); | |||
/// Creates a SocketAddress from an IP address and the | ||||
/// service name or port number. | /// service name or port number. | |||
/// | /// | |||
/// The IP address must either be a domain name, or it must | /// The IP address must either be a domain name, or it must | |||
/// be in dotted decimal (IPv4) or hex string (IPv6) format. | /// be in dotted decimal (IPv4) or hex string (IPv6) format. | |||
/// | /// | |||
/// The given port must either be a decimal port number, or | /// The given port must either be a decimal port number, or | |||
/// a service name. | /// a service name. | |||
explicit SocketAddress(const std::string& hostAndPort); | explicit SocketAddress(const std::string& hostAndPort); | |||
/// Creates a SocketAddress from an IP address or host name and a | /// Creates a SocketAddress from an IP address or host name and the | |||
/// port number/service name. Host name/address and port num ber must | /// port number/service name. Host name/address and port num ber must | |||
/// be separated by a colon. In case of an IPv6 address, | /// be separated by a colon. In case of an IPv6 address, | |||
/// the address part must be enclosed in brackets. | /// the address part must be enclosed in brackets. | |||
/// | /// | |||
/// Examples: | /// Examples: | |||
/// 192.168.1.10:80 | /// 192.168.1.10:80 | |||
/// [::ffff:192.168.1.120]:2040 | /// [::ffff:192.168.1.120]:2040 | |||
/// www.appinf.com:8080 | /// www.appinf.com:8080 | |||
SocketAddress(const SocketAddress& addr); | SocketAddress(const SocketAddress& addr); | |||
/// Creates a SocketAddress by copying another one. | /// Creates a SocketAddress by copying another one. | |||
SocketAddress(const struct sockaddr* addr, poco_socklen_t length); | SocketAddress(const struct sockaddr* addr, poco_socklen_t length); | |||
/// Creates a SocketAddress from a native socket address. | /// Creates a SocketAddress from a native socket address. | |||
~SocketAddress(); | ~SocketAddress(); | |||
/// Destroys the SocketAddress. | /// Destroys the SocketAddress. | |||
SocketAddress& operator = (const SocketAddress& addr); | SocketAddress& operator = (const SocketAddress& socketAddress); | |||
/// Assigns another SocketAddress. | /// Assigns another SocketAddress. | |||
void swap(SocketAddress& addr); | ||||
/// Swaps the SocketAddress with another one. | ||||
IPAddress host() const; | IPAddress host() const; | |||
/// Returns the host IP address. | /// Returns the host IP address. | |||
Poco::UInt16 port() const; | Poco::UInt16 port() const; | |||
/// Returns the port number. | /// Returns the port number. | |||
poco_socklen_t length() const; | poco_socklen_t length() const; | |||
/// Returns the length of the internal native socket address . | /// Returns the length of the internal native socket address . | |||
const struct sockaddr* addr() const; | const struct sockaddr* addr() const; | |||
skipping to change at line 127 | skipping to change at line 106 | |||
int af() const; | int af() const; | |||
/// Returns the address family (AF_INET or AF_INET6) of the address. | /// Returns the address family (AF_INET or AF_INET6) of the address. | |||
std::string toString() const; | std::string toString() const; | |||
/// Returns a string representation of the address. | /// Returns a string representation of the address. | |||
IPAddress::Family family() const; | IPAddress::Family family() const; | |||
/// Returns the address family of the host's address. | /// Returns the address family of the host's address. | |||
bool operator < (const SocketAddress& addr) const; | bool operator < (const SocketAddress& socketAddress) const; | |||
bool operator == (const SocketAddress& addr) const; | bool operator == (const SocketAddress& socketAddress) const; | |||
bool operator != (const SocketAddress& addr) const; | bool operator != (const SocketAddress& socketAddress) const; | |||
enum | enum | |||
{ | { | |||
MAX_ADDRESS_LENGTH = | MAX_ADDRESS_LENGTH = | |||
#if defined(POCO_HAVE_IPv6) | #if defined(POCO_HAVE_IPv6) | |||
sizeof(struct sockaddr_in6) | sizeof(struct sockaddr_in6) | |||
#else | #else | |||
sizeof(struct sockaddr_in) | sizeof(struct sockaddr_in) | |||
#endif | #endif | |||
/// Maximum length in bytes of a socket address. | /// Maximum length in bytes of a socket address. | |||
}; | }; | |||
protected: | protected: | |||
void init(const IPAddress& host, Poco::UInt16 port); | void init(const IPAddress& hostAddress, Poco::UInt16 portNumber); | |||
void init(const std::string& host, Poco::UInt16 port); | void init(const std::string& hostAddress, Poco::UInt16 portNumber); | |||
Poco::UInt16 resolveService(const std::string& service); | Poco::UInt16 resolveService(const std::string& service); | |||
private: | private: | |||
SocketAddressImpl* _pImpl; | typedef Poco::Net::Impl::SocketAddressImpl Impl; | |||
#ifdef POCO_HAVE_ALIGNMENT | ||||
typedef Impl* Ptr; | ||||
#else | ||||
typedef Poco::AutoPtr<Impl> Ptr; | ||||
#endif | ||||
Ptr pImpl() const; | ||||
void newIPv4(); | ||||
void newIPv4(const sockaddr_in*); | ||||
void newIPv4(const IPAddress& hostAddress, Poco::UInt16 portNumber); | ||||
void newIPv6(const sockaddr_in6*); | ||||
void newIPv6(const IPAddress& hostAddress, Poco::UInt16 portNumber); | ||||
void destruct(); | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
char* storage(); | ||||
#ifdef POCO_ENABLE_CPP11 | ||||
static const unsigned sz = sizeof(Poco::Net::Impl::IPv6Socke | ||||
tAddressImpl); | ||||
typedef std::aligned_storage<sz>::type AlignerType; | ||||
union | ||||
{ | ||||
char buffer[sz]; | ||||
private: | ||||
AlignerType aligner; | ||||
} | ||||
#else // !POCO_ENABLE_CPP11 | ||||
AlignedCharArrayUnion <Poco::Net::Impl::IPv6SocketAddressImp | ||||
l> | ||||
#endif // POCO_ENABLE_CPP11 | ||||
_memory; | ||||
#else // !POCO_HAVE_ALIGNMENT | ||||
Ptr _pImpl; | ||||
#endif // POCO_HAVE_ALIGNMENT | ||||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline void swap(SocketAddress& a1, SocketAddress& a2) | ||||
inline void SocketAddress::destruct() | ||||
{ | { | |||
a1.swap(a2); | #ifdef POCO_HAVE_ALIGNMENT | |||
pImpl()->~SocketAddressImpl(); | ||||
#endif | ||||
} | ||||
inline SocketAddress::Ptr SocketAddress::pImpl() const | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
return reinterpret_cast<Ptr>(const_cast<char *>(_memory.buffer)); | ||||
#else | ||||
if (_pImpl) return _pImpl; | ||||
throw Poco::NullPointerException("Pointer to SocketAddress implement | ||||
ation is NULL."); | ||||
#endif | ||||
} | ||||
inline void SocketAddress::newIPv4() | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4SocketAddressImpl; | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4SocketAddressImpl; | ||||
#endif | ||||
} | ||||
inline void SocketAddress::newIPv4(const sockaddr_in* sockAddr) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4SocketAddressImpl(sockAddr); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4SocketAddressImpl(sockAddr); | ||||
#endif | ||||
} | ||||
inline void SocketAddress::newIPv4(const IPAddress& hostAddress, Poco::UInt | ||||
16 portNumber) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv4SocketAddressImpl(hostAddress.a | ||||
ddr(), htons(portNumber)); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv4SocketAddressImpl(hostAddress.addr | ||||
(), htons(portNumber)); | ||||
#endif | ||||
} | ||||
inline void SocketAddress::newIPv6(const sockaddr_in6* sockAddr) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6SocketAddressImpl(sockAddr); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6SocketAddressImpl(sockAddr); | ||||
#endif | ||||
} | ||||
inline void SocketAddress::newIPv6(const IPAddress& hostAddress, Poco::UInt | ||||
16 portNumber) | ||||
{ | ||||
#ifdef POCO_HAVE_ALIGNMENT | ||||
new (storage()) Poco::Net::Impl::IPv6SocketAddressImpl(hostAddress.a | ||||
ddr(), htons(portNumber), hostAddress.scope()); | ||||
#else | ||||
_pImpl = new Poco::Net::Impl::IPv6SocketAddressImpl(hostAddress.addr | ||||
(), htons(portNumber), hostAddress.scope()); | ||||
#endif | ||||
} | } | |||
inline IPAddress::Family SocketAddress::family() const | inline IPAddress::Family SocketAddress::family() const | |||
{ | { | |||
return host().family(); | return host().family(); | |||
} | } | |||
inline bool SocketAddress::operator == (const SocketAddress& addr) | #ifdef POCO_HAVE_ALIGNMENT | |||
const | inline char* SocketAddress::storage() | |||
{ | ||||
return _memory.buffer; | ||||
} | ||||
#endif | ||||
inline bool SocketAddress::operator == (const SocketAddress& socket | ||||
Address) const | ||||
{ | { | |||
return host() == addr.host() && port() == addr.port(); | return host() == socketAddress.host() && port() == socketAddress.por t(); | |||
} | } | |||
inline bool SocketAddress::operator != (const SocketAddress& addr) const | inline bool SocketAddress::operator != (const SocketAddress& socketAddress) const | |||
{ | { | |||
return host() != addr.host() || port() != addr.port(); | return host() != socketAddress.host() || port() != socketAddress.por t(); | |||
} | } | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_SocketAddress_INCLUDED | #endif // Net_SocketAddress_INCLUDED | |||
End of changes. 18 change blocks. | ||||
61 lines changed or deleted | 146 lines changed or added | |||
SocketConnector.h | SocketConnector.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Reactor | // Package: Reactor | |||
// Module: SocketConnector | // Module: SocketConnector | |||
// | // | |||
// Definition of the SocketConnector class. | // Definition of the SocketConnector class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketConnector_INCLUDED | #ifndef Net_SocketConnector_INCLUDED | |||
#define Net_SocketConnector_INCLUDED | #define Net_SocketConnector_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketNotification.h" | #include "Poco/Net/SocketNotification.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Observer.h" | #include "Poco/Observer.h" | |||
skipping to change at line 111 | skipping to change at line 91 | |||
/// Creates an acceptor, using the given ServerSocket. | /// Creates an acceptor, using the given ServerSocket. | |||
/// The SocketConnector registers itself with the given Sock etReactor. | /// The SocketConnector registers itself with the given Sock etReactor. | |||
{ | { | |||
_socket.connectNB(address); | _socket.connectNB(address); | |||
registerConnector(reactor); | registerConnector(reactor); | |||
} | } | |||
virtual ~SocketConnector() | virtual ~SocketConnector() | |||
/// Destroys the SocketConnector. | /// Destroys the SocketConnector. | |||
{ | { | |||
unregisterConnector(); | try | |||
{ | ||||
unregisterConnector(); | ||||
} | ||||
catch (...) | ||||
{ | ||||
poco_unexpected(); | ||||
} | ||||
} | } | |||
virtual void registerConnector(SocketReactor& reactor) | virtual void registerConnector(SocketReactor& reactor) | |||
/// Registers the SocketConnector with a SocketReactor. | /// Registers the SocketConnector with a SocketReactor. | |||
/// | /// | |||
/// A subclass can override this and, for example, also regi ster | /// A subclass can override this and, for example, also regi ster | |||
/// an event handler for a timeout event. | /// an event handler for a timeout event. | |||
/// | /// | |||
/// The overriding method must call the baseclass implementa tion first. | /// The overriding method must call the baseclass implementa tion first. | |||
{ | { | |||
skipping to change at line 204 | skipping to change at line 191 | |||
SocketReactor* reactor() | SocketReactor* reactor() | |||
/// Returns a pointer to the SocketReactor where | /// Returns a pointer to the SocketReactor where | |||
/// this SocketConnector is registered. | /// this SocketConnector is registered. | |||
/// | /// | |||
/// The pointer may be null. | /// The pointer may be null. | |||
{ | { | |||
return _pReactor; | return _pReactor; | |||
} | } | |||
Socket& socket() | StreamSocket& socket() | |||
/// Returns a reference to the SocketConnector's socket. | /// Returns a reference to the SocketConnector's socket. | |||
{ | { | |||
return _socket; | return _socket; | |||
} | } | |||
private: | private: | |||
SocketConnector(); | SocketConnector(); | |||
SocketConnector(const SocketConnector&); | SocketConnector(const SocketConnector&); | |||
SocketConnector& operator = (const SocketConnector&); | SocketConnector& operator = (const SocketConnector&); | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 10 lines changed or added | |||
SocketDefs.h | SocketDefs.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: NetCore | // Package: NetCore | |||
// Module: SocketDefs | // Module: SocketDefs | |||
// | // | |||
// Include platform-specific header files for sockets. | // Include platform-specific header files for sockets. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketDefs_INCLUDED | #ifndef Net_SocketDefs_INCLUDED | |||
#define Net_SocketDefs_INCLUDED | #define Net_SocketDefs_INCLUDED | |||
#define POCO_ENOERR 0 | ||||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
#include <winsock2.h> | #include <winsock2.h> | |||
#include <ws2tcpip.h> | #include <ws2tcpip.h> | |||
#define POCO_INVALID_SOCKET INVALID_SOCKET | #define POCO_INVALID_SOCKET INVALID_SOCKET | |||
#define poco_socket_t SOCKET | #define poco_socket_t SOCKET | |||
#define poco_socklen_t int | #define poco_socklen_t int | |||
#define poco_ioctl_request_t int | #define poco_ioctl_request_t int | |||
#define poco_closesocket(s) closesocket(s) | #define poco_closesocket(s) closesocket(s) | |||
#define POCO_EINTR WSAEINTR | #define POCO_EINTR WSAEINTR | |||
skipping to change at line 167 | skipping to change at line 149 | |||
#if defined(POCO_OS_FAMILY_VMS) | #if defined(POCO_OS_FAMILY_VMS) | |||
#include <inet.h> | #include <inet.h> | |||
#else | #else | |||
#include <arpa/inet.h> | #include <arpa/inet.h> | |||
#endif | #endif | |||
#include <netinet/in.h> | #include <netinet/in.h> | |||
#include <netinet/tcp.h> | #include <netinet/tcp.h> | |||
#include <netdb.h> | #include <netdb.h> | |||
#if defined(POCO_OS_FAMILY_UNIX) | #if defined(POCO_OS_FAMILY_UNIX) | |||
#if (POCO_OS == POCO_OS_LINUX) | #if (POCO_OS == POCO_OS_LINUX) | |||
// <linux/if.h> is needed by NetworkInterface for if | // Net/src/NetworkInterface.cpp changed #include <li | |||
map, ifreq and ifconf definitions | nux/if.h> to #include <net/if.h> | |||
#include <linux/if.h> | // no more conflict, can use #include <net/if.h> her | |||
// if_nametoindex and if_indextoname are needed by I | e | |||
PAddress and NetworkInterface | #include <net/if.h> | |||
// we can't get them from <net/if.h> because of a co | #elif (POCO_OS == POCO_OS_HPUX) | |||
nflict with <linux/if.h>, so | ||||
// we declare them here | ||||
extern "C" | extern "C" | |||
{ | { | |||
extern unsigned int if_nametoindex (__const char *__ | #include <net/if.h> | |||
ifname) __THROW; | ||||
extern char *if_indextoname (unsigned int __ifindex, | ||||
char *__ifname) __THROW; | ||||
} | } | |||
#else | #else | |||
#include <net/if.h> | #include <net/if.h> | |||
#endif | #endif | |||
#endif | #endif | |||
#if (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_MAC_OS_X) | #if (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_MAC_OS_X) | |||
#include <sys/sockio.h> | #include <sys/sockio.h> | |||
#include <sys/filio.h> | #include <sys/filio.h> | |||
#endif | #endif | |||
#define POCO_INVALID_SOCKET -1 | #define POCO_INVALID_SOCKET -1 | |||
skipping to change at line 257 | skipping to change at line 237 | |||
#endif | #endif | |||
#if defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_TRU64) || (POCO_OS = = POCO_OS_AIX) || (POCO_OS == POCO_OS_IRIX) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_VXWORKS) | #if defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_TRU64) || (POCO_OS = = POCO_OS_AIX) || (POCO_OS == POCO_OS_IRIX) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_VXWORKS) | |||
#define POCO_HAVE_SALEN 1 | #define POCO_HAVE_SALEN 1 | |||
#endif | #endif | |||
#if POCO_OS != POCO_OS_VXWORKS && !defined(POCO_NET_NO_ADDRINFO) | #if POCO_OS != POCO_OS_VXWORKS && !defined(POCO_NET_NO_ADDRINFO) | |||
#define POCO_HAVE_ADDRINFO 1 | #define POCO_HAVE_ADDRINFO 1 | |||
#endif | #endif | |||
#if (POCO_OS == POCO_OS_HPUX) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS = = POCO_OS_WINDOWS_CE) | #if (POCO_OS == POCO_OS_HPUX) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS = = POCO_OS_WINDOWS_CE) || (POCO_OS == POCO_OS_CYGWIN) | |||
#define POCO_BROKEN_TIMEOUTS 1 | #define POCO_BROKEN_TIMEOUTS 1 | |||
#endif | #endif | |||
#if defined(POCO_HAVE_ADDRINFO) | #if defined(POCO_HAVE_ADDRINFO) | |||
#if !defined(AI_ADDRCONFIG) | #ifndef AI_PASSIVE | |||
#define AI_PASSIVE 0 | ||||
#endif | ||||
#ifndef AI_CANONNAME | ||||
#define AI_CANONNAME 0 | ||||
#endif | ||||
#ifndef AI_NUMERICHOST | ||||
#define AI_NUMERICHOST 0 | ||||
#endif | ||||
#ifndef AI_NUMERICSERV | ||||
#define AI_NUMERICSERV 0 | ||||
#endif | ||||
#ifndef AI_ALL | ||||
#define AI_ALL 0 | ||||
#endif | ||||
#ifndef AI_ADDRCONFIG | ||||
#define AI_ADDRCONFIG 0 | #define AI_ADDRCONFIG 0 | |||
#endif | #endif | |||
#ifndef AI_V4MAPPED | ||||
#define AI_V4MAPPED 0 | ||||
#endif | ||||
#endif | #endif | |||
#if defined(POCO_HAVE_SALEN) | #if defined(POCO_HAVE_SALEN) | |||
#define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len) | #define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len) | |||
#define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct s ockaddr_in) | #define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct s ockaddr_in) | |||
#if defined(POCO_HAVE_IPv6) | #if defined(POCO_HAVE_IPv6) | |||
#define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(stru ct sockaddr_in6) | #define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(stru ct sockaddr_in6) | |||
#endif | #endif | |||
#else | #else | |||
#define poco_set_sa_len(pSA, len) (void) 0 | #define poco_set_sa_len(pSA, len) (void) 0 | |||
skipping to change at line 323 | skipping to change at line 321 | |||
#define poco_ntoh_32(x) (x) | #define poco_ntoh_32(x) (x) | |||
#else | #else | |||
#define poco_ntoh_16(x) \ | #define poco_ntoh_16(x) \ | |||
((((x) >> 8) & 0x00ff) | (((x) << 8) & 0xff00)) | ((((x) >> 8) & 0x00ff) | (((x) << 8) & 0xff00)) | |||
#define poco_ntoh_32(x) \ | #define poco_ntoh_32(x) \ | |||
((((x) >> 24) & 0x000000ff) | (((x) >> 8) & 0x0000ff00) | (( (x) << 8) & 0x00ff0000) | (((x) << 24) & 0xff000000)) | ((((x) >> 24) & 0x000000ff) | (((x) >> 8) & 0x0000ff00) | (( (x) << 8) & 0x00ff0000) | (((x) << 24) & 0xff000000)) | |||
#endif | #endif | |||
#define poco_hton_16(x) poco_ntoh_16(x) | #define poco_hton_16(x) poco_ntoh_16(x) | |||
#define poco_hton_32(x) poco_ntoh_32(x) | #define poco_hton_32(x) poco_ntoh_32(x) | |||
#if !defined(s6_addr16) | ||||
#if defined(POCO_OS_FAMILY_WINDOWS) | ||||
#define s6_addr16 u.Word | ||||
#else | ||||
#define s6_addr16 __u6_addr.__u6_addr16 | ||||
#endif | ||||
#endif | ||||
#if !defined(s6_addr32) | ||||
#if defined(POCO_OS_FAMILY_UNIX) | ||||
#if (POCO_OS == POCO_OS_SOLARIS) | ||||
#define s6_addr32 _S6_un._S6_u32 | ||||
#else | ||||
#define s6_addr32 __u6_addr.__u6_addr32 | ||||
#endif | ||||
#endif | ||||
#endif | ||||
#endif // Net_SocketDefs_INCLUDED | #endif // Net_SocketDefs_INCLUDED | |||
End of changes. 8 change blocks. | ||||
46 lines changed or deleted | 48 lines changed or added | |||
SocketImpl.h | SocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: SocketImpl | // Module: SocketImpl | |||
// | // | |||
// Definition of the SocketImpl class. | // Definition of the SocketImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketImpl_INCLUDED | #ifndef Net_SocketImpl_INCLUDED | |||
#define Net_SocketImpl_INCLUDED | #define Net_SocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketDefs.h" | #include "Poco/Net/SocketDefs.h" | |||
#include "Poco/Net/SocketAddress.h" | #include "Poco/Net/SocketAddress.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SocketNotification.h | SocketNotification.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Reactor | // Package: Reactor | |||
// Module: SocketNotification | // Module: SocketNotification | |||
// | // | |||
// Definition of the SocketNotification class. | // Definition of the SocketNotification class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketNotification_INCLUDED | #ifndef Net_SocketNotification_INCLUDED | |||
#define Net_SocketNotification_INCLUDED | #define Net_SocketNotification_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 61 | skipping to change at line 41 | |||
/// The base class for all notifications generated by | /// The base class for all notifications generated by | |||
/// the SocketReactor. | /// the SocketReactor. | |||
{ | { | |||
public: | public: | |||
explicit SocketNotification(SocketReactor* pReactor); | explicit SocketNotification(SocketReactor* pReactor); | |||
/// Creates the SocketNotification for the given SocketReact or. | /// Creates the SocketNotification for the given SocketReact or. | |||
virtual ~SocketNotification(); | virtual ~SocketNotification(); | |||
/// Destroys the SocketNotification. | /// Destroys the SocketNotification. | |||
SocketReactor& source(); | SocketReactor& source() const; | |||
/// Returns the SocketReactor that generated the notificatio n. | /// Returns the SocketReactor that generated the notificatio n. | |||
Socket& socket(); | Socket socket() const; | |||
/// Returns the socket that caused the notification. | /// Returns the socket that caused the notification. | |||
private: | private: | |||
void setSocket(const Socket& socket); | void setSocket(const Socket& socket); | |||
SocketReactor* _pReactor; | SocketReactor* _pReactor; | |||
Socket _socket; | Socket _socket; | |||
friend class SocketNotifier; | friend class SocketNotifier; | |||
}; | }; | |||
skipping to change at line 148 | skipping to change at line 128 | |||
ShutdownNotification(SocketReactor* pReactor); | ShutdownNotification(SocketReactor* pReactor); | |||
/// Creates the ShutdownNotification for the given SocketRea ctor. | /// Creates the ShutdownNotification for the given SocketRea ctor. | |||
~ShutdownNotification(); | ~ShutdownNotification(); | |||
/// Destroys the ShutdownNotification. | /// Destroys the ShutdownNotification. | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline SocketReactor& SocketNotification::source() | inline SocketReactor& SocketNotification::source() const | |||
{ | { | |||
return *_pReactor; | return *_pReactor; | |||
} | } | |||
inline Socket& SocketNotification::socket() | inline Socket SocketNotification::socket() const | |||
{ | { | |||
return _socket; | return _socket; | |||
} | } | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_SocketNotification_INCLUDED | #endif // Net_SocketNotification_INCLUDED | |||
End of changes. 5 change blocks. | ||||
36 lines changed or deleted | 5 lines changed or added | |||
SocketNotifier.h | SocketNotifier.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Reactor | // Package: Reactor | |||
// Module: SocketNotifier | // Module: SocketNotifier | |||
// | // | |||
// Definition of the SocketNotifier class. | // Definition of the SocketNotifier class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketNotifier_INCLUDED | #ifndef Net_SocketNotifier_INCLUDED | |||
#define Net_SocketNotifier_INCLUDED | #define Net_SocketNotifier_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/NotificationCenter.h" | #include "Poco/NotificationCenter.h" | |||
#include "Poco/Observer.h" | #include "Poco/Observer.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SocketReactor.h | SocketReactor.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Reactor | // Package: Reactor | |||
// Module: SocketReactor | // Module: SocketReactor | |||
// | // | |||
// Definition of the SocketReactor class. | // Definition of the SocketReactor class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketReactor_INCLUDED | #ifndef Net_SocketReactor_INCLUDED | |||
#define Net_SocketReactor_INCLUDED | #define Net_SocketReactor_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include "Poco/Observer.h" | #include "Poco/Observer.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
class Thread; | ||||
namespace Net { | namespace Net { | |||
class Socket; | class Socket; | |||
class SocketNotification; | class SocketNotification; | |||
class SocketNotifier; | class SocketNotifier; | |||
class Net_API SocketReactor: public Poco::Runnable | class Net_API SocketReactor: public Poco::Runnable | |||
/// This class, which is part of the Reactor pattern, | /// This class, which is part of the Reactor pattern, | |||
/// implements the "Initiation Dispatcher". | /// implements the "Initiation Dispatcher". | |||
/// | /// | |||
skipping to change at line 146 | skipping to change at line 129 | |||
void run(); | void run(); | |||
/// Runs the SocketReactor. The reactor will run | /// Runs the SocketReactor. The reactor will run | |||
/// until stop() is called (in a separate thread). | /// until stop() is called (in a separate thread). | |||
void stop(); | void stop(); | |||
/// Stops the SocketReactor. | /// Stops the SocketReactor. | |||
/// | /// | |||
/// The reactor will be stopped when the next event | /// The reactor will be stopped when the next event | |||
/// (including a timeout event) occurs. | /// (including a timeout event) occurs. | |||
void wakeUp(); | ||||
/// Wakes up idle reactor. | ||||
void setTimeout(const Poco::Timespan& timeout); | void setTimeout(const Poco::Timespan& timeout); | |||
/// Sets the timeout. | /// Sets the timeout. | |||
/// | /// | |||
/// If no other event occurs for the given timeout | /// If no other event occurs for the given timeout | |||
/// interval, a timeout event is sent to all event listeners . | /// interval, a timeout event is sent to all event listeners . | |||
/// | /// | |||
/// The default timeout is 250 milliseconds; | /// The default timeout is 250 milliseconds; | |||
/// | /// | |||
/// The timeout is passed to the Socket::select() | /// The timeout is passed to the Socket::select() | |||
/// method. | /// method. | |||
skipping to change at line 235 | skipping to change at line 221 | |||
bool _stop; | bool _stop; | |||
Poco::Timespan _timeout; | Poco::Timespan _timeout; | |||
EventHandlerMap _handlers; | EventHandlerMap _handlers; | |||
NotificationPtr _pReadableNotification; | NotificationPtr _pReadableNotification; | |||
NotificationPtr _pWritableNotification; | NotificationPtr _pWritableNotification; | |||
NotificationPtr _pErrorNotification; | NotificationPtr _pErrorNotification; | |||
NotificationPtr _pTimeoutNotification; | NotificationPtr _pTimeoutNotification; | |||
NotificationPtr _pIdleNotification; | NotificationPtr _pIdleNotification; | |||
NotificationPtr _pShutdownNotification; | NotificationPtr _pShutdownNotification; | |||
Poco::FastMutex _mutex; | Poco::FastMutex _mutex; | |||
Poco::Thread* _pThread; | ||||
friend class SocketNotifier; | friend class SocketNotifier; | |||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_SocketReactor_INCLUDED | #endif // Net_SocketReactor_INCLUDED | |||
End of changes. 4 change blocks. | ||||
32 lines changed or deleted | 8 lines changed or added | |||
SocketStream.h | SocketStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: SocketStream | // Module: SocketStream | |||
// | // | |||
// Definition of the SocketStream class. | // Definition of the SocketStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_SocketStream_INCLUDED | #ifndef Net_SocketStream_INCLUDED | |||
#define Net_SocketStream_INCLUDED | #define Net_SocketStream_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/BufferedBidirectionalStreamBuf.h" | #include "Poco/BufferedBidirectionalStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SplitterChannel.h | SplitterChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: SplitterChannel | // Module: SplitterChannel | |||
// | // | |||
// Definition of the SplitterChannel class. | // Definition of the SplitterChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SplitterChannel_INCLUDED | #ifndef Foundation_SplitterChannel_INCLUDED | |||
#define Foundation_SplitterChannel_INCLUDED | #define Foundation_SplitterChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Stopwatch.h | Stopwatch.h | |||
---|---|---|---|---|
// | // | |||
// Stopwatch.h | // Stopwatch.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/Stopwatch.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/Stopwatch.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: Stopwatch | // Module: Stopwatch | |||
// | // | |||
// Definition of the Stopwatch class. | // Definition of the Stopwatch class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Stopwatch_INCLUDED | #ifndef Foundation_Stopwatch_INCLUDED | |||
#define Foundation_Stopwatch_INCLUDED | #define Foundation_Stopwatch_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Clock.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Stopwatch | class Foundation_API Stopwatch | |||
/// A simple facility to measure time intervals | /// A simple facility to measure time intervals | |||
/// with microsecond resolution. | /// with microsecond resolution. | |||
/// | ||||
/// Note that Stopwatch is based on the Timestamp | ||||
/// class. Therefore, if during a Stopwatch run, | ||||
/// the system time is changed, the measured time | ||||
/// will not be correct. | ||||
{ | { | |||
public: | public: | |||
Stopwatch(); | Stopwatch(); | |||
~Stopwatch(); | ~Stopwatch(); | |||
void start(); | void start(); | |||
/// Starts (or restarts) the stopwatch. | /// Starts (or restarts) the stopwatch. | |||
void stop(); | void stop(); | |||
/// Stops or pauses the stopwatch. | /// Stops or pauses the stopwatch. | |||
void reset(); | void reset(); | |||
/// Resets the stopwatch. | /// Resets the stopwatch. | |||
void restart(); | void restart(); | |||
/// Resets and starts the stopwatch. | /// Resets and starts the stopwatch. | |||
Timestamp::TimeDiff elapsed() const; | Clock::ClockDiff elapsed() const; | |||
/// Returns the elapsed time in microseconds | /// Returns the elapsed time in microseconds | |||
/// since the stopwatch started. | /// since the stopwatch started. | |||
int elapsedSeconds() const; | int elapsedSeconds() const; | |||
/// Returns the number of seconds elapsed | /// Returns the number of seconds elapsed | |||
/// since the stopwatch started. | /// since the stopwatch started. | |||
static Timestamp::TimeVal resolution(); | static Clock::ClockVal resolution(); | |||
/// Returns the resolution of the stopwatch. | /// Returns the resolution of the stopwatch. | |||
private: | private: | |||
Stopwatch(const Stopwatch&); | Stopwatch(const Stopwatch&); | |||
Stopwatch& operator = (const Stopwatch&); | Stopwatch& operator = (const Stopwatch&); | |||
Timestamp _start; | Clock _start; | |||
Timestamp::TimeDiff _elapsed; | Clock::ClockDiff _elapsed; | |||
bool _running; | bool _running; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline void Stopwatch::start() | inline void Stopwatch::start() | |||
{ | { | |||
if (!_running) | if (!_running) | |||
{ | { | |||
_start.update(); | _start.update(); | |||
_running = true; | _running = true; | |||
} | } | |||
} | } | |||
inline void Stopwatch::stop() | inline void Stopwatch::stop() | |||
{ | { | |||
if (_running) | if (_running) | |||
{ | { | |||
Timestamp current; | Clock current; | |||
_elapsed += current - _start; | _elapsed += current - _start; | |||
_running = false; | _running = false; | |||
} | } | |||
} | } | |||
inline int Stopwatch::elapsedSeconds() const | inline int Stopwatch::elapsedSeconds() const | |||
{ | { | |||
return int(elapsed()/resolution()); | return int(elapsed()/resolution()); | |||
} | } | |||
inline Timestamp::TimeVal Stopwatch::resolution() | inline Clock::ClockVal Stopwatch::resolution() | |||
{ | { | |||
return Timestamp::resolution(); | return Clock::resolution(); | |||
} | } | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Stopwatch_INCLUDED | #endif // Foundation_Stopwatch_INCLUDED | |||
End of changes. 10 change blocks. | ||||
47 lines changed or deleted | 11 lines changed or added | |||
StrategyCollection.h | StrategyCollection.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: StrategyCollection | // Module: StrategyCollection | |||
// | // | |||
// Definition of the StrategyCollection class. | // Definition of the StrategyCollection class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StrategyCollection_INCLUDED | #ifndef Foundation_StrategyCollection_INCLUDED | |||
#define Foundation_StrategyCollection_INCLUDED | #define Foundation_StrategyCollection_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/AbstractStrategy.h" | #include "Poco/AbstractStrategy.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamChannel.h | StreamChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: StreamChannel | // Module: StreamChannel | |||
// | // | |||
// Definition of the StreamChannel class. | // Definition of the StreamChannel class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StreamChannel_INCLUDED | #ifndef Foundation_StreamChannel_INCLUDED | |||
#define Foundation_StreamChannel_INCLUDED | #define Foundation_StreamChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamConverter.h | StreamConverter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: StreamConverter | // Module: StreamConverter | |||
// | // | |||
// Definition of the StreamConverter class. | // Definition of the StreamConverter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StreamConverter_INCLUDED | #ifndef Foundation_StreamConverter_INCLUDED | |||
#define Foundation_StreamConverter_INCLUDED | #define Foundation_StreamConverter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamCopier.h | StreamCopier.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamCopier | // Module: StreamCopier | |||
// | // | |||
// Definition of class StreamCopier. | // Definition of class StreamCopier. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StreamCopier_INCLUDED | #ifndef Foundation_StreamCopier_INCLUDED | |||
#define Foundation_StreamCopier_INCLUDED | #define Foundation_StreamCopier_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
#include <cstddef> | #include <cstddef> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API StreamCopier | class Foundation_API StreamCopier | |||
/// This class provides static methods to copy the contents from one stream | /// This class provides static methods to copy the contents from one stream | |||
/// into another. | /// into another. | |||
{ | { | |||
public: | public: | |||
static std::streamsize copyStream(std::istream& istr, std::ostream& ost r, std::size_t bufferSize = 8192); | static std::streamsize copyStream(std::istream& istr, std::ostream& ostr, std::size_t bufferSize = 8192); | |||
/// Writes all bytes readable from istr to ostr, using an in ternal buffer. | /// Writes all bytes readable from istr to ostr, using an in ternal buffer. | |||
/// | /// | |||
/// Returns the number of bytes copied. | /// Returns the number of bytes copied. | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
static Poco::UInt64 copyStream64(std::istream& istr, std::ostream& ostr , std::size_t bufferSize = 8192); | static Poco::UInt64 copyStream64(std::istream& istr, std::ostream& o str, std::size_t bufferSize = 8192); | |||
/// Writes all bytes readable from istr to ostr, using an in ternal buffer. | /// Writes all bytes readable from istr to ostr, using an in ternal buffer. | |||
/// | /// | |||
/// Returns the number of bytes copied as a 64-bit unsigned integer. | /// Returns the number of bytes copied as a 64-bit unsigned integer. | |||
/// | /// | |||
/// Note: the only difference to copyStream() is that a 64-b it unsigned | /// Note: the only difference to copyStream() is that a 64-b it unsigned | |||
/// integer is used to count the number of bytes copied. | /// integer is used to count the number of bytes copied. | |||
#endif | #endif | |||
static std::streamsize copyStreamUnbuffered(std::istream& istr, std::os tream& ostr); | static std::streamsize copyStreamUnbuffered(std::istream& istr, std: :ostream& ostr); | |||
/// Writes all bytes readable from istr to ostr. | /// Writes all bytes readable from istr to ostr. | |||
/// | /// | |||
/// Returns the number of bytes copied. | /// Returns the number of bytes copied. | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
static Poco::UInt64 copyStreamUnbuffered64(std::istream& istr, std::ost ream& ostr); | static Poco::UInt64 copyStreamUnbuffered64(std::istream& istr, std:: ostream& ostr); | |||
/// Writes all bytes readable from istr to ostr. | /// Writes all bytes readable from istr to ostr. | |||
/// | /// | |||
/// Returns the number of bytes copied as a 64-bit unsigned integer. | /// Returns the number of bytes copied as a 64-bit unsigned integer. | |||
/// | /// | |||
/// Note: the only difference to copyStreamUnbuffered() is t hat a 64-bit unsigned | /// Note: the only difference to copyStreamUnbuffered() is t hat a 64-bit unsigned | |||
/// integer is used to count the number of bytes copied. | /// integer is used to count the number of bytes copied. | |||
#endif | #endif | |||
static std::streamsize copyToString(std::istream& istr, std::string& st r, std::size_t bufferSize = 8192); | static std::streamsize copyToString(std::istream& istr, std::string& str, std::size_t bufferSize = 8192); | |||
/// Appends all bytes readable from istr to the given string , using an internal buffer. | /// Appends all bytes readable from istr to the given string , using an internal buffer. | |||
/// | /// | |||
/// Returns the number of bytes copied. | /// Returns the number of bytes copied. | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
static Poco::UInt64 copyToString64(std::istream& istr, std::string& str , std::size_t bufferSize = 8192); | static Poco::UInt64 copyToString64(std::istream& istr, std::string& str, std::size_t bufferSize = 8192); | |||
/// Appends all bytes readable from istr to the given string , using an internal buffer. | /// Appends all bytes readable from istr to the given string , using an internal buffer. | |||
/// | /// | |||
/// Returns the number of bytes copied as a 64-bit unsigned integer. | /// Returns the number of bytes copied as a 64-bit unsigned integer. | |||
/// | /// | |||
/// Note: the only difference to copyToString() is that a 64 -bit unsigned | /// Note: the only difference to copyToString() is that a 64 -bit unsigned | |||
/// integer is used to count the number of bytes copied. | /// integer is used to count the number of bytes copied. | |||
#endif | #endif | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
End of changes. 7 change blocks. | ||||
38 lines changed or deleted | 7 lines changed or added | |||
StreamSocket.h | StreamSocket.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: StreamSocket | // Module: StreamSocket | |||
// | // | |||
// Definition of the StreamSocket class. | // Definition of the StreamSocket class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_StreamSocket_INCLUDED | #ifndef Net_StreamSocket_INCLUDED | |||
#define Net_StreamSocket_INCLUDED | #define Net_StreamSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/Socket.h" | #include "Poco/Net/Socket.h" | |||
#include "Poco/FIFOBuffer.h" | #include "Poco/FIFOBuffer.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamSocketImpl.h | StreamSocketImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Sockets | // Package: Sockets | |||
// Module: StreamSocketImpl | // Module: StreamSocketImpl | |||
// | // | |||
// Definition of the StreamSocketImpl class. | // Definition of the StreamSocketImpl class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_StreamSocketImpl_INCLUDED | #ifndef Net_StreamSocketImpl_INCLUDED | |||
#define Net_StreamSocketImpl_INCLUDED | #define Net_StreamSocketImpl_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/SocketImpl.h" | #include "Poco/Net/SocketImpl.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamTokenizer.h | StreamTokenizer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamTokenizer | // Module: StreamTokenizer | |||
// | // | |||
// Definition of the StreamTokenizer class. | // Definition of the StreamTokenizer class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StreamTokenizer_INCLUDED | #ifndef Foundation_StreamTokenizer_INCLUDED | |||
#define Foundation_StreamTokenizer_INCLUDED | #define Foundation_StreamTokenizer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Token.h" | #include "Poco/Token.h" | |||
#include <istream> | #include <istream> | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
StreamUtil.h | StreamUtil.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamUtil | // Module: StreamUtil | |||
// | // | |||
// Stream implementation support. | // Stream implementation support. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StreamUtil_INCLUDED | #ifndef Foundation_StreamUtil_INCLUDED | |||
#define Foundation_StreamUtil_INCLUDED | #define Foundation_StreamUtil_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
// poco_ios_init | // poco_ios_init | |||
// | // | |||
// This is a workaround for a bug in the Dinkumware | // This is a workaround for a bug in the Dinkumware | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
String.h | String.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: String | // Module: String | |||
// | // | |||
// String utility functions. | // String utility functions. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_String_INCLUDED | #ifndef Foundation_String_INCLUDED | |||
#define Foundation_String_INCLUDED | #define Foundation_String_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Ascii.h" | #include "Poco/Ascii.h" | |||
#include <cstring> | #include <cstring> | |||
#include <algorithm> | ||||
namespace Poco { | namespace Poco { | |||
template <class S> | template <class S> | |||
S trimLeft(const S& str) | S trimLeft(const S& str) | |||
/// Returns a copy of str with all leading | /// Returns a copy of str with all leading | |||
/// whitespace removed. | /// whitespace removed. | |||
{ | { | |||
typename S::const_iterator it = str.begin(); | typename S::const_iterator it = str.begin(); | |||
typename S::const_iterator end = str.end(); | typename S::const_iterator end = str.end(); | |||
skipping to change at line 133 | skipping to change at line 114 | |||
template <class S> | template <class S> | |||
S toUpper(const S& str) | S toUpper(const S& str) | |||
/// Returns a copy of str containing all upper-case characters. | /// Returns a copy of str containing all upper-case characters. | |||
{ | { | |||
typename S::const_iterator it = str.begin(); | typename S::const_iterator it = str.begin(); | |||
typename S::const_iterator end = str.end(); | typename S::const_iterator end = str.end(); | |||
S result; | S result; | |||
result.reserve(str.size()); | result.reserve(str.size()); | |||
while (it != end) result += Ascii::toUpper(*it++); | while (it != end) result += static_cast<typename S::value_type>(Asci i::toUpper(*it++)); | |||
return result; | return result; | |||
} | } | |||
template <class S> | template <class S> | |||
S& toUpperInPlace(S& str) | S& toUpperInPlace(S& str) | |||
/// Replaces all characters in str with their upper-case counterpart s. | /// Replaces all characters in str with their upper-case counterpart s. | |||
{ | { | |||
typename S::iterator it = str.begin(); | typename S::iterator it = str.begin(); | |||
typename S::iterator end = str.end(); | typename S::iterator end = str.end(); | |||
while (it != end) { *it = Ascii::toUpper(*it); ++it; } | while (it != end) { *it = static_cast<typename S::value_type>(Ascii: :toUpper(*it)); ++it; } | |||
return str; | return str; | |||
} | } | |||
template <class S> | template <class S> | |||
S toLower(const S& str) | S toLower(const S& str) | |||
/// Returns a copy of str containing all lower-case characters. | /// Returns a copy of str containing all lower-case characters. | |||
{ | { | |||
typename S::const_iterator it = str.begin(); | typename S::const_iterator it = str.begin(); | |||
typename S::const_iterator end = str.end(); | typename S::const_iterator end = str.end(); | |||
S result; | S result; | |||
result.reserve(str.size()); | result.reserve(str.size()); | |||
while (it != end) result += Ascii::toLower(*it++); | while (it != end) result += static_cast<typename S::value_type>(Asci i::toLower(*it++)); | |||
return result; | return result; | |||
} | } | |||
template <class S> | template <class S> | |||
S& toLowerInPlace(S& str) | S& toLowerInPlace(S& str) | |||
/// Replaces all characters in str with their lower-case counterpart s. | /// Replaces all characters in str with their lower-case counterpart s. | |||
{ | { | |||
typename S::iterator it = str.begin(); | typename S::iterator it = str.begin(); | |||
typename S::iterator end = str.end(); | typename S::iterator end = str.end(); | |||
while (it != end) { *it = Ascii::toLower(*it); ++it; } | while (it != end) { *it = static_cast<typename S::value_type>(Ascii: :toLower(*it)); ++it; } | |||
return str; | return str; | |||
} | } | |||
#if !defined(POCO_NO_TEMPLATE_ICOMPARE) | #if !defined(POCO_NO_TEMPLATE_ICOMPARE) | |||
template <class S, class It> | template <class S, class It> | |||
int icompare( | int icompare( | |||
const S& str, | const S& str, | |||
typename S::size_type pos, | typename S::size_type pos, | |||
typename S::size_type n, | typename S::size_type n, | |||
skipping to change at line 190 | skipping to change at line 171 | |||
It end2) | It end2) | |||
/// Case-insensitive string comparison | /// Case-insensitive string comparison | |||
{ | { | |||
typename S::size_type sz = str.size(); | typename S::size_type sz = str.size(); | |||
if (pos > sz) pos = sz; | if (pos > sz) pos = sz; | |||
if (pos + n > sz) n = sz - pos; | if (pos + n > sz) n = sz - pos; | |||
It it1 = str.begin() + pos; | It it1 = str.begin() + pos; | |||
It end1 = str.begin() + pos + n; | It end1 = str.begin() + pos + n; | |||
while (it1 != end1 && it2 != end2) | while (it1 != end1 && it2 != end2) | |||
{ | { | |||
typename S::value_type c1(Ascii::toLower(*it1)); | typename S::value_type c1(static_cast<typename S::value_type | |||
typename S::value_type c2(Ascii::toLower(*it2)); | >(Ascii::toLower(*it1))); | |||
typename S::value_type c2(static_cast<typename S::value_type | ||||
>(Ascii::toLower(*it2))); | ||||
if (c1 < c2) | if (c1 < c2) | |||
return -1; | return -1; | |||
else if (c1 > c2) | else if (c1 > c2) | |||
return 1; | return 1; | |||
++it1; ++it2; | ++it1; ++it2; | |||
} | } | |||
if (it1 == end1) | if (it1 == end1) | |||
return it2 == end2 ? 0 : -1; | return it2 == end2 ? 0 : -1; | |||
else | else | |||
skipping to change at line 215 | skipping to change at line 196 | |||
template <class S> | template <class S> | |||
int icompare(const S& str1, const S& str2) | int icompare(const S& str1, const S& str2) | |||
// A special optimization for an often used case. | // A special optimization for an often used case. | |||
{ | { | |||
typename S::const_iterator it1(str1.begin()); | typename S::const_iterator it1(str1.begin()); | |||
typename S::const_iterator end1(str1.end()); | typename S::const_iterator end1(str1.end()); | |||
typename S::const_iterator it2(str2.begin()); | typename S::const_iterator it2(str2.begin()); | |||
typename S::const_iterator end2(str2.end()); | typename S::const_iterator end2(str2.end()); | |||
while (it1 != end1 && it2 != end2) | while (it1 != end1 && it2 != end2) | |||
{ | { | |||
typename S::value_type c1(Ascii::toLower(*it1)); | typename S::value_type c1(static_cast<typename S::value_type | |||
typename S::value_type c2(Ascii::toLower(*it2)); | >(Ascii::toLower(*it1))); | |||
typename S::value_type c2(static_cast<typename S::value_type | ||||
>(Ascii::toLower(*it2))); | ||||
if (c1 < c2) | if (c1 < c2) | |||
return -1; | return -1; | |||
else if (c1 > c2) | else if (c1 > c2) | |||
return 1; | return 1; | |||
++it1; ++it2; | ++it1; ++it2; | |||
} | } | |||
if (it1 == end1) | if (it1 == end1) | |||
return it2 == end2 ? 0 : -1; | return it2 == end2 ? 0 : -1; | |||
else | else | |||
skipping to change at line 294 | skipping to change at line 275 | |||
const typename S::value_type* ptr) | const typename S::value_type* ptr) | |||
{ | { | |||
poco_check_ptr (ptr); | poco_check_ptr (ptr); | |||
typename S::size_type sz = str.size(); | typename S::size_type sz = str.size(); | |||
if (pos > sz) pos = sz; | if (pos > sz) pos = sz; | |||
if (pos + n > sz) n = sz - pos; | if (pos + n > sz) n = sz - pos; | |||
typename S::const_iterator it = str.begin() + pos; | typename S::const_iterator it = str.begin() + pos; | |||
typename S::const_iterator end = str.begin() + pos + n; | typename S::const_iterator end = str.begin() + pos + n; | |||
while (it != end && *ptr) | while (it != end && *ptr) | |||
{ | { | |||
typename S::value_type c1(Ascii::toLower(*it)); | typename S::value_type c1(static_cast<typename S::value_type | |||
typename S::value_type c2(Ascii::toLower(*ptr)); | >(Ascii::toLower(*it))); | |||
typename S::value_type c2(static_cast<typename S::value_type | ||||
>(Ascii::toLower(*ptr))); | ||||
if (c1 < c2) | if (c1 < c2) | |||
return -1; | return -1; | |||
else if (c1 > c2) | else if (c1 > c2) | |||
return 1; | return 1; | |||
++it; ++ptr; | ++it; ++ptr; | |||
} | } | |||
if (it == end) | if (it == end) | |||
return *ptr == 0 ? 0 : -1; | return *ptr == 0 ? 0 : -1; | |||
else | else | |||
skipping to change at line 450 | skipping to change at line 431 | |||
start = pos + fromLen; | start = pos + fromLen; | |||
} | } | |||
else result.append(str, start, str.size() - start); | else result.append(str, start, str.size() - start); | |||
} | } | |||
while (pos != S::npos); | while (pos != S::npos); | |||
str.swap(result); | str.swap(result); | |||
return str; | return str; | |||
} | } | |||
template <class S> | template <class S> | |||
S& replaceInPlace(S& str, const typename S::value_type from, const typename | ||||
S::value_type to = 0, typename S::size_type start = 0) | ||||
{ | ||||
if (from == to) return str; | ||||
typename S::size_type pos = 0; | ||||
do | ||||
{ | ||||
pos = str.find(from, start); | ||||
if (pos != S::npos) | ||||
{ | ||||
if (to) str[pos] = to; | ||||
else str.erase(pos, 1); | ||||
} | ||||
} while (pos != S::npos); | ||||
return str; | ||||
} | ||||
template <class S> | ||||
S& removeInPlace(S& str, const typename S::value_type ch, typename S::size_ | ||||
type start = 0) | ||||
{ | ||||
return replaceInPlace(str, ch, 0, start); | ||||
} | ||||
template <class S> | ||||
S replace(const S& str, const S& from, const S& to, typename S::size_type s tart = 0) | S replace(const S& str, const S& from, const S& to, typename S::size_type s tart = 0) | |||
/// Replace all occurences of from (which must not be the empty stri ng) | /// Replace all occurences of from (which must not be the empty stri ng) | |||
/// in str with to, starting at position start. | /// in str with to, starting at position start. | |||
{ | { | |||
S result(str); | S result(str); | |||
replaceInPlace(result, from, to, start); | replaceInPlace(result, from, to, start); | |||
return result; | return result; | |||
} | } | |||
template <class S> | template <class S> | |||
S replace(const S& str, const typename S::value_type* from, const typename S::value_type* to, typename S::size_type start = 0) | S replace(const S& str, const typename S::value_type* from, const typename S::value_type* to, typename S::size_type start = 0) | |||
{ | { | |||
S result(str); | S result(str); | |||
replaceInPlace(result, from, to, start); | replaceInPlace(result, from, to, start); | |||
return result; | return result; | |||
} | } | |||
template <class S> | ||||
S replace(const S& str, const typename S::value_type from, const typename S | ||||
::value_type to = 0, typename S::size_type start = 0) | ||||
{ | ||||
S result(str); | ||||
replaceInPlace(result, from, to, start); | ||||
return result; | ||||
} | ||||
template <class S> | ||||
S remove(const S& str, const typename S::value_type ch, typename S::size_ty | ||||
pe start = 0) | ||||
{ | ||||
S result(str); | ||||
replaceInPlace(result, ch, 0, start); | ||||
return result; | ||||
} | ||||
#else | #else | |||
std::string Foundation_API replace(const std::string& str, const std::strin | Foundation_API std::string replace(const std::string& str, const std::strin | |||
g& from, const std::string& to, std::string::size_type start = 0); | g& from, const std::string& to, std::string::size_type start = 0); | |||
std::string Foundation_API replace(const std::string& str, const std::strin | Foundation_API std::string replace(const std::string& str, const std::strin | |||
g::value_type* from, const std::string::value_type* to, std::string::size_t | g::value_type* from, const std::string::value_type* to, std::string::size_t | |||
ype start = 0); | ype start = 0); | |||
std::string& Foundation_API replaceInPlace(std::string& str, const std::str | Foundation_API std::string replace(const std::string& str, const std::strin | |||
ing& from, const std::string& to, std::string::size_type start = 0); | g::value_type from, const std::string::value_type to = 0, std::string::size | |||
std::string& Foundation_API replaceInPlace(std::string& str, const std::str | _type start = 0); | |||
ing::value_type* from, const std::string::value_type* to, std::string::size | Foundation_API std::string remove(const std::string& str, const std::string | |||
_type start = 0); | ::value_type ch, std::string::size_type start = 0); | |||
Foundation_API std::string& replaceInPlace(std::string& str, const std::str | ||||
ing& from, const std::string& to, std::string::size_type start = 0); | ||||
Foundation_API std::string& replaceInPlace(std::string& str, const std::str | ||||
ing::value_type* from, const std::string::value_type* to, std::string::size | ||||
_type start = 0); | ||||
Foundation_API std::string& replaceInPlace(std::string& str, const std::str | ||||
ing::value_type from, const std::string::value_type to = 0, std::string::si | ||||
ze_type start = 0); | ||||
Foundation_API std::string& removeInPlace(std::string& str, const std::stri | ||||
ng::value_type ch, std::string::size_type start = 0); | ||||
#endif | #endif | |||
template <class S> | template <class S> | |||
S cat(const S& s1, const S& s2) | S cat(const S& s1, const S& s2) | |||
/// Concatenates two strings. | /// Concatenates two strings. | |||
{ | { | |||
S result = s1; | S result = s1; | |||
result.reserve(s1.size() + s2.size()); | result.reserve(s1.size() + s2.size()); | |||
result.append(s2); | result.append(s2); | |||
skipping to change at line 550 | skipping to change at line 576 | |||
{ | { | |||
S result; | S result; | |||
for (It it = begin; it != end; ++it) | for (It it = begin; it != end; ++it) | |||
{ | { | |||
if (!result.empty()) result.append(delim); | if (!result.empty()) result.append(delim); | |||
result += *it; | result += *it; | |||
} | } | |||
return result; | return result; | |||
} | } | |||
// | ||||
// case-insensitive string equality | ||||
// | ||||
template <typename charT> | ||||
struct i_char_traits : public std::char_traits<charT> | ||||
{ | ||||
inline static bool eq(charT c1, charT c2) | ||||
{ | ||||
return Ascii::toLower(c1) == Ascii::toLower(c2); | ||||
} | ||||
inline static bool ne(charT c1, charT c2) | ||||
{ | ||||
return !eq(c1, c2); | ||||
} | ||||
inline static bool lt(charT c1, charT c2) | ||||
{ | ||||
return Ascii::toLower(c1) < Ascii::toLower(c2); | ||||
} | ||||
static int compare(const charT* s1, const charT* s2, size_t n) | ||||
{ | ||||
for (int i = 0; i < n && s1 && s2; ++i, ++s1, ++s2) | ||||
{ | ||||
if (Ascii::toLower(*s1) == Ascii::toLower(*s2)) cont | ||||
inue; | ||||
else if (Ascii::toLower(*s1) < Ascii::toLower(*s2)) | ||||
return -1; | ||||
else return 1; | ||||
} | ||||
return 0; | ||||
} | ||||
static const charT* find(const charT* s, int n, charT a) | ||||
{ | ||||
while(n-- > 0 && Ascii::toLower(*s) != Ascii::toLower(a)) { | ||||
++s; } | ||||
return s; | ||||
} | ||||
}; | ||||
typedef std::basic_string<char, i_char_traits<char> > istring; | ||||
/// Case-insensitive std::string counterpart. | ||||
template<typename T> | ||||
std::size_t isubstr(const T& str, const T& sought) | ||||
/// Case-insensitive substring; searches for a substring | ||||
/// without regards to case. | ||||
{ | ||||
typename T::const_iterator it = std::search(str.begin(), str.end(), | ||||
sought.begin(), sought.end(), | ||||
i_char_traits<typename T::value_type>::eq); | ||||
if (it != str.end()) return it - str.begin(); | ||||
else return static_cast<std::size_t>(T::npos); | ||||
} | ||||
struct CILess | ||||
/// Case-insensitive less-than functor; useful for standard maps | ||||
/// and sets with std::strings keys and case-insensitive ordering | ||||
/// requirement. | ||||
{ | ||||
inline bool operator() (const std::string& s1, const std::string& s2 | ||||
) const | ||||
{ | ||||
return icompare(s1, s2) < 0; | ||||
} | ||||
}; | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_String_INCLUDED | #endif // Foundation_String_INCLUDED | |||
End of changes. 13 change blocks. | ||||
52 lines changed or deleted | 155 lines changed or added | |||
StringPartSource.h | StringPartSource.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: Messages | // Package: Messages | |||
// Module: StringPartSource | // Module: StringPartSource | |||
// | // | |||
// Definition of the StringPartSource class. | // Definition of the StringPartSource class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_StringPartSource_INCLUDED | #ifndef Net_StringPartSource_INCLUDED | |||
#define Net_StringPartSource_INCLUDED | #define Net_StringPartSource_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/PartSource.h" | #include "Poco/Net/PartSource.h" | |||
#include <sstream> | #include <sstream> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 71 | skipping to change at line 51 | |||
StringPartSource(const std::string& str, const std::string& mediaTyp e, const std::string& filename); | StringPartSource(const std::string& str, const std::string& mediaTyp e, const std::string& filename); | |||
/// Creates the StringPartSource for the given | /// Creates the StringPartSource for the given | |||
/// string, MIME type and filename. | /// string, MIME type and filename. | |||
~StringPartSource(); | ~StringPartSource(); | |||
/// Destroys the StringPartSource. | /// Destroys the StringPartSource. | |||
std::istream& stream(); | std::istream& stream(); | |||
/// Returns a string input stream for the string. | /// Returns a string input stream for the string. | |||
const std::string& filename(); | const std::string& filename() const; | |||
/// Returns the filename portion of the path. | /// Returns the filename portion of the path. | |||
std::streamsize getContentLength() const; | ||||
/// Returns the string size. | ||||
private: | private: | |||
std::istringstream _istr; | std::istringstream _istr; | |||
std::string _filename; | std::string _filename; | |||
StringPartSource(const StringPartSource&); | StringPartSource(const StringPartSource&); | |||
StringPartSource& operator = (const StringPartSource&); | StringPartSource& operator = (const StringPartSource&); | |||
}; | }; | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 5 lines changed or added | |||
StringTokenizer.h | StringTokenizer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: StringTokenizer | // Module: StringTokenizer | |||
// | // | |||
// Definition of the StringTokenizer class. | // Definition of the StringTokenizer class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_StringTokenizer_INCLUDED | #ifndef Foundation_StringTokenizer_INCLUDED | |||
#define Foundation_StringTokenizer_INCLUDED | #define Foundation_StringTokenizer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <vector> | #include <vector> | |||
#include <cstddef> | #include <cstddef> | |||
skipping to change at line 69 | skipping to change at line 49 | |||
typedef std::vector<std::string> TokenVec; | typedef std::vector<std::string> TokenVec; | |||
typedef TokenVec::const_iterator Iterator; | typedef TokenVec::const_iterator Iterator; | |||
StringTokenizer(const std::string& str, const std::string& separator s, int options = 0); | StringTokenizer(const std::string& str, const std::string& separator s, int options = 0); | |||
/// Splits the given string into tokens. The tokens are expe cted to be | /// Splits the given string into tokens. The tokens are expe cted to be | |||
/// separated by one of the separator characters given in se parators. | /// separated by one of the separator characters given in se parators. | |||
/// Additionally, options can be specified: | /// Additionally, options can be specified: | |||
/// * TOK_IGNORE_EMPTY: empty tokens are ignored | /// * TOK_IGNORE_EMPTY: empty tokens are ignored | |||
/// * TOK_TRIM: trailing and leading whitespace is removed from tokens. | /// * TOK_TRIM: trailing and leading whitespace is removed from tokens. | |||
/// An empty token at the end of str is always ignored. For | ||||
example, | ||||
/// a StringTokenizer with the following arguments: | ||||
/// StringTokenizer(",ab,cd,", ","); | ||||
/// will produce three tokens, "", "ab" and "cd". | ||||
~StringTokenizer(); | ~StringTokenizer(); | |||
/// Destroys the tokenizer. | /// Destroys the tokenizer. | |||
Iterator begin() const; | Iterator begin() const; | |||
Iterator end() const; | Iterator end() const; | |||
const std::string& operator [] (std::size_t index) const; | const std::string& operator [] (std::size_t index) const; | |||
/// Returns const reference the index'th token. | /// Returns const reference the index'th token. | |||
/// Throws a RangeException if the index is out of range. | /// Throws a RangeException if the index is out of range. | |||
skipping to change at line 111 | skipping to change at line 87 | |||
std::size_t count() const; | std::size_t count() const; | |||
/// Returns the total number of tokens. | /// Returns the total number of tokens. | |||
std::size_t count(const std::string& token) const; | std::size_t count(const std::string& token) const; | |||
/// Returns the number of tokens equal to the specified toke n. | /// Returns the number of tokens equal to the specified toke n. | |||
private: | private: | |||
StringTokenizer(const StringTokenizer&); | StringTokenizer(const StringTokenizer&); | |||
StringTokenizer& operator = (const StringTokenizer&); | StringTokenizer& operator = (const StringTokenizer&); | |||
void trim (std::string& token); | ||||
TokenVec _tokens; | TokenVec _tokens; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline StringTokenizer::Iterator StringTokenizer::begin() const | inline StringTokenizer::Iterator StringTokenizer::begin() const | |||
{ | { | |||
return _tokens.begin(); | return _tokens.begin(); | |||
End of changes. 3 change blocks. | ||||
37 lines changed or deleted | 3 lines changed or added | |||
Stringifier.h | Stringifier.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Stringifier | // Module: Stringifier | |||
// | // | |||
// Definition of the Stringifier class. | // Definition of the Stringifier class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSONStringifier_INCLUDED | #ifndef JSON_JSONStringifier_INCLUDED | |||
#define JSON_JSONStringifier_INCLUDED | #define JSON_JSONStringifier_INCLUDED | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
namespace JSON { | namespace JSON { | |||
class JSON_API Stringifier | class JSON_API Stringifier | |||
/// Helper class for creating a String from a JSON object or array | /// Helper class for creating a String from a JSON object or array | |||
{ | { | |||
public: | public: | |||
static void stringify(const Dynamic::Var& any, std::ostream& out, un | static void condense(const Dynamic::Var& any, std::ostream& out); | |||
signed int indent = 0); | /// Writes a condensed string representation of the value to | |||
the output stream while preserving the insertion order. | ||||
/// This is just a "shortcut" to stringify(any, out) with na | ||||
me indicating the function effect. | ||||
static void stringify(const Dynamic::Var& any, bool preserveInsertio | ||||
nOrder, std::ostream& out, unsigned int indent = 0); | ||||
/// Writes a String representation of the value to the outpu | ||||
t stream while preserving the insertion order. | ||||
/// When indent is 0, the generated string will be created a | ||||
s small as possible (condensed). | ||||
/// When preserveInsertionOrder is true, the original string | ||||
object members order will be preserved. | ||||
/// This is a "shortcut" to stringify(any, out, indent, -1, | ||||
preserveInsertionOrder). | ||||
static void stringify(const Dynamic::Var& any, std::ostream& out, un | ||||
signed int indent = 0, int step = -1, bool preserveInsertionOrder = false); | ||||
/// Writes a String representation of the value to the outpu t stream. | /// Writes a String representation of the value to the outpu t stream. | |||
/// When indent is 0, the String will be created as small as possible. | /// When indent is 0, the String will be created as small as possible. | |||
/// When preserveInsertionOrder is true, the original string | ||||
object members order will be preserved; | ||||
/// otherwise, object members are sorted by their names. | ||||
static void formatString(const std::string& value, std::ostream& out | ||||
); | ||||
/// Formats the JSON string and streams it into ostream. | ||||
}; | }; | |||
inline void Stringifier::condense(const Dynamic::Var& any, std::ostream& ou | ||||
t) | ||||
{ | ||||
stringify(any, out, 0, -1, true); | ||||
} | ||||
inline void Stringifier::stringify(const Dynamic::Var& any, bool preserveIn | ||||
sertionOrder, std::ostream& out, unsigned int indent) | ||||
{ | ||||
stringify(any, out, indent, -1, preserveInsertionOrder); | ||||
} | ||||
}} // namespace Poco::JSON | }} // namespace Poco::JSON | |||
#endif // JSON_JSONStringifier_INCLUDED | #endif // JSON_JSONStringifier_INCLUDED | |||
End of changes. 4 change blocks. | ||||
34 lines changed or deleted | 39 lines changed or added | |||
Struct.h | Struct.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: Struct | // Module: Struct | |||
// | // | |||
// Definition of the Struct class. | // Definition of the Struct class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Struct_INCLUDED | #ifndef Foundation_Struct_INCLUDED | |||
#define Foundation_Struct_INCLUDED | #define Foundation_Struct_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/Dynamic/VarHolder.h" | #include "Poco/Dynamic/VarHolder.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include <map> | #include <map> | |||
#include <set> | #include <set> | |||
namespace Poco { | namespace Poco { | |||
namespace Dynamic { | namespace Dynamic { | |||
template <typename K> | template <typename K> | |||
class Struct | class Struct | |||
/// Struct allows to define a named collection of Var objects. | /// Struct allows to define a named collection of Var objects. | |||
{ | { | |||
public: | public: | |||
typedef typename std::map<K, Var> Data; | typedef typename std::map<K, Var> Data; | |||
typedef typename std::set<K> NameSet; | typedef typename std::set<K> NameSet; | |||
typedef typename Data::iterator Iterator; | typedef typename Data::iterator Iterator; | |||
typedef typename Data::const_iterator ConstIterator; | typedef typename Data::const_iterator ConstIterator; | |||
typedef typename Struct<K>::Data::value_type ValueType; | typedef typename Struct<K>::Data::value_type ValueType; | |||
typedef typename Struct<K>::Data::size_type SizeType; | typedef typename Struct<K>::Data::size_type SizeType; | |||
typedef typename std::pair<typename Struct<K>::Iterator, bool> InsRe tVal; | typedef typename std::pair<typename Struct<K>::Iterator, bool> InsRe tVal; | |||
typedef typename Poco::SharedPtr<Struct<K> > Ptr; | ||||
Struct(): _data() | Struct(): _data() | |||
/// Creates an empty Struct | /// Creates an empty Struct | |||
{ | { | |||
} | } | |||
Struct(const Data& val): _data(val) | Struct(const Data& val): _data(val) | |||
/// Creates the Struct from the given value. | /// Creates the Struct from the given value. | |||
{ | { | |||
} | } | |||
skipping to change at line 147 | skipping to change at line 129 | |||
{ | { | |||
return _data.begin(); | return _data.begin(); | |||
} | } | |||
inline ConstIterator begin() const | inline ConstIterator begin() const | |||
/// Returns the begin const iterator for the Struct | /// Returns the begin const iterator for the Struct | |||
{ | { | |||
return _data.begin(); | return _data.begin(); | |||
} | } | |||
inline InsRetVal insert(const K& key, const Var& value) | template <typename T> | |||
inline InsRetVal insert(const K& key, const T& value) | ||||
/// Inserts a <name, Var> pair into the Struct, | /// Inserts a <name, Var> pair into the Struct, | |||
/// returns a pair containing the iterator and a boolean whi ch | /// returns a pair containing the iterator and a boolean whi ch | |||
/// indicates success or not (is true, when insert succeeded , false, | /// indicates success or not (is true, when insert succeeded , false, | |||
/// when already another element was present, in this case I terator | /// when already another element was present, in this case I terator | |||
/// points to that other element) | /// points to that other element) | |||
{ | { | |||
// fix: SunPro C++ is silly ... | // fix: SunPro C++ is silly ... | |||
ValueType valueType(key,value); | ValueType valueType(key, value); | |||
return insert(valueType); | return insert(valueType); | |||
} | } | |||
inline InsRetVal insert(const ValueType& aPair) | inline InsRetVal insert(const ValueType& aPair) | |||
/// Inserts a <name, Var> pair into the Struct, | /// Inserts a <name, Var> pair into the Struct, | |||
/// returns a pair containing the iterator and a boolean whi ch | /// returns a pair containing the iterator and a boolean whi ch | |||
/// indicates success or not (is true, when insert succeeded , false, | /// indicates success or not (is true, when insert succeeded , false, | |||
/// when already another element was present, in this case I terator | /// when already another element was present, in this case I terator | |||
/// points to that other element) | /// points to that other element) | |||
{ | { | |||
skipping to change at line 203 | skipping to change at line 186 | |||
inline NameSet members() const | inline NameSet members() const | |||
/// Returns a sorted collection containing all member names | /// Returns a sorted collection containing all member names | |||
{ | { | |||
NameSet keys; | NameSet keys; | |||
ConstIterator it = begin(); | ConstIterator it = begin(); | |||
ConstIterator itEnd = end(); | ConstIterator itEnd = end(); | |||
for (; it != itEnd; ++it) keys.insert(it->first); | for (; it != itEnd; ++it) keys.insert(it->first); | |||
return keys; | return keys; | |||
} | } | |||
std::string toString() | ||||
{ | ||||
std::string str; | ||||
Var(*this).convert<std::string>(str); | ||||
return str; | ||||
} | ||||
private: | private: | |||
Data _data; | Data _data; | |||
}; | }; | |||
template <> | template <> | |||
class VarHolderImpl<Struct<std::string> >: public VarHolder | class VarHolderImpl<Struct<std::string> >: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(const Struct<std::string>& val): _val(val) | VarHolderImpl(const Struct<std::string>& val): _val(val) | |||
{ | { | |||
skipping to change at line 224 | skipping to change at line 214 | |||
~VarHolderImpl() | ~VarHolderImpl() | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
return typeid(Struct<std::string>); | return typeid(Struct<std::string>); | |||
} | } | |||
void convert(Int8& val) const | void convert(Int8&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int8"); | throw BadCastException("Cannot cast Struct type to Int8"); | |||
} | } | |||
void convert(Int16& val) const | void convert(Int16&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int16"); | throw BadCastException("Cannot cast Struct type to Int16"); | |||
} | } | |||
void convert(Int32& val) const | void convert(Int32&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int32"); | throw BadCastException("Cannot cast Struct type to Int32"); | |||
} | } | |||
void convert(Int64& val) const | void convert(Int64&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int64"); | throw BadCastException("Cannot cast Struct type to Int64"); | |||
} | } | |||
void convert(UInt8& val) const | void convert(UInt8&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt8"); | throw BadCastException("Cannot cast Struct type to UInt8"); | |||
} | } | |||
void convert(UInt16& val) const | void convert(UInt16&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt16"); | throw BadCastException("Cannot cast Struct type to UInt16"); | |||
} | } | |||
void convert(UInt32& val) const | void convert(UInt32&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt32"); | throw BadCastException("Cannot cast Struct type to UInt32"); | |||
} | } | |||
void convert(UInt64& val) const | void convert(UInt64&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt64"); | throw BadCastException("Cannot cast Struct type to UInt64"); | |||
} | } | |||
void convert(bool& val) const | void convert(bool&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to bool"); | throw BadCastException("Cannot cast Struct type to bool"); | |||
} | } | |||
void convert(float& val) const | void convert(float&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to float"); | throw BadCastException("Cannot cast Struct type to float"); | |||
} | } | |||
void convert(double& val) const | void convert(double&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to double"); | throw BadCastException("Cannot cast Struct type to double"); | |||
} | } | |||
void convert(char& val) const | void convert(char&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to char"); | throw BadCastException("Cannot cast Struct type to char"); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val.append("{ "); | val.append("{ "); | |||
Struct<std::string>::ConstIterator it = _val.begin(); | Struct<std::string>::ConstIterator it = _val.begin(); | |||
Struct<std::string>::ConstIterator itEnd = _val.end(); | Struct<std::string>::ConstIterator itEnd = _val.end(); | |||
if (!_val.empty()) | if (!_val.empty()) | |||
{ | { | |||
Var key(it->first); | Var key(it->first); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, it->second); | Impl::appendJSONValue(val, it->second); | |||
++it; | ++it; | |||
} | } | |||
for (; it != itEnd; ++it) | for (; it != itEnd; ++it) | |||
{ | { | |||
val.append(", "); | val.append(", "); | |||
Var key(it->first); | Var key(it->first); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, it->second); | Impl::appendJSONValue(val, it->second); | |||
} | } | |||
val.append(" }"); | val.append(" }"); | |||
} | } | |||
void convert(Poco::DateTime&) const | void convert(Poco::DateTime&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::DateTime"); | throw BadCastException("Struct -> Poco::DateTime"); | |||
} | } | |||
void convert(Poco::LocalDateTime&) const | void convert(Poco::LocalDateTime&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::LocalDateTime"); | throw BadCastException("Struct -> Poco::LocalDateTime"); | |||
} | } | |||
void convert(Poco::Timestamp&) const | void convert(Poco::Timestamp&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::Timestamp"); | throw BadCastException("Struct -> Poco::Timestamp"); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Struct<std::string>& value() const | const Struct<std::string>& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 363 | skipping to change at line 353 | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
std::size_t size() const | ||||
{ | ||||
return _val.size(); | ||||
} | ||||
Var& operator [] (const std::string& name) | Var& operator [] (const std::string& name) | |||
{ | { | |||
return _val[name]; | return _val[name]; | |||
} | } | |||
const Var& operator [] (const std::string& name) const | const Var& operator [] (const std::string& name) const | |||
{ | { | |||
return _val[name]; | return _val[name]; | |||
} | } | |||
skipping to change at line 394 | skipping to change at line 389 | |||
~VarHolderImpl() | ~VarHolderImpl() | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
return typeid(Struct<int>); | return typeid(Struct<int>); | |||
} | } | |||
void convert(Int8& val) const | void convert(Int8&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int8"); | throw BadCastException("Cannot cast Struct type to Int8"); | |||
} | } | |||
void convert(Int16& val) const | void convert(Int16&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int16"); | throw BadCastException("Cannot cast Struct type to Int16"); | |||
} | } | |||
void convert(Int32& val) const | void convert(Int32&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int32"); | throw BadCastException("Cannot cast Struct type to Int32"); | |||
} | } | |||
void convert(Int64& val) const | void convert(Int64&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to Int64"); | throw BadCastException("Cannot cast Struct type to Int64"); | |||
} | } | |||
void convert(UInt8& val) const | void convert(UInt8&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt8"); | throw BadCastException("Cannot cast Struct type to UInt8"); | |||
} | } | |||
void convert(UInt16& val) const | void convert(UInt16&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt16"); | throw BadCastException("Cannot cast Struct type to UInt16"); | |||
} | } | |||
void convert(UInt32& val) const | void convert(UInt32&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt32"); | throw BadCastException("Cannot cast Struct type to UInt32"); | |||
} | } | |||
void convert(UInt64& val) const | void convert(UInt64&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to UInt64"); | throw BadCastException("Cannot cast Struct type to UInt64"); | |||
} | } | |||
void convert(bool& val) const | void convert(bool&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to bool"); | throw BadCastException("Cannot cast Struct type to bool"); | |||
} | } | |||
void convert(float& val) const | void convert(float&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to float"); | throw BadCastException("Cannot cast Struct type to float"); | |||
} | } | |||
void convert(double& val) const | void convert(double&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to double"); | throw BadCastException("Cannot cast Struct type to double"); | |||
} | } | |||
void convert(char& val) const | void convert(char&) const | |||
{ | { | |||
throw BadCastException("Cannot cast Struct type to char"); | throw BadCastException("Cannot cast Struct type to char"); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val.append("{ "); | val.append("{ "); | |||
Struct<int>::ConstIterator it = _val.begin(); | Struct<int>::ConstIterator it = _val.begin(); | |||
Struct<int>::ConstIterator itEnd = _val.end(); | Struct<int>::ConstIterator itEnd = _val.end(); | |||
if (!_val.empty()) | if (!_val.empty()) | |||
{ | { | |||
Var key(it->first); | Var key(it->first); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, it->second); | Impl::appendJSONValue(val, it->second); | |||
++it; | ++it; | |||
} | } | |||
for (; it != itEnd; ++it) | for (; it != itEnd; ++it) | |||
{ | { | |||
val.append(", "); | val.append(", "); | |||
Var key(it->first); | Var key(it->first); | |||
appendJSONString(val, key); | Impl::appendJSONKey(val, key); | |||
val.append(" : "); | val.append(" : "); | |||
appendJSONString(val, it->second); | Impl::appendJSONValue(val, it->second); | |||
} | } | |||
val.append(" }"); | val.append(" }"); | |||
} | } | |||
void convert(Poco::DateTime&) const | void convert(Poco::DateTime&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::DateTime"); | throw BadCastException("Struct -> Poco::DateTime"); | |||
} | } | |||
void convert(Poco::LocalDateTime&) const | void convert(Poco::LocalDateTime&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::LocalDateTime"); | throw BadCastException("Struct -> Poco::LocalDateTime"); | |||
} | } | |||
void convert(Poco::Timestamp&) const | void convert(Poco::Timestamp&) const | |||
{ | { | |||
throw BadCastException("Struct -> Poco::Timestamp"); | throw BadCastException("Struct -> Poco::Timestamp"); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Struct<int>& value() const | const Struct<int>& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 533 | skipping to change at line 528 | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
std::size_t size() const | ||||
{ | ||||
return _val.size(); | ||||
} | ||||
Var& operator [] (int name) | Var& operator [] (int name) | |||
{ | { | |||
return _val[name]; | return _val[name]; | |||
} | } | |||
const Var& operator [] (int name) const | const Var& operator [] (int name) const | |||
{ | { | |||
return _val[name]; | return _val[name]; | |||
} | } | |||
private: | private: | |||
Struct<int> _val; | Struct<int> _val; | |||
}; | }; | |||
} // namespace Dynamic | } // namespace Dynamic | |||
//@ deprecated | ||||
typedef Dynamic::Struct<std::string> DynamicStruct; | typedef Dynamic::Struct<std::string> DynamicStruct; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Struct_INCLUDED | #endif // Foundation_Struct_INCLUDED | |||
End of changes. 45 change blocks. | ||||
71 lines changed or deleted | 59 lines changed or added | |||
Subsystem.h | Subsystem.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Application | // Package: Application | |||
// Module: Subsystem | // Module: Subsystem | |||
// | // | |||
// Definition of the Subsystem class. | // Definition of the Subsystem class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_Subsystem_INCLUDED | #ifndef Util_Subsystem_INCLUDED | |||
#define Util_Subsystem_INCLUDED | #define Util_Subsystem_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SynchronizedObject.h | SynchronizedObject.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: SynchronizedObject | // Module: SynchronizedObject | |||
// | // | |||
// Definition of the SynchronizedObject class. | // Definition of the SynchronizedObject class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SynchronizedObject_INCLUDED | #ifndef Foundation_SynchronizedObject_INCLUDED | |||
#define Foundation_SynchronizedObject_INCLUDED | #define Foundation_SynchronizedObject_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SyslogChannel.h | SyslogChannel.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: SyslogChannel | // Module: SyslogChannel | |||
// | // | |||
// Definition of the SyslogChannel class specific to UNIX. | // Definition of the SyslogChannel class specific to UNIX. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_SyslogChannel_INCLUDED | #ifndef Foundation_SyslogChannel_INCLUDED | |||
#define Foundation_SyslogChannel_INCLUDED | #define Foundation_SyslogChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
SystemConfiguration.h | SystemConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: SystemConfiguration | // Module: SystemConfiguration | |||
// | // | |||
// Definition of the SystemConfiguration class. | // Definition of the SystemConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_SystemConfiguration_INCLUDED | #ifndef Util_SystemConfiguration_INCLUDED | |||
#define Util_SystemConfiguration_INCLUDED | #define Util_SystemConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TCPServer.h | TCPServer.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: TCPServer | // Package: TCPServer | |||
// Module: TCPServer | // Module: TCPServer | |||
// | // | |||
// Definition of the TCPServer class. | // Definition of the TCPServer class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_TCPServer_INCLUDED | #ifndef Net_TCPServer_INCLUDED | |||
#define Net_TCPServer_INCLUDED | #define Net_TCPServer_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/ServerSocket.h" | #include "Poco/Net/ServerSocket.h" | |||
#include "Poco/Net/TCPServerConnectionFactory.h" | #include "Poco/Net/TCPServerConnectionFactory.h" | |||
#include "Poco/Net/TCPServerParams.h" | #include "Poco/Net/TCPServerParams.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
skipping to change at line 96 | skipping to change at line 76 | |||
/// Thus, the call to start() returns immediately, and the server | /// Thus, the call to start() returns immediately, and the server | |||
/// continues to run in the background. | /// continues to run in the background. | |||
/// | /// | |||
/// To stop the server from accepting new connections, call stop(). | /// To stop the server from accepting new connections, call stop(). | |||
/// | /// | |||
/// After calling stop(), no new connections will be accepted and | /// After calling stop(), no new connections will be accepted and | |||
/// all queued connections will be discarded. | /// all queued connections will be discarded. | |||
/// Already served connections, however, will continue being served. | /// Already served connections, however, will continue being served. | |||
{ | { | |||
public: | public: | |||
TCPServer(TCPServerConnectionFactory::Ptr pFactory, Poco::UInt16 por | ||||
tNumber = 0, TCPServerParams::Ptr pParams = 0); | ||||
/// Creates the TCPServer, with ServerSocket listening on th | ||||
e given port. | ||||
/// Default port is zero, allowing any availble port. The po | ||||
rt number | ||||
/// can be queried through TCPServer::port() member. | ||||
/// | ||||
/// The server takes ownership of the TCPServerConnectionFac | ||||
tory | ||||
/// and deletes it when it's no longer needed. | ||||
/// | ||||
/// The server also takes ownership of the TCPServerParams o | ||||
bject. | ||||
/// If no TCPServerParams object is given, the server's TCPS | ||||
erverDispatcher | ||||
/// creates its own one. | ||||
/// | ||||
/// New threads are taken from the default thread pool. | ||||
TCPServer(TCPServerConnectionFactory::Ptr pFactory, const ServerSock et& socket, TCPServerParams::Ptr pParams = 0); | TCPServer(TCPServerConnectionFactory::Ptr pFactory, const ServerSock et& socket, TCPServerParams::Ptr pParams = 0); | |||
/// Creates the TCPServer, using the given ServerSocket. | /// Creates the TCPServer, using the given ServerSocket. | |||
/// | /// | |||
/// The server takes ownership of the TCPServerConnectionFac tory | /// The server takes ownership of the TCPServerConnectionFac tory | |||
/// and deletes it when it's no longer needed. | /// and deletes it when it's no longer needed. | |||
/// | /// | |||
/// The server also takes ownership of the TCPServerParams o bject. | /// The server also takes ownership of the TCPServerParams o bject. | |||
/// If no TCPServerParams object is given, the server's TCPS erverDispatcher | /// If no TCPServerParams object is given, the server's TCPS erverDispatcher | |||
/// creates its own one. | /// creates its own one. | |||
/// | /// | |||
skipping to change at line 146 | skipping to change at line 140 | |||
/// Stops the server. | /// Stops the server. | |||
/// | /// | |||
/// No new connections will be accepted. | /// No new connections will be accepted. | |||
/// Already handled connections will continue to be served. | /// Already handled connections will continue to be served. | |||
/// | /// | |||
/// Once the server has been stopped, it cannot be restarted . | /// Once the server has been stopped, it cannot be restarted . | |||
int currentThreads() const; | int currentThreads() const; | |||
/// Returns the number of currently used connection threads. | /// Returns the number of currently used connection threads. | |||
int maxThreads() const; | ||||
/// Returns the maximum number of threads available. | ||||
int totalConnections() const; | int totalConnections() const; | |||
/// Returns the total number of handled connections. | /// Returns the total number of handled connections. | |||
int currentConnections() const; | int currentConnections() const; | |||
/// Returns the number of currently handled connections. | /// Returns the number of currently handled connections. | |||
int maxConcurrentConnections() const; | int maxConcurrentConnections() const; | |||
/// Returns the maximum number of concurrently handled conne ctions. | /// Returns the maximum number of concurrently handled conne ctions. | |||
int queuedConnections() const; | int queuedConnections() const; | |||
/// Returns the number of queued connections. | /// Returns the number of queued connections. | |||
int refusedConnections() const; | int refusedConnections() const; | |||
/// Returns the number of refused connections. | /// Returns the number of refused connections. | |||
const ServerSocket& socket() const; | ||||
/// Returns the underlying server socket. | ||||
Poco::UInt16 port() const; | Poco::UInt16 port() const; | |||
/// Returns the port the server socket listens on. | /// Returns the port the server socket listens on. | |||
protected: | protected: | |||
void run(); | void run(); | |||
/// Runs the server. The server will run until | /// Runs the server. The server will run until | |||
/// the stop() method is called, or the server | /// the stop() method is called, or the server | |||
/// object is destroyed, which implicitly calls | /// object is destroyed, which implicitly calls | |||
/// the stop() method. | /// the stop() method. | |||
skipping to change at line 185 | skipping to change at line 185 | |||
TCPServer(); | TCPServer(); | |||
TCPServer(const TCPServer&); | TCPServer(const TCPServer&); | |||
TCPServer& operator = (const TCPServer&); | TCPServer& operator = (const TCPServer&); | |||
ServerSocket _socket; | ServerSocket _socket; | |||
TCPServerDispatcher* _pDispatcher; | TCPServerDispatcher* _pDispatcher; | |||
Poco::Thread _thread; | Poco::Thread _thread; | |||
bool _stopped; | bool _stopped; | |||
}; | }; | |||
inline const ServerSocket& TCPServer::socket() const | ||||
{ | ||||
return _socket; | ||||
} | ||||
inline Poco::UInt16 TCPServer::port() const | inline Poco::UInt16 TCPServer::port() const | |||
{ | { | |||
return _socket.address().port(); | return _socket.address().port(); | |||
} | } | |||
} } // namespace Poco::Net | } } // namespace Poco::Net | |||
#endif // Net_TCPServer_INCLUDED | #endif // Net_TCPServer_INCLUDED | |||
End of changes. 5 change blocks. | ||||
32 lines changed or deleted | 32 lines changed or added | |||
TCPServerConnection.h | TCPServerConnection.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: TCPServer | // Package: TCPServer | |||
// Module: TCPServerConnection | // Module: TCPServerConnection | |||
// | // | |||
// Definition of the TCPServerConnection class. | // Definition of the TCPServerConnection class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_TCPServerConnection_INCLUDED | #ifndef Net_TCPServerConnection_INCLUDED | |||
#define Net_TCPServerConnection_INCLUDED | #define Net_TCPServerConnection_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TCPServerConnectionFactory.h | TCPServerConnectionFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: TCPServer | // Package: TCPServer | |||
// Module: TCPServerConnectionFactory | // Module: TCPServerConnectionFactory | |||
// | // | |||
// Definition of the TCPServerConnectionFactory class. | // Definition of the TCPServerConnectionFactory class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_TCPServerConnectionFactory_INCLUDED | #ifndef Net_TCPServerConnectionFactory_INCLUDED | |||
#define Net_TCPServerConnectionFactory_INCLUDED | #define Net_TCPServerConnectionFactory_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/TCPServerConnection.h" | #include "Poco/Net/TCPServerConnection.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TCPServerDispatcher.h | TCPServerDispatcher.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: TCPServer | // Package: TCPServer | |||
// Module: TCPServerDispatcher | // Module: TCPServerDispatcher | |||
// | // | |||
// Definition of the TCPServerDispatcher class. | // Definition of the TCPServerDispatcher class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_TCPServerDispatcher_INCLUDED | #ifndef Net_TCPServerDispatcher_INCLUDED | |||
#define Net_TCPServerDispatcher_INCLUDED | #define Net_TCPServerDispatcher_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Net/TCPServerConnectionFactory.h" | #include "Poco/Net/TCPServerConnectionFactory.h" | |||
#include "Poco/Net/TCPServerParams.h" | #include "Poco/Net/TCPServerParams.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
skipping to change at line 85 | skipping to change at line 65 | |||
void enqueue(const StreamSocket& socket); | void enqueue(const StreamSocket& socket); | |||
/// Queues the given socket connection. | /// Queues the given socket connection. | |||
void stop(); | void stop(); | |||
/// Stops the dispatcher. | /// Stops the dispatcher. | |||
int currentThreads() const; | int currentThreads() const; | |||
/// Returns the number of currently used threads. | /// Returns the number of currently used threads. | |||
int maxThreads() const; | ||||
/// Returns the maximum number of threads available. | ||||
int totalConnections() const; | int totalConnections() const; | |||
/// Returns the total number of handled connections. | /// Returns the total number of handled connections. | |||
int currentConnections() const; | int currentConnections() const; | |||
/// Returns the number of currently handled connections. | /// Returns the number of currently handled connections. | |||
int maxConcurrentConnections() const; | int maxConcurrentConnections() const; | |||
/// Returns the maximum number of concurrently handled conne ctions. | /// Returns the maximum number of concurrently handled conne ctions. | |||
int queuedConnections() const; | int queuedConnections() const; | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 4 lines changed or added | |||
TCPServerParams.h | TCPServerParams.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: TCPServer | // Package: TCPServer | |||
// Module: TCPServerParams | // Module: TCPServerParams | |||
// | // | |||
// Definition of the TCPServerParams class. | // Definition of the TCPServerParams class. | |||
// | // | |||
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_TCPServerParams_INCLUDED | #ifndef Net_TCPServerParams_INCLUDED | |||
#define Net_TCPServerParams_INCLUDED | #define Net_TCPServerParams_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/Timespan.h" | #include "Poco/Timespan.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Task.h | Task.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Tasks | // Package: Tasks | |||
// Module: Tasks | // Module: Tasks | |||
// | // | |||
// Definition of the Task class. | // Definition of the Task class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Task_INCLUDED | #ifndef Foundation_Task_INCLUDED | |||
#define Foundation_Task_INCLUDED | #define Foundation_Task_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TaskManager.h | TaskManager.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Tasks | // Package: Tasks | |||
// Module: Tasks | // Module: Tasks | |||
// | // | |||
// Definition of the TaskManager class. | // Definition of the TaskManager class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TaskManager_INCLUDED | #ifndef Foundation_TaskManager_INCLUDED | |||
#define Foundation_TaskManager_INCLUDED | #define Foundation_TaskManager_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Task.h" | #include "Poco/Task.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include "Poco/NotificationCenter.h" | #include "Poco/NotificationCenter.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TaskNotification.h | TaskNotification.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Tasks | // Package: Tasks | |||
// Module: Tasks | // Module: Tasks | |||
// | // | |||
// Definition of the TaskNotification class. | // Definition of the TaskNotification class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TaskNotification_INCLUDED | #ifndef Foundation_TaskNotification_INCLUDED | |||
#define Foundation_TaskNotification_INCLUDED | #define Foundation_TaskNotification_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
#include "Poco/Task.h" | #include "Poco/Task.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TeeStream.h | TeeStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: TeeStream | // Module: TeeStream | |||
// | // | |||
// Definition of the TeeStream class. | // Definition of the TeeStream class. | |||
// | // | |||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TeeStream_INCLUDED | #ifndef Foundation_TeeStream_INCLUDED | |||
#define Foundation_TeeStream_INCLUDED | #define Foundation_TeeStream_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UnbufferedStreamBuf.h" | #include "Poco/UnbufferedStreamBuf.h" | |||
#include <vector> | #include <vector> | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Template.h | Template.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: Template | // Module: Template | |||
// | // | |||
// Definition of the Template class. | // Definition of the Template class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSONTemplate_INCLUDED | #ifndef JSON_JSONTemplate_INCLUDED | |||
#define JSON_JSONTemplate_INCLUDED | #define JSON_JSONTemplate_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/Dynamic/Var.h" | #include "Poco/Dynamic/Var.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/Path.h" | #include "Poco/Path.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TemplateCache.h | TemplateCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: JSON | // Library: JSON | |||
// Package: JSON | // Package: JSON | |||
// Module: TemplateCache | // Module: TemplateCache | |||
// | // | |||
// Definition of the TemplateCache class. | // Definition of the TemplateCache class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef JSON_JSONTemplateCache_INCLUDED | #ifndef JSON_JSONTemplateCache_INCLUDED | |||
#define JSON_JSONTemplateCache_INCLUDED | #define JSON_JSONTemplateCache_INCLUDED | |||
#include "Poco/JSON/JSON.h" | #include "Poco/JSON/JSON.h" | |||
#include "Poco/JSON/Template.h" | #include "Poco/JSON/Template.h" | |||
#include "Poco/Path.h" | #include "Poco/Path.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
#include "Poco/Logger.h" | #include "Poco/Logger.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TemporaryFile.h | TemporaryFile.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Filesystem | // Package: Filesystem | |||
// Module: TemporaryFile | // Module: TemporaryFile | |||
// | // | |||
// Definition of the TemporaryFile class. | // Definition of the TemporaryFile class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TemporaryFile_INCLUDED | #ifndef Foundation_TemporaryFile_INCLUDED | |||
#define Foundation_TemporaryFile_INCLUDED | #define Foundation_TemporaryFile_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/File.h" | #include "Poco/File.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Text.h | Text.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: DOM | // Module: DOM | |||
// | // | |||
// Definition of the DOM Text class. | // Definition of the DOM Text class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_Text_INCLUDED | #ifndef DOM_Text_INCLUDED | |||
#define DOM_Text_INCLUDED | #define DOM_Text_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/DOM/CharacterData.h" | #include "Poco/DOM/CharacterData.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TextBufferIterator.h | TextBufferIterator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: TextBufferIterator | // Module: TextBufferIterator | |||
// | // | |||
// Definition of the TextBufferIterator class. | // Definition of the TextBufferIterator class. | |||
// | // | |||
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TextBufferIterator_INCLUDED | #ifndef Foundation_TextBufferIterator_INCLUDED | |||
#define Foundation_TextBufferIterator_INCLUDED | #define Foundation_TextBufferIterator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <cstdlib> | #include <cstdlib> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TextConverter.h | TextConverter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: TextConverter | // Module: TextConverter | |||
// | // | |||
// Definition of the TextConverter class. | // Definition of the TextConverter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TextConverter_INCLUDED | #ifndef Foundation_TextConverter_INCLUDED | |||
#define Foundation_TextConverter_INCLUDED | #define Foundation_TextConverter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class TextEncoding; | class TextEncoding; | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TextEncoding.h | TextEncoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: TextEncoding | // Module: TextEncoding | |||
// | // | |||
// Definition of the abstract TextEncoding class. | // Definition of the abstract TextEncoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TextEncoding_INCLUDED | #ifndef Foundation_TextEncoding_INCLUDED | |||
#define Foundation_TextEncoding_INCLUDED | #define Foundation_TextEncoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/SharedPtr.h" | #include "Poco/SharedPtr.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TextIterator.h | TextIterator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: TextIterator | // Module: TextIterator | |||
// | // | |||
// Definition of the TextIterator class. | // Definition of the TextIterator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TextIterator_INCLUDED | #ifndef Foundation_TextIterator_INCLUDED | |||
#define Foundation_TextIterator_INCLUDED | #define Foundation_TextIterator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class TextEncoding; | class TextEncoding; | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Thread.h | Thread.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the Thread class. | // Definition of the Thread class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Thread_INCLUDED | #ifndef Foundation_Thread_INCLUDED | |||
#define Foundation_Thread_INCLUDED | #define Foundation_Thread_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Event.h" | ||||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#if defined(POCO_OS_FAMILY_WINDOWS) | #if defined(POCO_OS_FAMILY_WINDOWS) | |||
#if defined(_WIN32_WCE) | #if defined(_WIN32_WCE) | |||
#include "Poco/Thread_WINCE.h" | #include "Poco/Thread_WINCE.h" | |||
#else | #else | |||
#include "Poco/Thread_WIN32.h" | #include "Poco/Thread_WIN32.h" | |||
#endif | #endif | |||
#elif defined(POCO_VXWORKS) | #elif defined(POCO_VXWORKS) | |||
#include "Poco/Thread_VX.h" | #include "Poco/Thread_VX.h" | |||
skipping to change at line 138 | skipping to change at line 119 | |||
/// only used on POSIX platforms where the values SCHED_OTHE R (default), | /// only used on POSIX platforms where the values SCHED_OTHE R (default), | |||
/// SCHED_FIFO and SCHED_RR are supported. | /// SCHED_FIFO and SCHED_RR are supported. | |||
int getOSPriority() const; | int getOSPriority() const; | |||
/// Returns the thread's priority, expressed as an operating system | /// Returns the thread's priority, expressed as an operating system | |||
/// specific priority value. | /// specific priority value. | |||
/// | /// | |||
/// May return 0 if the priority has not been explicitly set . | /// May return 0 if the priority has not been explicitly set . | |||
static int getMinOSPriority(int policy = POLICY_DEFAULT); | static int getMinOSPriority(int policy = POLICY_DEFAULT); | |||
/// Returns the mininum operating system-specific priority v alue, | /// Returns the minimum operating system-specific priority v alue, | |||
/// which can be passed to setOSPriority() for the given pol icy. | /// which can be passed to setOSPriority() for the given pol icy. | |||
static int getMaxOSPriority(int policy = POLICY_DEFAULT); | static int getMaxOSPriority(int policy = POLICY_DEFAULT); | |||
/// Returns the maximum operating system-specific priority v alue, | /// Returns the maximum operating system-specific priority v alue, | |||
/// which can be passed to setOSPriority() for the given pol icy. | /// which can be passed to setOSPriority() for the given pol icy. | |||
void setStackSize(int size); | void setStackSize(int size); | |||
/// Sets the thread's stack size in bytes. | /// Sets the thread's stack size in bytes. | |||
/// Setting the stack size to 0 will use the default stack s ize. | /// Setting the stack size to 0 will use the default stack s ize. | |||
/// Typically, the real stack size is rounded up to the near est | /// Typically, the real stack size is rounded up to the near est | |||
/// page size multiple. | /// page size multiple. | |||
int getStackSize() const; | int getStackSize() const; | |||
/// Returns the thread's stack size in bytes. | /// Returns the thread's stack size in bytes. | |||
/// If the default stack size is used, 0 is returned. | /// If the default stack size is used, 0 is returned. | |||
void start(Runnable& target); | void start(Runnable& target); | |||
/// Starts the thread with the given target. | /// Starts the thread with the given target. | |||
/// | ||||
/// Note that the given Runnable object must remain | ||||
/// valid during the entire lifetime of the thread, as | ||||
/// only a reference to it is stored internally. | ||||
void start(Callable target, void* pData = 0); | void start(Callable target, void* pData = 0); | |||
/// Starts the thread with the given target and parameter. | /// Starts the thread with the given target and parameter. | |||
template <class Functor> | ||||
void startFunc(Functor fn) | ||||
/// Starts the thread with the given functor object or lambd | ||||
a. | ||||
{ | ||||
startImpl(new FunctorRunnable<Functor>(fn)); | ||||
} | ||||
void join(); | void join(); | |||
/// Waits until the thread completes execution. | /// Waits until the thread completes execution. | |||
/// If multiple threads try to join the same | /// If multiple threads try to join the same | |||
/// thread, the result is undefined. | /// thread, the result is undefined. | |||
void join(long milliseconds); | void join(long milliseconds); | |||
/// Waits for at most the given interval for the thread | /// Waits for at most the given interval for the thread | |||
/// to complete. Throws a TimeoutException if the thread | /// to complete. Throws a TimeoutException if the thread | |||
/// does not complete within the specified time interval. | /// does not complete within the specified time interval. | |||
bool tryJoin(long milliseconds); | bool tryJoin(long milliseconds); | |||
/// Waits for at most the given interval for the thread | /// Waits for at most the given interval for the thread | |||
/// to complete. Returns true if the thread has finished, | /// to complete. Returns true if the thread has finished, | |||
/// false otherwise. | /// false otherwise. | |||
bool isRunning() const; | bool isRunning() const; | |||
/// Returns true if the thread is running. | /// Returns true if the thread is running. | |||
static bool trySleep(long milliseconds); | ||||
/// Starts an interruptible sleep. When trySleep() is called | ||||
, | ||||
/// the thread will remain suspended until: | ||||
/// - the timeout expires or | ||||
/// - wakeUp() is called | ||||
/// | ||||
/// Function returns true if sleep attempt was completed, fa | ||||
lse | ||||
/// if sleep was interrupted by a wakeUp() call. | ||||
/// A frequent scenario where trySleep()/wakeUp() pair of fu | ||||
nctions | ||||
/// is useful is with threads spending most of the time idle | ||||
, | ||||
/// with periodic activity between the idle times; trying to | ||||
sleep | ||||
/// (as opposed to sleeping) allows immediate ending of idle | ||||
thread | ||||
/// from the outside. | ||||
/// | ||||
/// The trySleep() and wakeUp() calls should be used with | ||||
/// understanding that the suspended state is not a true sle | ||||
ep, | ||||
/// but rather a state of waiting for an event, with timeout | ||||
/// expiration. This makes order of calls significant; calli | ||||
ng | ||||
/// wakeUp() before calling trySleep() will prevent the next | ||||
/// trySleep() call to actually suspend the thread (which, i | ||||
n | ||||
/// some scenarios, may be desirable behavior). | ||||
void wakeUp(); | ||||
/// Wakes up the thread which is in the state of interruptib | ||||
le | ||||
/// sleep. For threads that are not suspended, calling this | ||||
/// function has the effect of preventing the subsequent | ||||
/// trySleep() call to put thread in a suspended state. | ||||
static void sleep(long milliseconds); | static void sleep(long milliseconds); | |||
/// Suspends the current thread for the specified | /// Suspends the current thread for the specified | |||
/// amount of time. | /// amount of time. | |||
static void yield(); | static void yield(); | |||
/// Yields cpu to other threads. | /// Yields cpu to other threads. | |||
static Thread* current(); | static Thread* current(); | |||
/// Returns the Thread object for the currently active threa d. | /// Returns the Thread object for the currently active threa d. | |||
/// If the current thread is the main thread, 0 is returned. | /// If the current thread is the main thread, 0 is returned. | |||
skipping to change at line 206 | skipping to change at line 226 | |||
void clearTLS(); | void clearTLS(); | |||
/// Clears the thread's local storage. | /// Clears the thread's local storage. | |||
std::string makeName(); | std::string makeName(); | |||
/// Creates a unique name for a thread. | /// Creates a unique name for a thread. | |||
static int uniqueId(); | static int uniqueId(); | |||
/// Creates and returns a unique id for a thread. | /// Creates and returns a unique id for a thread. | |||
template <class Functor> | ||||
class FunctorRunnable: public Runnable | ||||
{ | ||||
public: | ||||
FunctorRunnable(const Functor& functor): | ||||
_functor(functor) | ||||
{ | ||||
} | ||||
~FunctorRunnable() | ||||
{ | ||||
} | ||||
void run() | ||||
{ | ||||
_functor(); | ||||
} | ||||
private: | ||||
Functor _functor; | ||||
}; | ||||
private: | private: | |||
Thread(const Thread&); | Thread(const Thread&); | |||
Thread& operator = (const Thread&); | Thread& operator = (const Thread&); | |||
int _id; | int _id; | |||
std::string _name; | std::string _name; | |||
ThreadLocalStorage* _pTLS; | ThreadLocalStorage* _pTLS; | |||
Event _event; | ||||
mutable FastMutex _mutex; | mutable FastMutex _mutex; | |||
friend class ThreadLocalStorage; | friend class ThreadLocalStorage; | |||
friend class PooledThread; | friend class PooledThread; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline Thread::TID Thread::tid() const | inline Thread::TID Thread::tid() const | |||
End of changes. 8 change blocks. | ||||
33 lines changed or deleted | 76 lines changed or added | |||
ThreadLocal.h | ThreadLocal.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the ThreadLocal template and related classes. | // Definition of the ThreadLocal template and related classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ThreadLocal_INCLUDED | #ifndef Foundation_ThreadLocal_INCLUDED | |||
#define Foundation_ThreadLocal_INCLUDED | #define Foundation_ThreadLocal_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ThreadPool.h | ThreadPool.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ThreadPool | // Module: ThreadPool | |||
// | // | |||
// Definition of the ThreadPool class. | // Definition of the ThreadPool class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ThreadPool_INCLUDED | #ifndef Foundation_ThreadPool_INCLUDED | |||
#define Foundation_ThreadPool_INCLUDED | #define Foundation_ThreadPool_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <vector> | #include <vector> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
ThreadTarget.h | ThreadTarget.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: ThreadTarget | // Module: ThreadTarget | |||
// | // | |||
// Definition of the ThreadTarget class. | // Definition of the ThreadTarget class. | |||
// | // | |||
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2008, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ThreadTarget_INCLUDED | #ifndef Foundation_ThreadTarget_INCLUDED | |||
#define Foundation_ThreadTarget_INCLUDED | #define Foundation_ThreadTarget_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Thread_POSIX.h | Thread_POSIX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the ThreadImpl class for POSIX Threads. | // Definition of the ThreadImpl class for POSIX Threads. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Thread_POSIX_INCLUDED | #ifndef Foundation_Thread_POSIX_INCLUDED | |||
#define Foundation_Thread_POSIX_INCLUDED | #define Foundation_Thread_POSIX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/SignalHandler.h" | #include "Poco/SignalHandler.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include <pthread.h> | #include <pthread.h> | |||
// must be limits.h (not <climits>) for PTHREAD_STACK_MIN on Solaris | // must be limits.h (not <climits>) for PTHREAD_STACK_MIN on Solaris | |||
#include <limits.h> | #include <limits.h> | |||
#if !defined(POCO_NO_SYS_SELECT_H) | #if !defined(POCO_NO_SYS_SELECT_H) | |||
#include <sys/select.h> | #include <sys/select.h> | |||
#endif | #endif | |||
#include <errno.h> | #include <errno.h> | |||
#if defined(POCO_VXWORKS) | #if defined(POCO_VXWORKS) | |||
#include <cstring> | #include <cstring> | |||
#endif | #endif | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API ThreadImpl | class Foundation_API ThreadImpl | |||
{ | { | |||
public: | public: | |||
typedef pthread_t TIDImpl; | typedef pthread_t TIDImpl; | |||
typedef void (*Callable)(void*); | typedef void (*Callable)(void*); | |||
enum Priority | enum Priority | |||
{ | { | |||
PRIO_LOWEST_IMPL, | PRIO_LOWEST_IMPL, | |||
PRIO_LOW_IMPL, | PRIO_LOW_IMPL, | |||
PRIO_NORMAL_IMPL, | PRIO_NORMAL_IMPL, | |||
PRIO_HIGH_IMPL, | PRIO_HIGH_IMPL, | |||
PRIO_HIGHEST_IMPL | PRIO_HIGHEST_IMPL | |||
}; | }; | |||
enum Policy | enum Policy | |||
{ | { | |||
POLICY_DEFAULT_IMPL = SCHED_OTHER | POLICY_DEFAULT_IMPL = SCHED_OTHER | |||
}; | }; | |||
struct CallbackData: public RefCountedObject | ||||
{ | ||||
CallbackData(): callback(0), pData(0) | ||||
{ | ||||
} | ||||
Callable callback; | ||||
void* pData; | ||||
}; | ||||
ThreadImpl(); | ThreadImpl(); | |||
~ThreadImpl(); | ~ThreadImpl(); | |||
TIDImpl tidImpl() const; | TIDImpl tidImpl() const; | |||
void setPriorityImpl(int prio); | void setPriorityImpl(int prio); | |||
int getPriorityImpl() const; | int getPriorityImpl() const; | |||
void setOSPriorityImpl(int prio, int policy = SCHED_OTHER); | void setOSPriorityImpl(int prio, int policy = SCHED_OTHER); | |||
int getOSPriorityImpl() const; | int getOSPriorityImpl() const; | |||
static int getMinOSPriorityImpl(int policy); | static int getMinOSPriorityImpl(int policy); | |||
static int getMaxOSPriorityImpl(int policy); | static int getMaxOSPriorityImpl(int policy); | |||
void setStackSizeImpl(int size); | void setStackSizeImpl(int size); | |||
int getStackSizeImpl() const; | int getStackSizeImpl() const; | |||
void startImpl(Runnable& target); | void startImpl(SharedPtr<Runnable> pTarget); | |||
void startImpl(Callable target, void* pData = 0); | ||||
void joinImpl(); | void joinImpl(); | |||
bool joinImpl(long milliseconds); | bool joinImpl(long milliseconds); | |||
bool isRunningImpl() const; | bool isRunningImpl() const; | |||
static void sleepImpl(long milliseconds); | static void sleepImpl(long milliseconds); | |||
static void yieldImpl(); | static void yieldImpl(); | |||
static ThreadImpl* currentImpl(); | static ThreadImpl* currentImpl(); | |||
static TIDImpl currentTidImpl(); | static TIDImpl currentTidImpl(); | |||
protected: | protected: | |||
static void* runnableEntry(void* pThread); | static void* runnableEntry(void* pThread); | |||
static void* callableEntry(void* pThread); | ||||
static int mapPrio(int prio, int policy = SCHED_OTHER); | static int mapPrio(int prio, int policy = SCHED_OTHER); | |||
static int reverseMapPrio(int osPrio, int policy = SCHED_OTHER); | static int reverseMapPrio(int osPrio, int policy = SCHED_OTHER); | |||
private: | private: | |||
class CurrentThreadHolder | class CurrentThreadHolder | |||
{ | { | |||
public: | public: | |||
CurrentThreadHolder() | CurrentThreadHolder() | |||
{ | { | |||
if (pthread_key_create(&_key, NULL)) | if (pthread_key_create(&_key, NULL)) | |||
skipping to change at line 148 | skipping to change at line 116 | |||
pthread_setspecific(_key, pThread); | pthread_setspecific(_key, pThread); | |||
} | } | |||
private: | private: | |||
pthread_key_t _key; | pthread_key_t _key; | |||
}; | }; | |||
struct ThreadData: public RefCountedObject | struct ThreadData: public RefCountedObject | |||
{ | { | |||
ThreadData(): | ThreadData(): | |||
pRunnableTarget(0), | ||||
pCallbackTarget(0), | ||||
thread(0), | thread(0), | |||
prio(PRIO_NORMAL_IMPL), | prio(PRIO_NORMAL_IMPL), | |||
policy(SCHED_OTHER), | policy(SCHED_OTHER), | |||
done(false), | done(false), | |||
stackSize(POCO_THREAD_STACK_SIZE) | stackSize(POCO_THREAD_STACK_SIZE), | |||
started(false), | ||||
joined(false) | ||||
{ | { | |||
#if defined(POCO_VXWORKS) | #if defined(POCO_VXWORKS) | |||
// This workaround is for VxWorks 5.x where | // This workaround is for VxWorks 5.x where | |||
// pthread_init() won't properly initialize the thre ad. | // pthread_init() won't properly initialize the thre ad. | |||
std::memset(&thread, 0, sizeof(thread)); | std::memset(&thread, 0, sizeof(thread)); | |||
#endif | #endif | |||
} | } | |||
Runnable* pRunnableTarget; | SharedPtr<Runnable> pRunnableTarget; | |||
AutoPtr<CallbackData> pCallbackTarget; | ||||
pthread_t thread; | pthread_t thread; | |||
int prio; | int prio; | |||
int osPrio; | int osPrio; | |||
int policy; | int policy; | |||
Event done; | Event done; | |||
std::size_t stackSize; | std::size_t stackSize; | |||
bool started; | ||||
bool joined; | ||||
}; | }; | |||
AutoPtr<ThreadData> _pData; | AutoPtr<ThreadData> _pData; | |||
static CurrentThreadHolder _currentThreadHolder; | static CurrentThreadHolder _currentThreadHolder; | |||
#if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | #if defined(POCO_OS_FAMILY_UNIX) && !defined(POCO_VXWORKS) | |||
SignalHandler::JumpBufferVec _jumpBufferVec; | SignalHandler::JumpBufferVec _jumpBufferVec; | |||
friend class SignalHandler; | friend class SignalHandler; | |||
#endif | #endif | |||
skipping to change at line 198 | skipping to change at line 167 | |||
return _pData->prio; | return _pData->prio; | |||
} | } | |||
inline int ThreadImpl::getOSPriorityImpl() const | inline int ThreadImpl::getOSPriorityImpl() const | |||
{ | { | |||
return _pData->osPrio; | return _pData->osPrio; | |||
} | } | |||
inline bool ThreadImpl::isRunningImpl() const | inline bool ThreadImpl::isRunningImpl() const | |||
{ | { | |||
return _pData->pRunnableTarget != 0 || | return !_pData->pRunnableTarget.isNull(); | |||
(_pData->pCallbackTarget.get() != 0 && _pData->pCallbackTarg | ||||
et->callback != 0); | ||||
} | } | |||
inline void ThreadImpl::yieldImpl() | inline void ThreadImpl::yieldImpl() | |||
{ | { | |||
sched_yield(); | sched_yield(); | |||
} | } | |||
inline int ThreadImpl::getStackSizeImpl() const | inline int ThreadImpl::getStackSizeImpl() const | |||
{ | { | |||
return static_cast<int>(_pData->stackSize); | return static_cast<int>(_pData->stackSize); | |||
End of changes. 11 change blocks. | ||||
55 lines changed or deleted | 11 lines changed or added | |||
Thread_VX.h | Thread_VX.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the ThreadImpl class for VxWorks tasks. | // Definition of the ThreadImpl class for VxWorks tasks. | |||
// | // | |||
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Thread_VX_INCLUDED | #ifndef Foundation_Thread_VX_INCLUDED | |||
#define Foundation_Thread_VX_INCLUDED | #define Foundation_Thread_VX_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/SignalHandler.h" | #include "Poco/SignalHandler.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Thread_WIN32.h | Thread_WIN32.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the ThreadImpl class for WIN32. | // Definition of the ThreadImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Thread_WIN32_INCLUDED | #ifndef Foundation_Thread_WIN32_INCLUDED | |||
#define Foundation_Thread_WIN32_INCLUDED | #define Foundation_Thread_WIN32_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API ThreadImpl | class Foundation_API ThreadImpl | |||
{ | { | |||
public: | public: | |||
typedef DWORD TIDImpl; | typedef DWORD TIDImpl; | |||
typedef void (*Callable)(void*); | typedef void (*Callable)(void*); | |||
#if defined(_DLL) | #if defined(_DLL) | |||
typedef DWORD (WINAPI *Entry)(LPVOID); | typedef DWORD (WINAPI *Entry)(LPVOID); | |||
#else | #else | |||
typedef unsigned (__stdcall *Entry)(void*); | typedef unsigned (__stdcall *Entry)(void*); | |||
#endif | #endif | |||
struct CallbackData | ||||
{ | ||||
CallbackData(): callback(0), pData(0) | ||||
{ | ||||
} | ||||
Callable callback; | ||||
void* pData; | ||||
}; | ||||
enum Priority | enum Priority | |||
{ | { | |||
PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | |||
PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | |||
PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | |||
PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | |||
PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | |||
}; | }; | |||
enum Policy | enum Policy | |||
skipping to change at line 95 | skipping to change at line 66 | |||
TIDImpl tidImpl() const; | TIDImpl tidImpl() const; | |||
void setPriorityImpl(int prio); | void setPriorityImpl(int prio); | |||
int getPriorityImpl() const; | int getPriorityImpl() const; | |||
void setOSPriorityImpl(int prio, int policy = 0); | void setOSPriorityImpl(int prio, int policy = 0); | |||
int getOSPriorityImpl() const; | int getOSPriorityImpl() const; | |||
static int getMinOSPriorityImpl(int policy); | static int getMinOSPriorityImpl(int policy); | |||
static int getMaxOSPriorityImpl(int policy); | static int getMaxOSPriorityImpl(int policy); | |||
void setStackSizeImpl(int size); | void setStackSizeImpl(int size); | |||
int getStackSizeImpl() const; | int getStackSizeImpl() const; | |||
void startImpl(Runnable& target); | void startImpl(SharedPtr<Runnable> pTarget); | |||
void startImpl(Callable target, void* pData = 0); | ||||
void joinImpl(); | void joinImpl(); | |||
bool joinImpl(long milliseconds); | bool joinImpl(long milliseconds); | |||
bool isRunningImpl() const; | bool isRunningImpl() const; | |||
static void sleepImpl(long milliseconds); | static void sleepImpl(long milliseconds); | |||
static void yieldImpl(); | static void yieldImpl(); | |||
static ThreadImpl* currentImpl(); | static ThreadImpl* currentImpl(); | |||
static TIDImpl currentTidImpl(); | static TIDImpl currentTidImpl(); | |||
protected: | protected: | |||
#if defined(_DLL) | #if defined(_DLL) | |||
static DWORD WINAPI runnableEntry(LPVOID pThread); | static DWORD WINAPI runnableEntry(LPVOID pThread); | |||
#else | #else | |||
static unsigned __stdcall runnableEntry(void* pThread); | static unsigned __stdcall runnableEntry(void* pThread); | |||
#endif | #endif | |||
#if defined(_DLL) | ||||
static DWORD WINAPI callableEntry(LPVOID pThread); | ||||
#else | ||||
static unsigned __stdcall callableEntry(void* pThread); | ||||
#endif | ||||
void createImpl(Entry ent, void* pData); | void createImpl(Entry ent, void* pData); | |||
void threadCleanup(); | void threadCleanup(); | |||
private: | private: | |||
class CurrentThreadHolder | class CurrentThreadHolder | |||
{ | { | |||
public: | public: | |||
CurrentThreadHolder(): _slot(TlsAlloc()) | CurrentThreadHolder(): _slot(TlsAlloc()) | |||
{ | { | |||
if (_slot == TLS_OUT_OF_INDEXES) | if (_slot == TLS_OUT_OF_INDEXES) | |||
skipping to change at line 148 | skipping to change at line 111 | |||
} | } | |||
void set(ThreadImpl* pThread) | void set(ThreadImpl* pThread) | |||
{ | { | |||
TlsSetValue(_slot, pThread); | TlsSetValue(_slot, pThread); | |||
} | } | |||
private: | private: | |||
DWORD _slot; | DWORD _slot; | |||
}; | }; | |||
Runnable* _pRunnableTarget; | SharedPtr<Runnable> _pRunnableTarget; | |||
CallbackData _callbackTarget; | HANDLE _thread; | |||
HANDLE _thread; | DWORD _threadId; | |||
DWORD _threadId; | int _prio; | |||
int _prio; | int _stackSize; | |||
int _stackSize; | ||||
static CurrentThreadHolder _currentThreadHolder; | static CurrentThreadHolder _currentThreadHolder; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline int ThreadImpl::getPriorityImpl() const | inline int ThreadImpl::getPriorityImpl() const | |||
{ | { | |||
return _prio; | return _prio; | |||
End of changes. 7 change blocks. | ||||
58 lines changed or deleted | 9 lines changed or added | |||
Thread_WINCE.h | Thread_WINCE.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Thread | // Module: Thread | |||
// | // | |||
// Definition of the ThreadImpl class for WIN32. | // Definition of the ThreadImpl class for WIN32. | |||
// | // | |||
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Thread_WINCE_INCLUDED | #ifndef Foundation_Thread_WINCE_INCLUDED | |||
#define Foundation_Thread_WINCE_INCLUDED | #define Foundation_Thread_WINCE_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
#if !defined(TLS_OUT_OF_INDEXES) // Windows CE 5.x does not define this | #if !defined(TLS_OUT_OF_INDEXES) // Windows CE 5.x does not define this | |||
#define TLS_OUT_OF_INDEXES 0xFFFFFFFF | #define TLS_OUT_OF_INDEXES 0xFFFFFFFF | |||
#endif | #endif | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API ThreadImpl | class Foundation_API ThreadImpl | |||
{ | { | |||
public: | public: | |||
typedef DWORD TIDImpl; | typedef DWORD TIDImpl; | |||
typedef void (*Callable)(void*); | typedef void (*Callable)(void*); | |||
typedef DWORD (WINAPI *Entry)(LPVOID); | typedef DWORD (WINAPI *Entry)(LPVOID); | |||
struct CallbackData | ||||
{ | ||||
CallbackData(): callback(0), pData(0) | ||||
{ | ||||
} | ||||
Callable callback; | ||||
void* pData; | ||||
}; | ||||
enum Priority | enum Priority | |||
{ | { | |||
PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | |||
PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | |||
PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | |||
PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | |||
PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | |||
}; | }; | |||
enum Policy | enum Policy | |||
skipping to change at line 94 | skipping to change at line 65 | |||
TIDImpl tidImpl() const; | TIDImpl tidImpl() const; | |||
void setPriorityImpl(int prio); | void setPriorityImpl(int prio); | |||
int getPriorityImpl() const; | int getPriorityImpl() const; | |||
void setOSPriorityImpl(int prio, int policy = 0); | void setOSPriorityImpl(int prio, int policy = 0); | |||
int getOSPriorityImpl() const; | int getOSPriorityImpl() const; | |||
static int getMinOSPriorityImpl(int policy); | static int getMinOSPriorityImpl(int policy); | |||
static int getMaxOSPriorityImpl(int policy); | static int getMaxOSPriorityImpl(int policy); | |||
void setStackSizeImpl(int size); | void setStackSizeImpl(int size); | |||
int getStackSizeImpl() const; | int getStackSizeImpl() const; | |||
void startImpl(Runnable& target); | void startImpl(SharedPtr<Runnable> pTarget); | |||
void startImpl(Callable target, void* pData = 0); | ||||
void joinImpl(); | void joinImpl(); | |||
bool joinImpl(long milliseconds); | bool joinImpl(long milliseconds); | |||
bool isRunningImpl() const; | bool isRunningImpl() const; | |||
static void sleepImpl(long milliseconds); | static void sleepImpl(long milliseconds); | |||
static void yieldImpl(); | static void yieldImpl(); | |||
static ThreadImpl* currentImpl(); | static ThreadImpl* currentImpl(); | |||
static TIDImpl currentTidImpl(); | static TIDImpl currentTidImpl(); | |||
protected: | protected: | |||
static DWORD WINAPI runnableEntry(LPVOID pThread); | static DWORD WINAPI runnableEntry(LPVOID pThread); | |||
static DWORD WINAPI callableEntry(LPVOID pThread); | ||||
void createImpl(Entry ent, void* pData); | void createImpl(Entry ent, void* pData); | |||
void threadCleanup(); | void threadCleanup(); | |||
private: | private: | |||
class CurrentThreadHolder | class CurrentThreadHolder | |||
{ | { | |||
public: | public: | |||
CurrentThreadHolder(): _slot(TlsAlloc()) | CurrentThreadHolder(): _slot(TlsAlloc()) | |||
{ | { | |||
skipping to change at line 138 | skipping to change at line 106 | |||
} | } | |||
void set(ThreadImpl* pThread) | void set(ThreadImpl* pThread) | |||
{ | { | |||
TlsSetValue(_slot, pThread); | TlsSetValue(_slot, pThread); | |||
} | } | |||
private: | private: | |||
DWORD _slot; | DWORD _slot; | |||
}; | }; | |||
Runnable* _pRunnableTarget; | SharedPtr<Runnable> _pRunnableTarget; | |||
CallbackData _callbackTarget; | ||||
HANDLE _thread; | HANDLE _thread; | |||
DWORD _threadId; | DWORD _threadId; | |||
int _prio; | int _prio; | |||
int _stackSize; | int _stackSize; | |||
static CurrentThreadHolder _currentThreadHolder; | static CurrentThreadHolder _currentThreadHolder; | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
End of changes. 6 change blocks. | ||||
48 lines changed or deleted | 4 lines changed or added | |||
TimedNotificationQueue.h | TimedNotificationQueue.h | |||
---|---|---|---|---|
// | // | |||
// TimedNotificationQueue.h | // TimedNotificationQueue.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/TimedNotificationQueue.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/TimedNotificationQueue.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Notifications | // Package: Notifications | |||
// Module: TimedNotificationQueue | // Module: TimedNotificationQueue | |||
// | // | |||
// Definition of the TimedNotificationQueue class. | // Definition of the TimedNotificationQueue class. | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TimedNotificationQueue_INCLUDED | #ifndef Foundation_TimedNotificationQueue_INCLUDED | |||
#define Foundation_TimedNotificationQueue_INCLUDED | #define Foundation_TimedNotificationQueue_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Notification.h" | #include "Poco/Notification.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/Clock.h" | ||||
#include <map> | #include <map> | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API TimedNotificationQueue | class Foundation_API TimedNotificationQueue | |||
/// A TimedNotificationQueue object provides a way to implement time d, asynchronous | /// A TimedNotificationQueue object provides a way to implement time d, asynchronous | |||
/// notifications. This is especially useful for sending notificatio ns | /// notifications. This is especially useful for sending notificatio ns | |||
/// from one thread to another, for example from a background thread to | /// from one thread to another, for example from a background thread to | |||
/// the main (user interface) thread. | /// the main (user interface) thread. | |||
/// | /// | |||
skipping to change at line 86 | skipping to change at line 67 | |||
/// Destroys the TimedNotificationQueue. | /// Destroys the TimedNotificationQueue. | |||
void enqueueNotification(Notification::Ptr pNotification, Timestamp timestamp); | void enqueueNotification(Notification::Ptr pNotification, Timestamp timestamp); | |||
/// Enqueues the given notification by adding it to | /// Enqueues the given notification by adding it to | |||
/// the queue according to the given timestamp. | /// the queue according to the given timestamp. | |||
/// Lower timestamp values are inserted before higher ones. | /// Lower timestamp values are inserted before higher ones. | |||
/// The queue takes ownership of the notification, thus | /// The queue takes ownership of the notification, thus | |||
/// a call like | /// a call like | |||
/// notificationQueue.enqueueNotification(new MyNotifica tion, someTime); | /// notificationQueue.enqueueNotification(new MyNotifica tion, someTime); | |||
/// does not result in a memory leak. | /// does not result in a memory leak. | |||
/// | ||||
/// The Timestamp is converted to an equivalent Clock value. | ||||
void enqueueNotification(Notification::Ptr pNotification, Clock cloc | ||||
k); | ||||
/// Enqueues the given notification by adding it to | ||||
/// the queue according to the given clock value. | ||||
/// Lower clock values are inserted before higher ones. | ||||
/// The queue takes ownership of the notification, thus | ||||
/// a call like | ||||
/// notificationQueue.enqueueNotification(new MyNotifica | ||||
tion, someTime); | ||||
/// does not result in a memory leak. | ||||
Notification* dequeueNotification(); | Notification* dequeueNotification(); | |||
/// Dequeues the next pending notification with a timestamp | /// Dequeues the next pending notification with a timestamp | |||
/// less than or equal to the current time. | /// less than or equal to the current time. | |||
/// Returns 0 (null) if no notification is available. | /// Returns 0 (null) if no notification is available. | |||
/// The caller gains ownership of the notification and | /// The caller gains ownership of the notification and | |||
/// is expected to release it when done with it. | /// is expected to release it when done with it. | |||
/// | /// | |||
/// It is highly recommended that the result is immediately | /// It is highly recommended that the result is immediately | |||
/// assigned to a Notification::Ptr, to avoid potential | /// assigned to a Notification::Ptr, to avoid potential | |||
/// memory management issues. | /// memory management issues. | |||
Notification* waitDequeueNotification(); | Notification* waitDequeueNotification(); | |||
/// Dequeues the next pending notification. | /// Dequeues the next pending notification. | |||
/// If no notification is available, waits for a notificatio n | /// If no notification is available, waits for a notificatio n | |||
/// to be enqueued. | /// to be enqueued. | |||
/// The caller gains ownership of the notification and | /// The caller gains ownership of the notification and | |||
/// is expected to release it when done with it. | /// is expected to release it when done with it. | |||
/// This method returns 0 (null) if wakeUpWaitingThreads() | ||||
/// has been called by another thread. | ||||
/// | /// | |||
/// It is highly recommended that the result is immediately | /// It is highly recommended that the result is immediately | |||
/// assigned to a Notification::Ptr, to avoid potential | /// assigned to a Notification::Ptr, to avoid potential | |||
/// memory management issues. | /// memory management issues. | |||
Notification* waitDequeueNotification(long milliseconds); | Notification* waitDequeueNotification(long milliseconds); | |||
/// Dequeues the next pending notification. | /// Dequeues the next pending notification. | |||
/// If no notification is available, waits for a notificatio n | /// If no notification is available, waits for a notificatio n | |||
/// to be enqueued up to the specified time. | /// to be enqueued up to the specified time. | |||
/// Returns 0 (null) if no notification is available. | /// Returns 0 (null) if no notification is available. | |||
skipping to change at line 137 | skipping to change at line 127 | |||
/// Returns the number of notifications in the queue. | /// Returns the number of notifications in the queue. | |||
void clear(); | void clear(); | |||
/// Removes all notifications from the queue. | /// Removes all notifications from the queue. | |||
/// | /// | |||
/// Calling clear() while another thread executes one of | /// Calling clear() while another thread executes one of | |||
/// the dequeue member functions will result in undefined | /// the dequeue member functions will result in undefined | |||
/// behavior. | /// behavior. | |||
protected: | protected: | |||
typedef std::multimap<Timestamp, Notification::Ptr> NfQueue; | typedef std::multimap<Clock, Notification::Ptr> NfQueue; | |||
Notification::Ptr dequeueOne(NfQueue::iterator& it); | Notification::Ptr dequeueOne(NfQueue::iterator& it); | |||
bool wait(Timestamp::TimeDiff interval); | bool wait(Clock::ClockDiff interval); | |||
private: | private: | |||
NfQueue _nfQueue; | NfQueue _nfQueue; | |||
Event _nfAvailable; | Event _nfAvailable; | |||
mutable FastMutex _mutex; | mutable FastMutex _mutex; | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_TimedNotificationQueue_INCLUDED | #endif // Foundation_TimedNotificationQueue_INCLUDED | |||
End of changes. 8 change blocks. | ||||
38 lines changed or deleted | 19 lines changed or added | |||
Timer.h | Timer.h | |||
---|---|---|---|---|
// | // | |||
// Timer.h | // Timer.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/Timer.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/Timer.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Threading | // Package: Threading | |||
// Module: Timer | // Module: Timer | |||
// | // | |||
// Definition of the Timer and related classes. | // Definition of the Timer and related classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Timer_INCLUDED | #ifndef Foundation_Timer_INCLUDED | |||
#define Foundation_Timer_INCLUDED | #define Foundation_Timer_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Event.h" | #include "Poco/Event.h" | |||
#include "Poco/Thread.h" | #include "Poco/Thread.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Clock.h" | |||
namespace Poco { | namespace Poco { | |||
class AbstractTimerCallback; | class AbstractTimerCallback; | |||
class ThreadPool; | class ThreadPool; | |||
class Foundation_API Timer: protected Runnable | class Foundation_API Timer: protected Runnable | |||
/// This class implements a thread-based timer. | /// This class implements a thread-based timer. | |||
/// A timer starts a thread that first waits for a given start inter val. | /// A timer starts a thread that first waits for a given start inter val. | |||
/// Once that interval expires, the timer callback is called repeate dly | /// Once that interval expires, the timer callback is called repeate dly | |||
skipping to change at line 167 | skipping to change at line 147 | |||
protected: | protected: | |||
void run(); | void run(); | |||
private: | private: | |||
volatile long _startInterval; | volatile long _startInterval; | |||
volatile long _periodicInterval; | volatile long _periodicInterval; | |||
Event _wakeUp; | Event _wakeUp; | |||
Event _done; | Event _done; | |||
long _skipped; | long _skipped; | |||
AbstractTimerCallback* _pCallback; | AbstractTimerCallback* _pCallback; | |||
Timestamp _nextInvocation; | Clock _nextInvocation; | |||
mutable FastMutex _mutex; | mutable FastMutex _mutex; | |||
Timer(const Timer&); | Timer(const Timer&); | |||
Timer& operator = (const Timer&); | Timer& operator = (const Timer&); | |||
}; | }; | |||
class Foundation_API AbstractTimerCallback | class Foundation_API AbstractTimerCallback | |||
/// This is the base class for all instantiations of | /// This is the base class for all instantiations of | |||
/// the TimerCallback template. | /// the TimerCallback template. | |||
{ | { | |||
End of changes. 4 change blocks. | ||||
35 lines changed or deleted | 4 lines changed or added | |||
TimerTask.h | TimerTask.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Timer | // Package: Timer | |||
// Module: TimerTask | // Module: TimerTask | |||
// | // | |||
// Definition of the TimerTask class. | // Definition of the TimerTask class. | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_TimerTask_INCLUDED | #ifndef Util_TimerTask_INCLUDED | |||
#define Util_TimerTask_INCLUDED | #define Util_TimerTask_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Runnable.h" | #include "Poco/Runnable.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
#include "Poco/AutoPtr.h" | #include "Poco/AutoPtr.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
skipping to change at line 70 | skipping to change at line 50 | |||
TimerTask(); | TimerTask(); | |||
/// Creates the TimerTask. | /// Creates the TimerTask. | |||
void cancel(); | void cancel(); | |||
/// Cancels the execution of the timer. | /// Cancels the execution of the timer. | |||
/// If the task has been scheduled for one-time execution an d has | /// If the task has been scheduled for one-time execution an d has | |||
/// not yet run, or has not yet been scheduled, it will neve r run. | /// not yet run, or has not yet been scheduled, it will neve r run. | |||
/// If the task has been scheduled for repeated execution, i t will never | /// If the task has been scheduled for repeated execution, i t will never | |||
/// run again. If the task is running when this call occurs, the task | /// run again. If the task is running when this call occurs, the task | |||
/// will run to completion, but will never run again. | /// will run to completion, but will never run again. | |||
/// | ||||
/// Warning: A TimerTask that has been cancelled must not be | ||||
scheduled again. | ||||
/// An attempt to do so results in a Poco::Util::IllegalStat | ||||
eException being thrown. | ||||
bool isCancelled() const; | bool isCancelled() const; | |||
/// Returns true iff the TimerTask has been cancelled by a c all | /// Returns true iff the TimerTask has been cancelled by a c all | |||
/// to cancel(). | /// to cancel(). | |||
Poco::Timestamp lastExecution() const; | Poco::Timestamp lastExecution() const; | |||
/// Returns the time of the last execution of the timer task . | /// Returns the time of the last execution of the timer task . | |||
/// | /// | |||
/// Returns 0 if the timer has never been executed. | /// Returns 0 if the timer has never been executed. | |||
End of changes. 2 change blocks. | ||||
32 lines changed or deleted | 6 lines changed or added | |||
TimerTaskAdapter.h | TimerTaskAdapter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Timer | // Package: Timer | |||
// Module: TimerTaskAdapter | // Module: TimerTaskAdapter | |||
// | // | |||
// Definition of the TimerTaskAdapter class template. | // Definition of the TimerTaskAdapter class template. | |||
// | // | |||
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_TimerTaskAdapter_INCLUDED | #ifndef Util_TimerTaskAdapter_INCLUDED | |||
#define Util_TimerTaskAdapter_INCLUDED | #define Util_TimerTaskAdapter_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/TimerTask.h" | #include "Poco/Util/TimerTask.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Timespan.h | Timespan.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: Timespan | // Module: Timespan | |||
// | // | |||
// Definition of the Timespan class. | // Definition of the Timespan class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Timespan_INCLUDED | #ifndef Foundation_Timespan_INCLUDED | |||
#define Foundation_Timespan_INCLUDED | #define Foundation_Timespan_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 62 | skipping to change at line 42 | |||
Timespan(); | Timespan(); | |||
/// Creates a zero Timespan. | /// Creates a zero Timespan. | |||
Timespan(TimeDiff microseconds); | Timespan(TimeDiff microseconds); | |||
/// Creates a Timespan. | /// Creates a Timespan. | |||
Timespan(long seconds, long microseconds); | Timespan(long seconds, long microseconds); | |||
/// Creates a Timespan. Useful for creating | /// Creates a Timespan. Useful for creating | |||
/// a Timespan from a struct timeval. | /// a Timespan from a struct timeval. | |||
Timespan(int days, int hours, int minutes, int seconds, int microsec onds); | Timespan(int days, int hours, int minutes, int seconds, int microSec onds); | |||
/// Creates a Timespan. | /// Creates a Timespan. | |||
Timespan(const Timespan& timespan); | Timespan(const Timespan& timespan); | |||
/// Creates a Timespan from another one. | /// Creates a Timespan from another one. | |||
~Timespan(); | ~Timespan(); | |||
/// Destroys the Timespan. | /// Destroys the Timespan. | |||
Timespan& operator = (const Timespan& timespan); | Timespan& operator = (const Timespan& timespan); | |||
/// Assignment operator. | /// Assignment operator. | |||
Timespan& operator = (TimeDiff microseconds); | Timespan& operator = (TimeDiff microseconds); | |||
/// Assignment operator. | /// Assignment operator. | |||
Timespan& assign(int days, int hours, int minutes, int seconds, int microseconds); | Timespan& assign(int days, int hours, int minutes, int seconds, int microSeconds); | |||
/// Assigns a new span. | /// Assigns a new span. | |||
Timespan& assign(long seconds, long microseconds); | Timespan& assign(long seconds, long microseconds); | |||
/// Assigns a new span. Useful for assigning | /// Assigns a new span. Useful for assigning | |||
/// from a struct timeval. | /// from a struct timeval. | |||
void swap(Timespan& timespan); | void swap(Timespan& timespan); | |||
/// Swaps the Timespan with another one. | /// Swaps the Timespan with another one. | |||
bool operator == (const Timespan& ts) const; | bool operator == (const Timespan& ts) const; | |||
bool operator != (const Timespan& ts) const; | bool operator != (const Timespan& ts) const; | |||
bool operator > (const Timespan& ts) const; | bool operator > (const Timespan& ts) const; | |||
bool operator >= (const Timespan& ts) const; | bool operator >= (const Timespan& ts) const; | |||
bool operator < (const Timespan& ts) const; | bool operator < (const Timespan& ts) const; | |||
bool operator <= (const Timespan& ts) const; | bool operator <= (const Timespan& ts) const; | |||
bool operator == (TimeDiff microseconds) const; | bool operator == (TimeDiff microSeconds) const; | |||
bool operator != (TimeDiff microseconds) const; | bool operator != (TimeDiff microSeconds) const; | |||
bool operator > (TimeDiff microseconds) const; | bool operator > (TimeDiff microSeconds) const; | |||
bool operator >= (TimeDiff microseconds) const; | bool operator >= (TimeDiff microSeconds) const; | |||
bool operator < (TimeDiff microseconds) const; | bool operator < (TimeDiff microSeconds) const; | |||
bool operator <= (TimeDiff microseconds) const; | bool operator <= (TimeDiff microSeconds) const; | |||
Timespan operator + (const Timespan& d) const; | Timespan operator + (const Timespan& d) const; | |||
Timespan operator - (const Timespan& d) const; | Timespan operator - (const Timespan& d) const; | |||
Timespan& operator += (const Timespan& d); | Timespan& operator += (const Timespan& d); | |||
Timespan& operator -= (const Timespan& d); | Timespan& operator -= (const Timespan& d); | |||
Timespan operator + (TimeDiff microseconds) const; | Timespan operator + (TimeDiff microSeconds) const; | |||
Timespan operator - (TimeDiff microseconds) const; | Timespan operator - (TimeDiff microSeconds) const; | |||
Timespan& operator += (TimeDiff microseconds); | Timespan& operator += (TimeDiff microSeconds); | |||
Timespan& operator -= (TimeDiff microseconds); | Timespan& operator -= (TimeDiff microSeconds); | |||
int days() const; | int days() const; | |||
/// Returns the number of days. | /// Returns the number of days. | |||
int hours() const; | int hours() const; | |||
/// Returns the number of hours (0 to 23). | /// Returns the number of hours (0 to 23). | |||
int totalHours() const; | int totalHours() const; | |||
/// Returns the total number of hours. | /// Returns the total number of hours. | |||
skipping to change at line 252 | skipping to change at line 232 | |||
inline bool Timespan::operator < (const Timespan& ts) const | inline bool Timespan::operator < (const Timespan& ts) const | |||
{ | { | |||
return _span < ts._span; | return _span < ts._span; | |||
} | } | |||
inline bool Timespan::operator <= (const Timespan& ts) const | inline bool Timespan::operator <= (const Timespan& ts) const | |||
{ | { | |||
return _span <= ts._span; | return _span <= ts._span; | |||
} | } | |||
inline bool Timespan::operator == (TimeDiff microseconds) const | inline bool Timespan::operator == (TimeDiff microSeconds) const | |||
{ | { | |||
return _span == microseconds; | return _span == microSeconds; | |||
} | } | |||
inline bool Timespan::operator != (TimeDiff microseconds) const | inline bool Timespan::operator != (TimeDiff microSeconds) const | |||
{ | { | |||
return _span != microseconds; | return _span != microSeconds; | |||
} | } | |||
inline bool Timespan::operator > (TimeDiff microseconds) const | inline bool Timespan::operator > (TimeDiff microSeconds) const | |||
{ | { | |||
return _span > microseconds; | return _span > microSeconds; | |||
} | } | |||
inline bool Timespan::operator >= (TimeDiff microseconds) const | inline bool Timespan::operator >= (TimeDiff microSeconds) const | |||
{ | { | |||
return _span >= microseconds; | return _span >= microSeconds; | |||
} | } | |||
inline bool Timespan::operator < (TimeDiff microseconds) const | inline bool Timespan::operator < (TimeDiff microSeconds) const | |||
{ | { | |||
return _span < microseconds; | return _span < microSeconds; | |||
} | } | |||
inline bool Timespan::operator <= (TimeDiff microseconds) const | inline bool Timespan::operator <= (TimeDiff microSeconds) const | |||
{ | { | |||
return _span <= microseconds; | return _span <= microSeconds; | |||
} | } | |||
inline void swap(Timespan& s1, Timespan& s2) | inline void swap(Timespan& s1, Timespan& s2) | |||
{ | { | |||
s1.swap(s2); | s1.swap(s2); | |||
} | } | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Timespan_INCLUDED | #endif // Foundation_Timespan_INCLUDED | |||
End of changes. 17 change blocks. | ||||
56 lines changed or deleted | 25 lines changed or added | |||
Timestamp.h | Timestamp.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: Timestamp | // Module: Timestamp | |||
// | // | |||
// Definition of the Timestamp class. | // Definition of the Timestamp class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Timestamp_INCLUDED | #ifndef Foundation_Timestamp_INCLUDED | |||
#define Foundation_Timestamp_INCLUDED | #define Foundation_Timestamp_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <ctime> | #include <ctime> | |||
namespace Poco { | namespace Poco { | |||
class Timespan; | ||||
class Foundation_API Timestamp | class Foundation_API Timestamp | |||
/// A Timestamp stores a monotonic* time value | /// A Timestamp stores a monotonic* time value | |||
/// with (theoretical) microseconds resolution. | /// with (theoretical) microseconds resolution. | |||
/// Timestamps can be compared with each other | /// Timestamps can be compared with each other | |||
/// and simple arithmetics are supported. | /// and simple arithmetics are supported. | |||
/// | /// | |||
/// [*] Note that Timestamp values are only monotonic as | /// [*] Note that Timestamp values are only monotonic as | |||
/// long as the systems's clock is monotonic as well | /// long as the systems's clock is monotonic as well | |||
/// (and not, e.g. set back). | /// (and not, e.g. set back due to time synchronization | |||
/// or other reasons). | ||||
/// | /// | |||
/// Timestamps are UTC (Coordinated Universal Time) | /// Timestamps are UTC (Coordinated Universal Time) | |||
/// based and thus independent of the timezone | /// based and thus independent of the timezone | |||
/// in effect on the system. | /// in effect on the system. | |||
/// | ||||
/// The internal reference time is the Unix epoch, | ||||
/// midnight, January 1, 1970. | ||||
{ | { | |||
public: | public: | |||
typedef Int64 TimeVal; /// monotonic UTC time value in microsecon | typedef Int64 TimeVal; | |||
d resolution | /// Monotonic UTC time value in microsecond resolution, | |||
typedef Int64 UtcTimeVal; /// monotonic UTC time value in 100 nanose | /// with base time midnight, January 1, 1970. | |||
cond resolution | ||||
typedef Int64 TimeDiff; /// difference between two timestamps in m | typedef Int64 UtcTimeVal; | |||
icroseconds | /// Monotonic UTC time value in 100 nanosecond resolution, | |||
/// with base time midnight, October 15, 1582. | ||||
typedef Int64 TimeDiff; | ||||
/// Difference between two TimeVal values in microseconds. | ||||
static const TimeVal TIMEVAL_MIN; /// Minimum timestamp value. | ||||
static const TimeVal TIMEVAL_MAX; /// Maximum timestamp value. | ||||
Timestamp(); | Timestamp(); | |||
/// Creates a timestamp with the current time. | /// Creates a timestamp with the current time. | |||
Timestamp(TimeVal tv); | Timestamp(TimeVal tv); | |||
/// Creates a timestamp from the given time value. | /// Creates a timestamp from the given time value | |||
/// (microseconds since midnight, January 1, 1970). | ||||
Timestamp(const Timestamp& other); | Timestamp(const Timestamp& other); | |||
/// Copy constructor. | /// Copy constructor. | |||
~Timestamp(); | ~Timestamp(); | |||
/// Destroys the timestamp | /// Destroys the timestamp | |||
Timestamp& operator = (const Timestamp& other); | Timestamp& operator = (const Timestamp& other); | |||
Timestamp& operator = (TimeVal tv); | Timestamp& operator = (TimeVal tv); | |||
skipping to change at line 94 | skipping to change at line 91 | |||
/// Updates the Timestamp with the current time. | /// Updates the Timestamp with the current time. | |||
bool operator == (const Timestamp& ts) const; | bool operator == (const Timestamp& ts) const; | |||
bool operator != (const Timestamp& ts) const; | bool operator != (const Timestamp& ts) const; | |||
bool operator > (const Timestamp& ts) const; | bool operator > (const Timestamp& ts) const; | |||
bool operator >= (const Timestamp& ts) const; | bool operator >= (const Timestamp& ts) const; | |||
bool operator < (const Timestamp& ts) const; | bool operator < (const Timestamp& ts) const; | |||
bool operator <= (const Timestamp& ts) const; | bool operator <= (const Timestamp& ts) const; | |||
Timestamp operator + (TimeDiff d) const; | Timestamp operator + (TimeDiff d) const; | |||
Timestamp operator + (const Timespan& span) const; | ||||
Timestamp operator - (TimeDiff d) const; | Timestamp operator - (TimeDiff d) const; | |||
Timestamp operator - (const Timespan& span) const; | ||||
TimeDiff operator - (const Timestamp& ts) const; | TimeDiff operator - (const Timestamp& ts) const; | |||
Timestamp& operator += (TimeDiff d); | Timestamp& operator += (TimeDiff d); | |||
Timestamp& operator += (const Timespan& span); | ||||
Timestamp& operator -= (TimeDiff d); | Timestamp& operator -= (TimeDiff d); | |||
Timestamp& operator -= (const Timespan& span); | ||||
std::time_t epochTime() const; | std::time_t epochTime() const; | |||
/// Returns the timestamp expressed in time_t. | /// Returns the timestamp expressed in time_t. | |||
/// time_t base time is midnight, January 1, 1970. | /// time_t base time is midnight, January 1, 1970. | |||
/// Resolution is one second. | /// Resolution is one second. | |||
UtcTimeVal utcTime() const; | UtcTimeVal utcTime() const; | |||
/// Returns the timestamp expressed in UTC-based | /// Returns the timestamp expressed in UTC-based | |||
/// time. UTC base time is midnight, October 15, 1582. | /// time. UTC base time is midnight, October 15, 1582. | |||
/// Resolution is 100 nanoseconds. | /// Resolution is 100 nanoseconds. | |||
skipping to change at line 121 | skipping to change at line 122 | |||
/// since the Unix epoch, midnight, January 1, 1970. | /// since the Unix epoch, midnight, January 1, 1970. | |||
TimeDiff elapsed() const; | TimeDiff elapsed() const; | |||
/// Returns the time elapsed since the time denoted by | /// Returns the time elapsed since the time denoted by | |||
/// the timestamp. Equivalent to Timestamp() - *this. | /// the timestamp. Equivalent to Timestamp() - *this. | |||
bool isElapsed(TimeDiff interval) const; | bool isElapsed(TimeDiff interval) const; | |||
/// Returns true iff the given interval has passed | /// Returns true iff the given interval has passed | |||
/// since the time denoted by the timestamp. | /// since the time denoted by the timestamp. | |||
TimeVal raw() const; | ||||
/// Returns the raw time value. | ||||
/// | ||||
/// Same as epochMicroseconds(). | ||||
static Timestamp fromEpochTime(std::time_t t); | static Timestamp fromEpochTime(std::time_t t); | |||
/// Creates a timestamp from a std::time_t. | /// Creates a timestamp from a std::time_t. | |||
static Timestamp fromUtcTime(UtcTimeVal val); | static Timestamp fromUtcTime(UtcTimeVal val); | |||
/// Creates a timestamp from a UTC time value. | /// Creates a timestamp from a UTC time value | |||
/// (100 nanosecond intervals since midnight, | ||||
/// October 15, 1582). | ||||
static TimeVal resolution(); | static TimeDiff resolution(); | |||
/// Returns the resolution in units per second. | /// Returns the resolution in units per second. | |||
/// Since the timestamp has microsecond resolution, | /// Since the timestamp has microsecond resolution, | |||
/// the returned value is always 1000000. | /// the returned value is always 1000000. | |||
#if defined(_WIN32) | #if defined(_WIN32) | |||
static Timestamp fromFileTimeNP(UInt32 fileTimeLow, UInt32 fileTimeH igh); | static Timestamp fromFileTimeNP(UInt32 fileTimeLow, UInt32 fileTimeH igh); | |||
void toFileTimeNP(UInt32& fileTimeLow, UInt32& fileTimeHigh) const; | void toFileTimeNP(UInt32& fileTimeLow, UInt32& fileTimeHigh) const; | |||
#endif | #endif | |||
private: | private: | |||
skipping to change at line 229 | skipping to change at line 237 | |||
return now - *this; | return now - *this; | |||
} | } | |||
inline bool Timestamp::isElapsed(Timestamp::TimeDiff interval) const | inline bool Timestamp::isElapsed(Timestamp::TimeDiff interval) const | |||
{ | { | |||
Timestamp now; | Timestamp now; | |||
Timestamp::TimeDiff diff = now - *this; | Timestamp::TimeDiff diff = now - *this; | |||
return diff >= interval; | return diff >= interval; | |||
} | } | |||
inline Timestamp::TimeVal Timestamp::resolution() | inline Timestamp::TimeDiff Timestamp::resolution() | |||
{ | { | |||
return 1000000; | return 1000000; | |||
} | } | |||
inline void swap(Timestamp& s1, Timestamp& s2) | inline void swap(Timestamp& s1, Timestamp& s2) | |||
{ | { | |||
s1.swap(s2); | s1.swap(s2); | |||
} | } | |||
inline Timestamp::TimeVal Timestamp::raw() const | ||||
{ | ||||
return _ts; | ||||
} | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Timestamp_INCLUDED | #endif // Foundation_Timestamp_INCLUDED | |||
End of changes. 15 change blocks. | ||||
43 lines changed or deleted | 42 lines changed or added | |||
Timezone.h | Timezone.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: DateTime | // Package: DateTime | |||
// Module: Timezone | // Module: Timezone | |||
// | // | |||
// Definition of the Timezone class. | // Definition of the Timezone class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Timezone_INCLUDED | #ifndef Foundation_Timezone_INCLUDED | |||
#define Foundation_Timezone_INCLUDED | #define Foundation_Timezone_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Token.h | Token.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamTokenizer | // Module: StreamTokenizer | |||
// | // | |||
// Definition of the Token class. | // Definition of the Token class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Token_INCLUDED | #ifndef Foundation_Token_INCLUDED | |||
#define Foundation_Token_INCLUDED | #define Foundation_Token_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 104 | skipping to change at line 84 | |||
virtual Class tokenClass() const; | virtual Class tokenClass() const; | |||
/// Returns the kind of the token. | /// Returns the kind of the token. | |||
const std::string& tokenString() const; | const std::string& tokenString() const; | |||
/// Returns the token's raw string. | /// Returns the token's raw string. | |||
virtual std::string asString() const; | virtual std::string asString() const; | |||
/// Returns a string representation of the token. | /// Returns a string representation of the token. | |||
#if defined(POCO_HAVE_INT64) | ||||
virtual Int64 asInteger64() const; | ||||
/// Returns a 64-bit integer representation of the token. | ||||
virtual UInt64 asUnsignedInteger64() const; | ||||
/// Returns an unsigned 64-bit integer representation of the token. | ||||
#endif | ||||
virtual int asInteger() const; | virtual int asInteger() const; | |||
/// Returns an integer representation of the token. | /// Returns an integer representation of the token. | |||
virtual unsigned asUnsignedInteger() const; | ||||
/// Returns an unsigned integer representation of the token. | ||||
virtual double asFloat() const; | virtual double asFloat() const; | |||
/// Returns a floating-point representation of the token. | /// Returns a floating-point representation of the token. | |||
virtual char asChar() const; | virtual char asChar() const; | |||
/// Returns a char representation of the token. | /// Returns a char representation of the token. | |||
bool is(Class tokenClass) const; | bool is(Class tokenClass) const; | |||
/// Returns true iff the token has the given class. | /// Returns true iff the token has the given class. | |||
protected: | protected: | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 12 lines changed or added | |||
TreeWalker.h | TreeWalker.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: DOM | // Package: DOM | |||
// Module: TreeWalker | // Module: TreeWalker | |||
// | // | |||
// Definition of the DOM TreeWalker class. | // Definition of the DOM TreeWalker class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef DOM_TreeWalker_INCLUDED | #ifndef DOM_TreeWalker_INCLUDED | |||
#define DOM_TreeWalker_INCLUDED | #define DOM_TreeWalker_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Tuple.h | Tuple.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Tuple | // Module: Tuple | |||
// | // | |||
// Definition of the Tuple class. | // Definition of the Tuple class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Tuple_INCLUDED | #ifndef Foundation_Tuple_INCLUDED | |||
#define Foundation_Tuple_INCLUDED | #define Foundation_Tuple_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TypeList.h" | #include "Poco/TypeList.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
TypeList.h | TypeList.h | |||
---|---|---|---|---|
skipping to change at line 19 | skipping to change at line 19 | |||
// | // | |||
// Implementation of the TypeList template. | // Implementation of the TypeList template. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Portions extracted and adapted from | // Portions extracted and adapted from | |||
// The Loki Library | // The Loki Library | |||
// Copyright (c) 2001 by Andrei Alexandrescu | // Copyright (c) 2001 by Andrei Alexandrescu | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_TypeList_INCLUDED | #ifndef Foundation_TypeList_INCLUDED | |||
#define Foundation_TypeList_INCLUDED | #define Foundation_TypeList_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/MetaProgramming.h" | #include "Poco/MetaProgramming.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 169 | skipping to change at line 149 | |||
typename T19 = NullTypeList> | typename T19 = NullTypeList> | |||
struct TypeListType | struct TypeListType | |||
/// TypeListType takes 1 - 20 typename arguments. | /// TypeListType takes 1 - 20 typename arguments. | |||
/// Usage: | /// Usage: | |||
/// | /// | |||
/// TypeListType<T0, T1, ... , Tn>::HeadType typeList; | /// TypeListType<T0, T1, ... , Tn>::HeadType typeList; | |||
/// | /// | |||
/// typeList is a TypeList of T0, T1, ... , Tn | /// typeList is a TypeList of T0, T1, ... , Tn | |||
{ | { | |||
private: | private: | |||
typedef typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T1 3,T14,T15,T16,T17,T18,T19>::HeadType TailType; | typedef typename TypeListType<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 ,T13,T14,T15,T16,T17,T18,T19>::HeadType TailType; | |||
public: | public: | |||
typedef TypeList<T0, TailType> HeadType; | typedef TypeList<T0, TailType> HeadType; | |||
}; | }; | |||
template <> | template <> | |||
struct TypeListType<> | struct TypeListType<> | |||
{ | { | |||
typedef NullTypeList HeadType; | typedef NullTypeList HeadType; | |||
}; | }; | |||
template <int n> | template <int n> | |||
struct Getter | struct Getter | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
Types.h | Types.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Types | // Module: Types | |||
// | // | |||
// Definitions of fixed-size integer types for various platforms | // Definitions of fixed-size integer types for various platforms | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Types_INCLUDED | #ifndef Foundation_Types_INCLUDED | |||
#define Foundation_Types_INCLUDED | #define Foundation_Types_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
skipping to change at line 68 | skipping to change at line 48 | |||
#define POCO_PTR_IS_64_BIT 1 | #define POCO_PTR_IS_64_BIT 1 | |||
typedef signed __int64 IntPtr; | typedef signed __int64 IntPtr; | |||
typedef unsigned __int64 UIntPtr; | typedef unsigned __int64 UIntPtr; | |||
#else | #else | |||
typedef signed long IntPtr; | typedef signed long IntPtr; | |||
typedef unsigned long UIntPtr; | typedef unsigned long UIntPtr; | |||
#endif | #endif | |||
#define POCO_HAVE_INT64 1 | #define POCO_HAVE_INT64 1 | |||
#elif defined(__GNUC__) || defined(__clang__) | #elif defined(__GNUC__) || defined(__clang__) | |||
// | // | |||
// Unix/GCC | // Unix/GCC/Clang | |||
// | // | |||
typedef signed char Int8; | typedef signed char Int8; | |||
typedef unsigned char UInt8; | typedef unsigned char UInt8; | |||
typedef signed short Int16; | typedef signed short Int16; | |||
typedef unsigned short UInt16; | typedef unsigned short UInt16; | |||
typedef signed int Int32; | typedef signed int Int32; | |||
typedef unsigned int UInt32; | typedef unsigned int UInt32; | |||
typedef signed long IntPtr; | #if defined(_WIN64) | |||
typedef unsigned long UIntPtr; | ||||
#if defined(__LP64__) | ||||
#define POCO_PTR_IS_64_BIT 1 | #define POCO_PTR_IS_64_BIT 1 | |||
#define POCO_LONG_IS_64_BIT 1 | typedef signed long long IntPtr; | |||
typedef signed long Int64; | typedef unsigned long long UIntPtr; | |||
typedef unsigned long UInt64; | ||||
#else | ||||
typedef signed long long Int64; | typedef signed long long Int64; | |||
typedef unsigned long long UInt64; | typedef unsigned long long UInt64; | |||
#else | ||||
typedef signed long IntPtr; | ||||
typedef unsigned long UIntPtr; | ||||
#if defined(__LP64__) | ||||
#define POCO_PTR_IS_64_BIT 1 | ||||
#define POCO_LONG_IS_64_BIT 1 | ||||
typedef signed long Int64; | ||||
typedef unsigned long UInt64; | ||||
#else | ||||
typedef signed long long Int64; | ||||
typedef unsigned long long UInt64; | ||||
#endif | ||||
#endif | #endif | |||
#define POCO_HAVE_INT64 1 | #define POCO_HAVE_INT64 1 | |||
#elif defined(__DECCXX) | #elif defined(__DECCXX) | |||
// | // | |||
// Compaq C++ | // Compaq C++ | |||
// | // | |||
typedef signed char Int8; | typedef signed char Int8; | |||
typedef unsigned char UInt8; | typedef unsigned char UInt8; | |||
typedef signed short Int16; | typedef signed short Int16; | |||
typedef unsigned short UInt16; | typedef unsigned short UInt16; | |||
End of changes. 5 change blocks. | ||||
40 lines changed or deleted | 17 lines changed or added | |||
URI.h | URI.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: URI | // Package: URI | |||
// Module: URI | // Module: URI | |||
// | // | |||
// Definition of the URI class. | // Definition of the URI class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_URI_INCLUDED | #ifndef Foundation_URI_INCLUDED | |||
#define Foundation_URI_INCLUDED | #define Foundation_URI_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <vector> | #include <vector> | |||
#include <utility> | ||||
namespace Poco { | namespace Poco { | |||
class Path; | ||||
class Foundation_API URI | class Foundation_API URI | |||
/// A Uniform Resource Identifier, as specified in RFC 3986. | /// A Uniform Resource Identifier, as specified in RFC 3986. | |||
/// | /// | |||
/// The URI class provides methods for building URIs from their | /// The URI class provides methods for building URIs from their | |||
/// parts, as well as for splitting URIs into their parts. | /// parts, as well as for splitting URIs into their parts. | |||
/// Furthermore, the class provides methods for resolving | /// Furthermore, the class provides methods for resolving | |||
/// relative URIs against base URIs. | /// relative URIs against base URIs. | |||
/// | /// | |||
/// The class automatically performs a few normalizations on | /// The class automatically performs a few normalizations on | |||
/// all URIs and URI parts passed to it: | /// all URIs and URI parts passed to it: | |||
/// * scheme identifiers are converted to lower case. | /// * scheme identifiers are converted to lower case | |||
/// * percent-encoded characters are decoded | /// * percent-encoded characters are decoded | |||
/// * optionally, dot segments are removed from paths (see normali ze()) | /// * optionally, dot segments are removed from paths (see normali ze()) | |||
{ | { | |||
public: | public: | |||
typedef std::vector<std::pair<std::string, std::string> > QueryParam | ||||
eters; | ||||
URI(); | URI(); | |||
/// Creates an empty URI. | /// Creates an empty URI. | |||
explicit URI(const std::string& uri); | explicit URI(const std::string& uri); | |||
/// Parses an URI from the given string. Throws a | /// Parses an URI from the given string. Throws a | |||
/// SyntaxException if the uri is not valid. | /// SyntaxException if the uri is not valid. | |||
explicit URI(const char* uri); | explicit URI(const char* uri); | |||
/// Parses an URI from the given string. Throws a | /// Parses an URI from the given string. Throws a | |||
/// SyntaxException if the uri is not valid. | /// SyntaxException if the uri is not valid. | |||
skipping to change at line 91 | skipping to change at line 76 | |||
URI(const std::string& scheme, const std::string& authority, const s td::string& path, const std::string& query, const std::string& fragment); | URI(const std::string& scheme, const std::string& authority, const s td::string& path, const std::string& query, const std::string& fragment); | |||
/// Creates an URI from its parts. | /// Creates an URI from its parts. | |||
URI(const URI& uri); | URI(const URI& uri); | |||
/// Copy constructor. Creates an URI from another one. | /// Copy constructor. Creates an URI from another one. | |||
URI(const URI& baseURI, const std::string& relativeURI); | URI(const URI& baseURI, const std::string& relativeURI); | |||
/// Creates an URI from a base URI and a relative URI, accor ding to | /// Creates an URI from a base URI and a relative URI, accor ding to | |||
/// the algorithm in section 5.2 of RFC 3986. | /// the algorithm in section 5.2 of RFC 3986. | |||
explicit URI(const Path& path); | ||||
/// Creates a URI from a path. | ||||
/// | ||||
/// The path will be made absolute, and a file:// URI | ||||
/// will be built from it. | ||||
~URI(); | ~URI(); | |||
/// Destroys the URI. | /// Destroys the URI. | |||
URI& operator = (const URI& uri); | URI& operator = (const URI& uri); | |||
/// Assignment operator. | /// Assignment operator. | |||
URI& operator = (const std::string& uri); | URI& operator = (const std::string& uri); | |||
/// Parses and assigns an URI from the given string. Throws a | /// Parses and assigns an URI from the given string. Throws a | |||
/// SyntaxException if the uri is not valid. | /// SyntaxException if the uri is not valid. | |||
skipping to change at line 169 | skipping to change at line 160 | |||
/// Parses the given authority part for the URI and sets | /// Parses the given authority part for the URI and sets | |||
/// the user-info, host, port components accordingly. | /// the user-info, host, port components accordingly. | |||
const std::string& getPath() const; | const std::string& getPath() const; | |||
/// Returns the path part of the URI. | /// Returns the path part of the URI. | |||
void setPath(const std::string& path); | void setPath(const std::string& path); | |||
/// Sets the path part of the URI. | /// Sets the path part of the URI. | |||
std::string getQuery() const; | std::string getQuery() const; | |||
/// Returns the query part of the URI. | /// Returns the decoded query part of the URI. | |||
/// | ||||
/// Note that encoded ampersand characters ('&', "%26") | ||||
/// will be decoded, which could cause ambiguities if the qu | ||||
ery | ||||
/// string contains multiple parameters and a parameter name | ||||
/// or value contains an ampersand as well. | ||||
/// In such a case it's better to use getRawQuery() or | ||||
/// getQueryParameters(). | ||||
void setQuery(const std::string& query); | void setQuery(const std::string& query); | |||
/// Sets the query part of the URI. | /// Sets the query part of the URI. | |||
/// | ||||
/// The query string will be percent-encoded. If the query | ||||
/// already contains percent-encoded characters, these | ||||
/// will be double-encoded, which is probably not what's | ||||
/// intended by the caller. Furthermore, ampersand ('&') | ||||
/// characters in the query will not be encoded. This could | ||||
/// lead to ambiguity issues if the query string contains mu | ||||
ltiple | ||||
/// name-value parameters separated by ampersand, and if any | ||||
/// name or value also contains an ampersand. In such a | ||||
/// case, it's better to use setRawQuery() with a properly | ||||
/// percent-encoded query string, or use addQueryParameter() | ||||
/// or setQueryParameters(), which take care of appropriate | ||||
/// percent encoding of parameter names and values. | ||||
void addQueryParameter(const std::string& param, const std::string& | ||||
val = ""); | ||||
/// Adds "param=val" to the query; "param" may not be empty. | ||||
/// If val is empty, only '=' is appended to the parameter. | ||||
/// | ||||
/// In addition to regular encoding, function also encodes ' | ||||
&' and '=', | ||||
/// if found in param or val. | ||||
const std::string& getRawQuery() const; | const std::string& getRawQuery() const; | |||
/// Returns the unencoded query part of the URI. | /// Returns the query string in raw form, which usually | |||
/// means percent encoded. | ||||
void setRawQuery(const std::string& query); | void setRawQuery(const std::string& query); | |||
/// Sets the query part of the URI. | /// Sets the query part of the URI. | |||
/// | ||||
/// The given query string must be properly percent-encoded. | ||||
QueryParameters getQueryParameters() const; | ||||
/// Returns the decoded query string parameters as a vector | ||||
/// of name-value pairs. | ||||
void setQueryParameters(const QueryParameters& params); | ||||
/// Sets the query part of the URI from a vector | ||||
/// of query parameters. | ||||
/// | ||||
/// Calls addQueryParameter() for each parameter name and va | ||||
lue. | ||||
const std::string& getFragment() const; | const std::string& getFragment() const; | |||
/// Returns the fragment part of the URI. | /// Returns the fragment part of the URI. | |||
void setFragment(const std::string& fragment); | void setFragment(const std::string& fragment); | |||
/// Sets the fragment part of the URI. | /// Sets the fragment part of the URI. | |||
void setPathEtc(const std::string& pathEtc); | void setPathEtc(const std::string& pathEtc); | |||
/// Sets the path, query and fragment parts of the URI. | /// Sets the path, query and fragment parts of the URI. | |||
skipping to change at line 245 | skipping to change at line 276 | |||
/// is prepended in accordance with section 3.3 of RFC 3986. | /// is prepended in accordance with section 3.3 of RFC 3986. | |||
void getPathSegments(std::vector<std::string>& segments); | void getPathSegments(std::vector<std::string>& segments); | |||
/// Places the single path segments (delimited by slashes) i nto the | /// Places the single path segments (delimited by slashes) i nto the | |||
/// given vector. | /// given vector. | |||
static void encode(const std::string& str, const std::string& reserv ed, std::string& encodedStr); | static void encode(const std::string& str, const std::string& reserv ed, std::string& encodedStr); | |||
/// URI-encodes the given string by escaping reserved and no n-ASCII | /// URI-encodes the given string by escaping reserved and no n-ASCII | |||
/// characters. The encoded string is appended to encodedStr . | /// characters. The encoded string is appended to encodedStr . | |||
static void decode(const std::string& str, std::string& decodedStr); | static void decode(const std::string& str, std::string& decodedStr, bool plusAsSpace = false); | |||
/// URI-decodes the given string by replacing percent-encode d | /// URI-decodes the given string by replacing percent-encode d | |||
/// characters with the actual character. The decoded string | /// characters with the actual character. The decoded string | |||
/// is appended to decodedStr. | /// is appended to decodedStr. | |||
/// | ||||
/// When plusAsSpace is true, non-encoded plus signs in the | ||||
query are decoded as spaces. | ||||
/// (http://www.w3.org/TR/html401/interact/forms.html#h-17.1 | ||||
3.4.1) | ||||
protected: | protected: | |||
bool equals(const URI& uri) const; | bool equals(const URI& uri) const; | |||
/// Returns true if both uri's are equivalent. | /// Returns true if both uri's are equivalent. | |||
bool isWellKnownPort() const; | bool isWellKnownPort() const; | |||
/// Returns true if the URI's port number is a well-known on e | /// Returns true if the URI's port number is a well-known on e | |||
/// (for example, 80, if the scheme is http). | /// (for example, 80, if the scheme is http). | |||
unsigned short getWellKnownPort() const; | unsigned short getWellKnownPort() const; | |||
End of changes. 12 change blocks. | ||||
36 lines changed or deleted | 67 lines changed or added | |||
URIStreamFactory.h | URIStreamFactory.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: URI | // Package: URI | |||
// Module: URIStreamFactory | // Module: URIStreamFactory | |||
// | // | |||
// Definition of the URIStreamFactory class. | // Definition of the URIStreamFactory class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_URIStreamFactory_INCLUDED | #ifndef Foundation_URIStreamFactory_INCLUDED | |||
#define Foundation_URIStreamFactory_INCLUDED | #define Foundation_URIStreamFactory_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
URIStreamOpener.h | URIStreamOpener.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: URI | // Package: URI | |||
// Module: URIStreamOpener | // Module: URIStreamOpener | |||
// | // | |||
// Definition of the URIStreamOpener class. | // Definition of the URIStreamOpener class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_URIStreamOpener_INCLUDED | #ifndef Foundation_URIStreamOpener_INCLUDED | |||
#define Foundation_URIStreamOpener_INCLUDED | #define Foundation_URIStreamOpener_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include <istream> | #include <istream> | |||
#include <map> | #include <map> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UTF16Encoding.h | UTF16Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UTF16Encoding | // Module: UTF16Encoding | |||
// | // | |||
// Definition of the UTF16Encoding class. | // Definition of the UTF16Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UTF16Encoding_INCLUDED | #ifndef Foundation_UTF16Encoding_INCLUDED | |||
#define Foundation_UTF16Encoding_INCLUDED | #define Foundation_UTF16Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UTF32Encoding.h | UTF32Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UTF32Encoding | // Module: UTF32Encoding | |||
// | // | |||
// Definition of the UTF32Encoding class. | // Definition of the UTF32Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UTF32Encoding_INCLUDED | #ifndef Foundation_UTF32Encoding_INCLUDED | |||
#define Foundation_UTF32Encoding_INCLUDED | #define Foundation_UTF32Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UTF8Encoding.h | UTF8Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UTF8Encoding | // Module: UTF8Encoding | |||
// | // | |||
// Definition of the UTF8Encoding class. | // Definition of the UTF8Encoding class. | |||
// | // | |||
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UTF8Encoding_INCLUDED | #ifndef Foundation_UTF8Encoding_INCLUDED | |||
#define Foundation_UTF8Encoding_INCLUDED | #define Foundation_UTF8Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UTF8String.h | UTF8String.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UTF8String | // Module: UTF8String | |||
// | // | |||
// Definition of the UTF8 string functions. | // Definition of the UTF8 string functions. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UTF8String_INCLUDED | #ifndef Foundation_UTF8String_INCLUDED | |||
#define Foundation_UTF8String_INCLUDED | #define Foundation_UTF8String_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
struct Foundation_API UTF8 | struct Foundation_API UTF8 | |||
/// This class provides static methods that are UTF-8 capable varian ts | /// This class provides static methods that are UTF-8 capable varian ts | |||
/// of the same functions in Poco/String.h. | /// of the same functions in Poco/String.h. | |||
/// | /// | |||
/// The various variants of icompare() provide case insensitive comp arison | /// The various variants of icompare() provide case insensitive comp arison | |||
/// for UTF-8 encoded strings. | /// for UTF-8 encoded strings. | |||
/// | /// | |||
/// toUpper(), toUpperInPlace(), toLower() and toLowerInPlace() prov ide | /// toUpper(), toUpperInPlace(), toLower() and toLowerInPlace() prov ide | |||
/// Unicode-based character case transformation for UTF-8 encoded st rings. | /// Unicode-based character case transformation for UTF-8 encoded st rings. | |||
/// | ||||
/// removeBOM() removes the UTF-8 Byte Order Mark sequence (0xEF, 0x | ||||
BB, 0xBF) | ||||
/// from the beginning of the given string, if it's there. | ||||
{ | { | |||
static int icompare(const std::string& str, std::string::size_type p os, std::string::size_type n, std::string::const_iterator it2, std::string: :const_iterator end2); | static int icompare(const std::string& str, std::string::size_type p os, std::string::size_type n, std::string::const_iterator it2, std::string: :const_iterator end2); | |||
static int icompare(const std::string& str1, const std::string& str2 ); | static int icompare(const std::string& str1, const std::string& str2 ); | |||
static int icompare(const std::string& str1, std::string::size_type n1, const std::string& str2, std::string::size_type n2); | static int icompare(const std::string& str1, std::string::size_type n1, const std::string& str2, std::string::size_type n2); | |||
static int icompare(const std::string& str1, std::string::size_type n, const std::string& str2); | static int icompare(const std::string& str1, std::string::size_type n, const std::string& str2); | |||
static int icompare(const std::string& str1, std::string::size_type pos, std::string::size_type n, const std::string& str2); | static int icompare(const std::string& str1, std::string::size_type pos, std::string::size_type n, const std::string& str2); | |||
static int icompare(const std::string& str1, std::string::size_type pos1, std::string::size_type n1, const std::string& str2, std::string::size _type pos2, std::string::size_type n2); | static int icompare(const std::string& str1, std::string::size_type pos1, std::string::size_type n1, const std::string& str2, std::string::size _type pos2, std::string::size_type n2); | |||
static int icompare(const std::string& str1, std::string::size_type pos1, std::string::size_type n, const std::string& str2, std::string::size_ type pos2); | static int icompare(const std::string& str1, std::string::size_type pos1, std::string::size_type n, const std::string& str2, std::string::size_ type pos2); | |||
static int icompare(const std::string& str, std::string::size_type p os, std::string::size_type n, const std::string::value_type* ptr); | static int icompare(const std::string& str, std::string::size_type p os, std::string::size_type n, const std::string::value_type* ptr); | |||
static int icompare(const std::string& str, std::string::size_type p os, const std::string::value_type* ptr); | static int icompare(const std::string& str, std::string::size_type p os, const std::string::value_type* ptr); | |||
static int icompare(const std::string& str, const std::string::value _type* ptr); | static int icompare(const std::string& str, const std::string::value _type* ptr); | |||
static std::string toUpper(const std::string& str); | static std::string toUpper(const std::string& str); | |||
static std::string& toUpperInPlace(std::string& str); | static std::string& toUpperInPlace(std::string& str); | |||
static std::string toLower(const std::string& str); | static std::string toLower(const std::string& str); | |||
static std::string& toLowerInPlace(std::string& str); | static std::string& toLowerInPlace(std::string& str); | |||
static void removeBOM(std::string& str); | ||||
/// Remove the UTF-8 Byte Order Mark sequence (0xEF, 0xBB, 0 | ||||
xBF) | ||||
/// from the beginning of the string, if it's there. | ||||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_UTF8String_INCLUDED | #endif // Foundation_UTF8String_INCLUDED | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 10 lines changed or added | |||
UTFString.h | UTFString.h | |||
---|---|---|---|---|
// | // | |||
// Types.h | // UTFString.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/UTFString.h#2 $ | // $Id: //poco/1.4/Foundation/include/Poco/UTFString.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UTFString | // Module: UTFString | |||
// | // | |||
// Definitions of strings for UTF encodings. | // Definitions of strings for UTF encodings. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UTFString_INCLUDED | #ifndef Foundation_UTFString_INCLUDED | |||
#define Foundation_UTFString_INCLUDED | #define Foundation_UTFString_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Types.h" | ||||
#include <string> | #include <string> | |||
namespace Poco { | namespace Poco { | |||
// UTF string types | struct UTF16CharTraits | |||
{ | ||||
typedef std::fpos<mbstate_t> u16streampos; | ||||
typedef UInt16 char_type; | ||||
typedef int int_type; | ||||
typedef std::streamoff off_type; | ||||
typedef u16streampos pos_type; | ||||
typedef mbstate_t state_type; | ||||
static void assign(char_type& c1, const char_type& c2) | ||||
{ | ||||
c1 = c2; | ||||
} | ||||
static bool eq(char_type c1, char_type c2) | ||||
{ | ||||
return c1 == c2; | ||||
} | ||||
static bool lt(char_type c1, char_type c2) | ||||
{ | ||||
return c1 < c2; | ||||
} | ||||
static int compare(const char_type* s1, const char_type* s2, size_t | ||||
n) | ||||
{ | ||||
for (; n; --n, ++s1, ++s2) | ||||
{ | ||||
if (lt(*s1, *s2)) | ||||
return -1; | ||||
if (lt(*s2, *s1)) | ||||
return 1; | ||||
} | ||||
return 0; | ||||
} | ||||
static size_t length(const char_type* s) | ||||
{ | ||||
size_t len = 0; | ||||
for (; !eq(*s, char_type(0)); ++s) | ||||
++len; | ||||
return len; | ||||
} | ||||
static const char_type* find(const char_type* s, size_t n, const cha | ||||
r_type& a) | ||||
{ | ||||
for (; n; --n) | ||||
{ | ||||
if (eq(*s, a)) | ||||
return s; | ||||
++s; | ||||
} | ||||
return 0; | ||||
} | ||||
static char_type* move(char_type* s1, const char_type* s2, size_t n) | ||||
{ | ||||
char_type* r = s1; | ||||
if (s1 < s2) | ||||
{ | ||||
for (; n; --n, ++s1, ++s2) | ||||
assign(*s1, *s2); | ||||
} | ||||
else if (s2 < s1) | ||||
{ | ||||
s1 += n; | ||||
s2 += n; | ||||
for (; n; --n) | ||||
assign(*--s1, *--s2); | ||||
} | ||||
return r; | ||||
} | ||||
static char_type* copy(char_type* s1, const char_type* s2, size_t n) | ||||
{ | ||||
poco_assert(s2 < s1 || s2 >= s1 + n); | ||||
char_type* r = s1; | ||||
for (; n; --n, ++s1, ++s2) | ||||
assign(*s1, *s2); | ||||
return r; | ||||
} | ||||
static char_type* assign(char_type* s, size_t n, char_type a) | ||||
{ | ||||
char_type* r = s; | ||||
for (; n; --n, ++s) | ||||
assign(*s, a); | ||||
return r; | ||||
} | ||||
static int_type not_eof(int_type c) | ||||
{ | ||||
return eq_int_type(c, eof()) ? ~eof() : c; | ||||
} | ||||
static char_type to_char_type(int_type c) | ||||
{ | ||||
return char_type(c); | ||||
} | ||||
static int_type to_int_type(char_type c) | ||||
{ | ||||
return int_type(c); | ||||
} | ||||
static bool eq_int_type(int_type c1, int_type c2) | ||||
{ | ||||
return c1 == c2; | ||||
} | ||||
static int_type eof() | ||||
{ | ||||
return int_type(0xDFFF); | ||||
} | ||||
}; | ||||
struct UTF32CharTraits | ||||
{ | ||||
typedef std::fpos<mbstate_t> u32streampos; | ||||
typedef UInt32 char_type; | ||||
typedef int int_type; | ||||
typedef std::streamoff off_type; | ||||
typedef u32streampos pos_type; | ||||
typedef mbstate_t state_type; | ||||
static void assign(char_type& c1, const char_type& c2) | ||||
{ | ||||
c1 = c2; | ||||
} | ||||
static bool eq(char_type c1, char_type c2) | ||||
{ | ||||
return c1 == c2; | ||||
} | ||||
static bool lt(char_type c1, char_type c2) | ||||
{ | ||||
return c1 < c2; | ||||
} | ||||
static int compare(const char_type* s1, const char_type* s2, size_t | ||||
n) | ||||
{ | ||||
for (; n; --n, ++s1, ++s2) | ||||
{ | ||||
if (lt(*s1, *s2)) | ||||
return -1; | ||||
if (lt(*s2, *s1)) | ||||
return 1; | ||||
} | ||||
return 0; | ||||
} | ||||
static size_t length(const char_type* s) | ||||
{ | ||||
size_t len = 0; | ||||
for (; !eq(*s, char_type(0)); ++s) | ||||
++len; | ||||
return len; | ||||
} | ||||
static const char_type* find(const char_type* s, size_t n, const cha | ||||
r_type& a) | ||||
{ | ||||
for (; n; --n) | ||||
{ | ||||
if (eq(*s, a)) | ||||
return s; | ||||
++s; | ||||
} | ||||
return 0; | ||||
} | ||||
static char_type* move(char_type* s1, const char_type* s2, size_t n) | ||||
{ | ||||
char_type* r = s1; | ||||
if (s1 < s2) | ||||
{ | ||||
for (; n; --n, ++s1, ++s2) | ||||
assign(*s1, *s2); | ||||
} | ||||
else if (s2 < s1) | ||||
{ | ||||
s1 += n; | ||||
s2 += n; | ||||
for (; n; --n) | ||||
assign(*--s1, *--s2); | ||||
} | ||||
return r; | ||||
} | ||||
static char_type* copy(char_type* s1, const char_type* s2, size_t n) | ||||
{ | ||||
poco_assert(s2 < s1 || s2 >= s1 + n); | ||||
char_type* r = s1; | ||||
for (; n; --n, ++s1, ++s2) | ||||
assign(*s1, *s2); | ||||
return r; | ||||
} | ||||
static char_type* assign(char_type* s, size_t n, char_type a) | ||||
{ | ||||
char_type* r = s; | ||||
for (; n; --n, ++s) | ||||
assign(*s, a); | ||||
return r; | ||||
} | ||||
static int_type not_eof(int_type c) | ||||
{ | ||||
return eq_int_type(c, eof()) ? ~eof() : c; | ||||
} | ||||
static char_type to_char_type(int_type c) | ||||
{ | ||||
return char_type(c); | ||||
} | ||||
static int_type to_int_type(char_type c) | ||||
{ | ||||
return int_type(c); | ||||
} | ||||
static bool eq_int_type(int_type c1, int_type c2) | ||||
{ | ||||
return c1 == c2; | ||||
} | ||||
static int_type eof() | ||||
{ | ||||
return int_type(0xDFFF); | ||||
} | ||||
}; | ||||
//#if defined(POCO_ENABLE_CPP11) //TODO | //#if defined(POCO_ENABLE_CPP11) //TODO | |||
// typedef char16_t UTF16Char; | // typedef char16_t UTF16Char; | |||
// typedef std::u16string UTF16String; | // typedef std::u16string UTF16String; | |||
// typedef char32_t UTF32Char; | // typedef char32_t UTF32Char; | |||
// typedef std::u32string UTF32String; | // typedef std::u32string UTF32String; | |||
//#else | //#else | |||
#ifdef POCO_NO_WSTRING | #ifdef POCO_NO_WSTRING | |||
typedef Poco::UInt16 UTF16Char; | typedef Poco::UInt16 UTF16C | |||
typedef std::basic_string<UInt16> UTF16String; | har; | |||
typedef UInt32 UTF32Char; | typedef std::basic_string<UTF16Char, UTF16CharTraits> UTF16S | |||
typedef std::basic_string<UInt32> UTF32String; | tring; | |||
typedef UInt32 UTF32C | ||||
har; | ||||
typedef std::basic_string<UTF32Char, UTF32CharTraits> UTF32S | ||||
tring; | ||||
#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 | |||
typedef std::wstring UTF16String; | UTF16Char; | |||
typedef UInt32 UTF32Char; | typedef std::wstring | |||
typedef std::basic_string<UInt32> UTF32String; | UTF16String; | |||
typedef UInt32 | ||||
UTF32Char; | ||||
typedef std::basic_string<UTF32Char, UTF32CharTraits | ||||
> UTF32String; | ||||
#elif defined(__SIZEOF_WCHAR_T__) //gcc | #elif defined(__SIZEOF_WCHAR_T__) //gcc | |||
#if (__SIZEOF_WCHAR_T__ == 2) | #if (__SIZEOF_WCHAR_T__ == 2) | |||
typedef wchar_t UTF16Char; | typedef wchar_t | |||
typedef std::wstring UTF16Strin | UTF16Char; | |||
g; | typedef std::wstring | |||
typedef UInt32 UTF32Char; | UTF16String; | |||
typedef std::basic_string<UInt32> UTF32Strin | typedef UInt32 | |||
g; | UTF32Char; | |||
typedef std::basic_string<UTF32Char, UTF32Ch | ||||
arTraits> UTF32String; | ||||
#elif (__SIZEOF_WCHAR_T__ == 4) | #elif (__SIZEOF_WCHAR_T__ == 4) | |||
typedef Poco::UInt16 UTF16Char; | typedef Poco::UInt16 | |||
typedef std::basic_string<UInt16> UTF16Strin | UTF16Char; | |||
g; | typedef std::basic_string<UTF16Char, UTF16Ch | |||
typedef wchar_t UTF32Char; | arTraits> UTF16String; | |||
typedef std::wstring UTF32Strin | typedef wchar_t | |||
g; | UTF32Char; | |||
typedef std::wstring | ||||
UTF32String; | ||||
#endif | #endif | |||
#else // default to 32-bit wchar_t | #else // default to 32-bit wchar_t | |||
typedef Poco::UInt16 UTF16Char; | typedef Poco::UInt16 | |||
typedef std::basic_string<UInt16> UTF16String; | UTF16Char; | |||
typedef wchar_t UTF32Char; | typedef std::basic_string<UTF16Char, UTF16CharTraits | |||
typedef std::wstring UTF32String; | > UTF16String; | |||
typedef wchar_t | ||||
UTF32Char; | ||||
typedef std::wstring | ||||
UTF32String; | ||||
#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 | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_UTFString_INCLUDED | #endif // Foundation_UTFString_INCLUDED | |||
End of changes. 9 change blocks. | ||||
58 lines changed or deleted | 278 lines changed or added | |||
UUID.h | UUID.h | |||
---|---|---|---|---|
// | // | |||
// UUID.h | // UUID.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/UUID.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/UUID.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: UUID | // Package: UUID | |||
// Module: UUID | // Module: UUID | |||
// | // | |||
// Definition of the UUID class. | // Definition of the UUID class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UUID_INCLUDED | #ifndef Foundation_UUID_INCLUDED | |||
#define Foundation_UUID_INCLUDED | #define Foundation_UUID_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API UUID | class Foundation_API UUID | |||
/// A UUID is an identifier that is unique across both space and tim e, | /// A UUID is an identifier that is unique across both space and tim e, | |||
/// with respect to the space of all UUIDs. Since a UUID is a fixed | /// with respect to the space of all UUIDs. Since a UUID is a fixed | |||
/// size and contains a time field, it is possible for values to | /// size and contains a time field, it is possible for values to | |||
/// rollover (around A.D. 3400, depending on the specific algorithm | /// rollover (around A.D. 3400, depending on the specific algorithm | |||
/// used). A UUID can be used for multiple purposes, from tagging | /// used). A UUID can be used for multiple purposes, from tagging | |||
/// objects with an extremely short lifetime, to reliably identifyin g | /// objects with an extremely short lifetime, to reliably identifyin g | |||
/// very persistent objects across a network. | /// very persistent objects across a network. | |||
/// | ||||
/// This class implements a Universal Unique Identifier, | /// This class implements a Universal Unique Identifier, | |||
/// as specified in Appendix A of the DCE 1.1 Remote Procedure | /// as specified in Appendix A of the DCE 1.1 Remote Procedure | |||
/// Call Specification (http://www.opengroup.org/onlinepubs/9629399/ ), | /// Call Specification (http://www.opengroup.org/onlinepubs/9629399/ ), | |||
/// RFC 2518 (WebDAV), section 6.4.1 and the UUIDs and GUIDs interne t | /// RFC 2518 (WebDAV), section 6.4.1 and the UUIDs and GUIDs interne t | |||
/// draft by Leach/Salz from February, 1998 | /// draft by Leach/Salz from February, 1998 | |||
/// (http://ftp.ics.uci.edu/pub/ietf/webdav/uuid-guid/draft-leach-uu | /// (http://www.ics.uci.edu/~ejw/authoring/uuid-guid/draft-leach-uui | |||
ids-guids-01.txt) | ds-guids-01.txt) | |||
/// and also | /// and also http://tools.ietf.org/html/draft-mealling-uuid-urn-05 | |||
/// http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-03.t | ||||
xt | ||||
{ | { | |||
public: | public: | |||
enum Version | enum Version | |||
{ | { | |||
UUID_TIME_BASED = 0x01, | UUID_TIME_BASED = 0x01, | |||
UUID_DCE_UID = 0x02, | UUID_DCE_UID = 0x02, | |||
UUID_NAME_BASED = 0x03, | UUID_NAME_BASED = 0x03, | |||
UUID_RANDOM = 0x04 | UUID_RANDOM = 0x04 | |||
}; | }; | |||
End of changes. 4 change blocks. | ||||
38 lines changed or deleted | 6 lines changed or added | |||
UUIDGenerator.h | UUIDGenerator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: UUID | // Package: UUID | |||
// Module: UUID | // Module: UUID | |||
// | // | |||
// Definition of the UUIDGenerator class. | // Definition of the UUIDGenerator class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UUIDGenerator_INCLUDED | #ifndef Foundation_UUIDGenerator_INCLUDED | |||
#define Foundation_UUIDGenerator_INCLUDED | #define Foundation_UUIDGenerator_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UUID.h" | #include "Poco/UUID.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/Random.h" | #include "Poco/Random.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UnWindows.h | UnWindows.h | |||
---|---|---|---|---|
skipping to change at line 34 | skipping to change at line 34 | |||
// translation unit or not, this might be changed to GetUserNameA/GetUserNa meW, or not. | // translation unit or not, this might be changed to GetUserNameA/GetUserNa meW, or not. | |||
// While, due to naming conventions used, this is less of a problem in POCO , some | // While, due to naming conventions used, this is less of a problem in POCO , some | |||
// of the users of POCO might use a different naming convention where this can become | // of the users of POCO might use a different naming convention where this can become | |||
// a problem. | // a problem. | |||
// | // | |||
// To disable the #undef's, compile POCO with the POCO_NO_UNWINDOWS macro # define'd. | // To disable the #undef's, compile POCO with the POCO_NO_UNWINDOWS macro # define'd. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UnWindows_INCLUDED | #ifndef Foundation_UnWindows_INCLUDED | |||
#define Foundation_UnWindows_INCLUDED | #define Foundation_UnWindows_INCLUDED | |||
// Reduce bloat | // Reduce bloat | |||
#if defined(_WIN32) | #if defined(_WIN32) | |||
#if !defined(WIN32_LEAN_AND_MEAN) && !defined(POCO_BLOATED_WIN32) | #if !defined(WIN32_LEAN_AND_MEAN) && !defined(POCO_BLOATED_WIN32) | |||
#define WIN32_LEAN_AND_MEAN | #define WIN32_LEAN_AND_MEAN | |||
#endif | #endif | |||
#endif | #endif | |||
#if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0501) | // Microsoft Visual C++ includes copies of the Windows header files | |||
#error Unsupported Windows version. | // that were current at the time Visual C++ was released. | |||
// The Windows header files use macros to indicate which versions | ||||
// of Windows support many programming elements. Therefore, you must | ||||
// define these macros to use new functionality introduced in each | ||||
// major operating system release. (Individual header files may use | ||||
// different macros; therefore, if compilation problems occur, check | ||||
// the header file that contains the definition for conditional | ||||
// definitions.) For more information, see SdkDdkVer.h. | ||||
#if !defined(_WIN32_WCE) | ||||
#if defined(_WIN32_WINNT) | ||||
#if (_WIN32_WINNT < 0x0501) | ||||
#error Unsupported Windows version. | ||||
#endif | ||||
#elif defined(NTDDI_VERSION) | ||||
#if (NTDDI_VERSION < 0x05010100) | ||||
#error Unsupported Windows version. | ||||
#endif | ||||
#elif !defined(_WIN32_WINNT) | #elif !defined(_WIN32_WINNT) | |||
// define minimum supported | // Define minimum supported version. | |||
// This can be changed, if needed. | ||||
// If allowed (see POCO_MIN_WINDOWS_OS_SUPPORT | ||||
// below), Platform_WIN32.h will do its | ||||
// best to determine the appropriate values | ||||
// and may redefine these. See Platform_WIN32.h | ||||
// for details. | ||||
#define _WIN32_WINNT 0x0501 | #define _WIN32_WINNT 0x0501 | |||
#define NTDDI_VERSION 0x05010100 | ||||
#endif | ||||
#endif | #endif | |||
// To prevent Platform_WIN32.h to modify version defines, | ||||
// uncomment this, otherwise versions will be automatically | ||||
// discovered in Platform_WIN32.h. | ||||
// #define POCO_FORCE_MIN_WINDOWS_OS_SUPPORT | ||||
#include <windows.h> | #include <windows.h> | |||
#if !defined(POCO_NO_UNWINDOWS) | #if !defined(POCO_NO_UNWINDOWS) | |||
// A list of annoying macros to #undef. | // A list of annoying macros to #undef. | |||
// Extend as required. | // Extend as required. | |||
#undef GetBinaryType | #undef GetBinaryType | |||
#undef GetShortPathName | #undef GetShortPathName | |||
#undef GetLongPathName | #undef GetLongPathName | |||
#undef GetEnvironmentStrings | #undef GetEnvironmentStrings | |||
#undef SetEnvironmentStrings | #undef SetEnvironmentStrings | |||
End of changes. 5 change blocks. | ||||
35 lines changed or deleted | 34 lines changed or added | |||
UnbufferedStreamBuf.h | UnbufferedStreamBuf.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Streams | // Package: Streams | |||
// Module: StreamBuf | // Module: StreamBuf | |||
// | // | |||
// Definition of template BasicUnbufferedStreamBuf and class UnbufferedStre amBuf. | // Definition of template BasicUnbufferedStreamBuf and class UnbufferedStre amBuf. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UnbufferedStreamBuf_INCLUDED | #ifndef Foundation_UnbufferedStreamBuf_INCLUDED | |||
#define Foundation_UnbufferedStreamBuf_INCLUDED | #define Foundation_UnbufferedStreamBuf_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/StreamUtil.h" | #include "Poco/StreamUtil.h" | |||
#include <streambuf> | #include <streambuf> | |||
#include <iosfwd> | #include <iosfwd> | |||
#include <ios> | #include <ios> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Unicode.h | Unicode.h | |||
---|---|---|---|---|
// | // | |||
// Unicode.h | // Unicode.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/Unicode.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/Unicode.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Unicode | // Module: Unicode | |||
// | // | |||
// Definition of the Unicode class. | // Definition of the Unicode class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Unicode_INCLUDED | #ifndef Foundation_Unicode_INCLUDED | |||
#define Foundation_Unicode_INCLUDED | #define Foundation_Unicode_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Unicode | class Foundation_API Unicode | |||
skipping to change at line 187 | skipping to change at line 167 | |||
UCP_LEPCHA, | UCP_LEPCHA, | |||
UCP_LYCIAN, | UCP_LYCIAN, | |||
UCP_LYDIAN, | UCP_LYDIAN, | |||
UCP_OL_CHIKI, | UCP_OL_CHIKI, | |||
UCP_REJANG, | UCP_REJANG, | |||
UCP_SAURASHTRA, | UCP_SAURASHTRA, | |||
UCP_SUNDANESE, | UCP_SUNDANESE, | |||
UCP_VAI | UCP_VAI | |||
}; | }; | |||
enum | ||||
{ | ||||
UCP_MAX_CODEPOINT = 0x10FFFF | ||||
}; | ||||
struct CharacterProperties | struct CharacterProperties | |||
/// This structure holds the character properties | /// This structure holds the character properties | |||
/// of an Unicode character. | /// of an Unicode character. | |||
{ | { | |||
CharacterCategory category; | CharacterCategory category; | |||
CharacterType type; | CharacterType type; | |||
Script script; | Script script; | |||
}; | }; | |||
static void properties(int ch, CharacterProperties& props); | static void properties(int ch, CharacterProperties& props); | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
UnicodeConverter.h | UnicodeConverter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: UnicodeConverter | // Module: UnicodeConverter | |||
// | // | |||
// Definition of the UnicodeConverter class. | // Definition of the UnicodeConverter class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UnicodeConverter_INCLUDED | #ifndef Foundation_UnicodeConverter_INCLUDED | |||
#define Foundation_UnicodeConverter_INCLUDED | #define Foundation_UnicodeConverter_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/UTFString.h" | #include "Poco/UTFString.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 128 | skipping to change at line 108 | |||
convert(f, t); | convert(f, t); | |||
} | } | |||
template <typename F, typename T> | template <typename F, typename T> | |||
static void toUTF8(const F& f, std::size_t l, T& t) | static void toUTF8(const F& f, std::size_t l, T& t) | |||
{ | { | |||
convert(f, l, t); | convert(f, l, t); | |||
} | } | |||
template <typename T> | template <typename T> | |||
static size_t UTFStrlen(const T* ptr) | static T to(const char* pChar) | |||
{ | ||||
T utfStr; | ||||
Poco::UnicodeConverter::convert(pChar, utfStr); | ||||
return utfStr; | ||||
} | ||||
template <typename T> | ||||
static T to(const std::string& str) | ||||
{ | ||||
T utfStr; | ||||
Poco::UnicodeConverter::convert(str, utfStr); | ||||
return utfStr; | ||||
} | ||||
template <typename T> | ||||
static std::size_t UTFStrlen(const T* ptr) | ||||
/// Returns the length (in characters) of a zero-terminated UTF string. | /// Returns the length (in characters) of a zero-terminated UTF string. | |||
{ | { | |||
if (ptr == 0) return 0; | if (ptr == 0) return 0; | |||
const T* p; | const T* p; | |||
for (p = ptr; *p; ++p); | for (p = ptr; *p; ++p); | |||
return p - ptr; | return p - ptr; | |||
} | } | |||
}; | }; | |||
} // namespace Poco | } // namespace Poco | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 18 lines changed or added | |||
UniqueAccessExpireCache.h | UniqueAccessExpireCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueAccessExpireCache | // Module: UniqueAccessExpireCache | |||
// | // | |||
// Definition of the UniqueAccessExpireCache class. | // Definition of the UniqueAccessExpireCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueAccessExpireCache_INCLUDED | #ifndef Foundation_UniqueAccessExpireCache_INCLUDED | |||
#define Foundation_UniqueAccessExpireCache_INCLUDED | #define Foundation_UniqueAccessExpireCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/UniqueAccessExpireStrategy.h" | #include "Poco/UniqueAccessExpireStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UniqueAccessExpireLRUCache.h | UniqueAccessExpireLRUCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueAccessExpireLRUCache | // Module: UniqueAccessExpireLRUCache | |||
// | // | |||
// Definition of the UniqueAccessExpireLRUCache class. | // Definition of the UniqueAccessExpireLRUCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueAccessExpireLRUCache_INCLUDED | #ifndef Foundation_UniqueAccessExpireLRUCache_INCLUDED | |||
#define Foundation_UniqueAccessExpireLRUCache_INCLUDED | #define Foundation_UniqueAccessExpireLRUCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/StrategyCollection.h" | #include "Poco/StrategyCollection.h" | |||
#include "Poco/UniqueAccessExpireStrategy.h" | #include "Poco/UniqueAccessExpireStrategy.h" | |||
#include "Poco/LRUStrategy.h" | #include "Poco/LRUStrategy.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UniqueAccessExpireStrategy.h | UniqueAccessExpireStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueAccessExpireStrategy | // Module: UniqueAccessExpireStrategy | |||
// | // | |||
// Definition of the UniqueAccessExpireStrategy class. | // Definition of the UniqueAccessExpireStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueAccessExpireStrategy_INCLUDED | #ifndef Foundation_UniqueAccessExpireStrategy_INCLUDED | |||
#define Foundation_UniqueAccessExpireStrategy_INCLUDED | #define Foundation_UniqueAccessExpireStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/AbstractStrategy.h" | #include "Poco/AbstractStrategy.h" | |||
#include "Poco/Bugcheck.h" | #include "Poco/Bugcheck.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UniqueExpireCache.h | UniqueExpireCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueExpireCache | // Module: UniqueExpireCache | |||
// | // | |||
// Definition of the UniqueExpireCache class. | // Definition of the UniqueExpireCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueExpireCache_INCLUDED | #ifndef Foundation_UniqueExpireCache_INCLUDED | |||
#define Foundation_UniqueExpireCache_INCLUDED | #define Foundation_UniqueExpireCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/UniqueExpireStrategy.h" | #include "Poco/UniqueExpireStrategy.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UniqueExpireLRUCache.h | UniqueExpireLRUCache.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueExpireLRUCache | // Module: UniqueExpireLRUCache | |||
// | // | |||
// Definition of the UniqueExpireLRUCache class. | // Definition of the UniqueExpireLRUCache class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueExpireLRUCache_INCLUDED | #ifndef Foundation_UniqueExpireLRUCache_INCLUDED | |||
#define Foundation_UniqueExpireLRUCache_INCLUDED | #define Foundation_UniqueExpireLRUCache_INCLUDED | |||
#include "Poco/AbstractCache.h" | #include "Poco/AbstractCache.h" | |||
#include "Poco/StrategyCollection.h" | #include "Poco/StrategyCollection.h" | |||
#include "Poco/UniqueExpireStrategy.h" | #include "Poco/UniqueExpireStrategy.h" | |||
#include "Poco/LRUStrategy.h" | #include "Poco/LRUStrategy.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
UniqueExpireStrategy.h | UniqueExpireStrategy.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: UniqueExpireStrategy | // Module: UniqueExpireStrategy | |||
// | // | |||
// Definition of the UniqueExpireStrategy class. | // Definition of the UniqueExpireStrategy class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_UniqueExpireStrategy_INCLUDED | #ifndef Foundation_UniqueExpireStrategy_INCLUDED | |||
#define Foundation_UniqueExpireStrategy_INCLUDED | #define Foundation_UniqueExpireStrategy_INCLUDED | |||
#include "Poco/KeyValueArgs.h" | #include "Poco/KeyValueArgs.h" | |||
#include "Poco/ValidArgs.h" | #include "Poco/ValidArgs.h" | |||
#include "Poco/AbstractStrategy.h" | #include "Poco/AbstractStrategy.h" | |||
#include "Poco/Bugcheck.h" | #include "Poco/Bugcheck.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Units.h | Units.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Units | // Package: Units | |||
// Module: Units | // Module: Units | |||
// | // | |||
// Definitions for the C++ Units library. | // Definitions for the C++ Units library. | |||
// | // | |||
// Copyright (c) 2007-2010, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007-2010, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
// Adapted for POCO from the following source: | // Adapted for POCO from the following source: | |||
// | // | |||
// C++ Units by Calum Grant | // C++ Units by Calum Grant | |||
// | // | |||
// Written by Calum Grant | // Written by Calum Grant | |||
// Copyright (C) Calum Grant 2007 | // Copyright (C) Calum Grant 2007 | |||
// | // | |||
// Home page: http://calumgrant.net/units | // Home page: http://calumgrant.net/units | |||
// File location: http://calumgrant.net/units/units.hpp | // File location: http://calumgrant.net/units/units.hpp | |||
skipping to change at line 314 | skipping to change at line 294 | |||
} | } | |||
template <int Num, int Den, typename V, typename U> | template <int Num, int Den, typename V, typename U> | |||
Value<V, Power<U, Num, Den> > raise(const Value<V, U>& a) | Value<V, Power<U, Num, Den> > raise(const Value<V, U>& a) | |||
{ | { | |||
return Value<V, Power<U, Num, Den> >(Internal::FixedPower<Num, Den>: :Power(a.get())); | return Value<V, Power<U, Num, Den> >(Internal::FixedPower<Num, Den>: :Power(a.get())); | |||
} | } | |||
namespace Internal | namespace Internal | |||
{ | { | |||
#ifndef POCO_ENABLE_CPP11 | ||||
template <bool> struct static_assert; | ||||
template <> struct static_assert<true> { }; | ||||
/// Ensures (at compile-time) that the template argument is | ||||
true. | ||||
#endif | ||||
template <typename T1, typename T2> | template <typename T1, typename T2> | |||
struct Convertible; | struct Convertible; | |||
template <typename U> | template <typename U> | |||
struct ScalingFactor; | struct ScalingFactor; | |||
template <typename T1, typename T2> | template <typename T1, typename T2> | |||
struct Convert3 | struct Convert3 | |||
/// Converts T1 to T2. | /// Converts T1 to T2. | |||
/// Stage 3 - performed after Stage 1 and Stage 2. | /// Stage 3 - performed after Stage 1 and Stage 2. | |||
skipping to change at line 362 | skipping to change at line 336 | |||
} | } | |||
}; | }; | |||
template <typename T1, typename T2> | template <typename T1, typename T2> | |||
struct Convert | struct Convert | |||
/// Converts T1 to T2. | /// Converts T1 to T2. | |||
/// If you really want to implement your own conversion rout ine, | /// If you really want to implement your own conversion rout ine, | |||
/// specialize this template. | /// specialize this template. | |||
/// The default implementation falls through to Convert2. | /// The default implementation falls through to Convert2. | |||
{ | { | |||
#ifdef POCO_ENABLE_CPP11 | /// If this fails, then T1 is not Convertible to T2: | |||
static_assert(Convertible<T1,T2>::Value, "Error: Value not c | poco_static_assert ((Convertible<T1,T2>::Value)); | |||
onvertible."); | ||||
#else | ||||
static_assert<Convertible<T1,T2>::Value> checkConvertible; | ||||
#endif | ||||
/// If this fails, then T1 is not Convertible to T2: | ||||
template <typename V> | template <typename V> | |||
static V fn(const V& v) | static V fn(const V& v) | |||
{ | { | |||
return Convert2<T1,T2>::fn(v); | return Convert2<T1,T2>::fn(v); | |||
} | } | |||
}; | }; | |||
template <typename T> | template <typename T> | |||
struct Convert<T, T> | struct Convert<T, T> | |||
End of changes. 3 change blocks. | ||||
46 lines changed or deleted | 3 lines changed or added | |||
Util.h | Util.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// Package: Util | // Package: Util | |||
// Module: Util | // Module: Util | |||
// | // | |||
// Basic definitions for the Poco Util library. | // Basic definitions for the Poco Util library. | |||
// This file must be the first file included by every other Util | // This file must be the first file included by every other Util | |||
// header file. | // header file. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_Util_INCLUDED | #ifndef Util_Util_INCLUDED | |||
#define Util_Util_INCLUDED | #define Util_Util_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
// | // | |||
// The following block is the standard way of creating macros which make ex porting | // The following block is the standard way of creating macros which make ex porting | |||
// from a DLL simpler. All files within this DLL are compiled with the Util _EXPORTS | // from a DLL simpler. All files within this DLL are compiled with the Util _EXPORTS | |||
skipping to change at line 62 | skipping to change at line 42 | |||
// | // | |||
#if defined(_WIN32) && defined(POCO_DLL) | #if defined(_WIN32) && defined(POCO_DLL) | |||
#if defined(Util_EXPORTS) | #if defined(Util_EXPORTS) | |||
#define Util_API __declspec(dllexport) | #define Util_API __declspec(dllexport) | |||
#else | #else | |||
#define Util_API __declspec(dllimport) | #define Util_API __declspec(dllimport) | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined(Util_API) | #if !defined(Util_API) | |||
#define Util_API | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__ | |||
GNUC__ >= 4) | ||||
#define Util_API __attribute__ ((visibility ("default"))) | ||||
#else | ||||
#define Util_API | ||||
#endif | ||||
#endif | #endif | |||
// | // | |||
// Automatically link Util library. | // Automatically link Util library. | |||
// | // | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Util_EXPORTS) | #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Util_EXPORTS) | |||
#pragma comment(lib, "PocoUtil" POCO_LIB_SUFFIX) | #pragma comment(lib, "PocoUtil" POCO_LIB_SUFFIX) | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
ValidArgs.h | ValidArgs.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Cache | // Package: Cache | |||
// Module: ValidArgs | // Module: ValidArgs | |||
// | // | |||
// Definition of the ValidArgs class. | // Definition of the ValidArgs class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_ValidArgs_INCLUDED | #ifndef Foundation_ValidArgs_INCLUDED | |||
#define Foundation_ValidArgs_INCLUDED | #define Foundation_ValidArgs_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
template <class TKey> | template <class TKey> | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Validator.h | Validator.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Options | // Package: Options | |||
// Module: Validator | // Module: Validator | |||
// | // | |||
// Definition of the Validator class. | // Definition of the Validator class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_Validator_INCLUDED | #ifndef Util_Validator_INCLUDED | |||
#define Util_Validator_INCLUDED | #define Util_Validator_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/RefCountedObject.h" | #include "Poco/RefCountedObject.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
skipping to change at line 60 | skipping to change at line 40 | |||
/// Validator specifies the interface for option validators. | /// Validator specifies the interface for option validators. | |||
/// | /// | |||
/// Option validators provide a simple way for the automatic | /// Option validators provide a simple way for the automatic | |||
/// validation of command line argument values. | /// validation of command line argument values. | |||
{ | { | |||
public: | public: | |||
virtual void validate(const Option& option, const std::string& value ) = 0; | virtual void validate(const Option& option, const std::string& value ) = 0; | |||
/// Validates the value for the given option. | /// Validates the value for the given option. | |||
/// Does nothing if the value is valid. | /// Does nothing if the value is valid. | |||
/// | /// | |||
/// Throws an InvalidOptionException otherwise. | /// Throws an OptionException otherwise. | |||
protected: | protected: | |||
Validator(); | Validator(); | |||
/// Creates the Validator. | /// Creates the Validator. | |||
virtual ~Validator(); | virtual ~Validator(); | |||
/// Destroys the Validator. | /// Destroys the Validator. | |||
}; | }; | |||
} } // namespace Poco::Util | } } // namespace Poco::Util | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 2 lines changed or added | |||
Var.h | Var.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: Var | // Module: Var | |||
// | // | |||
// Definition of the Var class. | // Definition of the Var class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Var_INCLUDED | #ifndef Foundation_Var_INCLUDED | |||
#define Foundation_Var_INCLUDED | #define Foundation_Var_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Format.h" | #include "Poco/Format.h" | |||
#include "Poco/SharedPtr.h" | ||||
#include "Poco/Dynamic/VarHolder.h" | #include "Poco/Dynamic/VarHolder.h" | |||
#include "Poco/Dynamic/VarIterator.h" | ||||
#include <typeinfo> | #include <typeinfo> | |||
namespace Poco { | namespace Poco { | |||
namespace Dynamic { | namespace Dynamic { | |||
template <typename T> | template <typename T> | |||
class Struct; | class Struct; | |||
class Foundation_API Var | class Foundation_API Var | |||
/// Var allows to store data of different types and to convert betwe en these types transparently. | /// Var allows to store data of different types and to convert betwe en these types transparently. | |||
/// Var puts forth the best effort to provide intuitive and reasonab le conversion semantics and prevent | /// Var puts forth the best effort to provide intuitive and reasonab le conversion semantics and prevent | |||
/// unexpected data loss, particularly when performing narrowing or signedness conversions of numeric data types. | /// unexpected data loss, particularly when performing narrowing or signedness conversions of numeric data types. | |||
/// | /// | |||
/// An attempt to convert or extract from a non-initialized (“empty” ) Var variable shall result | /// An attempt to convert or extract from a non-initialized ("empty" ) Var variable shall result | |||
/// in an exception being thrown. | /// in an exception being thrown. | |||
/// | /// | |||
/// Loss of signedness is not allowed for numeric values. This means that if an attempt is made to convert | /// Loss of signedness is not allowed for numeric values. This means that if an attempt is made to convert | |||
/// the internal value which is a negative signed integer to an unsi gned integer type storage, a RangeException is thrown. | /// the internal value which is a negative signed integer to an unsi gned integer type storage, a RangeException is thrown. | |||
/// Overflow is not allowed, so if the internal value is a larger nu mber than the target numeric type size can accomodate, | /// Overflow is not allowed, so if the internal value is a larger nu mber than the target numeric type size can accomodate, | |||
/// a RangeException is thrown. | /// a RangeException is thrown. | |||
/// | /// | |||
/// Precision loss, such as in conversion from floating-point types to integers or from double to float on platforms | /// Precision loss, such as in conversion from floating-point types to integers or from double to float on platforms | |||
/// where they differ in size (provided internal actual value fits i n float min/max range), is allowed. | /// where they differ in size (provided internal actual value fits i n float min/max range), is allowed. | |||
/// | /// | |||
skipping to change at line 87 | skipping to change at line 69 | |||
/// | /// | |||
/// Arithmetic operations with POD types as well as between Var's ar e supported, subject to following | /// Arithmetic operations with POD types as well as between Var's ar e supported, subject to following | |||
/// limitations: | /// limitations: | |||
/// | /// | |||
/// - for std::string and const char* values, only '+' and '+=' operations are supported | /// - for std::string and const char* values, only '+' and '+=' operations are supported | |||
/// | /// | |||
/// - for integral and floating point numeric values, following operations are supported: | /// - for integral and floating point numeric values, following operations are supported: | |||
/// '+', '+=', '-', '-=', '*', '*=' , '/' and '/=' | /// '+', '+=', '-', '-=', '*', '*=' , '/' and '/=' | |||
/// | /// | |||
/// - for integral values, following operations are supported: | /// - for integral values, following operations are supported: | |||
/// prefix and postfix increment (++) and decement (-- ) | /// prefix and postfix increment (++) and decrement (- -) | |||
/// | /// | |||
/// - for all other types, InvalidArgumentException is thrown up on attempt of an arithmetic operation | /// - for all other types, InvalidArgumentException is thrown up on attempt of an arithmetic operation | |||
/// | /// | |||
/// A Var can be created from and converted to a value of any type f or which a specialization of | /// A Var can be created from and converted to a value of any type f or which a specialization of | |||
/// VarHolderImpl is available. For supported types, see VarHolder d ocumentation. | /// VarHolderImpl is available. For supported types, see VarHolder d ocumentation. | |||
{ | { | |||
public: | public: | |||
typedef SharedPtr<Var> Ptr; | ||||
typedef Poco::Dynamic::VarIterator Iterator; | ||||
typedef const VarIterator ConstIterator; | ||||
Var(); | Var(); | |||
/// Creates an empty Var. | /// Creates an empty Var. | |||
template <typename T> | template <typename T> | |||
Var(const T& val): | Var(const T& val) | |||
_pHolder(new VarHolderImpl<T>(val)) | ||||
/// Creates the Var from the given value. | /// Creates the Var from the given value. | |||
#ifdef POCO_NO_SOO | ||||
: _pHolder(new VarHolderImpl<T>(val)) | ||||
{ | ||||
} | ||||
#else | ||||
{ | { | |||
construct(val); | ||||
} | } | |||
#endif | ||||
Var(const char* pVal); | Var(const char* pVal); | |||
// Convenience constructor for const char* which gets mapped to a std::string internally, i.e. pVal is deep-copied. | // Convenience constructor for const char* which gets mapped to a std::string internally, i.e. pVal is deep-copied. | |||
Var(const Var& other); | Var(const Var& other); | |||
/// Copy constructor. | /// Copy constructor. | |||
~Var(); | ~Var(); | |||
/// Destroys the Var. | /// Destroys the Var. | |||
void swap(Var& other); | void swap(Var& other); | |||
/// Swaps the content of the this Var with the other Var. | /// Swaps the content of the this Var with the other Var. | |||
ConstIterator begin() const; | ||||
/// Returns the const Var iterator. | ||||
ConstIterator end() const; | ||||
/// Returns the const Var iterator. | ||||
Iterator begin(); | ||||
/// Returns the Var iterator. | ||||
Iterator end(); | ||||
/// Returns the Var iterator. | ||||
template <typename T> | template <typename T> | |||
void convert(T& val) const | void convert(T& val) const | |||
/// Invoke this method to perform a safe conversion. | /// Invoke this method to perform a safe conversion. | |||
/// | /// | |||
/// Example usage: | /// Example usage: | |||
/// Var any("42"); | /// Var any("42"); | |||
/// int i; | /// int i; | |||
/// any.convert(i); | /// any.convert(i); | |||
/// | /// | |||
/// Throws a RangeException if the value does not fit | /// Throws a RangeException if the value does not fit | |||
/// into the result variable. | /// into the result variable. | |||
/// Throws a NotImplementedException if conversion is | /// Throws a NotImplementedException if conversion is | |||
/// not available for the given type. | /// not available for the given type. | |||
/// Throws InvalidAccessException if Var is empty. | /// Throws InvalidAccessException if Var is empty. | |||
{ | { | |||
if (!_pHolder) | VarHolder* pHolder = content(); | |||
if (!pHolder) | ||||
throw InvalidAccessException("Can not convert empty value."); | throw InvalidAccessException("Can not convert empty value."); | |||
_pHolder->convert(val); | pHolder->convert(val); | |||
} | } | |||
template <typename T> | template <typename T> | |||
T convert() const | T convert() const | |||
/// Invoke this method to perform a safe conversion. | /// Invoke this method to perform a safe conversion. | |||
/// | /// | |||
/// Example usage: | /// Example usage: | |||
/// Var any("42"); | /// Var any("42"); | |||
/// int i = any.convert<int>(); | /// int i = any.convert<int>(); | |||
/// | /// | |||
/// Throws a RangeException if the value does not fit | /// Throws a RangeException if the value does not fit | |||
/// into the result variable. | /// into the result variable. | |||
/// Throws a NotImplementedException if conversion is | /// Throws a NotImplementedException if conversion is | |||
/// not available for the given type. | /// not available for the given type. | |||
/// Throws InvalidAccessException if Var is empty. | /// Throws InvalidAccessException if Var is empty. | |||
{ | { | |||
if (!_pHolder) | VarHolder* pHolder = content(); | |||
if (!pHolder) | ||||
throw InvalidAccessException("Can not convert empty value."); | throw InvalidAccessException("Can not convert empty value."); | |||
if (typeid(T) == _pHolder->type()) return extract<T>(); | if (typeid(T) == pHolder->type()) return extract<T>(); | |||
T result; | T result; | |||
_pHolder->convert(result); | pHolder->convert(result); | |||
return result; | return result; | |||
} | } | |||
template <typename T> | template <typename T> | |||
operator T () const | operator T () const | |||
/// Safe conversion operator for implicit type | /// Safe conversion operator for implicit type | |||
/// conversions. If the requested type T is same as the | /// conversions. If the requested type T is same as the | |||
/// type being held, the operation performed is direct | /// type being held, the operation performed is direct | |||
/// extraction, otherwise it is the conversion of the value | /// extraction, otherwise it is the conversion of the value | |||
/// from type currently held to the one requested. | /// from type currently held to the one requested. | |||
/// | /// | |||
/// Throws a RangeException if the value does not fit | /// Throws a RangeException if the value does not fit | |||
/// into the result variable. | /// into the result variable. | |||
/// Throws a NotImplementedException if conversion is | /// Throws a NotImplementedException if conversion is | |||
/// not available for the given type. | /// not available for the given type. | |||
/// Throws InvalidAccessException if Var is empty. | /// Throws InvalidAccessException if Var is empty. | |||
{ | { | |||
if (!_pHolder) | VarHolder* pHolder = content(); | |||
if (!pHolder) | ||||
throw InvalidAccessException("Can not conver t empty value."); | throw InvalidAccessException("Can not conver t empty value."); | |||
if (typeid(T) == _pHolder->type()) | if (typeid(T) == pHolder->type()) | |||
return extract<T>(); | return extract<T>(); | |||
else | else | |||
{ | { | |||
T result; | T result; | |||
_pHolder->convert(result); | pHolder->convert(result); | |||
return result; | return result; | |||
} | } | |||
} | } | |||
template <typename T> | template <typename T> | |||
const T& extract() const | const T& extract() const | |||
/// Returns a const reference to the actual value. | /// Returns a const reference to the actual value. | |||
/// | /// | |||
/// Must be instantiated with the exact type of | /// Must be instantiated with the exact type of | |||
/// the stored value, otherwise a BadCastException | /// the stored value, otherwise a BadCastException | |||
/// is thrown. | /// is thrown. | |||
/// Throws InvalidAccessException if Var is empty. | /// Throws InvalidAccessException if Var is empty. | |||
{ | { | |||
if (_pHolder && _pHolder->type() == typeid(T)) | VarHolder* pHolder = content(); | |||
if (pHolder && pHolder->type() == typeid(T)) | ||||
{ | { | |||
VarHolderImpl<T>* pHolderImpl = static_cast<VarHolde rImpl<T>*>(_pHolder); | VarHolderImpl<T>* pHolderImpl = static_cast<VarHolde rImpl<T>*>(pHolder); | |||
return pHolderImpl->value(); | return pHolderImpl->value(); | |||
} | } | |||
else if (!_pHolder) | else if (!pHolder) | |||
throw InvalidAccessException("Can not extract empty value."); | throw InvalidAccessException("Can not extract empty value."); | |||
else | else | |||
throw BadCastException(format("Can not convert %s to %s.", | throw BadCastException(format("Can not convert %s to %s.", | |||
_pHolder->type().name(), | pHolder->type().name(), | |||
typeid(T).name())); | typeid(T).name())); | |||
} | } | |||
template <typename T> | template <typename T> | |||
Var& operator = (const T& other) | Var& operator = (const T& other) | |||
/// Assignment operator for assigning POD to Var | /// Assignment operator for assigning POD to Var | |||
{ | { | |||
#ifdef POCO_NO_SOO | ||||
Var tmp(other); | Var tmp(other); | |||
swap(tmp); | swap(tmp); | |||
#else | ||||
construct(other); | ||||
#endif | ||||
return *this; | return *this; | |||
} | } | |||
bool operator ! () const; | bool operator ! () const; | |||
/// Logical NOT operator. | /// Logical NOT operator. | |||
Var& operator = (const Var& other); | Var& operator = (const Var& other); | |||
/// Assignment operator specialization for Var | /// Assignment operator specialization for Var | |||
template <typename T> | template <typename T> | |||
skipping to change at line 409 | skipping to change at line 425 | |||
{ | { | |||
if (isEmpty()) return false; | if (isEmpty()) return false; | |||
return convert<bool>() || other; | return convert<bool>() || other; | |||
} | } | |||
bool operator || (const Var& other) const; | bool operator || (const Var& other) const; | |||
/// Logical OR operator operator overload for Var | /// Logical OR operator operator overload for Var | |||
template <typename T> | template <typename T> | |||
bool operator && (const T& other) const | bool operator && (const T& other) const | |||
/// Logical AND operator | /// Logical AND operator. | |||
{ | { | |||
if (isEmpty()) return false; | if (isEmpty()) return false; | |||
return convert<bool>() && other; | return convert<bool>() && other; | |||
} | } | |||
bool operator && (const Var& other) const; | bool operator && (const Var& other) const; | |||
/// Logical AND operator operator overload for Var | /// Logical AND operator operator overload for Var. | |||
bool isArray() const; | bool isArray() const; | |||
/// Returns true if Var represents a vector | /// Returns true if Var is not empty. | |||
bool isVector() const; | ||||
/// Returns true if Var represents a vector. | ||||
bool isList() const; | ||||
/// Returns true if Var represents a list. | ||||
bool isDeque() const; | ||||
/// Returns true if Var represents a deque. | ||||
bool isStruct() const; | bool isStruct() const; | |||
/// Returns true if Var represents a struct | /// Returns true if Var represents a struct. | |||
char& at(std::size_t n); | ||||
/// Returns character at position n. This function only work | ||||
s with | ||||
/// Var containing a std::string. | ||||
template <typename T> | template <typename T> | |||
Var& operator [] (T n) | Var& operator [] (const T& n) | |||
/// Index operator, only use on Vars where isArray() or isSt | ||||
ruct() | ||||
/// returns true! In all other cases InvalidAccessException | ||||
is thrown. | ||||
{ | { | |||
if (isArray()) | return getAt(n); | |||
return holderImpl<std::vector<Var>, | ||||
InvalidAccessException>("Not an array.")->op | ||||
erator[](n); | ||||
else if (isStruct()) | ||||
return structIndexOperator(holderImpl<Struct<int>, | ||||
InvalidAccessException>("Not a struct."), st | ||||
atic_cast<int>(n)); | ||||
else | ||||
throw InvalidAccessException("Must be struct or arra | ||||
y."); | ||||
} | } | |||
template <typename T> | template <typename T> | |||
const Var& operator [] (T n) const | const Var& operator [] (const T& n) const | |||
/// const Index operator, only use on Vars where isArray() o | ||||
r isStruct() | ||||
/// returns true! In all other cases InvalidAccessException | ||||
is thrown. | ||||
{ | { | |||
if (isArray()) | return const_cast<Var*>(this)->getAt(n); | |||
return holderImpl<std::vector<Var>, | ||||
InvalidAccessException>("Not an array.")->op | ||||
erator[](n); | ||||
else if (isStruct()) | ||||
return structIndexOperator(holderImpl<Struct<int>, | ||||
InvalidAccessException>("Not a struct."), st | ||||
atic_cast<int>(n)); | ||||
else | ||||
throw InvalidAccessException("Must be struct or arra | ||||
y."); | ||||
} | } | |||
Var& operator [] (const std::string& name); | Var& operator [] (const std::string& name); | |||
/// Index operator by name, only use on Vars where isStruct | /// Index operator by name, only use on Vars where isStruct | |||
/// returns true! In all other cases InvalidAccessException is thrown. | /// returns true! In all other cases InvalidAccessException is thrown. | |||
const Var& operator [] (const std::string& name) const; | const Var& operator [] (const std::string& name) const; | |||
/// Index operator by name, only use on Vars where isStruct | /// Index operator by name, only use on Vars where isStruct | |||
/// returns true! In all other cases InvalidAccessException is thrown. | /// returns true! In all other cases InvalidAccessException is thrown. | |||
Var& operator [] (const char* name); | ||||
/// Index operator by name, only use on Vars where isStruct | ||||
/// returns true! In all other cases InvalidAccessException | ||||
is thrown. | ||||
const Var& operator [] (const char* name) const; | ||||
/// Index operator by name, only use on Vars where isStruct | ||||
/// returns true! In all other cases InvalidAccessException | ||||
is thrown. | ||||
const std::type_info& type() const; | const std::type_info& type() const; | |||
/// Returns the type information of the stored content. | /// Returns the type information of the stored content. | |||
void empty(); | void empty(); | |||
/// Empties Var. | /// Empties Var. | |||
bool isEmpty() const; | bool isEmpty() const; | |||
/// Returns true if empty. | /// Returns true if empty. | |||
bool isInteger() const; | bool isInteger() const; | |||
/// Returns true if stored value is integer. | /// Returns true if stored value is integer. | |||
bool isSigned() const; | bool isSigned() const; | |||
/// Returns true if stored value is signed. | /// Returns true if stored value is signed. | |||
bool isNumeric() const; | bool isNumeric() const; | |||
/// Returns true if stored value is numeric. | /// Returns true if stored value is numeric. | |||
/// Returns false for numeric strings (e.g. "123" is string, not number) | /// Returns false for numeric strings (e.g. "123" is string, not number) | |||
bool isBoolean() const; | ||||
/// Returns true if stored value is boolean. | ||||
/// Returns false for boolean strings (e.g. "true" is string | ||||
, not number) | ||||
bool isString() const; | bool isString() const; | |||
/// Returns true if stored value is std::string. | /// Returns true if stored value is std::string. | |||
std::size_t size() const; | ||||
/// Returns the size of this Var. | ||||
/// This function returns 0 when Var is empty, 1 for POD or | ||||
the size (i.e. length) | ||||
/// for held container. | ||||
std::string toString() const | ||||
/// Returns the stored value as string. | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
if (!pHolder) | ||||
throw InvalidAccessException("Can not conver | ||||
t empty value."); | ||||
if (typeid(std::string) == pHolder->type()) | ||||
return extract<std::string>(); | ||||
else | ||||
{ | ||||
std::string result; | ||||
pHolder->convert(result); | ||||
return result; | ||||
} | ||||
} | ||||
static Var parse(const std::string& val); | static Var parse(const std::string& val); | |||
/// Parses the string which must be in JSON format | /// Parses the string which must be in JSON format | |||
static std::string toString(const Var& any); | static std::string toString(const Var& var); | |||
/// Converts the Var to a string in JSON format. Note that t | /// Converts the Var to a string in JSON format. Note that t | |||
oString will return | oString(const Var&) will return | |||
/// a different result than any.convert<std::string>()! | /// a different result than Var::convert<std::string>() and | |||
Var::toString()! | ||||
private: | private: | |||
Var& getAt(std::size_t n); | ||||
Var& getAt(const std::string& n); | ||||
static Var parse(const std::string& val, std::string::size_type& off set); | static Var parse(const std::string& val, std::string::size_type& off set); | |||
/// Parses the string which must be in JSON format | /// Parses the string which must be in JSON format | |||
static Var parseObject(const std::string& val, std::string::size_typ e& pos); | static Var parseObject(const std::string& val, std::string::size_typ e& pos); | |||
static Var parseArray(const std::string& val, std::string::size_type & pos); | static Var parseArray(const std::string& val, std::string::size_type & pos); | |||
static std::string parseString(const std::string& val, std::string:: size_type& pos); | static std::string parseString(const std::string& val, std::string:: size_type& pos); | |||
static std::string parseJSONString(const std::string& val, std::stri ng::size_type& pos); | ||||
static void skipWhiteSpace(const std::string& val, std::string::size _type& pos); | static void skipWhiteSpace(const std::string& val, std::string::size _type& pos); | |||
template <typename T> | template <typename T> | |||
T add(const Var& other) const | T add(const Var& other) const | |||
{ | { | |||
return convert<T>() + other.convert<T>(); | return convert<T>() + other.convert<T>(); | |||
} | } | |||
template <typename T> | template <typename T> | |||
T subtract(const Var& other) const | T subtract(const Var& other) const | |||
skipping to change at line 535 | skipping to change at line 569 | |||
template <typename T> | template <typename T> | |||
T divide(const Var& other) const | T divide(const Var& other) const | |||
{ | { | |||
return convert<T>() / other.convert<T>(); | return convert<T>() / other.convert<T>(); | |||
} | } | |||
template <typename T, typename E> | template <typename T, typename E> | |||
VarHolderImpl<T>* holderImpl(const std::string errorMessage = "") co nst | VarHolderImpl<T>* holderImpl(const std::string errorMessage = "") co nst | |||
{ | { | |||
if (_pHolder && _pHolder->type() == typeid(T)) | VarHolder* pHolder = content(); | |||
return static_cast<VarHolderImpl<T>*>(_pHolder); | ||||
else if (!_pHolder) | if (pHolder && pHolder->type() == typeid(T)) | |||
return static_cast<VarHolderImpl<T>*>(pHolder); | ||||
else if (!pHolder) | ||||
throw InvalidAccessException("Can not access empty v alue."); | throw InvalidAccessException("Can not access empty v alue."); | |||
else | else | |||
throw E(errorMessage); | throw E(errorMessage); | |||
} | } | |||
Var& structIndexOperator(VarHolderImpl<Struct<int> >* pStr, int n) c onst; | Var& structIndexOperator(VarHolderImpl<Struct<int> >* pStr, int n) c onst; | |||
#ifdef POCO_NO_SOO | ||||
VarHolder* content() const | ||||
{ | ||||
return _pHolder; | ||||
} | ||||
void destruct() | ||||
{ | ||||
if (!isEmpty()) delete content(); | ||||
} | ||||
VarHolder* _pHolder; | VarHolder* _pHolder; | |||
#else | ||||
VarHolder* content() const | ||||
{ | ||||
return _placeholder.content(); | ||||
} | ||||
template<typename ValueType> | ||||
void construct(const ValueType& value) | ||||
{ | ||||
if (sizeof(VarHolderImpl<ValueType>) <= Placeholder<ValueTyp | ||||
e>::Size::value) | ||||
{ | ||||
new (reinterpret_cast<VarHolder*>(_placeholder.holde | ||||
r)) VarHolderImpl<ValueType>(value); | ||||
_placeholder.setLocal(true); | ||||
} | ||||
else | ||||
{ | ||||
_placeholder.pHolder = new VarHolderImpl<ValueType>( | ||||
value); | ||||
_placeholder.setLocal(false); | ||||
} | ||||
} | ||||
void construct(const char* value) | ||||
{ | ||||
std::string val(value); | ||||
if (sizeof(VarHolderImpl<std::string>) <= Placeholder<std::s | ||||
tring>::Size::value) | ||||
{ | ||||
new (reinterpret_cast<VarHolder*>(_placeholder.holde | ||||
r)) VarHolderImpl<std::string>(val); | ||||
_placeholder.setLocal(true); | ||||
} | ||||
else | ||||
{ | ||||
_placeholder.pHolder = new VarHolderImpl<std::string | ||||
>(val); | ||||
_placeholder.setLocal(false); | ||||
} | ||||
} | ||||
void construct(const Var& other) | ||||
{ | ||||
if (!other.isEmpty()) | ||||
other.content()->clone(&_placeholder); | ||||
else | ||||
_placeholder.erase(); | ||||
} | ||||
void destruct() | ||||
{ | ||||
if (!isEmpty()) | ||||
{ | ||||
if (_placeholder.isLocal()) | ||||
content()->~VarHolder(); | ||||
else | ||||
delete content(); | ||||
} | ||||
} | ||||
Placeholder<VarHolder> _placeholder; | ||||
#endif // POCO_NO_SOO | ||||
}; | }; | |||
/// | /// | |||
/// inlines | /// inlines | |||
/// | /// | |||
/// | /// | |||
/// Var members | /// Var members | |||
/// | /// | |||
inline void Var::swap(Var& ptr) | inline void Var::swap(Var& other) | |||
{ | { | |||
std::swap(_pHolder, ptr._pHolder); | #ifdef POCO_NO_SOO | |||
std::swap(_pHolder, other._pHolder); | ||||
#else | ||||
if (this == &other) return; | ||||
if (!_placeholder.isLocal() && !other._placeholder.isLocal()) | ||||
{ | ||||
std::swap(_placeholder.pHolder, other._placeholder.pHolder); | ||||
} | ||||
else | ||||
{ | ||||
Var tmp(*this); | ||||
try | ||||
{ | ||||
if (_placeholder.isLocal()) destruct(); | ||||
construct(other); | ||||
other = tmp; | ||||
} | ||||
catch (...) | ||||
{ | ||||
construct(tmp); | ||||
throw; | ||||
} | ||||
} | ||||
#endif | ||||
} | } | |||
inline const std::type_info& Var::type() const | inline const std::type_info& Var::type() const | |||
{ | { | |||
return _pHolder ? _pHolder->type() : typeid(void); | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->type() : typeid(void); | ||||
} | ||||
inline Var::ConstIterator Var::begin() const | ||||
{ | ||||
if (isEmpty()) return ConstIterator(const_cast<Var*>(this), true); | ||||
return ConstIterator(const_cast<Var*>(this), false); | ||||
} | } | |||
inline Var& Var::operator [] (const char* name) | inline Var::ConstIterator Var::end() const | |||
{ | { | |||
return operator [] (std::string(name)); | return ConstIterator(const_cast<Var*>(this), true); | |||
} | } | |||
inline const Var& Var::operator [] (const char* name) const | inline Var::Iterator Var::begin() | |||
{ | { | |||
return operator [] (std::string(name)); | if (isEmpty()) return Iterator(const_cast<Var*>(this), true); | |||
return Iterator(const_cast<Var*>(this), false); | ||||
} | ||||
inline Var::Iterator Var::end() | ||||
{ | ||||
return Iterator(this, true); | ||||
} | ||||
inline Var& Var::operator [] (const std::string& name) | ||||
{ | ||||
return getAt(name); | ||||
} | ||||
inline const Var& Var::operator [] (const std::string& name) const | ||||
{ | ||||
return const_cast<Var*>(this)->getAt(name); | ||||
} | } | |||
inline const Var Var::operator + (const char* other) const | inline const Var Var::operator + (const char* other) const | |||
{ | { | |||
return convert<std::string>() + other; | return convert<std::string>() + other; | |||
} | } | |||
inline Var& Var::operator += (const char*other) | inline Var& Var::operator += (const char*other) | |||
{ | { | |||
return *this = convert<std::string>() + other; | return *this = convert<std::string>() + other; | |||
} | } | |||
inline bool Var::operator ! () const | inline bool Var::operator ! () const | |||
{ | { | |||
return !convert<bool>(); | return !convert<bool>(); | |||
} | } | |||
inline bool Var::isEmpty() const | inline bool Var::isEmpty() const | |||
{ | { | |||
return 0 == _pHolder; | return 0 == content(); | |||
} | } | |||
inline bool Var::isArray() const | inline bool Var::isArray() const | |||
{ | { | |||
return _pHolder ? _pHolder->isArray() : false; | if (isEmpty() || | |||
isString()) return false; | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->isArray() : false; | ||||
} | ||||
inline bool Var::isVector() const | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->isVector() : false; | ||||
} | ||||
inline bool Var::isList() const | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->isList() : false; | ||||
} | ||||
inline bool Var::isDeque() const | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->isDeque() : false; | ||||
} | } | |||
inline bool Var::isStruct() const | inline bool Var::isStruct() const | |||
{ | { | |||
return _pHolder ? _pHolder->isStruct() : false; | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->isStruct() : false; | ||||
} | } | |||
inline bool Var::isInteger() const | inline bool Var::isInteger() const | |||
{ | { | |||
return _pHolder ? _pHolder->isInteger() : false; | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->isInteger() : false; | ||||
} | } | |||
inline bool Var::isSigned() const | inline bool Var::isSigned() const | |||
{ | { | |||
return _pHolder ? _pHolder->isSigned() : false; | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->isSigned() : false; | ||||
} | } | |||
inline bool Var::isNumeric() const | inline bool Var::isNumeric() const | |||
{ | { | |||
return _pHolder ? _pHolder->isNumeric() : false; | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->isNumeric() : false; | ||||
} | ||||
inline bool Var::isBoolean() const | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->isBoolean() : false; | ||||
} | } | |||
inline bool Var::isString() const | inline bool Var::isString() const | |||
{ | { | |||
return _pHolder ? _pHolder->isString() : false; | VarHolder* pHolder = content(); | |||
return pHolder ? pHolder->isString() : false; | ||||
} | ||||
inline std::size_t Var::size() const | ||||
{ | ||||
VarHolder* pHolder = content(); | ||||
return pHolder ? pHolder->size() : 0; | ||||
} | } | |||
/// | /// | |||
/// Var non-member functions | /// Var non-member functions | |||
/// | /// | |||
inline const Var operator + (const char* other, const Var& da) | inline const Var operator + (const char* other, const Var& da) | |||
/// Addition operator for adding Var to const char* | /// Addition operator for adding Var to const char* | |||
{ | { | |||
std::string tmp = other; | std::string tmp = other; | |||
return tmp + da.convert<std::string>(); | return tmp + da.convert<std::string>(); | |||
} | } | |||
inline char operator + (const char& other, const Var& da) | inline char operator + (const char& other, const Var& da) | |||
/// Addition operator for adding Var to char | /// Addition operator for adding Var to char | |||
{ | { | |||
skipping to change at line 1654 | skipping to change at line 1855 | |||
return other == da.convert<std::string>(); | return other == da.convert<std::string>(); | |||
} | } | |||
inline bool operator != (const std::string& other, const Var& da) | inline bool operator != (const std::string& other, const Var& da) | |||
/// Inequality operator for comparing Var with std::string | /// Inequality operator for comparing Var with std::string | |||
{ | { | |||
if (da.isEmpty()) return true; | if (da.isEmpty()) return true; | |||
return other != da.convert<std::string>(); | return other != da.convert<std::string>(); | |||
} | } | |||
inline bool operator == (const UTF16String& other, const Var& da) | ||||
/// Equality operator for comparing Var with UTF16String | ||||
{ | ||||
if (da.isEmpty()) return false; | ||||
return other == da.convert<UTF16String>(); | ||||
} | ||||
inline bool operator != (const UTF16String& other, const Var& da) | ||||
/// Inequality operator for comparing Var with UTF16String | ||||
{ | ||||
if (da.isEmpty()) return true; | ||||
return other != da.convert<UTF16String>(); | ||||
} | ||||
inline bool operator == (const char* other, const Var& da) | inline bool operator == (const char* other, const Var& da) | |||
/// Equality operator for comparing Var with const char* | /// Equality operator for comparing Var with const char* | |||
{ | { | |||
if (da.isEmpty()) return false; | if (da.isEmpty()) return false; | |||
return da.convert<std::string>() == other; | return da.convert<std::string>() == other; | |||
} | } | |||
inline bool operator != (const char* other, const Var& da) | inline bool operator != (const char* other, const Var& da) | |||
/// Inequality operator for comparing Var with const char* | /// Inequality operator for comparing Var with const char* | |||
{ | { | |||
End of changes. 58 change blocks. | ||||
115 lines changed or deleted | 318 lines changed or added | |||
VarHolder.h | VarHolder.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Dynamic | // Package: Dynamic | |||
// Module: VarHolder | // Module: VarHolder | |||
// | // | |||
// Definition of the VarHolder class. | // Definition of the VarHolder class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_VarHolder_INCLUDED | #ifndef Foundation_VarHolder_INCLUDED | |||
#define Foundation_VarHolder_INCLUDED | #define Foundation_VarHolder_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/NumberFormatter.h" | #include "Poco/NumberFormatter.h" | |||
#include "Poco/NumberParser.h" | #include "Poco/NumberParser.h" | |||
#include "Poco/DateTime.h" | #include "Poco/DateTime.h" | |||
#include "Poco/Timestamp.h" | #include "Poco/Timestamp.h" | |||
#include "Poco/LocalDateTime.h" | #include "Poco/LocalDateTime.h" | |||
#include "Poco/DateTimeFormat.h" | #include "Poco/DateTimeFormat.h" | |||
#include "Poco/DateTimeFormatter.h" | #include "Poco/DateTimeFormatter.h" | |||
#include "Poco/DateTimeParser.h" | #include "Poco/DateTimeParser.h" | |||
#include "Poco/String.h" | #include "Poco/String.h" | |||
#include "Poco/UnicodeConverter.h" | ||||
#include "Poco/UTFString.h" | ||||
#include "Poco/UTF8String.h" | ||||
#include "Poco/Any.h" | ||||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
#include <vector> | #include <vector> | |||
#include <list> | ||||
#include <deque> | ||||
#include <typeinfo> | #include <typeinfo> | |||
#undef min | #undef min | |||
#undef max | #undef max | |||
#include <limits> | #include <limits> | |||
namespace Poco { | namespace Poco { | |||
namespace Dynamic { | namespace Dynamic { | |||
class Var; | class Var; | |||
namespace Impl { | ||||
bool Foundation_API isJSONString(const Var& any); | bool Foundation_API isJSONString(const Var& any); | |||
/// Returns true for values that should be JSON-formatted as string. | /// Returns true for values that should be JSON-formatted as string. | |||
void Foundation_API appendJSONKey(std::string& val, const Var& any); | ||||
/// Converts the any to a JSON key (i.e. wraps it into double quotes | ||||
/// regardless of the underlying type) and appends it to val. | ||||
void Foundation_API appendJSONString(std::string& val, const Var& any); | void Foundation_API appendJSONString(std::string& val, const Var& any); | |||
/// Converts the any to a JSON value and adds it to val | /// Converts the any to a JSON string (i.e. wraps it into double quo | |||
tes) | ||||
/// regardless of the underlying type) and appends it to val. | ||||
void Foundation_API appendJSONValue(std::string& val, const Var& any); | ||||
/// Converts the any to a JSON value (if underlying type qualifies | ||||
/// as string - see isJSONString() - , it is wrapped into double quo | ||||
tes) | ||||
/// and appends it to val | ||||
template <typename C> | ||||
void containerToJSON(C& cont, std::string& val) | ||||
{ | ||||
// Serialize in JSON format. Note: although this is a vector<T>, the | ||||
code only | ||||
// supports vector<Var>. Total specialization is not possible | ||||
// because of the cyclic dependency between Var and VarHolder | ||||
// JSON format definition: [ n times: elem ',' ], no ',' for last el | ||||
em | ||||
val.append("[ "); | ||||
typename C::const_iterator it = cont.begin(); | ||||
typename C::const_iterator itEnd = cont.end(); | ||||
if (!cont.empty()) | ||||
{ | ||||
appendJSONValue(val, *it); | ||||
++it; | ||||
} | ||||
for (; it != itEnd; ++it) | ||||
{ | ||||
val.append(", "); | ||||
appendJSONValue(val, *it); | ||||
} | ||||
val.append(" ]"); | ||||
} | ||||
} // namespace Impl | ||||
class Foundation_API VarHolder | class Foundation_API VarHolder | |||
/// Interface for a data holder used by the Var class. | /// Interface for a data holder used by the Var class. | |||
/// Provides methods to convert between data types. | /// Provides methods to convert between data types. | |||
/// Only data types for which VarHolder specialization exists are su pported. | /// Only data types for which VarHolder specialization exists are su pported. | |||
/// | /// | |||
/// Provided are specializations for all C++ built-in types with add ition of | /// Provided are specializations for all C++ built-in types with add ition of | |||
/// std::string, DateTime, LocalDateTime, Timestamp, std::vector<Var > and DynamicStruct. | /// std::string, Poco::UTF16String, DateTime, LocalDateTime, Timesta mp, std::vector<Var> and DynamicStruct. | |||
/// | /// | |||
/// Additional types can be supported by adding specializations. Whe n implementing specializations, | /// Additional types can be supported by adding specializations. Whe n implementing specializations, | |||
/// the only condition is that they reside in Poco namespace and imp lement the pure virtual functions | /// the only condition is that they reside in Poco namespace and imp lement the pure virtual functions | |||
/// clone() and type(). | /// clone() and type(). | |||
/// | /// | |||
/// Those conversions that are not implemented shall fail back to th is base | /// Those conversions that are not implemented shall fail back to th is base | |||
/// class implementation. All the convert() function overloads in th is class | /// class implementation. All the convert() function overloads in th is class | |||
/// throw BadCastException. | /// throw BadCastException. | |||
{ | { | |||
public: | public: | |||
typedef Var ArrayValueType; | ||||
virtual ~VarHolder(); | virtual ~VarHolder(); | |||
/// Destroys the VarHolder. | /// Destroys the VarHolder. | |||
virtual VarHolder* clone() const; | virtual VarHolder* clone(Placeholder<VarHolder>* pHolder = 0) const | |||
/// Throws NotImplementedException. Implementation should | = 0; | |||
/// Implementation must implement this function to | ||||
/// deep-copy the VarHolder. | /// deep-copy the VarHolder. | |||
/// If small object optimization is enabled (i.e. if | ||||
virtual const std::type_info& type() const; | /// POCO_NO_SOO is not defined), VarHolder will be | |||
/// Throws NotImplementedException. Implementation should | /// instantiated in-place if it's size is smaller | |||
/// return the type information for the stored content. | /// than POCO_SMALL_OBJECT_SIZE. | |||
virtual const std::type_info& type() const = 0; | ||||
/// Implementation must return the type information | ||||
/// (typeid) for the stored content. | ||||
virtual void convert(Int8& val) const; | virtual void convert(Int8& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(Int16& val) const; | virtual void convert(Int16& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(Int32& val) const; | virtual void convert(Int32& val) const; | |||
skipping to change at line 142 | skipping to change at line 173 | |||
virtual void convert(LocalDateTime& val) const; | virtual void convert(LocalDateTime& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(Timestamp& val) const; | virtual void convert(Timestamp& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
#ifndef POCO_LONG_IS_64_BIT | #ifndef POCO_LONG_IS_64_BIT | |||
void convert(long& val) const; | void convert(long& val) const; | |||
/// Calls convert(Int32). | /// Calls convert(Int32). | |||
void convert(unsigned long& val) const; | void convert(unsigned long& val) const; | |||
/// Calls convert(UInt32). | /// Calls convert(UInt32). | |||
#endif | #endif | |||
virtual void convert(bool& val) const; | virtual void convert(bool& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(float& val) const; | virtual void convert(float& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(double& val) const; | virtual void convert(double& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(char& val) const; | virtual void convert(char& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(std::string& val) const; | virtual void convert(std::string& val) const; | |||
/// Throws BadCastException. Must be overriden in a type | /// Throws BadCastException. Must be overriden in a type | |||
/// specialization in order to suport the conversion. | /// specialization in order to suport the conversion. | |||
virtual void convert(Poco::UTF16String& val) const; | ||||
/// Throws BadCastException. Must be overriden in a type | ||||
/// specialization in order to suport the conversion. | ||||
virtual bool isArray() const; | virtual bool isArray() const; | |||
/// Returns true. | ||||
virtual bool isVector() const; | ||||
/// Returns false. Must be properly overriden in a type | ||||
/// specialization in order to suport the diagnostic. | ||||
virtual bool isList() const; | ||||
/// Returns false. Must be properly overriden in a type | ||||
/// specialization in order to suport the diagnostic. | ||||
virtual bool isDeque() const; | ||||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual bool isStruct() const; | virtual bool isStruct() const; | |||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual bool isInteger() const; | virtual bool isInteger() const; | |||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual bool isSigned() const; | virtual bool isSigned() const; | |||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual bool isNumeric() const; | virtual bool isNumeric() const; | |||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual bool isBoolean() const; | ||||
/// Returns false. Must be properly overriden in a type | ||||
/// specialization in order to suport the diagnostic. | ||||
virtual bool isString() const; | virtual bool isString() const; | |||
/// Returns false. Must be properly overriden in a type | /// Returns false. Must be properly overriden in a type | |||
/// specialization in order to suport the diagnostic. | /// specialization in order to suport the diagnostic. | |||
virtual std::size_t size() const; | ||||
/// Returns 1 iff Var is not empty or this function override | ||||
n. | ||||
protected: | protected: | |||
VarHolder(); | VarHolder(); | |||
/// Creates the VarHolder. | /// Creates the VarHolder. | |||
template <typename T> | ||||
VarHolder* cloneHolder(Placeholder<VarHolder>* pVarHolder, const T& | ||||
val) const | ||||
/// Instantiates value holder wrapper. If size of the wrappe | ||||
r is | ||||
/// larger than POCO_SMALL_OBJECT_SIZE, holder is instantiat | ||||
ed on | ||||
/// the heap, otherwise it is instantiated in-place (in the | ||||
/// pre-allocated buffer inside the holder). | ||||
/// | ||||
/// Called from clone() member function of the implementatio | ||||
n when | ||||
/// smal object optimization is enabled. | ||||
{ | ||||
#ifdef POCO_NO_SOO | ||||
(void)pVarHolder; | ||||
return new VarHolderImpl<T>(val); | ||||
#else | ||||
poco_check_ptr (pVarHolder); | ||||
if ((sizeof(VarHolderImpl<T>) <= Placeholder<T>::Size::value | ||||
)) | ||||
{ | ||||
new ((VarHolder*) pVarHolder->holder) VarHolderImpl< | ||||
T>(val); | ||||
pVarHolder->setLocal(true); | ||||
return (VarHolder*) pVarHolder->holder; | ||||
} | ||||
else | ||||
{ | ||||
pVarHolder->pHolder = new VarHolderImpl<T>(val); | ||||
pVarHolder->setLocal(false); | ||||
return pVarHolder->pHolder; | ||||
} | ||||
#endif | ||||
} | ||||
template <typename F, typename T> | template <typename F, typename T> | |||
void convertToSmaller(const F& from, T& to) const | void convertToSmaller(const F& from, T& to) const | |||
/// This function is meant to convert signed numeric values from | /// This function is meant to convert signed numeric values from | |||
/// larger to smaller type. It checks the upper and lower bo und and | /// larger to smaller type. It checks the upper and lower bo und and | |||
/// if from value is within limits of type T (i.e. check cal ls do not throw), | /// if from value is within limits of type T (i.e. check cal ls do not throw), | |||
/// it is converted. | /// it is converted. | |||
{ | { | |||
poco_static_assert (std::numeric_limits<F>::is_specialized); | poco_static_assert (std::numeric_limits<F>::is_specialized); | |||
poco_static_assert (std::numeric_limits<T>::is_specialized); | poco_static_assert (std::numeric_limits<T>::is_specialized); | |||
poco_static_assert (std::numeric_limits<F>::is_signed); | poco_static_assert (std::numeric_limits<F>::is_signed); | |||
skipping to change at line 334 | skipping to change at line 420 | |||
{ | { | |||
if (from < std::numeric_limits<T>::min()) | if (from < std::numeric_limits<T>::min()) | |||
throw RangeException("Value too small."); | throw RangeException("Value too small."); | |||
} | } | |||
}; | }; | |||
// | // | |||
// inlines | // inlines | |||
// | // | |||
inline VarHolder* VarHolder::clone() const | inline void VarHolder::convert(Int8& /*val*/) const | |||
{ | ||||
throw NotImplementedException("Not implemented: VarHolder::clone()") | ||||
; | ||||
} | ||||
inline const std::type_info& VarHolder::type() const | ||||
{ | ||||
throw NotImplementedException("Not implemented: VarHolder::type()"); | ||||
} | ||||
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"); | |||
} | } | |||
#ifndef POCO_LONG_IS_64_BIT | #ifndef POCO_LONG_IS_64_BIT | |||
inline void VarHolder::convert(long& val) const | inline void VarHolder::convert(long& val) const | |||
{ | { | |||
Int32 tmp; | Int32 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = tmp; | val = tmp; | |||
} | } | |||
inline void VarHolder::convert(unsigned long& val) const | inline void VarHolder::convert(unsigned long& val) const | |||
{ | { | |||
UInt32 tmp; | UInt32 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = tmp; | val = tmp; | |||
} | } | |||
#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"); | |||
} | } | |||
inline void VarHolder::convert(Poco::UTF16String& /*val*/) const | ||||
{ | ||||
throw BadCastException("Can not convert to Poco::UTF16String"); | ||||
} | ||||
inline bool VarHolder::isArray() const | inline bool VarHolder::isArray() const | |||
{ | { | |||
return true; | ||||
} | ||||
inline bool VarHolder::isVector() const | ||||
{ | ||||
return false; | ||||
} | ||||
inline bool VarHolder::isList() const | ||||
{ | ||||
return false; | ||||
} | ||||
inline bool VarHolder::isDeque() const | ||||
{ | ||||
return false; | return false; | |||
} | } | |||
inline bool VarHolder::isStruct() const | inline bool VarHolder::isStruct() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
inline bool VarHolder::isInteger() const | inline bool VarHolder::isInteger() const | |||
{ | { | |||
skipping to change at line 465 | skipping to change at line 563 | |||
inline bool VarHolder::isSigned() const | inline bool VarHolder::isSigned() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
inline bool VarHolder::isNumeric() const | inline bool VarHolder::isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
inline bool VarHolder::isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
inline bool VarHolder::isString() const | inline bool VarHolder::isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
inline std::size_t VarHolder::size() const | ||||
{ | ||||
return 1u; | ||||
} | ||||
template <typename T> | template <typename T> | |||
class VarHolderImpl: public VarHolder | class VarHolderImpl: public VarHolder | |||
/// Template based implementation of a VarHolder. | /// Template based implementation of a VarHolder. | |||
/// This class provides type storage for user-defined types | /// This class provides type storage for user-defined types | |||
/// that do not have VarHolderImpl specialization. | /// that do not have VarHolderImpl specialization. | |||
/// | /// | |||
/// The actual conversion work happens in the template specializatio ns | /// The actual conversion work happens in the template specializatio ns | |||
/// of this class. | /// of this class. | |||
/// | /// | |||
/// VarHolderImpl throws following exceptions: | /// VarHolderImpl throws following exceptions: | |||
skipping to change at line 505 | skipping to change at line 613 | |||
~VarHolderImpl() | ~VarHolderImpl() | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
return typeid(T); | return typeid(T); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const T& value() const | const T& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
skipping to change at line 605 | skipping to change at line 713 | |||
void convert(char& val) const | void convert(char& val) const | |||
{ | { | |||
val = static_cast<char>(_val); | val = static_cast<char>(_val); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | void convert(Poco::UTF16String& val) const | |||
{ | ||||
std::string str = NumberFormatter::format(_val); | ||||
Poco::UnicodeConverter::convert(str, val); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Int8& value() const | const Int8& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 640 | skipping to change at line 754 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<Int8>::is_signed; | return std::numeric_limits<Int8>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<Int8>::is_specialized; | return std::numeric_limits<Int8>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 737 | skipping to change at line 856 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | void convert(Poco::UTF16String& val) const | |||
{ | ||||
std::string str = NumberFormatter::format(_val); | ||||
Poco::UnicodeConverter::convert(str, val); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Int16& value() const | const Int16& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 869 | skipping to change at line 994 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Int32& value() const | const Int32& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 904 | skipping to change at line 1029 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<Int32>::is_signed; | return std::numeric_limits<Int32>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<Int32>::is_specialized; | return std::numeric_limits<Int32>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1016 | skipping to change at line 1146 | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& ldt) const | |||
{ | { | |||
ldt = Timestamp(_val); | ldt = Timestamp(_val); | |||
} | } | |||
void convert(Timestamp& val) const | void convert(Timestamp& val) const | |||
{ | { | |||
val = Timestamp(_val); | val = Timestamp(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Int64& value() const | const Int64& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1051 | skipping to change at line 1181 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<Int64>::is_signed; | return std::numeric_limits<Int64>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<Int64>::is_specialized; | return std::numeric_limits<Int64>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1148 | skipping to change at line 1283 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const UInt8& value() const | const UInt8& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1183 | skipping to change at line 1318 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<UInt8>::is_signed; | return std::numeric_limits<UInt8>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<UInt8>::is_specialized; | return std::numeric_limits<UInt8>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1280 | skipping to change at line 1420 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const UInt16& value() const | const UInt16& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1315 | skipping to change at line 1455 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<UInt16>::is_signed; | return std::numeric_limits<UInt16>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<UInt16>::is_specialized; | return std::numeric_limits<UInt16>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1412 | skipping to change at line 1557 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const UInt32& value() const | const UInt32& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1447 | skipping to change at line 1592 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<UInt32>::is_signed; | return std::numeric_limits<UInt32>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<UInt32>::is_specialized; | return std::numeric_limits<UInt32>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1565 | skipping to change at line 1715 | |||
ldt = Timestamp(val); | ldt = Timestamp(val); | |||
} | } | |||
void convert(Timestamp& val) const | void convert(Timestamp& val) const | |||
{ | { | |||
Int64 tmp; | Int64 tmp; | |||
convertUnsignedToSigned(_val, tmp); | convertUnsignedToSigned(_val, tmp); | |||
val = Timestamp(tmp); | val = Timestamp(tmp); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const UInt64& value() const | const UInt64& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1600 | skipping to change at line 1750 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<UInt64>::is_signed; | return std::numeric_limits<UInt64>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<UInt64>::is_specialized; | return std::numeric_limits<UInt64>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1695 | skipping to change at line 1850 | |||
void convert(char& val) const | void convert(char& val) const | |||
{ | { | |||
val = static_cast<char>(_val ? 1 : 0); | val = static_cast<char>(_val ? 1 : 0); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = (_val ? "true" : "false"); | val = (_val ? "true" : "false"); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const bool& value() const | const bool& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1730 | skipping to change at line 1885 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<bool>::is_signed; | return std::numeric_limits<bool>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<bool>::is_specialized; | return std::numeric_limits<bool>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return true; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1828 | skipping to change at line 1988 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const float& value() const | const float& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 1863 | skipping to change at line 2023 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<float>::is_signed; | return std::numeric_limits<float>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<float>::is_specialized; | return std::numeric_limits<float>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 1967 | skipping to change at line 2132 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const double& value() const | const double& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2002 | skipping to change at line 2167 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<double>::is_signed; | return std::numeric_limits<double>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<double>::is_specialized; | return std::numeric_limits<double>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2097 | skipping to change at line 2267 | |||
void convert(char& val) const | void convert(char& val) const | |||
{ | { | |||
val = _val; | val = _val; | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = std::string(1, _val); | val = std::string(1, _val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const char& value() const | const char& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2132 | skipping to change at line 2302 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<char>::is_signed; | return std::numeric_limits<char>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<char>::is_specialized; | return std::numeric_limits<char>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2153 | skipping to change at line 2328 | |||
}; | }; | |||
template <> | template <> | |||
class VarHolderImpl<std::string>: public VarHolder | class VarHolderImpl<std::string>: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(const char* pVal): _val(pVal) | VarHolderImpl(const char* pVal): _val(pVal) | |||
{ | { | |||
} | } | |||
VarHolderImpl(const std::string& val): _val(val) | VarHolderImpl(const std::string& val) : _val(val) | |||
{ | { | |||
} | } | |||
~VarHolderImpl() | ~VarHolderImpl() | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
return typeid(std::string); | return typeid(std::string); | |||
skipping to change at line 2212 | skipping to change at line 2387 | |||
val = NumberParser::parseUnsigned(_val); | val = NumberParser::parseUnsigned(_val); | |||
} | } | |||
void convert(UInt64& val) const | void convert(UInt64& val) const | |||
{ | { | |||
val = NumberParser::parseUnsigned64(_val); | val = NumberParser::parseUnsigned64(_val); | |||
} | } | |||
void convert(bool& val) const | void convert(bool& val) const | |||
{ | { | |||
static const std::string VAL_FALSE("false"); | if (_val.empty()) | |||
static const std::string VAL_INT_FALSE("0"); | ||||
if (_val.empty() || | ||||
_val == VAL_INT_FALSE || | ||||
(icompare(_val, VAL_FALSE) == 0)) | ||||
{ | { | |||
val = false; | val = false; | |||
return; | ||||
} | } | |||
else val = true; | ||||
static const std::string VAL_FALSE("false"); | ||||
static const std::string VAL_INT_FALSE("0"); | ||||
val = (_val != VAL_INT_FALSE && | ||||
(icompare(_val, VAL_FALSE) != 0)); | ||||
} | } | |||
void convert(float& val) const | void convert(float& val) const | |||
{ | { | |||
double v = NumberParser::parseFloat(_val); | double v = NumberParser::parseFloat(_val); | |||
convertToSmaller(v, val); | convertToSmaller(v, val); | |||
} | } | |||
void convert(double& val) const | void convert(double& val) const | |||
{ | { | |||
skipping to change at line 2248 | skipping to change at line 2423 | |||
val = '\0'; | val = '\0'; | |||
else | else | |||
val = _val[0]; | val = _val[0]; | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = _val; | val = _val; | |||
} | } | |||
void convert(Poco::UTF16String& val) const | ||||
{ | ||||
Poco::UnicodeConverter::convert(_val, val); | ||||
} | ||||
void convert(DateTime& val) const | void convert(DateTime& val) const | |||
{ | { | |||
int tzd = 0; | int tzd = 0; | |||
if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT , _val, val, tzd)) | if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT , _val, val, tzd)) | |||
throw BadCastException("string -> DateTime"); | throw BadCastException("string -> DateTime"); | |||
} | } | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& ldt) const | |||
{ | { | |||
int tzd = 0; | int tzd = 0; | |||
skipping to change at line 2275 | skipping to change at line 2455 | |||
void convert(Timestamp& ts) const | void convert(Timestamp& ts) const | |||
{ | { | |||
int tzd = 0; | int tzd = 0; | |||
DateTime tmp; | DateTime tmp; | |||
if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT , _val, tmp, tzd)) | if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT , _val, tmp, tzd)) | |||
throw BadCastException("string -> Timestamp"); | throw BadCastException("string -> Timestamp"); | |||
ts = tmp.timestamp(); | ts = tmp.timestamp(); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const std::string& value() const | const std:: string& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isString() const | |||
{ | { | |||
return false; | return true; | |||
} | } | |||
bool isStruct() const | std::size_t size() const | |||
{ | { | |||
return false; | return _val.length(); | |||
} | } | |||
bool isInteger() const | char& operator[](std::string::size_type n) | |||
{ | { | |||
return false; | if (n < size()) return _val.operator[](n); | |||
throw RangeException("String index out of range"); | ||||
} | } | |||
bool isSigned() const | const char& operator[](std::string::size_type n) const | |||
{ | { | |||
return false; | if (n < size()) return _val.operator[](n); | |||
throw RangeException("String index out of range"); | ||||
} | } | |||
bool isNumeric() const | private: | |||
VarHolderImpl(); | ||||
VarHolderImpl(const VarHolderImpl&); | ||||
VarHolderImpl& operator = (const VarHolderImpl&); | ||||
std::string _val; | ||||
}; | ||||
template <> | ||||
class VarHolderImpl<UTF16String>: public VarHolder | ||||
{ | ||||
public: | ||||
VarHolderImpl(const char* pVal) : _val(Poco::UnicodeConverter::to<UT | ||||
F16String>(pVal)) | ||||
{ | { | |||
return false; | } | |||
VarHolderImpl(const Poco::UTF16String& val) : _val(val) | ||||
{ | ||||
} | ||||
~VarHolderImpl() | ||||
{ | ||||
} | ||||
const std::type_info& type() const | ||||
{ | ||||
return typeid(Poco::UTF16String); | ||||
} | ||||
void convert(Int8& val) const | ||||
{ | ||||
int v = NumberParser::parse(toStdString()); | ||||
convertToSmaller(v, val); | ||||
} | ||||
void convert(Int16& val) const | ||||
{ | ||||
int v = NumberParser::parse(toStdString()); | ||||
convertToSmaller(v, val); | ||||
} | ||||
void convert(Int32& val) const | ||||
{ | ||||
val = NumberParser::parse(toStdString()); | ||||
} | ||||
void convert(Int64& val) const | ||||
{ | ||||
val = NumberParser::parse64(toStdString()); | ||||
} | ||||
void convert(UInt8& val) const | ||||
{ | ||||
unsigned int v = NumberParser::parseUnsigned(toStdString()); | ||||
convertToSmallerUnsigned(v, val); | ||||
} | ||||
void convert(UInt16& val) const | ||||
{ | ||||
unsigned int v = NumberParser::parseUnsigned(toStdString()); | ||||
convertToSmallerUnsigned(v, val); | ||||
} | ||||
void convert(UInt32& val) const | ||||
{ | ||||
val = NumberParser::parseUnsigned(toStdString()); | ||||
} | ||||
void convert(UInt64& val) const | ||||
{ | ||||
val = NumberParser::parseUnsigned64(toStdString()); | ||||
} | ||||
void convert(bool& val) const | ||||
{ | ||||
static const std::string VAL_FALSE("false"); | ||||
static const std::string VAL_INT_FALSE("0"); | ||||
if (_val.empty()) val = false; | ||||
std::string str; | ||||
UnicodeConverter::convert(_val, str); | ||||
val = (str != VAL_INT_FALSE && | ||||
(icompare(str, VAL_FALSE) != 0)); | ||||
} | ||||
void convert(float& val) const | ||||
{ | ||||
double v = NumberParser::parseFloat(toStdString()); | ||||
convertToSmaller(v, val); | ||||
} | ||||
void convert(double& val) const | ||||
{ | ||||
val = NumberParser::parseFloat(toStdString()); | ||||
} | ||||
void convert(char& val) const | ||||
{ | ||||
if (_val.empty()) | ||||
val = '\0'; | ||||
else | ||||
{ | ||||
std::string s; | ||||
UnicodeConverter::convert(_val, s); | ||||
val = s[0]; | ||||
} | ||||
} | ||||
void convert(Poco::UTF16String& val) const | ||||
{ | ||||
val = _val; | ||||
} | ||||
void convert(std::string& val) const | ||||
{ | ||||
UnicodeConverter::convert(_val, val); | ||||
} | ||||
void convert(DateTime& val) const | ||||
{ | ||||
int tzd = 0; | ||||
if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT | ||||
, toStdString(), val, tzd)) | ||||
throw BadCastException("string -> DateTime"); | ||||
} | ||||
void convert(LocalDateTime& ldt) const | ||||
{ | ||||
int tzd = 0; | ||||
DateTime tmp; | ||||
if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT | ||||
, toStdString(), tmp, tzd)) | ||||
throw BadCastException("string -> LocalDateTime"); | ||||
ldt = LocalDateTime(tzd, tmp, false); | ||||
} | ||||
void convert(Timestamp& ts) const | ||||
{ | ||||
int tzd = 0; | ||||
DateTime tmp; | ||||
if (!DateTimeParser::tryParse(DateTimeFormat::ISO8601_FORMAT | ||||
, toStdString(), tmp, tzd)) | ||||
throw BadCastException("string -> Timestamp"); | ||||
ts = tmp.timestamp(); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | ||||
return cloneHolder(pVarHolder, _val); | ||||
} | ||||
const Poco::UTF16String& value() const | ||||
{ | ||||
return _val; | ||||
} | } | |||
bool isString() const | bool isString() const | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
std::size_t size() const | ||||
{ | ||||
return _val.length(); | ||||
} | ||||
UTF16Char& operator[](Poco::UTF16String::size_type n) | ||||
{ | ||||
if (n < size()) return _val.operator[](n); | ||||
throw RangeException("String index out of range"); | ||||
} | ||||
const UTF16Char& operator[](Poco::UTF16String::size_type n) const | ||||
{ | ||||
if (n < size()) return _val.operator[](n); | ||||
throw RangeException("String index out of range"); | ||||
} | ||||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
std::string _val; | std::string toStdString() const | |||
{ | ||||
std::string str; | ||||
UnicodeConverter::convert(_val, str); | ||||
return str; | ||||
} | ||||
Poco::UTF16String _val; | ||||
}; | }; | |||
#ifndef POCO_LONG_IS_64_BIT | #ifndef POCO_LONG_IS_64_BIT | |||
template <> | template <> | |||
class VarHolderImpl<long>: public VarHolder | class VarHolderImpl<long>: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(long val): _val(val) | VarHolderImpl(long val): _val(val) | |||
{ | { | |||
skipping to change at line 2409 | skipping to change at line 2770 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const long& value() const | const long& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2444 | skipping to change at line 2805 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<long>::is_signed; | return std::numeric_limits<long>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<long>::is_specialized; | return std::numeric_limits<long>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2541 | skipping to change at line 2907 | |||
UInt8 tmp; | UInt8 tmp; | |||
convert(tmp); | convert(tmp); | |||
val = static_cast<char>(tmp); | val = static_cast<char>(tmp); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
val = NumberFormatter::format(_val); | val = NumberFormatter::format(_val); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const unsigned long& value() const | const unsigned long& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2576 | skipping to change at line 2942 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return std::numeric_limits<unsigned long>::is_signed; | return std::numeric_limits<unsigned long>::is_signed; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return std::numeric_limits<unsigned long>::is_specialized; | return std::numeric_limits<unsigned long>::is_specialized; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2610 | skipping to change at line 2981 | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
return typeid(std::vector<T>); | return typeid(std::vector<T>); | |||
} | } | |||
void convert(std::string& val) const | void convert(std::string& val) const | |||
{ | { | |||
// Serialize in JSON format: note: although this is a vector | Impl::containerToJSON(_val, val); | |||
<T>, the code only | ||||
// supports vector<Var>. Total specialization is not possibl | ||||
e | ||||
// because of the cyclic dependency between Var and VarHolde | ||||
r | ||||
// JSON format definition: [ n times: elem ',' ], no ',' for | ||||
last elem | ||||
val.append("[ "); | ||||
typename std::vector<T>::const_iterator it = _val.begin(); | ||||
typename std::vector<T>::const_iterator itEnd = _val.end(); | ||||
if (!_val.empty()) | ||||
{ | ||||
appendJSONString(val, *it); | ||||
++it; | ||||
} | ||||
for (; it != itEnd; ++it) | ||||
{ | ||||
val.append(", "); | ||||
appendJSONString(val, *it); | ||||
} | ||||
val.append(" ]"); | ||||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const std::vector<T>& value() const | const std::vector<T>& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isVector() const | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
bool isStruct() const | std::size_t size() const | |||
{ | { | |||
return false; | return _val.size(); | |||
} | } | |||
bool isInteger() const | T& operator[](typename std::vector<T>::size_type n) | |||
{ | { | |||
return false; | if (n < size()) return _val.operator[](n); | |||
throw RangeException("List index out of range"); | ||||
} | } | |||
bool isSigned() const | const T& operator[](typename std::vector<T>::size_type n) const | |||
{ | { | |||
return false; | if (n < size()) return _val.operator[](n); | |||
throw RangeException("List index out of range"); | ||||
} | } | |||
bool isNumeric() const | private: | |||
VarHolderImpl(); | ||||
VarHolderImpl(const VarHolderImpl&); | ||||
VarHolderImpl& operator = (const VarHolderImpl&); | ||||
std::vector<T> _val; | ||||
}; | ||||
template <typename T> | ||||
class VarHolderImpl<std::list<T> >: public VarHolder | ||||
{ | ||||
public: | ||||
VarHolderImpl(const std::list<T>& val): _val(val) | ||||
{ | { | |||
return false; | ||||
} | } | |||
bool isString() const | ~VarHolderImpl() | |||
{ | { | |||
return false; | ||||
} | } | |||
T& operator[](typename std::vector<T>::size_type n) | const std::type_info& type() const | |||
{ | { | |||
return _val.operator[](n); | return typeid(std::list<T>); | |||
} | } | |||
const T& operator[](typename std::vector<T>::size_type n) const | void convert(std::string& val) const | |||
{ | ||||
Impl::containerToJSON(_val, val); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | ||||
return cloneHolder(pVarHolder, _val); | ||||
} | ||||
const std::list<T>& value() const | ||||
{ | ||||
return _val; | ||||
} | ||||
bool isList() const | ||||
{ | ||||
return true; | ||||
} | ||||
std::size_t size() const | ||||
{ | { | |||
return _val.operator[](n); | return _val.size(); | |||
} | ||||
T& operator[](typename std::list<T>::size_type n) | ||||
{ | ||||
if (n >= size()) | ||||
throw RangeException("List index out of range"); | ||||
typename std::list<T>::size_type counter = 0; | ||||
typename std::list<T>::iterator it = _val.begin(); | ||||
for (; counter < n; ++counter) ++it; | ||||
return *it; | ||||
} | ||||
const T& operator[](typename std::list<T>::size_type n) const | ||||
{ | ||||
if (n >= size()) | ||||
throw RangeException("List index out of range"); | ||||
typename std::list<T>::size_type counter = 0; | ||||
typename std::list<T>::const_iterator it = _val.begin(); | ||||
for (; counter < n; ++counter) ++it; | ||||
return *it; | ||||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
std::vector<T> _val; | std::list<T> _val; | |||
}; | ||||
template <typename T> | ||||
class VarHolderImpl<std::deque<T> >: public VarHolder | ||||
{ | ||||
public: | ||||
VarHolderImpl(const std::deque<T>& val): _val(val) | ||||
{ | ||||
} | ||||
~VarHolderImpl() | ||||
{ | ||||
} | ||||
const std::type_info& type() const | ||||
{ | ||||
return typeid(std::deque<T>); | ||||
} | ||||
void convert(std::string& val) const | ||||
{ | ||||
Impl::containerToJSON(_val, val); | ||||
} | ||||
VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | ||||
{ | ||||
return cloneHolder(pVarHolder, _val); | ||||
} | ||||
const std::deque<T>& value() const | ||||
{ | ||||
return _val; | ||||
} | ||||
bool isDeque() const | ||||
{ | ||||
return true; | ||||
} | ||||
std::size_t size() const | ||||
{ | ||||
return _val.size(); | ||||
} | ||||
T& operator[](typename std::deque<T>::size_type n) | ||||
{ | ||||
if (n < size()) return _val.operator[](n); | ||||
throw RangeException("List index out of range"); | ||||
} | ||||
const T& operator[](typename std::deque<T>::size_type n) const | ||||
{ | ||||
if (n < size()) return _val.operator[](n); | ||||
throw RangeException("List index out of range"); | ||||
} | ||||
private: | ||||
VarHolderImpl(); | ||||
VarHolderImpl(const VarHolderImpl&); | ||||
VarHolderImpl& operator = (const VarHolderImpl&); | ||||
std::deque<T> _val; | ||||
}; | }; | |||
template <> | template <> | |||
class VarHolderImpl<DateTime>: public VarHolder | class VarHolderImpl<DateTime>: public VarHolder | |||
{ | { | |||
public: | public: | |||
VarHolderImpl(const DateTime& val): _val(val) | VarHolderImpl(const DateTime& val): _val(val) | |||
{ | { | |||
} | } | |||
~VarHolderImpl() | ~VarHolderImpl() | |||
{ | { | |||
} | } | |||
const std::type_info& type() const | const std::type_info& type() const | |||
{ | { | |||
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(); | |||
} | } | |||
void convert(Int64& val) const | void convert(Int64& val) const | |||
{ | { | |||
val = _val.timestamp().epochMicroseconds(); | val = _val.timestamp().epochMicroseconds(); | |||
} | } | |||
void convert(UInt64& val) const | void convert(UInt64& val) const | |||
skipping to change at line 2752 | skipping to change at line 3226 | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& ldt) const | |||
{ | { | |||
ldt = _val.timestamp(); | ldt = _val.timestamp(); | |||
} | } | |||
void convert(Timestamp& ts) const | void convert(Timestamp& ts) const | |||
{ | { | |||
ts = _val.timestamp(); | ts = _val.timestamp(); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const DateTime& value() const | const DateTime& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2787 | skipping to change at line 3261 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2847 | skipping to change at line 3326 | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& ldt) const | |||
{ | { | |||
ldt = _val; | ldt = _val; | |||
} | } | |||
void convert(Timestamp& ts) const | void convert(Timestamp& ts) const | |||
{ | { | |||
ts = _val.timestamp(); | ts = _val.timestamp(); | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const LocalDateTime& value() const | const LocalDateTime& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2882 | skipping to change at line 3361 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
skipping to change at line 2942 | skipping to change at line 3426 | |||
void convert(LocalDateTime& ldt) const | void convert(LocalDateTime& ldt) const | |||
{ | { | |||
ldt = _val; | ldt = _val; | |||
} | } | |||
void convert(Timestamp& ts) const | void convert(Timestamp& ts) const | |||
{ | { | |||
ts = _val; | ts = _val; | |||
} | } | |||
VarHolder* clone() const | VarHolder* clone(Placeholder<VarHolder>* pVarHolder = 0) const | |||
{ | { | |||
return new VarHolderImpl(_val); | return cloneHolder(pVarHolder, _val); | |||
} | } | |||
const Timestamp& value() const | const Timestamp& value() const | |||
{ | { | |||
return _val; | return _val; | |||
} | } | |||
bool isArray() const | bool isArray() const | |||
{ | { | |||
return false; | return false; | |||
skipping to change at line 2977 | skipping to change at line 3461 | |||
bool isSigned() const | bool isSigned() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isNumeric() const | bool isNumeric() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
bool isBoolean() const | ||||
{ | ||||
return false; | ||||
} | ||||
bool isString() const | bool isString() const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
private: | private: | |||
VarHolderImpl(); | VarHolderImpl(); | |||
VarHolderImpl(const VarHolderImpl&); | VarHolderImpl(const VarHolderImpl&); | |||
VarHolderImpl& operator = (const VarHolderImpl&); | VarHolderImpl& operator = (const VarHolderImpl&); | |||
Timestamp _val; | Timestamp _val; | |||
}; | }; | |||
typedef std::vector<Var> Vector; | ||||
typedef std::deque<Var> Deque; | ||||
typedef std::list<Var> List; | ||||
typedef Vector Array; | ||||
} } // namespace Poco::Dynamic | } } // namespace Poco::Dynamic | |||
#endif // Foundation_VarHolder_INCLUDED | #endif // Foundation_VarHolder_INCLUDED | |||
End of changes. 135 change blocks. | ||||
170 lines changed or deleted | 664 lines changed or added | |||
Version.h | Version.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Version | // Module: Version | |||
// | // | |||
// Version information for the POCO C++ Libraries. | // Version information for the POCO C++ Libraries. | |||
// | // | |||
// Copyright (c) 2004-2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Version_INCLUDED | #ifndef Foundation_Version_INCLUDED | |||
#define Foundation_Version_INCLUDED | #define Foundation_Version_INCLUDED | |||
// | // | |||
// Version Information | // Version Information | |||
// | // | |||
// Since 1.6.0, we're using Semantic Versioning 2.0 | ||||
// (http://semver.org/spec/v2.0.0.html) | ||||
// | ||||
// Version format is 0xAABBCCDD, where | // Version format is 0xAABBCCDD, where | |||
// - AA is the major version number, | // - AA is the major version number, | |||
// - BB is the minor version number, | // - BB is the minor version number, | |||
// - CC is the revision number, and | // - CC is the patch version number, and | |||
// - DD is the patch level number. | // - DD is the pre-release designation/number. | |||
// Note that some patch level numbers have | // The pre-release designation hex digits have a special meaning: | |||
// a special meaning: | // 00: final/stable releases | |||
// Dx are development releases | // Dx: development releases | |||
// Ax are alpha releases | // Ax: alpha releases | |||
// Bx are beta releases | // Bx: beta releases | |||
// | // | |||
#define POCO_VERSION 0x01050000 | #define POCO_VERSION 0x01060000 | |||
#endif // Foundation_Version_INCLUDED | #endif // Foundation_Version_INCLUDED | |||
End of changes. 4 change blocks. | ||||
40 lines changed or deleted | 12 lines changed or added | |||
Void.h | Void.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Core | // Package: Core | |||
// Module: Void | // Module: Void | |||
// | // | |||
// Definition of the Void class. | // Definition of the Void class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Void_INCLUDED | #ifndef Foundation_Void_INCLUDED | |||
#define Foundation_Void_INCLUDED | #define Foundation_Void_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
namespace Poco { | namespace Poco { | |||
class Foundation_API Void | class Foundation_API Void | |||
skipping to change at line 75 | skipping to change at line 55 | |||
Void& operator = (const Void& v); | Void& operator = (const Void& v); | |||
/// Assigns another void. | /// Assigns another void. | |||
bool operator ==(const Void& v) const; | bool operator ==(const Void& v) const; | |||
/// Will return always true due to Voids having no members. | /// Will return always true due to Voids having no members. | |||
bool operator !=(const Void& v) const; | bool operator !=(const Void& v) const; | |||
/// Will return always false due to Voids having no members. | /// Will return always false due to Voids having no members. | |||
}; | }; | |||
inline bool Void::operator ==(const Void& v) const | inline bool Void::operator ==(const Void& /*v*/) const | |||
{ | { | |||
return true; | return true; | |||
} | } | |||
inline bool Void::operator !=(const Void& v) const | inline bool Void::operator !=(const Void& /*v*/) const | |||
{ | { | |||
return false; | return false; | |||
} | } | |||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_Void_INCLUDED | #endif // Foundation_Void_INCLUDED | |||
End of changes. 3 change blocks. | ||||
34 lines changed or deleted | 3 lines changed or added | |||
WebSocket.h | WebSocket.h | |||
---|---|---|---|---|
// | // | |||
// WebSocket.h | // WebSocket.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/WebSocket.h#1 $ | // $Id: //poco/1.4/Net/include/Poco/Net/WebSocket.h#4 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: WebSocket | // Package: WebSocket | |||
// Module: WebSocket | // Module: WebSocket | |||
// | // | |||
// Definition of the WebSocket class. | // Definition of the WebSocket class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_WebSocket_INCLUDED | #ifndef Net_WebSocket_INCLUDED | |||
#define Net_WebSocket_INCLUDED | #define Net_WebSocket_INCLUDED | |||
#include "Poco/Net/Net.h" | #include "Poco/Net/Net.h" | |||
#include "Poco/Net/StreamSocket.h" | #include "Poco/Net/StreamSocket.h" | |||
#include "Poco/Net/HTTPCredentials.h" | #include "Poco/Net/HTTPCredentials.h" | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 94 | skipping to change at line 74 | |||
enum FrameOpcodes | enum FrameOpcodes | |||
/// Frame header opcodes. | /// Frame header opcodes. | |||
{ | { | |||
FRAME_OP_CONT = 0x00, /// Continuation frame. | FRAME_OP_CONT = 0x00, /// Continuation frame. | |||
FRAME_OP_TEXT = 0x01, /// Text frame. | FRAME_OP_TEXT = 0x01, /// Text frame. | |||
FRAME_OP_BINARY = 0x02, /// Binary frame. | FRAME_OP_BINARY = 0x02, /// Binary frame. | |||
FRAME_OP_CLOSE = 0x08, /// Close connection. | FRAME_OP_CLOSE = 0x08, /// Close connection. | |||
FRAME_OP_PING = 0x09, /// Ping frame. | FRAME_OP_PING = 0x09, /// Ping frame. | |||
FRAME_OP_PONG = 0x0a, /// Pong frame. | FRAME_OP_PONG = 0x0a, /// Pong frame. | |||
FRAME_OP_BITMASK = 0x0f /// Bit mask for opcodes. | FRAME_OP_BITMASK = 0x0f, /// Bit mask for opcodes. | |||
FRAME_OP_SETRAW = 0x100 /// Set raw flags (for use with sen | ||||
dBytes() and FRAME_OP_CONT). | ||||
}; | }; | |||
enum SendFlags | enum SendFlags | |||
/// Combined header flags and opcodes for use with sendFrame (). | /// Combined header flags and opcodes for use with sendFrame (). | |||
{ | { | |||
FRAME_TEXT = FRAME_FLAG_FIN | FRAME_OP_TEXT, | FRAME_TEXT = FRAME_FLAG_FIN | FRAME_OP_TEXT, | |||
/// Use this for sending a single text (UTF-8) paylo ad frame. | /// Use this for sending a single text (UTF-8) paylo ad frame. | |||
FRAME_BINARY = FRAME_FLAG_FIN | FRAME_OP_BINARY | FRAME_BINARY = FRAME_FLAG_FIN | FRAME_OP_BINARY | |||
/// Use this for sending a single binary payload fra me. | /// Use this for sending a single binary payload fra me. | |||
}; | }; | |||
skipping to change at line 184 | skipping to change at line 165 | |||
/// The given credentials are used for authentication | /// The given credentials are used for authentication | |||
/// if requested by the server. | /// if requested by the server. | |||
/// | /// | |||
/// Additional HTTP headers for the initial handshake reques t | /// Additional HTTP headers for the initial handshake reques t | |||
/// (such as Origin or Sec-WebSocket-Protocol) can be given | /// (such as Origin or Sec-WebSocket-Protocol) can be given | |||
/// in the request object. | /// in the request object. | |||
/// | /// | |||
/// The result of the handshake can be obtained from the res ponse | /// The result of the handshake can be obtained from the res ponse | |||
/// object. | /// object. | |||
WebSocket(const Socket& socket); | ||||
/// Creates a WebSocket from another Socket, which must be a | ||||
WebSocket, | ||||
/// otherwise a Poco::InvalidArgumentException will be throw | ||||
n. | ||||
virtual ~WebSocket(); | virtual ~WebSocket(); | |||
/// Destroys the StreamSocket. | /// Destroys the StreamSocket. | |||
WebSocket& operator = (const Socket& socket); | WebSocket& operator = (const Socket& socket); | |||
/// Assignment operator. | /// Assignment operator. | |||
/// | /// | |||
/// Releases the socket's SocketImpl and | /// The other socket must be a WebSocket, otherwise a Poco:: | |||
/// attaches the SocketImpl from the other socket and | InvalidArgumentException | |||
/// increments the reference count of the SocketImpl. | /// will be thrown. | |||
void shutdown(); | void shutdown(); | |||
/// Sends a Close control frame to the server end of | /// Sends a Close control frame to the server end of | |||
/// the connection to initiate an orderly shutdown | /// the connection to initiate an orderly shutdown | |||
/// of the connection. | /// of the connection. | |||
void shutdown(Poco::UInt16 statusCode, const std::string& statusMess age = ""); | void shutdown(Poco::UInt16 statusCode, const std::string& statusMess age = ""); | |||
/// Sends a Close control frame to the server end of | /// Sends a Close control frame to the server end of | |||
/// the connection to initiate an orderly shutdown | /// the connection to initiate an orderly shutdown | |||
/// of the connection. | /// of the connection. | |||
skipping to change at line 225 | skipping to change at line 209 | |||
/// value denoting a certain condition. | /// value denoting a certain condition. | |||
int receiveFrame(void* buffer, int length, int& flags); | int receiveFrame(void* buffer, int length, int& flags); | |||
/// Receives a frame from the socket and stores it | /// Receives a frame from the socket and stores it | |||
/// in buffer. Up to length bytes are received. If | /// in buffer. Up to length bytes are received. If | |||
/// the frame's payload is larger, a WebSocketException | /// the frame's payload is larger, a WebSocketException | |||
/// is thrown and the WebSocket connection must be | /// is thrown and the WebSocket connection must be | |||
/// terminated. | /// terminated. | |||
/// | /// | |||
/// Returns the number of bytes received. | /// Returns the number of bytes received. | |||
/// A return value of 0 means a graceful shutdown | /// A return value of 0 means that the peer has | |||
/// of the connection from the peer. | /// shut down or closed the connection. | |||
/// | /// | |||
/// Throws a TimeoutException if a receive timeout has | /// Throws a TimeoutException if a receive timeout has | |||
/// been set and nothing is received within that interval. | /// been set and nothing is received within that interval. | |||
/// Throws a NetException (or a subclass) in case of other e rrors. | /// Throws a NetException (or a subclass) in case of other e rrors. | |||
/// | /// | |||
/// The frame flags and opcode (FrameFlags and FrameOpcodes) | /// The frame flags and opcode (FrameFlags and FrameOpcodes) | |||
/// is stored in flags. | /// is stored in flags. | |||
Mode mode() const; | Mode mode() const; | |||
/// Returns WS_SERVER if the WebSocket is a server-side | /// Returns WS_SERVER if the WebSocket is a server-side | |||
End of changes. 6 change blocks. | ||||
39 lines changed or deleted | 16 lines changed or added | |||
WebSocketImpl.h | WebSocketImpl.h | |||
---|---|---|---|---|
// | // | |||
// WebSocketImpl.h | // WebSocketImpl.h | |||
// | // | |||
// $Id: //poco/1.4/Net/include/Poco/Net/WebSocketImpl.h#1 $ | // $Id: //poco/1.4/Net/include/Poco/Net/WebSocketImpl.h#5 $ | |||
// | // | |||
// Library: Net | // Library: Net | |||
// Package: WebSocket | // Package: WebSocket | |||
// Module: WebSocketImpl | // Module: WebSocketImpl | |||
// | // | |||
// Definition of the StreamSocketImpl class. | // Definition of the StreamSocketImpl class. | |||
// | // | |||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2012, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Net_WebSocketImpl_INCLUDED | #ifndef Net_WebSocketImpl_INCLUDED | |||
#define Net_WebSocketImpl_INCLUDED | #define Net_WebSocketImpl_INCLUDED | |||
#include "Poco/Net/StreamSocketImpl.h" | #include "Poco/Net/StreamSocketImpl.h" | |||
#include "Poco/Random.h" | #include "Poco/Random.h" | |||
namespace Poco { | namespace Poco { | |||
namespace Net { | namespace Net { | |||
skipping to change at line 77 | skipping to change at line 57 | |||
virtual void bind6(const SocketAddress& address, bool reuseAddress = false, bool ipV6Only = false); | virtual void bind6(const SocketAddress& address, bool reuseAddress = false, bool ipV6Only = false); | |||
virtual void listen(int backlog = 64); | virtual void listen(int backlog = 64); | |||
virtual void close(); | virtual void close(); | |||
virtual void shutdownReceive(); | virtual void shutdownReceive(); | |||
virtual void shutdownSend(); | virtual void shutdownSend(); | |||
virtual void shutdown(); | virtual void shutdown(); | |||
virtual int sendTo(const void* buffer, int length, const SocketAddre ss& address, int flags = 0); | virtual int sendTo(const void* buffer, int length, const SocketAddre ss& address, int flags = 0); | |||
virtual int receiveFrom(void* buffer, int length, SocketAddress& add ress, int flags = 0); | virtual int receiveFrom(void* buffer, int length, SocketAddress& add ress, int flags = 0); | |||
virtual void sendUrgent(unsigned char data); | virtual void sendUrgent(unsigned char data); | |||
virtual bool secure() const; | virtual bool secure() const; | |||
virtual void setSendTimeout(const Poco::Timespan& timeout); | ||||
virtual Poco::Timespan getSendTimeout(); | ||||
virtual void setReceiveTimeout(const Poco::Timespan& timeout); | ||||
virtual Poco::Timespan getReceiveTimeout(); | ||||
// Internal | // Internal | |||
int frameFlags() const; | int frameFlags() const; | |||
/// Returns the frame flags of the most recently received fr ame. | /// Returns the frame flags of the most recently received fr ame. | |||
bool mustMaskPayload() const; | bool mustMaskPayload() const; | |||
/// Returns true if the payload must be masked. | /// Returns true if the payload must be masked. | |||
protected: | protected: | |||
enum | enum | |||
{ | { | |||
FRAME_FLAG_MASK = 0x80, | FRAME_FLAG_MASK = 0x80, | |||
MAX_HEADER_LENGTH = 14 | MAX_HEADER_LENGTH = 14 | |||
}; | }; | |||
int receiveNBytes(void* buffer, int bytes); | ||||
virtual ~WebSocketImpl(); | virtual ~WebSocketImpl(); | |||
private: | private: | |||
WebSocketImpl(); | WebSocketImpl(); | |||
StreamSocketImpl* _pStreamSocketImpl; | StreamSocketImpl* _pStreamSocketImpl; | |||
int _frameFlags; | int _frameFlags; | |||
bool _mustMaskPayload; | bool _mustMaskPayload; | |||
Poco::Random _rnd; | Poco::Random _rnd; | |||
}; | }; | |||
End of changes. 4 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
WhitespaceFilter.h | WhitespaceFilter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: WhitespaceFilter | // Module: WhitespaceFilter | |||
// | // | |||
// Definition of the WhitespaceFilter class. | // Definition of the WhitespaceFilter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_WhitespaceFilter_INCLUDED | #ifndef SAX_WhitespaceFilter_INCLUDED | |||
#define SAX_WhitespaceFilter_INCLUDED | #define SAX_WhitespaceFilter_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/XMLFilterImpl.h" | #include "Poco/SAX/XMLFilterImpl.h" | |||
#include "Poco/SAX/LexicalHandler.h" | #include "Poco/SAX/LexicalHandler.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
WinRegistryConfiguration.h | WinRegistryConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Windows | // Package: Windows | |||
// Module: WinRegistryConfiguration | // Module: WinRegistryConfiguration | |||
// | // | |||
// Definition of the WinRegistryConfiguration class. | // Definition of the WinRegistryConfiguration class. | |||
// | // | |||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_WinRegistryConfiguration_INCLUDED | #ifndef Util_WinRegistryConfiguration_INCLUDED | |||
#define Util_WinRegistryConfiguration_INCLUDED | #define Util_WinRegistryConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/Util/AbstractConfiguration.h" | #include "Poco/Util/AbstractConfiguration.h" | |||
#include "Poco/String.h" | #include "Poco/String.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
WinRegistryKey.h | WinRegistryKey.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Windows | // Package: Windows | |||
// Module: WinRegistryKey | // Module: WinRegistryKey | |||
// | // | |||
// Definition of the WinRegistryKey class. | // Definition of the WinRegistryKey class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_WinRegistryKey_INCLUDED | #ifndef Util_WinRegistryKey_INCLUDED | |||
#define Util_WinRegistryKey_INCLUDED | #define Util_WinRegistryKey_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
#include <vector> | #include <vector> | |||
namespace Poco { | namespace Poco { | |||
skipping to change at line 63 | skipping to change at line 43 | |||
{ | { | |||
public: | public: | |||
typedef std::vector<std::string> Keys; | typedef std::vector<std::string> Keys; | |||
typedef std::vector<std::string> Values; | typedef std::vector<std::string> Values; | |||
enum Type | enum Type | |||
{ | { | |||
REGT_NONE = 0, | REGT_NONE = 0, | |||
REGT_STRING = 1, | REGT_STRING = 1, | |||
REGT_STRING_EXPAND = 2, | REGT_STRING_EXPAND = 2, | |||
REGT_BINARY = 3, | ||||
REGT_DWORD = 4, | REGT_DWORD = 4, | |||
REGT_QWORD = 11 | REGT_QWORD = 11 | |||
}; | }; | |||
WinRegistryKey(const std::string& key, bool readOnly = false, REGSAM extraSam = 0); | WinRegistryKey(const std::string& key, bool readOnly = false, REGSAM extraSam = 0); | |||
/// Creates the WinRegistryKey. | /// Creates the WinRegistryKey. | |||
/// | /// | |||
/// The key must start with one of the root key names | /// The key must start with one of the root key names | |||
/// like HKEY_CLASSES_ROOT, e.g. HKEY_LOCAL_MACHINE\SYSTEM\C urrentControlSet\Services. | /// like HKEY_CLASSES_ROOT, e.g. HKEY_LOCAL_MACHINE\SYSTEM\C urrentControlSet\Services. | |||
/// | /// | |||
skipping to change at line 115 | skipping to change at line 96 | |||
/// An empty name denotes the default value. | /// An empty name denotes the default value. | |||
std::string getStringExpand(const std::string& name); | std::string getStringExpand(const std::string& name); | |||
/// Returns the string value (REG_EXPAND_SZ) with the given name. | /// Returns the string value (REG_EXPAND_SZ) with the given name. | |||
/// An empty name denotes the default value. | /// An empty name denotes the default value. | |||
/// All references to environment variables (%VAR%) in the s tring | /// All references to environment variables (%VAR%) in the s tring | |||
/// are expanded. | /// are expanded. | |||
/// | /// | |||
/// Throws a NotFoundException if the value does not exist. | /// Throws a NotFoundException if the value does not exist. | |||
void setBinary(const std::string& name, const std::vector<char>& val | ||||
ue); | ||||
/// Sets the string value (REG_BINARY) with the given name. | ||||
/// An empty name denotes the default value. | ||||
std::vector<char> getBinary(const std::string& name); | ||||
/// Returns the string value (REG_BINARY) with the given nam | ||||
e. | ||||
/// An empty name denotes the default value. | ||||
/// | ||||
/// Throws a NotFoundException if the value does not exist. | ||||
void setInt(const std::string& name, int value); | void setInt(const std::string& name, int value); | |||
/// Sets the numeric (REG_DWORD) value with the given name. | /// Sets the numeric (REG_DWORD) value with the given name. | |||
/// An empty name denotes the default value. | /// An empty name denotes the default value. | |||
int getInt(const std::string& name); | int getInt(const std::string& name); | |||
/// Returns the numeric value (REG_DWORD) with the given nam e. | /// Returns the numeric value (REG_DWORD) with the given nam e. | |||
/// An empty name denotes the default value. | /// An empty name denotes the default value. | |||
/// | /// | |||
/// Throws a NotFoundException if the value does not exist. | /// Throws a NotFoundException if the value does not exist. | |||
#if defined(POCO_HAVE_INT64) | #if defined(POCO_HAVE_INT64) | |||
void setInt64(const std::string& name, Poco::Int64 value); | ||||
/// Sets the numeric (REG_QWORD) value with the given name. | ||||
/// An empty name denotes the default value. | ||||
Poco::Int64 getInt64(const std::string& name); | Poco::Int64 getInt64(const std::string& name); | |||
/// Returns the numeric value (REG_QWORD) with the given nam e. | /// Returns the numeric value (REG_QWORD) with the given nam e. | |||
/// An empty name denotes the default value. | /// An empty name denotes the default value. | |||
/// | /// | |||
/// Throws a NotFoundException if the value does not exist. | /// Throws a NotFoundException if the value does not exist. | |||
#endif // POCO_HAVE_INT64 | #endif // POCO_HAVE_INT64 | |||
void deleteValue(const std::string& name); | void deleteValue(const std::string& name); | |||
/// Deletes the value with the given name. | /// Deletes the value with the given name. | |||
End of changes. 4 change blocks. | ||||
32 lines changed or deleted | 18 lines changed or added | |||
WinService.h | WinService.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Windows | // Package: Windows | |||
// Module: WinService | // Module: WinService | |||
// | // | |||
// Definition of the WinService class. | // Definition of the WinService class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_WinService_INCLUDED | #ifndef Util_WinService_INCLUDED | |||
#define Util_WinService_INCLUDED | #define Util_WinService_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
#if defined(POCO_WIN32_UTF8) | #if defined(POCO_WIN32_UTF8) | |||
#define POCO_LPQUERY_SERVICE_CONFIG LPQUERY_SERVICE_CONFIGW | #define POCO_LPQUERY_SERVICE_CONFIG LPQUERY_SERVICE_CONFIGW | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Windows1250Encoding.h | Windows1250Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Windows1250Encoding | // Module: Windows1250Encoding | |||
// | // | |||
// Definition of the Windows1250Encoding class. | // Definition of the Windows1250Encoding class. | |||
// | // | |||
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Windows1250Encoding_INCLUDED | #ifndef Foundation_Windows1250Encoding_INCLUDED | |||
#define Foundation_Windows1250Encoding_INCLUDED | #define Foundation_Windows1250Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Windows1251Encoding.h | Windows1251Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Windows1251Encoding | // Module: Windows1251Encoding | |||
// | // | |||
// Definition of the Windows1251Encoding class. | // Definition of the Windows1251Encoding class. | |||
// | // | |||
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Windows1251Encoding_INCLUDED | #ifndef Foundation_Windows1251Encoding_INCLUDED | |||
#define Foundation_Windows1251Encoding_INCLUDED | #define Foundation_Windows1251Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
Windows1252Encoding.h | Windows1252Encoding.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Text | // Package: Text | |||
// Module: Windows1252Encoding | // Module: Windows1252Encoding | |||
// | // | |||
// Definition of the Windows1252Encoding class. | // Definition of the Windows1252Encoding class. | |||
// | // | |||
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_Windows1252Encoding_INCLUDED | #ifndef Foundation_Windows1252Encoding_INCLUDED | |||
#define Foundation_Windows1252Encoding_INCLUDED | #define Foundation_Windows1252Encoding_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/TextEncoding.h" | #include "Poco/TextEncoding.h" | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
WindowsConsoleChannel.h | WindowsConsoleChannel.h | |||
---|---|---|---|---|
// | // | |||
// WindowsConsoleChannel.h | // WindowsConsoleChannel.h | |||
// | // | |||
// $Id: //poco/1.4/Foundation/include/Poco/WindowsConsoleChannel.h#1 $ | // $Id: //poco/1.4/Foundation/include/Poco/WindowsConsoleChannel.h#2 $ | |||
// | // | |||
// Library: Foundation | // Library: Foundation | |||
// Package: Logging | // Package: Logging | |||
// Module: WindowsConsoleChannel | // Module: WindowsConsoleChannel | |||
// | // | |||
// Definition of the WindowsConsoleChannel class. | // Definition of the WindowsConsoleChannel class. | |||
// | // | |||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Foundation_WindowsConsoleChannel_INCLUDED | #ifndef Foundation_WindowsConsoleChannel_INCLUDED | |||
#define Foundation_WindowsConsoleChannel_INCLUDED | #define Foundation_WindowsConsoleChannel_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
#include "Poco/Channel.h" | #include "Poco/Channel.h" | |||
#include "Poco/Mutex.h" | #include "Poco/Mutex.h" | |||
#include "Poco/UnWindows.h" | #include "Poco/UnWindows.h" | |||
skipping to change at line 81 | skipping to change at line 61 | |||
/// Logs the given message to the channel's stream. | /// Logs the given message to the channel's stream. | |||
protected: | protected: | |||
~WindowsConsoleChannel(); | ~WindowsConsoleChannel(); | |||
private: | private: | |||
HANDLE _hConsole; | HANDLE _hConsole; | |||
bool _isFile; | bool _isFile; | |||
}; | }; | |||
class Foundation_API WindowsColorConsoleChannel: public Channel | ||||
/// A channel that writes to the Windows console. | ||||
/// | ||||
/// Only the message's text is written, followed | ||||
/// by a newline. | ||||
/// | ||||
/// If POCO has been compiled with POCO_WIN32_UTF8, | ||||
/// log messages are assumed to be UTF-8 encoded, and | ||||
/// are converted to UTF-16 prior to writing them to the | ||||
/// console. This is the main difference to the ConsoleChannel | ||||
/// class, which cannot handle UTF-8 encoded messages on Windows. | ||||
/// | ||||
/// Messages can be colored depending on priority. | ||||
/// | ||||
/// To enable message coloring, set the "enableColors" | ||||
/// property to true (default). Furthermore, colors can be | ||||
/// configured by setting the following properties | ||||
/// (default values are given in parenthesis): | ||||
/// | ||||
/// * traceColor (gray) | ||||
/// * debugColor (gray) | ||||
/// * informationColor (default) | ||||
/// * noticeColor (default) | ||||
/// * warningColor (yellow) | ||||
/// * errorColor (lightRed) | ||||
/// * criticalColor (lightRed) | ||||
/// * fatalColor (lightRed) | ||||
/// | ||||
/// The following color values are supported: | ||||
/// | ||||
/// * default | ||||
/// * black | ||||
/// * red | ||||
/// * green | ||||
/// * brown | ||||
/// * blue | ||||
/// * magenta | ||||
/// * cyan | ||||
/// * gray | ||||
/// * darkgray | ||||
/// * lightRed | ||||
/// * lightGreen | ||||
/// * yellow | ||||
/// * lightBlue | ||||
/// * lightMagenta | ||||
/// * lightCyan | ||||
/// * white | ||||
/// | ||||
/// Chain this channel to a FormattingChannel with an | ||||
/// appropriate Formatter to control what is contained | ||||
/// in the text. | ||||
/// | ||||
/// Only available on Windows platforms. | ||||
{ | ||||
public: | ||||
WindowsColorConsoleChannel(); | ||||
/// Creates the WindowsConsoleChannel. | ||||
void log(const Message& msg); | ||||
/// Logs the given message to the channel's stream. | ||||
void setProperty(const std::string& name, const std::string& value); | ||||
/// Sets the property with the given name. | ||||
/// | ||||
/// The following properties are supported: | ||||
/// * enableColors: Enable or disable colors. | ||||
/// * traceColor: Specify color for trace messages. | ||||
/// * debugColor: Specify color for debug messages. | ||||
/// * informationColor: Specify color for information mes | ||||
sages. | ||||
/// * noticeColor: Specify color for notice messages | ||||
. | ||||
/// * warningColor: Specify color for warning message | ||||
s. | ||||
/// * errorColor: Specify color for error messages. | ||||
/// * criticalColor: Specify color for critical messag | ||||
es. | ||||
/// * fatalColor: Specify color for fatal messages. | ||||
/// | ||||
/// See the class documentation for a list of supported colo | ||||
r values. | ||||
std::string getProperty(const std::string& name) const; | ||||
/// Returns the value of the property with the given name. | ||||
/// See setProperty() for a description of the supported | ||||
/// properties. | ||||
protected: | ||||
enum Color | ||||
{ | ||||
CC_BLACK = 0x0000, | ||||
CC_RED = 0x0004, | ||||
CC_GREEN = 0x0002, | ||||
CC_BROWN = 0x0006, | ||||
CC_BLUE = 0x0001, | ||||
CC_MAGENTA = 0x0005, | ||||
CC_CYAN = 0x0003, | ||||
CC_GRAY = 0x0007, | ||||
CC_DARKGRAY = 0x0008, | ||||
CC_LIGHTRED = 0x000C, | ||||
CC_LIGHTGREEN = 0x000A, | ||||
CC_YELLOW = 0x000E, | ||||
CC_LIGHTBLUE = 0x0009, | ||||
CC_LIGHTMAGENTA = 0x000D, | ||||
CC_LIGHTCYAN = 0x000B, | ||||
CC_WHITE = 0x000F | ||||
}; | ||||
~WindowsColorConsoleChannel(); | ||||
WORD parseColor(const std::string& color) const; | ||||
std::string formatColor(WORD color) const; | ||||
void initColors(); | ||||
private: | ||||
bool _enableColors; | ||||
HANDLE _hConsole; | ||||
bool _isFile; | ||||
WORD _colors[9]; | ||||
}; | ||||
} // namespace Poco | } // namespace Poco | |||
#endif // Foundation_WindowsConsoleChannel_INCLUDED | #endif // Foundation_WindowsConsoleChannel_INCLUDED | |||
End of changes. 3 change blocks. | ||||
33 lines changed or deleted | 122 lines changed or added | |||
XML.h | XML.h | |||
---|---|---|---|---|
skipping to change at line 17 | skipping to change at line 17 | |||
// Package: XML | // Package: XML | |||
// Module: XML | // Module: XML | |||
// | // | |||
// Basic definitions for the Poco XML library. | // Basic definitions for the Poco XML library. | |||
// This file must be the first file included by every other XML | // This file must be the first file included by every other XML | |||
// header file. | // header file. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_XML_INCLUDED | #ifndef XML_XML_INCLUDED | |||
#define XML_XML_INCLUDED | #define XML_XML_INCLUDED | |||
#include "Poco/Foundation.h" | #include "Poco/Foundation.h" | |||
// | // | |||
// The following block is the standard way of creating macros which make ex porting | // The following block is the standard way of creating macros which make ex porting | |||
// from a DLL simpler. All files within this DLL are compiled with the XML_ EXPORTS | // from a DLL simpler. All files within this DLL are compiled with the XML_ EXPORTS | |||
skipping to change at line 62 | skipping to change at line 42 | |||
// | // | |||
#if defined(_WIN32) && defined(POCO_DLL) | #if defined(_WIN32) && defined(POCO_DLL) | |||
#if defined(XML_EXPORTS) | #if defined(XML_EXPORTS) | |||
#define XML_API __declspec(dllexport) | #define XML_API __declspec(dllexport) | |||
#else | #else | |||
#define XML_API __declspec(dllimport) | #define XML_API __declspec(dllimport) | |||
#endif | #endif | |||
#endif | #endif | |||
#if !defined(XML_API) | #if !defined(XML_API) | |||
#define XML_API | #if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__ | |||
GNUC__ >= 4) | ||||
#define XML_API __attribute__ ((visibility ("default"))) | ||||
#else | ||||
#define XML_API | ||||
#endif | ||||
#endif | #endif | |||
// | // | |||
// Automatically link XML library. | // Automatically link XML library. | |||
// | // | |||
#if defined(_MSC_VER) | #if defined(_MSC_VER) | |||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(XML_EXPORTS) | #if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(XML_EXPORTS) | |||
#pragma comment(lib, "PocoXML" POCO_LIB_SUFFIX) | #pragma comment(lib, "PocoXML" POCO_LIB_SUFFIX) | |||
#endif | #endif | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
33 lines changed or deleted | 7 lines changed or added | |||
XMLConfiguration.h | XMLConfiguration.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: Util | // Library: Util | |||
// Package: Configuration | // Package: Configuration | |||
// Module: XMLConfiguration | // Module: XMLConfiguration | |||
// | // | |||
// Definition of the XMLConfiguration class. | // Definition of the XMLConfiguration class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef Util_XMLConfiguration_INCLUDED | #ifndef Util_XMLConfiguration_INCLUDED | |||
#define Util_XMLConfiguration_INCLUDED | #define Util_XMLConfiguration_INCLUDED | |||
#include "Poco/Util/Util.h" | #include "Poco/Util/Util.h" | |||
#ifndef POCO_UTIL_NO_XMLCONFIGURATION | ||||
#include "Poco/Util/MapConfiguration.h" | #include "Poco/Util/MapConfiguration.h" | |||
#include "Poco/DOM/Document.h" | #include "Poco/DOM/Document.h" | |||
#include "Poco/DOM/AutoPtr.h" | #include "Poco/DOM/AutoPtr.h" | |||
#include "Poco/DOM/DOMWriter.h" | #include "Poco/DOM/DOMWriter.h" | |||
#include "Poco/SAX/InputSource.h" | #include "Poco/SAX/InputSource.h" | |||
#include <istream> | #include <istream> | |||
namespace Poco { | namespace Poco { | |||
namespace Util { | namespace Util { | |||
skipping to change at line 211 | skipping to change at line 194 | |||
static Poco::XML::Node* findElement(const std::string& attr, const s td::string& value, Poco::XML::Node* pNode); | static Poco::XML::Node* findElement(const std::string& attr, const s td::string& value, Poco::XML::Node* pNode); | |||
static Poco::XML::Node* findAttribute(const std::string& name, Poco: :XML::Node* pNode, bool create); | static Poco::XML::Node* findAttribute(const std::string& name, Poco: :XML::Node* pNode, bool create); | |||
Poco::XML::AutoPtr<Poco::XML::Node> _pRoot; | Poco::XML::AutoPtr<Poco::XML::Node> _pRoot; | |||
Poco::XML::AutoPtr<Poco::XML::Document> _pDocument; | Poco::XML::AutoPtr<Poco::XML::Document> _pDocument; | |||
char _delim; | char _delim; | |||
}; | }; | |||
} } // namespace Poco::Util | } } // namespace Poco::Util | |||
#endif // POCO_UTIL_NO_XMLCONFIGURATION | ||||
#endif // Util_XMLConfiguration_INCLUDED | #endif // Util_XMLConfiguration_INCLUDED | |||
End of changes. 3 change blocks. | ||||
32 lines changed or deleted | 6 lines changed or added | |||
XMLException.h | XMLException.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: XMLException | // Module: XMLException | |||
// | // | |||
// Definition of the XMLException class. | // Definition of the XMLException class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_XMLException_INCLUDED | #ifndef XML_XMLException_INCLUDED | |||
#define XML_XMLException_INCLUDED | #define XML_XMLException_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/Exception.h" | #include "Poco/Exception.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLFilter.h | XMLFilter.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAXFilters | // Module: SAXFilters | |||
// | // | |||
// SAX2 XMLFilter Interface. | // SAX2 XMLFilter Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_XMLFilter_INCLUDED | #ifndef SAX_XMLFilter_INCLUDED | |||
#define SAX_XMLFilter_INCLUDED | #define SAX_XMLFilter_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/XMLReader.h" | #include "Poco/SAX/XMLReader.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLFilterImpl.h | XMLFilterImpl.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAXFilters | // Module: SAXFilters | |||
// | // | |||
// SAX2 XMLFilterImpl class. | // SAX2 XMLFilterImpl class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_XMLFilterImpl_INCLUDED | #ifndef SAX_XMLFilterImpl_INCLUDED | |||
#define SAX_XMLFilterImpl_INCLUDED | #define SAX_XMLFilterImpl_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/XMLFilter.h" | #include "Poco/SAX/XMLFilter.h" | |||
#include "Poco/SAX/EntityResolver.h" | #include "Poco/SAX/EntityResolver.h" | |||
#include "Poco/SAX/DTDHandler.h" | #include "Poco/SAX/DTDHandler.h" | |||
#include "Poco/SAX/ContentHandler.h" | #include "Poco/SAX/ContentHandler.h" | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLReader.h | XMLReader.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: SAX | // Package: SAX | |||
// Module: SAX | // Module: SAX | |||
// | // | |||
// SAX2 XMLReader Interface. | // SAX2 XMLReader Interface. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef SAX_XMLReader_INCLUDED | #ifndef SAX_XMLReader_INCLUDED | |||
#define SAX_XMLReader_INCLUDED | #define SAX_XMLReader_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/XML/XMLString.h" | #include "Poco/XML/XMLString.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLStream.h | XMLStream.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: XMLStream | // Module: XMLStream | |||
// | // | |||
// Definition of the XMLByteInputStream and XMLCharInputStream classes. | // Definition of the XMLByteInputStream and XMLCharInputStream classes. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_XMLStream_INCLUDED | #ifndef XML_XMLStream_INCLUDED | |||
#define XML_XMLStream_INCLUDED | #define XML_XMLStream_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include <istream> | #include <istream> | |||
#include <ostream> | #include <ostream> | |||
namespace Poco { | namespace Poco { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLString.h | XMLString.h | |||
---|---|---|---|---|
skipping to change at line 15 | skipping to change at line 15 | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: XMLString | // Module: XMLString | |||
// | // | |||
// Definition of the XMLString class. | // Definition of the XMLString class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_XMLString_INCLUDED | #ifndef XML_XMLString_INCLUDED | |||
#define XML_XMLString_INCLUDED | #define XML_XMLString_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
namespace Poco { | namespace Poco { | |||
namespace XML { | namespace XML { | |||
End of changes. 1 change blocks. | ||||
32 lines changed or deleted | 1 lines changed or added | |||
XMLWriter.h | XMLWriter.h | |||
---|---|---|---|---|
// | // | |||
// XMLWriter.h | // XMLWriter.h | |||
// | // | |||
// $Id: //poco/1.4/XML/include/Poco/XML/XMLWriter.h#1 $ | // $Id: //poco/1.4/XML/include/Poco/XML/XMLWriter.h#3 $ | |||
// | // | |||
// Library: XML | // Library: XML | |||
// Package: XML | // Package: XML | |||
// Module: XMLWriter | // Module: XMLWriter | |||
// | // | |||
// Definition of the XMLWriter class. | // Definition of the XMLWriter class. | |||
// | // | |||
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |||
// and Contributors. | // and Contributors. | |||
// | // | |||
// Permission is hereby granted, free of charge, to any person or organizat | // SPDX-License-Identifier: BSL-1.0 | |||
ion | ||||
// 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 t | ||||
he | ||||
// 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, includi | ||||
ng | ||||
// 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 EVEN | ||||
T | ||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | ||||
E | ||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | ||||
SE, | ||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | ||||
HER | ||||
// DEALINGS IN THE SOFTWARE. | ||||
// | // | |||
#ifndef XML_XMLWriter_INCLUDED | #ifndef XML_XMLWriter_INCLUDED | |||
#define XML_XMLWriter_INCLUDED | #define XML_XMLWriter_INCLUDED | |||
#include "Poco/XML/XML.h" | #include "Poco/XML/XML.h" | |||
#include "Poco/SAX/ContentHandler.h" | #include "Poco/SAX/ContentHandler.h" | |||
#include "Poco/SAX/LexicalHandler.h" | #include "Poco/SAX/LexicalHandler.h" | |||
#include "Poco/SAX/DTDHandler.h" | #include "Poco/SAX/DTDHandler.h" | |||
#include "Poco/SAX/NamespaceSupport.h" | #include "Poco/SAX/NamespaceSupport.h" | |||
skipping to change at line 277 | skipping to change at line 257 | |||
// DTDHandler | // DTDHandler | |||
void notationDecl(const XMLString& name, const XMLString* publicId, const XMLString* systemId); | void notationDecl(const XMLString& name, const XMLString* publicId, const XMLString* systemId); | |||
void unparsedEntityDecl(const XMLString& name, const XMLString* publ icId, const XMLString& systemId, const XMLString& notationName); | void unparsedEntityDecl(const XMLString& name, const XMLString* publ icId, const XMLString& systemId, const XMLString& notationName); | |||
static const std::string NEWLINE_DEFAULT; | static const std::string NEWLINE_DEFAULT; | |||
static const std::string NEWLINE_CR; | static const std::string NEWLINE_CR; | |||
static const std::string NEWLINE_CRLF; | static const std::string NEWLINE_CRLF; | |||
static const std::string NEWLINE_LF; | static const std::string NEWLINE_LF; | |||
// Namespace support. | ||||
XMLString uniquePrefix(); | ||||
/// Creates and returns a unique namespace prefix that | ||||
/// can be used with startPrefixMapping(). | ||||
bool isNamespaceMapped(const XMLString& namespc) const; | ||||
/// Returns true if the given namespace has been mapped | ||||
/// to a prefix in the current element or its ancestors. | ||||
// Misc. | ||||
int depth() const; | ||||
/// Return the number of nested XML elements. | ||||
/// | ||||
/// Will be -1 if no document or fragment has been started, | ||||
/// 0 if the document or fragment has been started, | ||||
/// 1 if the document element has been written and | ||||
/// > 1 for every element nested within the document element | ||||
. | ||||
protected: | protected: | |||
typedef std::map<XMLString, XMLString> AttributeMap; | typedef std::map<XMLString, XMLString> AttributeMap; | |||
void writeStartElement(const XMLString& namespaceURI, const XMLStrin g& localName, const XMLString& qname, const Attributes& attributes); | void writeStartElement(const XMLString& namespaceURI, const XMLStrin g& localName, const XMLString& qname, const Attributes& attributes); | |||
void writeEndElement(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname); | void writeEndElement(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname); | |||
void writeMarkup(const std::string& str) const; | void writeMarkup(const std::string& str) const; | |||
void writeXML(const XMLString& str) const; | void writeXML(const XMLString& str) const; | |||
void writeXML(XMLChar ch) const; | void writeXML(XMLChar ch) const; | |||
void writeNewLine() const; | void writeNewLine() const; | |||
void writeIndent() const; | void writeIndent() const; | |||
void writeIndent(int indent) const; | void writeIndent(int indent) const; | |||
void writeName(const XMLString& prefix, const XMLString& localName); | void writeName(const XMLString& prefix, const XMLString& localName); | |||
void writeXMLDeclaration(); | void writeXMLDeclaration(); | |||
void closeStartTag(); | void closeStartTag(); | |||
void declareAttributeNamespaces(const Attributes& attributes); | void declareAttributeNamespaces(const Attributes& attributes); | |||
void addNamespaceAttributes(AttributeMap& attributeMap); | void addNamespaceAttributes(AttributeMap& attributeMap); | |||
void addAttributes(AttributeMap& attributeMap, const Attributes& att ributes, const XMLString& elementNamespaceURI); | void addAttributes(AttributeMap& attributeMap, const Attributes& att ributes, const XMLString& elementNamespaceURI); | |||
void writeAttributes(const AttributeMap& attributeMap); | void writeAttributes(const AttributeMap& attributeMap); | |||
void prettyPrint() const; | void prettyPrint() const; | |||
XMLString newPrefix(); | ||||
static std::string nameToString(const XMLString& localName, const XM LString& qname); | static std::string nameToString(const XMLString& localName, const XM LString& qname); | |||
private: | private: | |||
struct Namespace | struct Namespace | |||
{ | { | |||
Namespace(const XMLString& thePrefix, const XMLString& theNa mespaceURI): | Namespace(const XMLString& thePrefix, const XMLString& theNa mespaceURI): | |||
prefix(thePrefix), | prefix(thePrefix), | |||
namespaceURI(theNamespaceURI) | namespaceURI(theNamespaceURI) | |||
{ | { | |||
} | } | |||
skipping to change at line 334 | skipping to change at line 331 | |||
bool _inInternalDTD; | bool _inInternalDTD; | |||
bool _contentWritten; | bool _contentWritten; | |||
bool _unclosedStartTag; | bool _unclosedStartTag; | |||
ElementStack _elementStack; | ElementStack _elementStack; | |||
NamespaceSupport _namespaces; | NamespaceSupport _namespaces; | |||
int _prefix; | int _prefix; | |||
bool _nsContextPushed; | bool _nsContextPushed; | |||
std::string _indent; | std::string _indent; | |||
static const std::string MARKUP_QUOTENC; | static const std::string MARKUP_QUOTENC; | |||
static const std::string MARKUP_APOSENC; | ||||
static const std::string MARKUP_AMPENC; | static const std::string MARKUP_AMPENC; | |||
static const std::string MARKUP_LTENC; | static const std::string MARKUP_LTENC; | |||
static const std::string MARKUP_GTENC; | static const std::string MARKUP_GTENC; | |||
static const std::string MARKUP_TABENC; | static const std::string MARKUP_TABENC; | |||
static const std::string MARKUP_CRENC; | static const std::string MARKUP_CRENC; | |||
static const std::string MARKUP_LFENC; | static const std::string MARKUP_LFENC; | |||
static const std::string MARKUP_LT; | static const std::string MARKUP_LT; | |||
static const std::string MARKUP_GT; | static const std::string MARKUP_GT; | |||
static const std::string MARKUP_SLASHGT; | static const std::string MARKUP_SLASHGT; | |||
static const std::string MARKUP_LTSLASH; | static const std::string MARKUP_LTSLASH; | |||
static const std::string MARKUP_COLON; | static const std::string MARKUP_COLON; | |||
static const std::string MARKUP_EQQUOT; | static const std::string MARKUP_EQQUOT; | |||
static const std::string MARKUP_QUOT; | static const std::string MARKUP_QUOT; | |||
static const std::string MARKUP_SPACE; | static const std::string MARKUP_SPACE; | |||
static const std::string MARKUP_TAB; | static const std::string MARKUP_TAB; | |||
static const std::string MARKUP_BEGIN_CDATA; | static const std::string MARKUP_BEGIN_CDATA; | |||
static const std::string MARKUP_END_CDATA; | static const std::string MARKUP_END_CDATA; | |||
}; | }; | |||
// | ||||
// inlines | ||||
// | ||||
inline int XMLWriter::depth() const | ||||
{ | ||||
return _depth; | ||||
} | ||||
} } // namespace Poco::XML | } } // namespace Poco::XML | |||
#endif // XML_XMLWriter_INCLUDED | #endif // XML_XMLWriter_INCLUDED | |||
End of changes. 6 change blocks. | ||||
35 lines changed or deleted | 29 lines changed or added | |||
expat.h | expat.h | |||
---|---|---|---|---|
skipping to change at line 740 | skipping to change at line 740 | |||
XML_GetSpecifiedAttributeCount(XML_Parser parser); | XML_GetSpecifiedAttributeCount(XML_Parser parser); | |||
/* Returns the index of the ID attribute passed in the last call to | /* Returns the index of the ID attribute passed in the last call to | |||
XML_StartElementHandler, or -1 if there is no ID attribute. Each | XML_StartElementHandler, or -1 if there is no ID attribute. Each | |||
attribute/value pair counts as 2; thus this correspondds to an | attribute/value pair counts as 2; thus this correspondds to an | |||
index into the atts array passed to the XML_StartElementHandler. | index into the atts array passed to the XML_StartElementHandler. | |||
*/ | */ | |||
XMLPARSEAPI(int) | XMLPARSEAPI(int) | |||
XML_GetIdAttributeIndex(XML_Parser parser); | XML_GetIdAttributeIndex(XML_Parser parser); | |||
#ifdef XML_ATTR_INFO | ||||
/* Source file byte offsets for the start and end of attribute names and va | ||||
lues. | ||||
The value indices are exclusive of surrounding quotes; thus in a UTF-8 s | ||||
ource | ||||
file an attribute value of "blah" will yield: | ||||
info->valueEnd - info->valueStart = 4 bytes. | ||||
*/ | ||||
typedef struct { | ||||
XML_Index nameStart; /* Offset to beginning of the attribute name. */ | ||||
XML_Index nameEnd; /* Offset after the attribute name's last byte. */ | ||||
XML_Index valueStart; /* Offset to beginning of the attribute value. */ | ||||
XML_Index valueEnd; /* Offset after the attribute value's last byte. * | ||||
/ | ||||
} XML_AttrInfo; | ||||
/* Returns an array of XML_AttrInfo structures for the attribute/value pair | ||||
s | ||||
passed in last call to the XML_StartElementHandler that were specified | ||||
in the start-tag rather than defaulted. Each attribute/value pair counts | ||||
as 1; thus the number of entries in the array is | ||||
XML_GetSpecifiedAttributeCount(parser) / 2. | ||||
*/ | ||||
XMLPARSEAPI(const XML_AttrInfo *) | ||||
XML_GetAttributeInfo(XML_Parser parser); | ||||
#endif | ||||
/* Parses some input. Returns XML_STATUS_ERROR if a fatal error is | /* Parses some input. Returns XML_STATUS_ERROR if a fatal error is | |||
detected. The last call to XML_Parse must have isFinal true; len | detected. The last call to XML_Parse must have isFinal true; len | |||
may be zero for this call (or any other). | may be zero for this call (or any other). | |||
Though the return values for these functions has always been | Though the return values for these functions has always been | |||
described as a Boolean value, the implementation, at least for the | described as a Boolean value, the implementation, at least for the | |||
1.95.x series, has always returned exactly one of the XML_Status | 1.95.x series, has always returned exactly one of the XML_Status | |||
values. | values. | |||
*/ | */ | |||
XMLPARSEAPI(enum XML_Status) | XMLPARSEAPI(enum XML_Status) | |||
skipping to change at line 881 | skipping to change at line 904 | |||
entity parsing (ie without XML_DTD being defined), then | entity parsing (ie without XML_DTD being defined), then | |||
XML_SetParamEntityParsing will return 0 if parsing of parameter | XML_SetParamEntityParsing will return 0 if parsing of parameter | |||
entities is requested; otherwise it will return non-zero. | entities is requested; otherwise it will return non-zero. | |||
Note: If XML_SetParamEntityParsing is called after XML_Parse or | Note: If XML_SetParamEntityParsing is called after XML_Parse or | |||
XML_ParseBuffer, then it has no effect and will always return 0. | XML_ParseBuffer, then it has no effect and will always return 0. | |||
*/ | */ | |||
XMLPARSEAPI(int) | XMLPARSEAPI(int) | |||
XML_SetParamEntityParsing(XML_Parser parser, | XML_SetParamEntityParsing(XML_Parser parser, | |||
enum XML_ParamEntityParsing parsing); | enum XML_ParamEntityParsing parsing); | |||
/* Sets the hash salt to use for internal hash calculations. | ||||
Helps in preventing DoS attacks based on predicting hash | ||||
function behavior. This must be called before parsing is started. | ||||
Returns 1 if successful, 0 when called after parsing has started. | ||||
*/ | ||||
XMLPARSEAPI(int) | ||||
XML_SetHashSalt(XML_Parser parser, | ||||
unsigned long hash_salt); | ||||
/* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then | /* If XML_Parse or XML_ParseBuffer have returned XML_STATUS_ERROR, then | |||
XML_GetErrorCode returns information about the error. | XML_GetErrorCode returns information about the error. | |||
*/ | */ | |||
XMLPARSEAPI(enum XML_Error) | XMLPARSEAPI(enum XML_Error) | |||
XML_GetErrorCode(XML_Parser parser); | XML_GetErrorCode(XML_Parser parser); | |||
/* These functions return information about the current parse | /* These functions return information about the current parse | |||
location. They may be called from any callback called to report | location. They may be called from any callback called to report | |||
some parse event; in this case the location is the location of the | some parse event; in this case the location is the location of the | |||
first of the sequence of characters that generated the event. When | first of the sequence of characters that generated the event. When | |||
skipping to change at line 982 | skipping to change at line 1014 | |||
enum XML_FeatureEnum { | enum XML_FeatureEnum { | |||
XML_FEATURE_END = 0, | XML_FEATURE_END = 0, | |||
XML_FEATURE_UNICODE, | XML_FEATURE_UNICODE, | |||
XML_FEATURE_UNICODE_WCHAR_T, | XML_FEATURE_UNICODE_WCHAR_T, | |||
XML_FEATURE_DTD, | XML_FEATURE_DTD, | |||
XML_FEATURE_CONTEXT_BYTES, | XML_FEATURE_CONTEXT_BYTES, | |||
XML_FEATURE_MIN_SIZE, | XML_FEATURE_MIN_SIZE, | |||
XML_FEATURE_SIZEOF_XML_CHAR, | XML_FEATURE_SIZEOF_XML_CHAR, | |||
XML_FEATURE_SIZEOF_XML_LCHAR, | XML_FEATURE_SIZEOF_XML_LCHAR, | |||
XML_FEATURE_NS, | XML_FEATURE_NS, | |||
XML_FEATURE_LARGE_SIZE | XML_FEATURE_LARGE_SIZE, | |||
XML_FEATURE_ATTR_INFO | ||||
/* Additional features must be added to the end of this enum. */ | /* Additional features must be added to the end of this enum. */ | |||
}; | }; | |||
typedef struct { | typedef struct { | |||
enum XML_FeatureEnum feature; | enum XML_FeatureEnum feature; | |||
const XML_LChar *name; | const XML_LChar *name; | |||
long int value; | long int value; | |||
} XML_Feature; | } XML_Feature; | |||
XMLPARSEAPI(const XML_Feature *) | XMLPARSEAPI(const XML_Feature *) | |||
XML_GetFeatureList(void); | XML_GetFeatureList(void); | |||
/* Expat follows the GNU/Linux convention of odd number minor version for | /* Expat follows the GNU/Linux convention of odd number minor version for | |||
beta/development releases and even number minor version for stable | beta/development releases and even number minor version for stable | |||
releases. Micro is bumped with each release, and set to 0 with each | releases. Micro is bumped with each release, and set to 0 with each | |||
change to major or minor version. | change to major or minor version. | |||
*/ | */ | |||
#define XML_MAJOR_VERSION 2 | #define XML_MAJOR_VERSION 2 | |||
#define XML_MINOR_VERSION 0 | #define XML_MINOR_VERSION 1 | |||
#define XML_MICRO_VERSION 1 | #define XML_MICRO_VERSION 0 | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* not Expat_INCLUDED */ | #endif /* not Expat_INCLUDED */ | |||
End of changes. 4 change blocks. | ||||
3 lines changed or deleted | 40 lines changed or added | |||
zconf.h | zconf.h | |||
---|---|---|---|---|
/* zconf.h -- configuration of the zlib compression library | /* zconf.h -- configuration of the zlib compression library | |||
* Copyright (C) 1995-2012 Jean-loup Gailly. | * Copyright (C) 1995-2013 Jean-loup Gailly. | |||
* For conditions of distribution and use, see copyright notice in zlib.h | * For conditions of distribution and use, see copyright notice in zlib.h | |||
*/ | */ | |||
/* @(#) $Id$ */ | /* @(#) $Id: //poco/1.4/Foundation/include/Poco/zconf.h#5 $ */ | |||
#ifndef ZCONF_H | #ifndef ZCONF_H | |||
#define ZCONF_H | #define ZCONF_H | |||
/* | /* | |||
* If you *really* need a unique prefix for all types and library functions , | * If you *really* need a unique prefix for all types and library functions , | |||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | |||
* Even better than compiling with -DZ_PREFIX would be to use configure to set | * Even better than compiling with -DZ_PREFIX would be to use configure to set | |||
* this permanently in zconf.h using "./configure --zprefix". | * this permanently in zconf.h using "./configure --zprefix". | |||
*/ | */ | |||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ | |||
# define Z_PREFIX_SET | # define Z_PREFIX_SET | |||
/* all linked symbols */ | /* all linked symbols */ | |||
# define _dist_code z__dist_code | # define _dist_code z__dist_code | |||
# define _length_code z__length_code | # define _length_code z__length_code | |||
# define _tr_align z__tr_align | # define _tr_align z__tr_align | |||
# define _tr_flush_bits z__tr_flush_bits | ||||
# define _tr_flush_block z__tr_flush_block | # define _tr_flush_block z__tr_flush_block | |||
# define _tr_init z__tr_init | # define _tr_init z__tr_init | |||
# define _tr_stored_block z__tr_stored_block | # define _tr_stored_block z__tr_stored_block | |||
# define _tr_tally z__tr_tally | # define _tr_tally z__tr_tally | |||
# define adler32 z_adler32 | # define adler32 z_adler32 | |||
# define adler32_combine z_adler32_combine | # define adler32_combine z_adler32_combine | |||
# define adler32_combine64 z_adler32_combine64 | # define adler32_combine64 z_adler32_combine64 | |||
# ifndef Z_SOLO | # ifndef Z_SOLO | |||
# define compress z_compress | # define compress z_compress | |||
# define compress2 z_compress2 | # define compress2 z_compress2 | |||
skipping to change at line 80 | skipping to change at line 81 | |||
# define gzgetc_ z_gzgetc_ | # define gzgetc_ z_gzgetc_ | |||
# define gzgets z_gzgets | # define gzgets z_gzgets | |||
# define gzoffset z_gzoffset | # define gzoffset z_gzoffset | |||
# define gzoffset64 z_gzoffset64 | # define gzoffset64 z_gzoffset64 | |||
# define gzopen z_gzopen | # define gzopen z_gzopen | |||
# define gzopen64 z_gzopen64 | # define gzopen64 z_gzopen64 | |||
# ifdef _WIN32 | # ifdef _WIN32 | |||
# define gzopen_w z_gzopen_w | # define gzopen_w z_gzopen_w | |||
# endif | # endif | |||
# define gzprintf z_gzprintf | # define gzprintf z_gzprintf | |||
# define gzvprintf z_gzvprintf | ||||
# define gzputc z_gzputc | # define gzputc z_gzputc | |||
# define gzputs z_gzputs | # define gzputs z_gzputs | |||
# define gzread z_gzread | # define gzread z_gzread | |||
# define gzrewind z_gzrewind | # define gzrewind z_gzrewind | |||
# define gzseek z_gzseek | # define gzseek z_gzseek | |||
# define gzseek64 z_gzseek64 | # define gzseek64 z_gzseek64 | |||
# define gzsetparams z_gzsetparams | # define gzsetparams z_gzsetparams | |||
# define gztell z_gztell | # define gztell z_gztell | |||
# define gztell64 z_gztell64 | # define gztell64 z_gztell64 | |||
# define gzungetc z_gzungetc | # define gzungetc z_gzungetc | |||
skipping to change at line 106 | skipping to change at line 108 | |||
# define inflateCopy z_inflateCopy | # define inflateCopy z_inflateCopy | |||
# define inflateEnd z_inflateEnd | # define inflateEnd z_inflateEnd | |||
# define inflateGetHeader z_inflateGetHeader | # define inflateGetHeader z_inflateGetHeader | |||
# define inflateInit2_ z_inflateInit2_ | # define inflateInit2_ z_inflateInit2_ | |||
# define inflateInit_ z_inflateInit_ | # define inflateInit_ z_inflateInit_ | |||
# define inflateMark z_inflateMark | # define inflateMark z_inflateMark | |||
# define inflatePrime z_inflatePrime | # define inflatePrime z_inflatePrime | |||
# define inflateReset z_inflateReset | # define inflateReset z_inflateReset | |||
# define inflateReset2 z_inflateReset2 | # define inflateReset2 z_inflateReset2 | |||
# define inflateSetDictionary z_inflateSetDictionary | # define inflateSetDictionary z_inflateSetDictionary | |||
# define inflateGetDictionary z_inflateGetDictionary | ||||
# define inflateSync z_inflateSync | # define inflateSync z_inflateSync | |||
# define inflateSyncPoint z_inflateSyncPoint | # define inflateSyncPoint z_inflateSyncPoint | |||
# define inflateUndermine z_inflateUndermine | # define inflateUndermine z_inflateUndermine | |||
# define inflateResetKeep z_inflateResetKeep | # define inflateResetKeep z_inflateResetKeep | |||
# define inflate_copyright z_inflate_copyright | # define inflate_copyright z_inflate_copyright | |||
# define inflate_fast z_inflate_fast | # define inflate_fast z_inflate_fast | |||
# define inflate_table z_inflate_table | # define inflate_table z_inflate_table | |||
# ifndef Z_SOLO | # ifndef Z_SOLO | |||
# define uncompress z_uncompress | # define uncompress z_uncompress | |||
# endif | # endif | |||
skipping to change at line 391 | skipping to change at line 394 | |||
#ifdef STDC | #ifdef STDC | |||
typedef void const *voidpc; | typedef void const *voidpc; | |||
typedef void FAR *voidpf; | typedef void FAR *voidpf; | |||
typedef void *voidp; | typedef void *voidp; | |||
#else | #else | |||
typedef Byte const *voidpc; | typedef Byte const *voidpc; | |||
typedef Byte FAR *voidpf; | typedef Byte FAR *voidpf; | |||
typedef Byte *voidp; | typedef Byte *voidp; | |||
#endif | #endif | |||
/* ./configure may #define Z_U4 here */ | ||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) | #if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) | |||
# include <limits.h> | # include <limits.h> | |||
# if (UINT_MAX == 0xffffffffUL) | # if (UINT_MAX == 0xffffffffUL) | |||
# define Z_U4 unsigned | # define Z_U4 unsigned | |||
# else | # elif (ULONG_MAX == 0xffffffffUL) | |||
# if (ULONG_MAX == 0xffffffffUL) | # define Z_U4 unsigned long | |||
# define Z_U4 unsigned long | # elif (USHRT_MAX == 0xffffffffUL) | |||
# else | # define Z_U4 unsigned short | |||
# if (USHRT_MAX == 0xffffffffUL) | ||||
# define Z_U4 unsigned short | ||||
# endif | ||||
# endif | ||||
# endif | # endif | |||
#endif | #endif | |||
#ifdef Z_U4 | #ifdef Z_U4 | |||
typedef Z_U4 z_crc_t; | typedef Z_U4 z_crc_t; | |||
#else | #else | |||
typedef unsigned long z_crc_t; | typedef unsigned long z_crc_t; | |||
#endif | #endif | |||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ | #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ | |||
# define Z_HAVE_UNISTD_H | # define Z_HAVE_UNISTD_H | |||
#endif | #endif | |||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ | #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ | |||
# define Z_HAVE_STDARG_H | # define Z_HAVE_STDARG_H | |||
#endif | #endif | |||
#ifndef _WIN32_WCE | ||||
#ifdef STDC | #ifdef STDC | |||
# ifndef Z_SOLO | # ifndef Z_SOLO | |||
# ifndef _WIN32_WCE | # include <sys/types.h> /* for off_t */ | |||
# include <sys/types.h> /* for off_t */ | # endif | |||
# endif | #endif | |||
#endif | ||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H) | ||||
# ifndef Z_SOLO | ||||
# include <stdarg.h> /* for va_list */ | ||||
# endif | # endif | |||
#endif | #endif | |||
#ifdef _WIN32 | #ifdef _WIN32 | |||
# include <stddef.h> /* for wchar_t */ | # ifndef Z_SOLO | |||
# include <stddef.h> /* for wchar_t */ | ||||
# endif | ||||
#endif | #endif | |||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and | /* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and | |||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even | * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even | |||
* though the former does not conform to the LFS document), but considering | * though the former does not conform to the LFS document), but considering | |||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as | * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as | |||
* equivalently requesting no 64-bit operations | * equivalently requesting no 64-bit operations | |||
*/ | */ | |||
#if defined(LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 | #if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 | |||
# undef _LARGEFILE64_SOURCE | # undef _LARGEFILE64_SOURCE | |||
#endif | #endif | |||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | #if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H) | |||
# define Z_HAVE_UNISTD_H | # define Z_HAVE_UNISTD_H | |||
#endif | #endif | |||
#ifndef Z_SOLO | #ifndef Z_SOLO | |||
# if defined(Z_HAVE_UNISTD_H) || defined(LARGEFILE64_SOURCE) | # if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) | |||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | # include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ | |||
# ifdef VMS | # ifdef VMS | |||
# include <unixio.h> /* for off_t */ | # include <unixio.h> /* for off_t */ | |||
# endif | # endif | |||
# ifndef z_off_t | # ifndef z_off_t | |||
# define z_off_t off_t | # define z_off_t off_t | |||
# endif | # endif | |||
# endif | # endif | |||
#endif | #endif | |||
End of changes. 12 change blocks. | ||||
18 lines changed or deleted | 23 lines changed or added | |||
zlib.h | zlib.h | |||
---|---|---|---|---|
/* zlib.h -- interface of the 'zlib' general purpose compression library | /* zlib.h -- interface of the 'zlib' general purpose compression library | |||
version 1.2.7, May 2nd, 2012 | version 1.2.8, April 28th, 2013 | |||
Copyright (C) 1995-2012 Jean-loup Gailly and Mark Adler | Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler | |||
This software is provided 'as-is', without any express or implied | This software is provided 'as-is', without any express or implied | |||
warranty. In no event will the authors be held liable for any damages | warranty. In no event will the authors be held liable for any damages | |||
arising from the use of this software. | arising from the use of this software. | |||
Permission is granted to anyone to use this software for any purpose, | Permission is granted to anyone to use this software for any purpose, | |||
including commercial applications, and to alter it and redistribute it | including commercial applications, and to alter it and redistribute it | |||
freely, subject to the following restrictions: | freely, subject to the following restrictions: | |||
1. The origin of this software must not be misrepresented; you must not | 1. The origin of this software must not be misrepresented; you must not | |||
skipping to change at line 39 | skipping to change at line 39 | |||
#ifndef ZLIB_H | #ifndef ZLIB_H | |||
#define ZLIB_H | #define ZLIB_H | |||
#include "zconf.h" | #include "zconf.h" | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
#define ZLIB_VERSION "1.2.7" | #define ZLIB_VERSION "1.2.8" | |||
#define ZLIB_VERNUM 0x1270 | #define ZLIB_VERNUM 0x1280 | |||
#define ZLIB_VER_MAJOR 1 | #define ZLIB_VER_MAJOR 1 | |||
#define ZLIB_VER_MINOR 2 | #define ZLIB_VER_MINOR 2 | |||
#define ZLIB_VER_REVISION 7 | #define ZLIB_VER_REVISION 8 | |||
#define ZLIB_VER_SUBREVISION 0 | #define ZLIB_VER_SUBREVISION 0 | |||
/* | /* | |||
The 'zlib' compression library provides in-memory compression and | The 'zlib' compression library provides in-memory compression and | |||
decompression functions, including integrity checks of the uncompressed d ata. | decompression functions, including integrity checks of the uncompressed d ata. | |||
This version of the library supports only one compression method (deflati on) | This version of the library supports only one compression method (deflati on) | |||
but other algorithms will be added later and will have the same stream | but other algorithms will be added later and will have the same stream | |||
interface. | interface. | |||
Compression can be done in a single step if the buffers are large enoug h, | Compression can be done in a single step if the buffers are large enoug h, | |||
skipping to change at line 834 | skipping to change at line 834 | |||
that was used for compression is provided. | that was used for compression is provided. | |||
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a | inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a | |||
parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is | parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is | |||
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the | inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the | |||
expected one (incorrect adler32 value). inflateSetDictionary does not | expected one (incorrect adler32 value). inflateSetDictionary does not | |||
perform any decompression: this will be done by subsequent calls of | perform any decompression: this will be done by subsequent calls of | |||
inflate(). | inflate(). | |||
*/ | */ | |||
ZEXTERN int ZEXPORT inflateGetDictionary OF((z_streamp strm, | ||||
Bytef *dictionary, | ||||
uInt *dictLength)); | ||||
/* | ||||
Returns the sliding dictionary being maintained by inflate. dictLengt | ||||
h is | ||||
set to the number of bytes in the dictionary, and that many bytes are co | ||||
pied | ||||
to dictionary. dictionary must have enough space, where 32768 bytes is | ||||
always enough. If inflateGetDictionary() is called with dictionary equa | ||||
l to | ||||
Z_NULL, then only the dictionary length is returned, and nothing is copi | ||||
ed. | ||||
Similary, if dictLength is Z_NULL, then it is not set. | ||||
inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the | ||||
stream state is inconsistent. | ||||
*/ | ||||
ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); | ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); | |||
/* | /* | |||
Skips invalid compressed data until a possible full flush point (see a bove | Skips invalid compressed data until a possible full flush point (see a bove | |||
for the description of deflate with Z_FULL_FLUSH) can be found, or until all | for the description of deflate with Z_FULL_FLUSH) can be found, or until all | |||
available input is skipped. No output is provided. | available input is skipped. No output is provided. | |||
inflateSync searches for a 00 00 FF FF pattern in the compressed data. | inflateSync searches for a 00 00 FF FF pattern in the compressed data. | |||
All full flush points have this pattern, but not all occurences of this | All full flush points have this pattern, but not all occurrences of this | |||
pattern are full flush points. | pattern are full flush points. | |||
inflateSync returns Z_OK if a possible full flush point has been found , | inflateSync returns Z_OK if a possible full flush point has been found , | |||
Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush poin t | Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush poin t | |||
has been found, or Z_STREAM_ERROR if the stream structure was inconsiste nt. | has been found, or Z_STREAM_ERROR if the stream structure was inconsiste nt. | |||
In the success case, the application may save the current current value of | In the success case, the application may save the current current value of | |||
total_in which indicates where valid compressed data was found. In the | total_in which indicates where valid compressed data was found. In the | |||
error case, the application may repeatedly call inflateSync, providing m ore | error case, the application may repeatedly call inflateSync, providing m ore | |||
input each time, until success or end of the input data. | input each time, until success or end of the input data. | |||
*/ | */ | |||
skipping to change at line 1002 | skipping to change at line 1017 | |||
deflate streams. | deflate streams. | |||
See inflateBack() for the usage of these routines. | See inflateBack() for the usage of these routines. | |||
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of | inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of | |||
the parameters are invalid, Z_MEM_ERROR if the internal state could not be | the parameters are invalid, Z_MEM_ERROR if the internal state could not be | |||
allocated, or Z_VERSION_ERROR if the version of the library does not mat ch | allocated, or Z_VERSION_ERROR if the version of the library does not mat ch | |||
the version of the header file. | the version of the header file. | |||
*/ | */ | |||
typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); | typedef unsigned (*in_func) OF((void FAR *, | |||
z_const unsigned char FAR * FAR *)); | ||||
typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); | typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); | |||
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, | ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, | |||
in_func in, void FAR *in_desc, | in_func in, void FAR *in_desc, | |||
out_func out, void FAR *out_desc)); | out_func out, void FAR *out_desc)); | |||
/* | /* | |||
inflateBack() does a raw inflate with a single call using a call-back | inflateBack() does a raw inflate with a single call using a call-back | |||
interface for input and output. This is more efficient than inflate() f | interface for input and output. This is potentially more efficient than | |||
or | inflate() for file i/o applications, in that it avoids copying between t | |||
file i/o applications in that it avoids copying between the output and t | he | |||
he | output and the sliding window by simply making the window itself the out | |||
sliding window by simply making the window itself the output buffer. Th | put | |||
is | buffer. inflate() can be faster on modern CPUs when used with large | |||
function trusts the application to not change the output buffer passed b | buffers. inflateBack() trusts the application to not change the output | |||
y | buffer passed by the output function, at least until inflateBack() retur | |||
the output function, at least until inflateBack() returns. | ns. | |||
inflateBackInit() must be called first to allocate the internal state | inflateBackInit() must be called first to allocate the internal state | |||
and to initialize the state with the user-provided window buffer. | and to initialize the state with the user-provided window buffer. | |||
inflateBack() may then be used multiple times to inflate a complete, raw | inflateBack() may then be used multiple times to inflate a complete, raw | |||
deflate stream with each call. inflateBackEnd() is then called to free the | deflate stream with each call. inflateBackEnd() is then called to free the | |||
allocated state. | allocated state. | |||
A raw deflate stream is one with no zlib or gzip header or trailer. | A raw deflate stream is one with no zlib or gzip header or trailer. | |||
This routine would normally be used in a utility that reads zip or gzip | This routine would normally be used in a utility that reads zip or gzip | |||
files and writes out uncompressed files. The utility would decode the | files and writes out uncompressed files. The utility would decode the | |||
skipping to change at line 1730 | skipping to change at line 1747 | |||
ZEXTERN const char * ZEXPORT zError OF((int)); | ZEXTERN const char * ZEXPORT zError OF((int)); | |||
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); | ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp)); | |||
ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); | ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void)); | |||
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); | ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int)); | |||
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); | ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp)); | |||
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); | ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp)); | |||
#if defined(_WIN32) && !defined(Z_SOLO) | #if defined(_WIN32) && !defined(Z_SOLO) | |||
ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, | ZEXTERN gzFile ZEXPORT gzopen_w OF((const wchar_t *path, | |||
const char *mode)); | const char *mode)); | |||
#endif | #endif | |||
#if defined(STDC) || defined(Z_HAVE_STDARG_H) | ||||
# ifndef Z_SOLO | ||||
ZEXTERN int ZEXPORTVA gzvprintf Z_ARG((gzFile file, | ||||
const char *format, | ||||
va_list va)); | ||||
# endif | ||||
#endif | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* ZLIB_H */ | #endif /* ZLIB_H */ | |||
End of changes. 9 change blocks. | ||||
16 lines changed or deleted | 43 lines changed or added | |||