Merge pull request #11 from pocoproject/develop

sync 13.4.2015
This commit is contained in:
Marian Krivoš 2015-04-13 20:05:05 +02:00
commit 7528cbc8d1
162 changed files with 1492 additions and 400 deletions

View File

@ -33,7 +33,7 @@ public:
int readRequest(char* buffer, int length); int readRequest(char* buffer, int length);
/// Read up to length bytes from request body into buffer. /// Read up to length bytes from request body into buffer.
/// Returns the number of bytes read, 0 if eof or -1 if an error occured. /// Returns the number of bytes read, 0 if eof or -1 if an error occurred.
void writeResponse(const char* buffer, int length); void writeResponse(const char* buffer, int length);
/// Writes the given characters as response to the given request_rec. /// Writes the given characters as response to the given request_rec.

View File

@ -35,6 +35,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# Append our module directory to CMake # Append our module directory to CMake
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# COMMENT REPLACED BY BIICODE
################################################################################# #################################################################################
# Setup C/C++ compiler options # Setup C/C++ compiler options
################################################################################# #################################################################################

View File

@ -52,5 +52,6 @@ Björn Schramke
Jonathan Seeley Jonathan Seeley
Tor Lillqvist Tor Lillqvist
Alexander Bychuk Alexander Bychuk
Francisco Ramírez
-- --
$Id$ $Id$

View File

@ -66,7 +66,7 @@ public:
Symbol* lookup(const std::string& name) const; Symbol* lookup(const std::string& name) const;
/// Looks up the given name in the symbol table /// Looks up the given name in the symbol table
/// and returns the corresponsing symbol, or null /// and returns the corresponding symbol, or null
/// if no symbol can be found. The name can include /// if no symbol can be found. The name can include
/// a namespace. /// a namespace.
@ -104,7 +104,7 @@ public:
private: private:
Symbol* lookup(const std::string& name, std::set<const NameSpace*>& alreadyVisited) const; Symbol* lookup(const std::string& name, std::set<const NameSpace*>& alreadyVisited) const;
/// Looks up the given name in the symbol table /// Looks up the given name in the symbol table
/// and returns the corresponsing symbol, or null /// and returns the corresponding symbol, or null
/// if no symbol can be found. The name can include /// if no symbol can be found. The name can include
/// a namespace. /// a namespace.

View File

@ -93,7 +93,7 @@ void Utility::detectPrefixAndIncludes(const std::string& origHFile, std::vector<
++itTmp; ++itTmp;
std::string defValue = *itTmp; std::string defValue = *itTmp;
istr >> x; istr >> x;
// now find the corresponsing #define // now find the corresponding #define
while (x.find(defValue) == std::string::npos) while (x.find(defValue) == std::string::npos)
istr >> x; istr >> x;
//now parse until a class def is found without a ; at the end //now parse until a class def is found without a ; at the end

View File

@ -17,7 +17,7 @@ namespace CppUnit {
/* /*
* Orthodox performs a simple set of tests on an arbitary * Orthodox performs a simple set of tests on an arbitrary
* class to make sure that it supports at least the * class to make sure that it supports at least the
* following operations: * following operations:
* *

View File

@ -37,7 +37,7 @@ class CryptoTransform;
class Crypto_API Cipher: public Poco::RefCountedObject class Crypto_API Cipher: public Poco::RefCountedObject
/// Represents the abstract base class from which all implementations of /// Represents the abstract base class from which all implementations of
/// symmetric/assymetric encryption algorithms must inherit. Use the CipherFactory /// symmetric/asymmetric encryption algorithms must inherit. Use the CipherFactory
/// class to obtain an instance of this class: /// class to obtain an instance of this class:
/// ///
/// CipherFactory& factory = CipherFactory::defaultFactory(); /// CipherFactory& factory = CipherFactory::defaultFactory();
@ -57,7 +57,7 @@ class Crypto_API Cipher: public Poco::RefCountedObject
/// decrypt strings or, in conjunction with a CryptoInputStream or a /// decrypt strings or, in conjunction with a CryptoInputStream or a
/// CryptoOutputStream, to encrypt streams of data. /// CryptoOutputStream, to encrypt streams of data.
/// ///
/// Since encrypted strings will contain arbitary binary data that will cause /// Since encrypted strings will contain arbitrary binary data that will cause
/// problems in applications that are not binary-safe (eg., when sending /// problems in applications that are not binary-safe (eg., when sending
/// encrypted data in e-mails), the encryptString() and decryptString() can /// encrypted data in e-mails), the encryptString() and decryptString() can
/// encode (or decode, respectively) encrypted data using a "transport encoding". /// encode (or decode, respectively) encrypted data using a "transport encoding".
@ -96,7 +96,7 @@ public:
ENC_BASE64 = 0x01, /// Base64-encoded output ENC_BASE64 = 0x01, /// Base64-encoded output
ENC_BINHEX = 0x02, /// BinHex-encoded output ENC_BINHEX = 0x02, /// BinHex-encoded output
ENC_BASE64_NO_LF = 0x81, /// Base64-encoded output, no linefeeds ENC_BASE64_NO_LF = 0x81, /// Base64-encoded output, no linefeeds
ENC_BINHEX_NO_LF = 0x82, /// BinHex-encoded output, no linefeeds ENC_BINHEX_NO_LF = 0x82 /// BinHex-encoded output, no linefeeds
}; };
@ -107,7 +107,7 @@ public:
/// Returns the name of the Cipher. /// Returns the name of the Cipher.
virtual CryptoTransform* createEncryptor() = 0; virtual CryptoTransform* createEncryptor() = 0;
/// Creates an encrytor object to be used with a CryptoStream. /// Creates an encryptor object to be used with a CryptoStream.
virtual CryptoTransform* createDecryptor() = 0; virtual CryptoTransform* createDecryptor() = 0;
/// Creates a decryptor object to be used with a CryptoStream. /// Creates a decryptor object to be used with a CryptoStream.

View File

@ -45,10 +45,10 @@ public:
/// Returns the name of the cipher. /// Returns the name of the cipher.
CryptoTransform* createEncryptor(); CryptoTransform* createEncryptor();
/// Creates an encrytor object. /// Creates an encryptor object.
CryptoTransform* createDecryptor(); CryptoTransform* createDecryptor();
/// Creates a decrytor object. /// Creates a decryptor object.
private: private:
CipherKey _key; CipherKey _key;

View File

@ -44,7 +44,7 @@ namespace Crypto {
class Crypto_API OpenSSLInitializer class Crypto_API OpenSSLInitializer
/// Initalizes the OpenSSL library. /// Initializes the OpenSSL library.
/// ///
/// The class ensures the earliest initialization and the /// The class ensures the earliest initialization and the
/// latest shutdown of the OpenSSL library. /// latest shutdown of the OpenSSL library.

View File

@ -33,7 +33,7 @@ namespace Crypto {
class RSACipherImpl: public Cipher class RSACipherImpl: public Cipher
/// An implementation of the Cipher class for /// An implementation of the Cipher class for
/// assymetric (public-private key) encryption /// asymmetric (public-private key) encryption
/// based on the the RSA algorithm in OpenSSL's /// based on the the RSA algorithm in OpenSSL's
/// crypto library. /// crypto library.
/// ///
@ -52,10 +52,10 @@ public:
/// Returns the name of the Cipher. /// Returns the name of the Cipher.
CryptoTransform* createEncryptor(); CryptoTransform* createEncryptor();
/// Creates an encrytor object. /// Creates an encryptor object.
CryptoTransform* createDecryptor(); CryptoTransform* createDecryptor();
/// Creates a decrytor object. /// Creates a decryptor object.
private: private:
RSAKey _key; RSAKey _key;

View File

@ -86,7 +86,7 @@ public:
const DigestEngine::Digest& signature(); const DigestEngine::Digest& signature();
/// Signs the digest using the RSA algorithm /// Signs the digest using the RSA algorithm
/// and the private key (teh first time it's /// and the private key (the first time it's
/// called) and returns the result. /// called) and returns the result.
/// ///
/// Can be called multiple times. /// Can be called multiple times.

View File

@ -128,7 +128,7 @@ public:
/// certificate. /// certificate.
/// ///
/// Returns true if verification against the issuer certificate /// Returns true if verification against the issuer certificate
/// was successfull, false otherwise. /// was successful, false otherwise.
const X509* certificate() const; const X509* certificate() const;
/// Returns the underlying OpenSSL certificate. /// Returns the underlying OpenSSL certificate.

View File

@ -4,8 +4,8 @@
#include "winres.h" #include "winres.h"
#define POCO_VERSION 1,6,0,0 #define POCO_VERSION 1,7,0,0
#define POCO_VERSION_STR "1.6.0" #define POCO_VERSION_STR "1.7.0"
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION POCO_VERSION FILEVERSION POCO_VERSION
@ -28,7 +28,7 @@ BEGIN
VALUE "FileDescription", "This file is part of the POCO C++ Libraries." VALUE "FileDescription", "This file is part of the POCO C++ Libraries."
VALUE "FileVersion", POCO_VERSION_STR VALUE "FileVersion", POCO_VERSION_STR
VALUE "InternalName", "POCO" VALUE "InternalName", "POCO"
VALUE "LegalCopyright", "Copyright (C) 2004-2014, Applied Informatics Software Engineering GmbH and Contributors." VALUE "LegalCopyright", "Copyright (C) 2004-2015, Applied Informatics Software Engineering GmbH and Contributors."
VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org" VALUE "ProductName", "POCO C++ Libraries - http://pocoproject.org"
VALUE "ProductVersion", POCO_VERSION_STR VALUE "ProductVersion", POCO_VERSION_STR
END END

View File

@ -93,7 +93,7 @@ private:
class TransactionException : public ConnectionException class TransactionException : public ConnectionException
/// TrabsactionException /// TransactionException
{ {
public: public:

View File

@ -57,7 +57,7 @@ public:
/// Returns host info. /// Returns host info.
static bool hasMicrosecond(); static bool hasMicrosecond();
/// Rturns true if microseconds are suported. /// Returns true if microseconds are supported.
static MYSQL* handle(Poco::Data::Session& session); static MYSQL* handle(Poco::Data::Session& session);
/// Returns native MySQL handle for the session. /// Returns native MySQL handle for the session.

View File

@ -559,7 +559,7 @@ private:
if (size == _maxFieldSize) if (size == _maxFieldSize)
{ {
getMinValueSize(val, size); getMinValueSize(val, size);
// accomodate for terminating zero // accommodate for terminating zero
if (size != _maxFieldSize) ++size; if (size != _maxFieldSize) ++size;
} }
@ -625,7 +625,7 @@ private:
if (size == _maxFieldSize) if (size == _maxFieldSize)
{ {
getMinValueSize(val, size); getMinValueSize(val, size);
// accomodate for terminating zero // accommodate for terminating zero
if (size != _maxFieldSize) size += sizeof(UTF16Char); if (size != _maxFieldSize) size += sizeof(UTF16Char);
} }
@ -942,7 +942,7 @@ private:
/// This function runs for query and stored procedure parameters (in and /// This function runs for query and stored procedure parameters (in and
/// out-bound). Some drivers, however, do not care about knowing this /// out-bound). Some drivers, however, do not care about knowing this
/// information to start with. For that reason, after all the attempts /// information to start with. For that reason, after all the attempts
/// to discover the required values are unsuccesfully exhausted, the values /// to discover the required values are unsuccessfully exhausted, the values
/// are both set to zero and no exception is thrown. /// are both set to zero and no exception is thrown.
void setParamSetSize(std::size_t length); void setParamSetSize(std::size_t length);

View File

@ -59,7 +59,7 @@ public:
bool autoBind = true, bool autoBind = true,
bool autoExtract = true); bool autoExtract = true);
/// Creates the SessionImpl. Opens a connection to the database. /// Creates the SessionImpl. Opens a connection to the database.
/// Throws NotConnectedException if connection was not succesful. /// Throws NotConnectedException if connection was not successful.
//@ deprecated //@ deprecated
SessionImpl(const std::string& connect, SessionImpl(const std::string& connect,

View File

@ -41,7 +41,7 @@ class ODBC_API TypeInfo
/// ///
/// This class provides mapping between C and SQL datatypes as well /// This class provides mapping between C and SQL datatypes as well
/// as datatypes supported by the underlying database. In order for database /// as datatypes supported by the underlying database. In order for database
/// types to be available, a valid conection handle must be supplied at either /// types to be available, a valid connection handle must be supplied at either
/// object construction time, or at a later point in time, through call to /// object construction time, or at a later point in time, through call to
/// fillTypeInfo member function. /// fillTypeInfo member function.
/// ///

View File

@ -380,7 +380,7 @@ std::string ODBCStatementImpl::nativeSQL()
delete [] pNative; delete [] pNative;
throw ConnectionException(_rConnection, "SQLNativeSql()"); throw ConnectionException(_rConnection, "SQLNativeSql()");
} }
++retlen;//accomodate for terminating '\0' ++retlen;//accommodate for terminating '\0'
}while (retlen > length); }while (retlen > length);
std::string sql(pNative); std::string sql(pNative);

View File

@ -158,7 +158,7 @@ std::size_t Preparator::maxDataSize(std::size_t pos) const
ODBCMetaColumn mc(_rStmt, pos); ODBCMetaColumn mc(_rStmt, pos);
sz = mc.length(); sz = mc.length();
// accomodate for terminating zero (non-bulk only!) // accommodate for terminating zero (non-bulk only!)
MetaColumn::ColumnDataType type = mc.type(); MetaColumn::ColumnDataType type = mc.type();
if (!isBulk() && ((ODBCMetaColumn::FDT_WSTRING == type) || (ODBCMetaColumn::FDT_STRING == type))) ++sz; if (!isBulk() && ((ODBCMetaColumn::FDT_WSTRING == type) || (ODBCMetaColumn::FDT_STRING == type))) ++sz;
} }

View File

@ -195,7 +195,7 @@ bool ODBCAccessTest::init(const std::string& driver, const std::string& dsn)
return false; return false;
} }
//N.B. Access driver does not suport check for connection. //N.B. Access driver does not support check for connection.
std::cout << "*** Connected to [" << driver << "] test database." << std::endl; std::cout << "*** Connected to [" << driver << "] test database." << std::endl;
return true; return true;

View File

@ -80,9 +80,9 @@ private:
/// Alternative is direct database configuration for PL/pgSQL usage. /// Alternative is direct database configuration for PL/pgSQL usage.
static const std::string _libDir; static const std::string _libDir;
/// Varible determining the location of the library directory /// Variable determining the location of the library directory
/// on the database installation system. /// on the database installation system.
/// Used to enable PLpgSQL language programmaticaly when /// Used to enable PLpgSQL language programmatically when
/// it is not enabled. /// it is not enabled.
static SessionPtr _pSession; static SessionPtr _pSession;

View File

@ -46,7 +46,7 @@ class SQLite_API Notifier
/// ///
/// There can be only one set of callbacks per session (i.e. registering a new /// There can be only one set of callbacks per session (i.e. registering a new
/// callback automatically unregisters the previous one). All callbacks are /// callback automatically unregisters the previous one). All callbacks are
/// registered and enabled at Notifier contruction time and can be disabled /// registered and enabled at Notifier construction time and can be disabled
/// at a later point time. /// at a later point time.
{ {
public: public:
@ -119,9 +119,9 @@ public:
/// and triggers the event. /// and triggers the event.
static int sqliteCommitCallbackFn(void* pVal); static int sqliteCommitCallbackFn(void* pVal);
/// Commit callback event dispatcher. If an exception occurs, it is catched inside this function, /// Commit callback event dispatcher. If an exception occurs, it is caught inside this function,
/// non-zero value is returned, which causes SQLite engine to turn commit into a rollback. /// non-zero value is returned, which causes SQLite engine to turn commit into a rollback.
/// Therefore, callers should check for return value - if it is zero, callback completed succesfuly /// Therefore, callers should check for return value - if it is zero, callback completed successfuly
/// and transaction was committed. /// and transaction was committed.
static void sqliteRollbackCallbackFn(void* pVal); static void sqliteRollbackCallbackFn(void* pVal);

View File

@ -78,8 +78,8 @@ protected:
void compileImpl(); void compileImpl();
/// Compiles the statement, doesn't bind yet. /// Compiles the statement, doesn't bind yet.
/// Returns true if the statement was succesfully compiled. /// Returns true if the statement was successfully compiled.
/// The way SQLite handles batches of statmeents is by compiling /// The way SQLite handles batches of statements is by compiling
/// one at a time and returning a pointer to the next one. /// one at a time and returning a pointer to the next one.
/// The remainder of the statement is kept in a string /// The remainder of the statement is kept in a string
/// buffer pointed to by _pLeftover member. /// buffer pointed to by _pLeftover member.

View File

@ -60,10 +60,10 @@ public:
/// Returns native DB handle. /// Returns native DB handle.
static std::string lastError(sqlite3* pDb); static std::string lastError(sqlite3* pDb);
/// Retreives the last error code from sqlite and converts it to a string. /// Retrieves the last error code from sqlite and converts it to a string.
static std::string lastError(const Session& session); static std::string lastError(const Session& session);
/// Retreives the last error code from sqlite and converts it to a string. /// Retrieves the last error code from sqlite and converts it to a string.
static void throwException(int rc, const std::string& addErrMsg = std::string()); static void throwException(int rc, const std::string& addErrMsg = std::string());
/// Throws for an error code the appropriate exception /// Throws for an error code the appropriate exception
@ -75,37 +75,37 @@ public:
/// Loads the contents of a database file on disk into an opened /// Loads the contents of a database file on disk into an opened
/// database in memory. /// database in memory.
/// ///
/// Returns true if succesful. /// Returns true if successful.
static bool fileToMemory(const Session& session, const std::string& fileName); static bool fileToMemory(const Session& session, const std::string& fileName);
/// Loads the contents of a database file on disk into an opened /// Loads the contents of a database file on disk into an opened
/// database in memory. /// database in memory.
/// ///
/// Returns true if succesful. /// Returns true if successful.
static bool memoryToFile(const std::string& fileName, sqlite3* pInMemory); static bool memoryToFile(const std::string& fileName, sqlite3* pInMemory);
/// Saves the contents of an opened database in memory to the /// Saves the contents of an opened database in memory to the
/// database on disk. /// database on disk.
/// ///
/// Returns true if succesful. /// Returns true if successful.
static bool memoryToFile(const std::string& fileName, const Session& session); static bool memoryToFile(const std::string& fileName, const Session& session);
/// Saves the contents of an opened database in memory to the /// Saves the contents of an opened database in memory to the
/// database on disk. /// database on disk.
/// ///
/// Returns true if succesful. /// Returns true if successful.
static bool isThreadSafe(); static bool isThreadSafe();
/// Returns true if SQLite was compiled in multi-thread or serialized mode. /// Returns true if SQLite was compiled in multi-thread or serialized mode.
/// See http://www.sqlite.org/c3ref/threadsafe.html for details. /// See http://www.sqlite.org/c3ref/threadsafe.html for details.
/// ///
/// Returns true if succesful /// Returns true if successful
static bool setThreadMode(int mode); static bool setThreadMode(int mode);
/// Sets the threading mode to single, multi or serialized. /// Sets the threading mode to single, multi or serialized.
/// See http://www.sqlite.org/threadsafe.html for details. /// See http://www.sqlite.org/threadsafe.html for details.
/// ///
/// Returns true if succesful /// Returns true if successful
static int getThreadMode(); static int getThreadMode();
/// Returns the thread mode. /// Returns the thread mode.

View File

@ -172,7 +172,7 @@ public:
/// Binds a long. /// Binds a long.
virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN) = 0; virtual void bind(std::size_t pos, const unsigned long& val, Direction dir = PD_IN) = 0;
/// Binds an unsiged long. /// Binds an unsigned long.
virtual void bind(std::size_t pos, const std::vector<long>& val, Direction dir = PD_IN); virtual void bind(std::size_t pos, const std::vector<long>& val, Direction dir = PD_IN);
/// Binds a long vector. /// Binds a long vector.

View File

@ -140,7 +140,7 @@ public:
bool isValueNull(const std::string& str, bool deflt); bool isValueNull(const std::string& str, bool deflt);
/// Overload for const reference to std::string. /// Overload for const reference to std::string.
/// ///
/// Returns true when folowing conditions are met: /// Returns true when following conditions are met:
/// ///
/// - string is empty /// - string is empty
/// - getEmptyStringIsNull() returns true /// - getEmptyStringIsNull() returns true
@ -148,7 +148,7 @@ public:
bool isValueNull(const Poco::UTF16String& str, bool deflt); bool isValueNull(const Poco::UTF16String& str, bool deflt);
/// Overload for const reference to UTF16String. /// Overload for const reference to UTF16String.
/// ///
/// Returns true when folowing conditions are met: /// Returns true when following conditions are met:
/// ///
/// - string is empty /// - string is empty
/// - getEmptyStringIsNull() returns true /// - getEmptyStringIsNull() returns true

View File

@ -1474,7 +1474,7 @@ inline AbstractBindingVec& io(AbstractBindingVec& bv)
template <typename T> template <typename T>
inline AbstractBinding::Ptr bind(T t, const std::string& name) inline AbstractBinding::Ptr bind(T t, const std::string& name)
/// Convenience function for a more compact Binding creation. /// Convenience function for a more compact Binding creation.
/// This funtion differs from use() in its value copy semantics. /// This function differs from use() in its value copy semantics.
{ {
return new CopyBinding<T>(t, name, AbstractBinding::PD_IN); return new CopyBinding<T>(t, name, AbstractBinding::PD_IN);
} }
@ -1483,7 +1483,7 @@ inline AbstractBinding::Ptr bind(T t, const std::string& name)
template <typename T> template <typename T>
inline AbstractBinding::Ptr bind(T t) inline AbstractBinding::Ptr bind(T t)
/// Convenience function for a more compact Binding creation. /// Convenience function for a more compact Binding creation.
/// This funtion differs from use() in its value copy semantics. /// This function differs from use() in its value copy semantics.
{ {
return Poco::Data::Keywords::bind(t, ""); return Poco::Data::Keywords::bind(t, "");
} }

View File

@ -41,10 +41,10 @@ public:
/// Destroys the bulk. /// Destroys the bulk.
const Limit& limit() const; const Limit& limit() const;
/// Returns the limit asociated with this bulk object. /// Returns the limit associated with this bulk object.
Poco::UInt32 size() const; Poco::UInt32 size() const;
/// Returns the value of the limit asociated with /// Returns the value of the limit associated with
/// this bulk object. /// this bulk object.
private: private:

View File

@ -139,7 +139,7 @@ class InternalBulkExtraction: public BulkExtraction<C>
/// Container Data Type specialization extension for extraction of values from a query result set. /// Container Data Type specialization extension for extraction of values from a query result set.
/// ///
/// This class is intended for PocoData internal use - it is used by StatementImpl /// This class is intended for PocoData internal use - it is used by StatementImpl
/// to automaticaly create internal BulkExtraction in cases when statement returns data and no external storage /// to automatically create internal BulkExtraction in cases when statement returns data and no external storage
/// was supplied. It is later used by RecordSet to retrieve the fetched data after statement execution. /// was supplied. It is later used by RecordSet to retrieve the fetched data after statement execution.
/// It takes ownership of the Column pointer supplied as constructor argument. Column object, in turn /// It takes ownership of the Column pointer supplied as constructor argument. Column object, in turn
/// owns the data container pointer. /// owns the data container pointer.

View File

@ -497,7 +497,7 @@ class InternalExtraction: public Extraction<C>
/// Container Data Type specialization extension for extraction of values from a query result set. /// Container Data Type specialization extension for extraction of values from a query result set.
/// ///
/// This class is intended for PocoData internal use - it is used by StatementImpl /// This class is intended for PocoData internal use - it is used by StatementImpl
/// to automaticaly create internal Extraction in cases when statement returns data and no external storage /// to automatically create internal Extraction in cases when statement returns data and no external storage
/// was supplied. It is later used by RecordSet to retrieve the fetched data after statement execution. /// was supplied. It is later used by RecordSet to retrieve the fetched data after statement execution.
/// It takes ownership of the Column pointer supplied as constructor argument. Column object, in turn /// It takes ownership of the Column pointer supplied as constructor argument. Column object, in turn
/// owns the data container pointer. /// owns the data container pointer.

View File

@ -205,7 +205,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::BLOB>(Poco::Data::BLOB& b1, inline void swap<Poco::Data::BLOB>(Poco::Data::BLOB& b1,
Poco::Data::BLOB& b2) Poco::Data::BLOB& b2)
/// Full template specalization of std:::swap for BLOB /// Full template specialization of std:::swap for BLOB
{ {
b1.swap(b2); b1.swap(b2);
} }
@ -213,7 +213,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::CLOB>(Poco::Data::CLOB& c1, inline void swap<Poco::Data::CLOB>(Poco::Data::CLOB& c1,
Poco::Data::CLOB& c2) Poco::Data::CLOB& c2)
/// Full template specalization of std:::swap for CLOB /// Full template specialization of std:::swap for CLOB
{ {
c1.swap(c2); c1.swap(c2);
} }

View File

@ -63,7 +63,7 @@ class Data_API RecordSet: private Statement
/// ///
/// The third (optional) argument passed to the Recordset constructor is a RowFormatter /// The third (optional) argument passed to the Recordset constructor is a RowFormatter
/// implementation. The formatter is used in conjunction with << operator for recordset /// implementation. The formatter is used in conjunction with << operator for recordset
/// data formating. /// data formatting.
/// ///
/// The number of rows in the RecordSet can be limited by specifying /// The number of rows in the RecordSet can be limited by specifying
/// a limit for the Statement. /// a limit for the Statement.

View File

@ -178,13 +178,13 @@ public:
/// Converts the column names to string. /// Converts the column names to string.
void formatNames() const; void formatNames() const;
/// Fomats the column names. /// Formats the column names.
const std::string& valuesToString() const; const std::string& valuesToString() const;
/// Converts the row values to string and returns the formated string. /// Converts the row values to string and returns the formatted string.
void formatValues() const; void formatValues() const;
/// Fomats the row values. /// Formats the row values.
bool operator == (const Row& other) const; bool operator == (const Row& other) const;
/// Equality operator. /// Equality operator.

View File

@ -125,7 +125,7 @@ public:
/// Returns the number of comparisons removed. /// Returns the number of comparisons removed.
void toggleNot(); void toggleNot();
/// Togless the NOT operator for this filter; /// Toggles the NOT operator for this filter;
bool isNot() const; bool isNot() const;
/// Returns true if filter is NOT-ed, false otherwise. /// Returns true if filter is NOT-ed, false otherwise.

View File

@ -51,9 +51,9 @@ class Data_API RowFormatter
/// Statement always has the ownership of the row formatter and shares /// Statement always has the ownership of the row formatter and shares
/// it with rows through RecordSet. /// it with rows through RecordSet.
/// ///
/// To accomodate for various formatting needs, a formatter can operate in two modes: /// To accommodate for various formatting needs, a formatter can operate in two modes:
/// ///
/// - progressive: formatted individual row strings are gemerated and returned from each /// - progressive: formatted individual row strings are generated and returned from each
/// call to formatValues; /// call to formatValues;
/// std::string& formatNames(const NameVecPtr, std::string&) and /// std::string& formatNames(const NameVecPtr, std::string&) and
/// std::string& formatValues(const ValueVec&, std::string&) member calls should be /// std::string& formatValues(const ValueVec&, std::string&) member calls should be
@ -65,7 +65,7 @@ class Data_API RowFormatter
/// void formatValues(const ValueVec&) member calls should be used in this case /// void formatValues(const ValueVec&) member calls should be used in this case
/// ///
/// When formatter is used in conjunction with Row/RecordSet, the formatting members corresponding /// When formatter is used in conjunction with Row/RecordSet, the formatting members corresponding
/// to the formater mode are expected to be implemented. If a call is propagated to this parent /// to the formatter mode are expected to be implemented. If a call is propagated to this parent
/// class, the functions do nothing or silently return empty string respectively. /// class, the functions do nothing or silently return empty string respectively.
/// ///
{ {
@ -134,10 +134,10 @@ public:
/// to empty strings and row count to INVALID_ROW_COUNT. /// to empty strings and row count to INVALID_ROW_COUNT.
Mode getMode() const; Mode getMode() const;
/// Returns the formater mode. /// Returns the formatter mode.
void setMode(Mode mode); void setMode(Mode mode);
/// Sets the fromatter mode. /// Sets the formatter mode.
protected: protected:

View File

@ -142,7 +142,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::RowIterator>(Poco::Data::RowIterator& s1, inline void swap<Poco::Data::RowIterator>(Poco::Data::RowIterator& s1,
Poco::Data::RowIterator& s2) Poco::Data::RowIterator& s2)
/// Full template specalization of std:::swap for RowIterator /// Full template specialization of std:::swap for RowIterator
{ {
s1.swap(s2); s1.swap(s2);
} }

View File

@ -51,10 +51,10 @@ class Data_API SQLChannel: public Poco::Channel
/// DateTime DATE)" /// DateTime DATE)"
/// ///
/// The table name is configurable through "table" property. /// The table name is configurable through "table" property.
/// Other than DateTime filed name used for optiona time-based archiving purposes, currently the /// Other than DateTime filed name used for optional time-based archiving purposes, currently the
/// field names are not mandated. However, it is recomended to use names as specified above. /// field names are not mandated. However, it is recommended to use names as specified above.
/// ///
/// To provide as non-intrusive operation as possbile, the log entries are cached and /// To provide as non-intrusive operation as possible, the log entries are cached and
/// inserted into the target database asynchronously by default . The blocking, however, will occur /// inserted into the target database asynchronously by default . The blocking, however, will occur
/// before the next entry insertion with default timeout of 1 second. The default settings can be /// before the next entry insertion with default timeout of 1 second. The default settings can be
/// overriden (see async, timeout and throw properties for details). /// overriden (see async, timeout and throw properties for details).
@ -104,12 +104,12 @@ public:
/// Table must exist in the target database. To disable archiving, /// Table must exist in the target database. To disable archiving,
/// set this property to empty string. /// set this property to empty string.
/// ///
/// * async: Indicates asynchronous execution. When excuting asynchronously, /// * async: Indicates asynchronous execution. When executing asynchronously,
/// messages are sent to the target using asyncronous execution. /// messages are sent to the target using asynchronous execution.
/// However, prior to the next message being processed and sent to /// However, prior to the next message being processed and sent to
/// the target, the previous operation must have been either completed /// the target, the previous operation must have been either completed
/// or timed out (see timeout and throw properties for details on /// or timed out (see timeout and throw properties for details on
/// how abnormal conditos are handled). /// how abnormal conditions are handled).
/// ///
/// * timeout: Timeout (ms) to wait for previous log operation completion. /// * timeout: Timeout (ms) to wait for previous log operation completion.
/// Values "0" and "" mean no timeout. Only valid when logging /// Values "0" and "" mean no timeout. Only valid when logging
@ -125,7 +125,7 @@ public:
std::size_t wait(); std::size_t wait();
/// Waits for the completion of the previous operation and returns /// Waits for the completion of the previous operation and returns
/// the result. If chanel is in synchronous mode, returns 0 immediately. /// the result. If channel is in synchronous mode, returns 0 immediately.
static void registerChannel(); static void registerChannel();
/// Registers the channel with the global LoggingFactory. /// Registers the channel with the global LoggingFactory.
@ -150,15 +150,15 @@ private:
typedef Poco::SharedPtr<ArchiveStrategy> StrategyPtr; typedef Poco::SharedPtr<ArchiveStrategy> StrategyPtr;
void initLogStatement(); void initLogStatement();
/// Initiallizes the log statement. /// Initializes the log statement.
void initArchiveStatements(); void initArchiveStatements();
/// Initiallizes the archive statement. /// Initializes the archive statement.
void logAsync(const Message& msg); void logAsync(const Message& msg);
/// Waits for previous operation completion and /// Waits for previous operation completion and
/// calls logSync(). If the previous operation times out, /// calls logSync(). If the previous operation times out,
/// and _throw is true, TimeoutException is thrown, oterwise /// and _throw is true, TimeoutException is thrown, otherwise
/// the timeout is ignored and log entry is lost. /// the timeout is ignored and log entry is lost.
void logSync(const Message& msg); void logSync(const Message& msg);

View File

@ -78,7 +78,7 @@ class Data_API Session
/// The above example assigns the variable i to the ":data" placeholder in the SQL query. The query is parsed and compiled exactly /// The above example assigns the variable i to the ":data" placeholder in the SQL query. The query is parsed and compiled exactly
/// once, but executed 100 times. At the end the values 0 to 99 will be present in the Table "DUMMY". /// once, but executed 100 times. At the end the values 0 to 99 will be present in the Table "DUMMY".
/// ///
/// A faster implementaton of the above code will simply create a vector of int /// A faster implementation of the above code will simply create a vector of int
/// and use the vector as parameter to the use clause (you could also use set or multiset instead): /// and use the vector as parameter to the use clause (you could also use set or multiset instead):
/// ///
/// std::vector<int> data; /// std::vector<int> data;
@ -202,7 +202,7 @@ public:
/// reconnect a disconnected session. /// reconnect a disconnected session.
/// If the connection is not established, /// If the connection is not established,
/// a ConnectionFailedException is thrown. /// a ConnectionFailedException is thrown.
/// Zero timout means indefinite /// Zero timeout means indefinite
void close(); void close();
/// Closes the session. /// Closes the session.
@ -262,7 +262,7 @@ public:
static std::string uri(const std::string& connector, static std::string uri(const std::string& connector,
const std::string& connectionString); const std::string& connectionString);
/// Utility function that teturns the URI formatted from supplied /// Utility function that returns the URI formatted from supplied
/// arguments as "connector:///connectionString". /// arguments as "connector:///connectionString".
void setFeature(const std::string& name, bool state); void setFeature(const std::string& name, bool state);
@ -486,7 +486,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::Session>(Poco::Data::Session& s1, inline void swap<Poco::Data::Session>(Poco::Data::Session& s1,
Poco::Data::Session& s2) Poco::Data::Session& s2)
/// Full template specalization of std:::swap for Session /// Full template specialization of std:::swap for Session
{ {
s1.swap(s2); s1.swap(s2);
} }

View File

@ -67,7 +67,7 @@ public:
/// a disconnected session. /// a disconnected session.
/// If the connection is not established within requested timeout /// If the connection is not established within requested timeout
/// (specified in seconds), a ConnectionFailedException is thrown. /// (specified in seconds), a ConnectionFailedException is thrown.
/// Zero timout means indefinite /// Zero timeout means indefinite
virtual void close() = 0; virtual void close() = 0;
/// Closes the connection. /// Closes the connection.
@ -170,7 +170,7 @@ public:
protected: protected:
void setConnectionString(const std::string& connectionString); void setConnectionString(const std::string& connectionString);
/// Sets the connection string. Should only be called on /// Sets the connection string. Should only be called on
/// disconnetced sessions. Throws InvalidAccessException when called on /// disconnected sessions. Throws InvalidAccessException when called on
/// a connected session. /// a connected session.
private: private:

View File

@ -111,7 +111,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::SimpleRowFormatter>(Poco::Data::SimpleRowFormatter& s1, inline void swap<Poco::Data::SimpleRowFormatter>(Poco::Data::SimpleRowFormatter& s1,
Poco::Data::SimpleRowFormatter& s2) Poco::Data::SimpleRowFormatter& s2)
/// Full template specalization of std:::swap for SimpleRowFormatter /// Full template specialization of std:::swap for SimpleRowFormatter
{ {
s1.swap(s2); s1.swap(s2);
} }

View File

@ -50,7 +50,7 @@ class Data_API Statement
/// It does not contain code of its own. /// It does not contain code of its own.
/// Its main purpose is to forward calls to the concrete StatementImpl stored inside. /// Its main purpose is to forward calls to the concrete StatementImpl stored inside.
/// Statement execution can be synchronous or asynchronous. /// Statement execution can be synchronous or asynchronous.
/// Synchronous ececution is achieved through execute() call, while asynchronous is /// Synchronous execution is achieved through execute() call, while asynchronous is
/// achieved through executeAsync() method call. /// achieved through executeAsync() method call.
/// An asynchronously executing statement should not be copied during the execution. /// An asynchronously executing statement should not be copied during the execution.
/// ///
@ -68,7 +68,7 @@ class Data_API Statement
/// ///
/// See individual functions documentation for more details. /// See individual functions documentation for more details.
/// ///
/// Statement owns the RowFormatter, which can be provided externaly through setFormatter() /// Statement owns the RowFormatter, which can be provided externally through setFormatter()
/// member function. /// member function.
/// If no formatter is externally supplied to the statement, the SimpleRowFormatter is lazy /// If no formatter is externally supplied to the statement, the SimpleRowFormatter is lazy
/// created and used. /// created and used.
@ -803,7 +803,7 @@ namespace std
template<> template<>
inline void swap<Poco::Data::Statement>(Poco::Data::Statement& s1, inline void swap<Poco::Data::Statement>(Poco::Data::Statement& s1,
Poco::Data::Statement& s2) Poco::Data::Statement& s2)
/// Full template specalization of std:::swap for Statement /// Full template specialization of std:::swap for Statement
{ {
s1.swap(s2); s1.swap(s2);
} }

View File

@ -131,7 +131,7 @@ public:
/// affected for all other statements (insert, update, delete). /// affected for all other statements (insert, update, delete).
/// If reset is true (default), the underlying bound storage is /// If reset is true (default), the underlying bound storage is
/// reset and reused. In case of containers, this means they are /// reset and reused. In case of containers, this means they are
/// cleared and resized to accomodate the number of rows returned by /// cleared and resized to accommodate the number of rows returned by
/// this execution step. When reset is false, data is appended to the /// this execution step. When reset is false, data is appended to the
/// bound containers during multiple execute calls. /// bound containers during multiple execute calls.
@ -184,7 +184,7 @@ protected:
virtual std::size_t next() = 0; virtual std::size_t next() = 0;
/// Retrieves the next row or set of rows from the resultset and /// Retrieves the next row or set of rows from the resultset and
/// returns the number of rows retreved. /// returns the number of rows retrieved.
/// ///
/// Will throw, if the resultset is empty. /// Will throw, if the resultset is empty.
/// Expects the statement to be compiled and bound. /// Expects the statement to be compiled and bound.
@ -253,7 +253,7 @@ protected:
/// - std::list /// - std::list
SessionImpl& session(); SessionImpl& session();
/// Rteurns session associated with this statement. /// Returns session associated with this statement.
virtual AbstractBinding::BinderPtr binder() = 0; virtual AbstractBinding::BinderPtr binder() = 0;
/// Returns the concrete binder used by the statement. /// Returns the concrete binder used by the statement.

View File

@ -36,7 +36,7 @@ class Data_API Transaction
/// transaction is in progress. If not, a new transaction is created. /// transaction is in progress. If not, a new transaction is created.
/// When the Transaction is destroyed, and commit() has been called, /// When the Transaction is destroyed, and commit() has been called,
/// nothing is done. Otherwise, the current transaction is rolled back. /// nothing is done. Otherwise, the current transaction is rolled back.
/// See Transaction for more detaisl nad purpose of this template. /// See Transaction for more details and purpose of this template.
{ {
public: public:
Transaction(Poco::Data::Session& session, Poco::Logger* pLogger = 0); Transaction(Poco::Data::Session& session, Poco::Logger* pLogger = 0);
@ -56,7 +56,7 @@ public:
/// reference as an argument. /// reference as an argument.
/// ///
/// When transaction is created using this constructor, it is executed and /// When transaction is created using this constructor, it is executed and
/// commited automatically. If no error occurs, rollback is disabled and does /// committed automatically. If no error occurs, rollback is disabled and does
/// not occur at destruction time. If an error occurs resulting in exception being /// not occur at destruction time. If an error occurs resulting in exception being
/// thrown, the transaction is rolled back and exception propagated to calling code. /// thrown, the transaction is rolled back and exception propagated to calling code.
/// ///
@ -84,7 +84,7 @@ public:
~Transaction(); ~Transaction();
/// Destroys the Transaction. /// Destroys the Transaction.
/// Rolls back the current database transaction if it has not been commited /// Rolls back the current database transaction if it has not been committed
/// (by calling commit()), or rolled back (by calling rollback()). /// (by calling commit()), or rolled back (by calling rollback()).
/// ///
/// If an exception is thrown during rollback, the exception is logged /// If an exception is thrown during rollback, the exception is logged
@ -111,7 +111,7 @@ public:
void execute(const std::vector<std::string>& sql); void execute(const std::vector<std::string>& sql);
/// Executes all the SQL statements supplied in the vector and, after the last /// Executes all the SQL statements supplied in the vector and, after the last
/// one is sucesfully executed, commits the transaction. /// one is successfully executed, commits the transaction.
/// If an error occurs during execution, transaction is rolled back. /// If an error occurs during execution, transaction is rolled back.
/// Passing true value for commit disables rollback during destruction /// Passing true value for commit disables rollback during destruction
/// of this Transaction object. /// of this Transaction object.

View File

@ -97,7 +97,7 @@ class TypeHandler: public AbstractTypeHandler
/// ///
/// static void extract(std::size_t pos, Person& obj, const Person& defVal, AbstractExtractor::Ptr pExt) /// static void extract(std::size_t pos, Person& obj, const Person& defVal, AbstractExtractor::Ptr pExt)
/// { /// {
/// // defVal is the default person we should use if we encunter NULL entries, so we take the individual fields /// // defVal is the default person we should use if we encounter NULL entries, so we take the individual fields
/// // as defaults. You can do more complex checking, ie return defVal if only one single entry of the fields is null etc... /// // as defaults. You can do more complex checking, ie return defVal if only one single entry of the fields is null etc...
/// poco_assert_dbg (!pExt.isNull()); /// poco_assert_dbg (!pExt.isNull());
/// std::string lastName; /// std::string lastName;

View File

@ -87,7 +87,7 @@ public:
/// If for the key already an entry exists, it will be overwritten. /// If for the key already an entry exists, it will be overwritten.
/// The difference to add is that no remove or add events are thrown in this case, /// The difference to add is that no remove or add events are thrown in this case,
/// just a simply silent update is performed /// just a simply silent update is performed
/// If the key doesnot exist the behavior is equal to add, ie. an add event is thrown /// If the key does not exist the behavior is equal to add, ie. an add event is thrown
{ {
typename TMutex::ScopedLock lock(_mutex); typename TMutex::ScopedLock lock(_mutex);
doUpdate(key, val); doUpdate(key, val);
@ -107,7 +107,7 @@ public:
/// If for the key already an entry exists, it will be overwritten. /// If for the key already an entry exists, it will be overwritten.
/// The difference to add is that no remove or add events are thrown in this case, /// The difference to add is that no remove or add events are thrown in this case,
/// just an Update is thrown /// just an Update is thrown
/// If the key doesnot exist the behavior is equal to add, ie. an add event is thrown /// If the key does not exist the behavior is equal to add, ie. an add event is thrown
{ {
typename TMutex::ScopedLock lock(_mutex); typename TMutex::ScopedLock lock(_mutex);
doUpdate(key, val); doUpdate(key, val);

View File

@ -253,7 +253,7 @@ public:
ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& args) ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& args)
/// Sends a notification to all registered delegates. The order is /// Sends a notification to all registered delegates. The order 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 seperate thread. /// immediately return. The delegates are invoked in a separate 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 list. These changes don't /// While executing, other objects can change the delegate list. These changes don't
/// influence the current active notifications but are activated with /// influence the current active notifications but are activated with
@ -344,7 +344,7 @@ protected:
} }
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 disabled events have no effect bool _enabled; /// Stores if an event is enabled. Notifies on disabled 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;
@ -455,7 +455,7 @@ public:
ActiveResult<void> notifyAsync(const void* pSender) ActiveResult<void> notifyAsync(const void* pSender)
/// Sends a notification to all registered delegates. The order is /// Sends a notification to all registered delegates. The order 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 seperate thread. /// immediately return. The delegates are invoked in a separate 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 list. These changes don't /// While executing, other objects can change the delegate list. These changes don't
/// influence the current active notifications but are activated with /// influence the current active notifications but are activated with
@ -544,7 +544,7 @@ protected:
} }
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 disabled events have no effect bool _enabled; /// Stores if an event is enabled. Notifies on disabled 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;

View File

@ -69,7 +69,7 @@ public:
virtual void onReplace(const void* pSender, std::set<TKey>& elemsToRemove) = 0; virtual void onReplace(const void* pSender, std::set<TKey>& elemsToRemove) = 0;
/// Used by the Strategy to indicate which elements should be removed from /// Used by the Strategy to indicate which elements should be removed from
/// the cache. Note that onReplace does not change the current list of keys. /// the cache. Note that onReplace does not change the current list of keys.
/// The cache object is reponsible to remove the elements. /// The cache object is responsible to remove the elements.
}; };

View File

@ -203,7 +203,7 @@ public:
Any& swap(Any& other) Any& swap(Any& other)
/// Swaps the content of the two Anys. /// Swaps the content of the two Anys.
/// ///
/// When small object optimizaton is enabled, swap only /// When small object optimization is enabled, swap only
/// has no-throw guarantee when both (*this and other) /// has no-throw guarantee when both (*this and other)
/// objects are allocated on the heap. /// objects are allocated on the heap.
{ {
@ -516,7 +516,7 @@ ValueType AnyCast(Any& operand)
/// 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 = ... /// Do not 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.
{ {
@ -535,7 +535,7 @@ ValueType AnyCast(const Any& operand)
/// 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& = ... /// Do not 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.
{ {

View File

@ -31,7 +31,7 @@ template <class C>
class AutoReleasePool class AutoReleasePool
/// An AutoReleasePool implements simple garbage collection for /// An AutoReleasePool implements simple garbage collection for
/// reference-counted objects. /// reference-counted objects.
/// It temporarily takes ownwership of reference-counted objects that /// It temporarily takes ownership of reference-counted objects that
/// nobody else wants to take ownership of and releases them /// nobody else wants to take ownership of and releases them
/// at a later, appropriate point in time. /// at a later, appropriate point in time.
/// ///

View File

@ -45,7 +45,7 @@ class Foundation_API BinaryWriter
/// data type sizes (e.g., 32-bit and 64-bit architectures), as the sizes /// data type sizes (e.g., 32-bit and 64-bit architectures), as the sizes
/// of some of the basic types may be different. For example, writing a /// of some of the basic types may be different. For example, writing a
/// long integer on a 64-bit system and reading it on a 32-bit system /// long integer on a 64-bit system and reading it on a 32-bit system
/// may yield an incorrent result. Use fixed-size types (Int32, Int64, etc.) /// may yield an incorrect result. Use fixed-size types (Int32, Int64, etc.)
/// in such a case. /// in such a case.
{ {
public: public:

View File

@ -69,7 +69,7 @@ public:
/// Returns the calculated checksum. /// Returns the calculated checksum.
Type type() const; Type type() const;
/// Which type of checksum are we calulcating /// Which type of checksum are we calculating.
private: private:
Type _type; Type _type;

View File

@ -30,7 +30,7 @@ class Foundation_API Clock
/// A Clock stores a monotonic* clock value /// A Clock stores a monotonic* clock value
/// with (theoretical) microseconds resolution. /// with (theoretical) microseconds resolution.
/// Clocks can be compared with each other /// Clocks can be compared with each other
/// and simple arithmetics are supported. /// and simple arithmetic is supported.
/// ///
/// [*] Note that Clock values are only monotonic if /// [*] Note that Clock values are only monotonic if
/// the operating system provides a monotonic clock. /// the operating system provides a monotonic clock.
@ -110,7 +110,7 @@ public:
static ClockDiff resolution(); static ClockDiff resolution();
/// Returns the resolution in units per second. /// Returns the resolution in units per second.
/// Since the Clock clas has microsecond resolution, /// Since the Clock class has microsecond resolution,
/// the returned value is always 1000000. /// the returned value is always 1000000.
static ClockDiff accuracy(); static ClockDiff accuracy();

View File

@ -160,11 +160,11 @@ public:
/// on a Saturday, week 1 will be the week starting on Monday, January 3. /// on a Saturday, week 1 will be the week starting on Monday, January 3.
/// January 1 and 2 will fall within week 0 (or the last week of the previous year). /// January 1 and 2 will fall within week 0 (or the last week of the previous year).
/// ///
/// For 2007, which starts on a Monday, week 1 will be the week startung on Monday, January 1. /// For 2007, which starts on a Monday, week 1 will be the week starting on Monday, January 1.
/// There will be no week 0 in 2007. /// There will be no week 0 in 2007.
int day() const; int day() const;
/// Returns the day witin the month (1 to 31). /// Returns the day within the month (1 to 31).
int dayOfWeek() const; int dayOfWeek() const;
/// Returns the weekday (0 to 6, where /// Returns the weekday (0 to 6, where
@ -247,7 +247,7 @@ protected:
/// Computes the Julian day for an UTC time. /// Computes the Julian day for an UTC time.
static double toJulianDay(int year, int month, int day, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0); static double toJulianDay(int year, int month, int day, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0);
/// Computes the Julian day for a gregorian calendar date and time. /// Computes the Julian day for a Gregorian calendar date and time.
/// See <http://vsg.cape.com/~pbaum/date/jdimp.htm>, section 2.3.1 for the algorithm. /// See <http://vsg.cape.com/~pbaum/date/jdimp.htm>, section 2.3.1 for the algorithm.
static Timestamp::UtcTimeVal toUtcTime(double julianDay); static Timestamp::UtcTimeVal toUtcTime(double julianDay);

View File

@ -103,7 +103,7 @@ public:
static int parseDayOfWeek(std::string::const_iterator& it, const std::string::const_iterator& end); static int parseDayOfWeek(std::string::const_iterator& it, const std::string::const_iterator& end);
/// Tries to interpret the given range as a weekday name. The range must be at least /// Tries to interpret the given range as a weekday name. The range must be at least
/// three characters long. /// three characters long.
/// Returns the weekday number (0 .. 6, where 0 = Synday, 1 = Monday, etc.) if the /// Returns the weekday number (0 .. 6, where 0 = Sunday, 1 = Monday, etc.) if the
/// weekday name is valid. Otherwise throws a SyntaxException. /// weekday name is valid. Otherwise throws a SyntaxException.
protected: protected:

View File

@ -46,7 +46,7 @@ class Foundation_API Var
/// ///
/// 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 unsigned integer type storage, a RangeException is thrown. /// the internal value which is a negative signed integer to an unsigned integer type storage, a RangeException is thrown.
/// Overflow is not allowed, so if the internal value is a larger number than the target numeric type size can accomodate, /// Overflow is not allowed, so if the internal value is a larger number than the target numeric type size can accommodate,
/// 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
@ -271,16 +271,16 @@ public:
template <typename T> template <typename T>
Var& operator += (const T& other) Var& operator += (const T& other)
/// Addition asignment operator for addition/assignment of POD to Var. /// Addition assignment operator for addition/assignment of POD to Var.
{ {
return *this = convert<T>() + other; return *this = convert<T>() + other;
} }
Var& operator += (const Var& other); Var& operator += (const Var& other);
/// Addition asignment operator overload for Var /// Addition assignment operator overload for Var
Var& operator += (const char* other); Var& operator += (const char* other);
/// Addition asignment operator overload for const char* /// Addition assignment operator overload for const char*
template <typename T> template <typename T>
const Var operator - (const T& other) const const Var operator - (const T& other) const
@ -294,13 +294,13 @@ public:
template <typename T> template <typename T>
Var& operator -= (const T& other) Var& operator -= (const T& other)
/// Subtraction asignment operator /// Subtraction assignment operator
{ {
return *this = convert<T>() - other; return *this = convert<T>() - other;
} }
Var& operator -= (const Var& other); Var& operator -= (const Var& other);
/// Subtraction asignment operator overload for Var /// Subtraction assignment operator overload for Var
template <typename T> template <typename T>
const Var operator * (const T& other) const const Var operator * (const T& other) const
@ -314,13 +314,13 @@ public:
template <typename T> template <typename T>
Var& operator *= (const T& other) Var& operator *= (const T& other)
/// Multiplication asignment operator /// Multiplication assignment operator
{ {
return *this = convert<T>() * other; return *this = convert<T>() * other;
} }
Var& operator *= (const Var& other); Var& operator *= (const Var& other);
/// Multiplication asignment operator overload for Var /// Multiplication assignment operator overload for Var
template <typename T> template <typename T>
const Var operator / (const T& other) const const Var operator / (const T& other) const
@ -334,13 +334,13 @@ public:
template <typename T> template <typename T>
Var& operator /= (const T& other) Var& operator /= (const T& other)
/// Division asignment operator /// Division assignment operator
{ {
return *this = convert<T>() / other; return *this = convert<T>() / other;
} }
Var& operator /= (const Var& other); Var& operator /= (const Var& other);
/// Division asignment operator specialization for Var /// Division assignment operator specialization for Var
template <typename T> template <typename T>
bool operator == (const T& other) const bool operator == (const T& other) const
@ -922,28 +922,28 @@ inline char operator / (const char& other, const Var& da)
inline char operator += (char& other, const Var& da) inline char operator += (char& other, const Var& da)
/// Addition asignment operator for adding Var to char /// Addition assignment operator for adding Var to char
{ {
return other += da.convert<char>(); return other += da.convert<char>();
} }
inline char operator -= (char& other, const Var& da) inline char operator -= (char& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from char /// Subtraction assignment operator for subtracting Var from char
{ {
return other -= da.convert<char>(); return other -= da.convert<char>();
} }
inline char operator *= (char& other, const Var& da) inline char operator *= (char& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with char /// Multiplication assignment operator for multiplying Var with char
{ {
return other *= da.convert<char>(); return other *= da.convert<char>();
} }
inline char operator /= (char& other, const Var& da) inline char operator /= (char& other, const Var& da)
/// Division asignment operator for dividing Var with char /// Division assignment operator for dividing Var with char
{ {
return other /= da.convert<char>(); return other /= da.convert<char>();
} }
@ -1026,28 +1026,28 @@ inline Poco::Int8 operator / (const Poco::Int8& other, const Var& da)
inline Poco::Int8 operator += (Poco::Int8& other, const Var& da) inline Poco::Int8 operator += (Poco::Int8& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::Int8 /// Addition assignment operator for adding Var to Poco::Int8
{ {
return other += da.convert<Poco::Int8>(); return other += da.convert<Poco::Int8>();
} }
inline Poco::Int8 operator -= (Poco::Int8& other, const Var& da) inline Poco::Int8 operator -= (Poco::Int8& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::Int8 /// Subtraction assignment operator for subtracting Var from Poco::Int8
{ {
return other -= da.convert<Poco::Int8>(); return other -= da.convert<Poco::Int8>();
} }
inline Poco::Int8 operator *= (Poco::Int8& other, const Var& da) inline Poco::Int8 operator *= (Poco::Int8& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::Int8 /// Multiplication assignment operator for multiplying Var with Poco::Int8
{ {
return other *= da.convert<Poco::Int8>(); return other *= da.convert<Poco::Int8>();
} }
inline Poco::Int8 operator /= (Poco::Int8& other, const Var& da) inline Poco::Int8 operator /= (Poco::Int8& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::Int8 /// Division assignment operator for dividing Var with Poco::Int8
{ {
return other /= da.convert<Poco::Int8>(); return other /= da.convert<Poco::Int8>();
} }
@ -1130,28 +1130,28 @@ inline Poco::UInt8 operator / (const Poco::UInt8& other, const Var& da)
inline Poco::UInt8 operator += (Poco::UInt8& other, const Var& da) inline Poco::UInt8 operator += (Poco::UInt8& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::UInt8 /// Addition assignment operator for adding Var to Poco::UInt8
{ {
return other += da.convert<Poco::UInt8>(); return other += da.convert<Poco::UInt8>();
} }
inline Poco::UInt8 operator -= (Poco::UInt8& other, const Var& da) inline Poco::UInt8 operator -= (Poco::UInt8& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::UInt8 /// Subtraction assignment operator for subtracting Var from Poco::UInt8
{ {
return other -= da.convert<Poco::UInt8>(); return other -= da.convert<Poco::UInt8>();
} }
inline Poco::UInt8 operator *= (Poco::UInt8& other, const Var& da) inline Poco::UInt8 operator *= (Poco::UInt8& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::UInt8 /// Multiplication assignment operator for multiplying Var with Poco::UInt8
{ {
return other *= da.convert<Poco::UInt8>(); return other *= da.convert<Poco::UInt8>();
} }
inline Poco::UInt8 operator /= (Poco::UInt8& other, const Var& da) inline Poco::UInt8 operator /= (Poco::UInt8& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::UInt8 /// Division assignment operator for dividing Var with Poco::UInt8
{ {
return other /= da.convert<Poco::UInt8>(); return other /= da.convert<Poco::UInt8>();
} }
@ -1234,28 +1234,28 @@ inline Poco::Int16 operator / (const Poco::Int16& other, const Var& da)
inline Poco::Int16 operator += (Poco::Int16& other, const Var& da) inline Poco::Int16 operator += (Poco::Int16& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::Int16 /// Addition assignment operator for adding Var to Poco::Int16
{ {
return other += da.convert<Poco::Int16>(); return other += da.convert<Poco::Int16>();
} }
inline Poco::Int16 operator -= (Poco::Int16& other, const Var& da) inline Poco::Int16 operator -= (Poco::Int16& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::Int16 /// Subtraction assignment operator for subtracting Var from Poco::Int16
{ {
return other -= da.convert<Poco::Int16>(); return other -= da.convert<Poco::Int16>();
} }
inline Poco::Int16 operator *= (Poco::Int16& other, const Var& da) inline Poco::Int16 operator *= (Poco::Int16& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::Int16 /// Multiplication assignment operator for multiplying Var with Poco::Int16
{ {
return other *= da.convert<Poco::Int16>(); return other *= da.convert<Poco::Int16>();
} }
inline Poco::Int16 operator /= (Poco::Int16& other, const Var& da) inline Poco::Int16 operator /= (Poco::Int16& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::Int16 /// Division assignment operator for dividing Var with Poco::Int16
{ {
return other /= da.convert<Poco::Int16>(); return other /= da.convert<Poco::Int16>();
} }
@ -1338,28 +1338,28 @@ inline Poco::UInt16 operator / (const Poco::UInt16& other, const Var& da)
inline Poco::UInt16 operator += (Poco::UInt16& other, const Var& da) inline Poco::UInt16 operator += (Poco::UInt16& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::UInt16 /// Addition assignment operator for adding Var to Poco::UInt16
{ {
return other += da.convert<Poco::UInt16>(); return other += da.convert<Poco::UInt16>();
} }
inline Poco::UInt16 operator -= (Poco::UInt16& other, const Var& da) inline Poco::UInt16 operator -= (Poco::UInt16& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::UInt16 /// Subtraction assignment operator for subtracting Var from Poco::UInt16
{ {
return other -= da.convert<Poco::UInt16>(); return other -= da.convert<Poco::UInt16>();
} }
inline Poco::UInt16 operator *= (Poco::UInt16& other, const Var& da) inline Poco::UInt16 operator *= (Poco::UInt16& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::UInt16 /// Multiplication assignment operator for multiplying Var with Poco::UInt16
{ {
return other *= da.convert<Poco::UInt16>(); return other *= da.convert<Poco::UInt16>();
} }
inline Poco::UInt16 operator /= (Poco::UInt16& other, const Var& da) inline Poco::UInt16 operator /= (Poco::UInt16& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::UInt16 /// Division assignment operator for dividing Var with Poco::UInt16
{ {
return other /= da.convert<Poco::UInt16>(); return other /= da.convert<Poco::UInt16>();
} }
@ -1442,28 +1442,28 @@ inline Poco::Int32 operator / (const Poco::Int32& other, const Var& da)
inline Poco::Int32 operator += (Poco::Int32& other, const Var& da) inline Poco::Int32 operator += (Poco::Int32& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::Int32 /// Addition assignment operator for adding Var to Poco::Int32
{ {
return other += da.convert<Poco::Int32>(); return other += da.convert<Poco::Int32>();
} }
inline Poco::Int32 operator -= (Poco::Int32& other, const Var& da) inline Poco::Int32 operator -= (Poco::Int32& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::Int32 /// Subtraction assignment operator for subtracting Var from Poco::Int32
{ {
return other -= da.convert<Poco::Int32>(); return other -= da.convert<Poco::Int32>();
} }
inline Poco::Int32 operator *= (Poco::Int32& other, const Var& da) inline Poco::Int32 operator *= (Poco::Int32& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::Int32 /// Multiplication assignment operator for multiplying Var with Poco::Int32
{ {
return other *= da.convert<Poco::Int32>(); return other *= da.convert<Poco::Int32>();
} }
inline Poco::Int32 operator /= (Poco::Int32& other, const Var& da) inline Poco::Int32 operator /= (Poco::Int32& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::Int32 /// Division assignment operator for dividing Var with Poco::Int32
{ {
return other /= da.convert<Poco::Int32>(); return other /= da.convert<Poco::Int32>();
} }
@ -1546,28 +1546,28 @@ inline Poco::UInt32 operator / (const Poco::UInt32& other, const Var& da)
inline Poco::UInt32 operator += (Poco::UInt32& other, const Var& da) inline Poco::UInt32 operator += (Poco::UInt32& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::UInt32 /// Addition assignment operator for adding Var to Poco::UInt32
{ {
return other += da.convert<Poco::UInt32>(); return other += da.convert<Poco::UInt32>();
} }
inline Poco::UInt32 operator -= (Poco::UInt32& other, const Var& da) inline Poco::UInt32 operator -= (Poco::UInt32& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::UInt32 /// Subtraction assignment operator for subtracting Var from Poco::UInt32
{ {
return other -= da.convert<Poco::UInt32>(); return other -= da.convert<Poco::UInt32>();
} }
inline Poco::UInt32 operator *= (Poco::UInt32& other, const Var& da) inline Poco::UInt32 operator *= (Poco::UInt32& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::UInt32 /// Multiplication assignment operator for multiplying Var with Poco::UInt32
{ {
return other *= da.convert<Poco::UInt32>(); return other *= da.convert<Poco::UInt32>();
} }
inline Poco::UInt32 operator /= (Poco::UInt32& other, const Var& da) inline Poco::UInt32 operator /= (Poco::UInt32& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::UInt32 /// Division assignment operator for dividing Var with Poco::UInt32
{ {
return other /= da.convert<Poco::UInt32>(); return other /= da.convert<Poco::UInt32>();
} }
@ -1650,28 +1650,28 @@ inline Poco::Int64 operator / (const Poco::Int64& other, const Var& da)
inline Poco::Int64 operator += (Poco::Int64& other, const Var& da) inline Poco::Int64 operator += (Poco::Int64& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::Int64 /// Addition assignment operator for adding Var to Poco::Int64
{ {
return other += da.convert<Poco::Int64>(); return other += da.convert<Poco::Int64>();
} }
inline Poco::Int64 operator -= (Poco::Int64& other, const Var& da) inline Poco::Int64 operator -= (Poco::Int64& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::Int64 /// Subtraction assignment operator for subtracting Var from Poco::Int64
{ {
return other -= da.convert<Poco::Int64>(); return other -= da.convert<Poco::Int64>();
} }
inline Poco::Int64 operator *= (Poco::Int64& other, const Var& da) inline Poco::Int64 operator *= (Poco::Int64& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::Int64 /// Multiplication assignment operator for multiplying Var with Poco::Int64
{ {
return other *= da.convert<Poco::Int64>(); return other *= da.convert<Poco::Int64>();
} }
inline Poco::Int64 operator /= (Poco::Int64& other, const Var& da) inline Poco::Int64 operator /= (Poco::Int64& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::Int64 /// Division assignment operator for dividing Var with Poco::Int64
{ {
return other /= da.convert<Poco::Int64>(); return other /= da.convert<Poco::Int64>();
} }
@ -1754,28 +1754,28 @@ inline Poco::UInt64 operator / (const Poco::UInt64& other, const Var& da)
inline Poco::UInt64 operator += (Poco::UInt64& other, const Var& da) inline Poco::UInt64 operator += (Poco::UInt64& other, const Var& da)
/// Addition asignment operator for adding Var to Poco::UInt64 /// Addition assignment operator for adding Var to Poco::UInt64
{ {
return other += da.convert<Poco::UInt64>(); return other += da.convert<Poco::UInt64>();
} }
inline Poco::UInt64 operator -= (Poco::UInt64& other, const Var& da) inline Poco::UInt64 operator -= (Poco::UInt64& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from Poco::UInt64 /// Subtraction assignment operator for subtracting Var from Poco::UInt64
{ {
return other -= da.convert<Poco::UInt64>(); return other -= da.convert<Poco::UInt64>();
} }
inline Poco::UInt64 operator *= (Poco::UInt64& other, const Var& da) inline Poco::UInt64 operator *= (Poco::UInt64& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with Poco::UInt64 /// Multiplication assignment operator for multiplying Var with Poco::UInt64
{ {
return other *= da.convert<Poco::UInt64>(); return other *= da.convert<Poco::UInt64>();
} }
inline Poco::UInt64 operator /= (Poco::UInt64& other, const Var& da) inline Poco::UInt64 operator /= (Poco::UInt64& other, const Var& da)
/// Division asignment operator for dividing Var with Poco::UInt64 /// Division assignment operator for dividing Var with Poco::UInt64
{ {
return other /= da.convert<Poco::UInt64>(); return other /= da.convert<Poco::UInt64>();
} }
@ -1858,28 +1858,28 @@ inline float operator / (const float& other, const Var& da)
inline float operator += (float& other, const Var& da) inline float operator += (float& other, const Var& da)
/// Addition asignment operator for adding Var to float /// Addition assignment operator for adding Var to float
{ {
return other += da.convert<float>(); return other += da.convert<float>();
} }
inline float operator -= (float& other, const Var& da) inline float operator -= (float& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from float /// Subtraction assignment operator for subtracting Var from float
{ {
return other -= da.convert<float>(); return other -= da.convert<float>();
} }
inline float operator *= (float& other, const Var& da) inline float operator *= (float& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with float /// Multiplication assignment operator for multiplying Var with float
{ {
return other *= da.convert<float>(); return other *= da.convert<float>();
} }
inline float operator /= (float& other, const Var& da) inline float operator /= (float& other, const Var& da)
/// Division asignment operator for dividing Var with float /// Division assignment operator for dividing Var with float
{ {
return other /= da.convert<float>(); return other /= da.convert<float>();
} }
@ -1962,28 +1962,28 @@ inline double operator / (const double& other, const Var& da)
inline double operator += (double& other, const Var& da) inline double operator += (double& other, const Var& da)
/// Addition asignment operator for adding Var to double /// Addition assignment operator for adding Var to double
{ {
return other += da.convert<double>(); return other += da.convert<double>();
} }
inline double operator -= (double& other, const Var& da) inline double operator -= (double& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from double /// Subtraction assignment operator for subtracting Var from double
{ {
return other -= da.convert<double>(); return other -= da.convert<double>();
} }
inline double operator *= (double& other, const Var& da) inline double operator *= (double& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with double /// Multiplication assignment operator for multiplying Var with double
{ {
return other *= da.convert<double>(); return other *= da.convert<double>();
} }
inline double operator /= (double& other, const Var& da) inline double operator /= (double& other, const Var& da)
/// Division asignment operator for dividing Var with double /// Division assignment operator for dividing Var with double
{ {
return other /= da.convert<double>(); return other /= da.convert<double>();
} }
@ -2133,28 +2133,28 @@ inline long operator / (const long& other, const Var& da)
inline long operator += (long& other, const Var& da) inline long operator += (long& other, const Var& da)
/// Addition asignment operator for adding Var to long /// Addition assignment operator for adding Var to long
{ {
return other += da.convert<long>(); return other += da.convert<long>();
} }
inline long operator -= (long& other, const Var& da) inline long operator -= (long& other, const Var& da)
/// Subtraction asignment operator for subtracting Var from long /// Subtraction assignment operator for subtracting Var from long
{ {
return other -= da.convert<long>(); return other -= da.convert<long>();
} }
inline long operator *= (long& other, const Var& da) inline long operator *= (long& other, const Var& da)
/// Multiplication asignment operator for multiplying Var with long /// Multiplication assignment operator for multiplying Var with long
{ {
return other *= da.convert<long>(); return other *= da.convert<long>();
} }
inline long operator /= (long& other, const Var& da) inline long operator /= (long& other, const Var& da)
/// Division asignment operator for dividing Var with long /// Division assignment operator for dividing Var with long
{ {
return other /= da.convert<long>(); return other /= da.convert<long>();
} }

View File

@ -139,47 +139,47 @@ public:
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 support 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 support the conversion.
virtual void convert(Int32& val) const; virtual void convert(Int32& 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 support the conversion.
virtual void convert(Int64& val) const; virtual void convert(Int64& 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 support the conversion.
virtual void convert(UInt8& val) const; virtual void convert(UInt8& 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 support the conversion.
virtual void convert(UInt16& val) const; virtual void convert(UInt16& 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 support the conversion.
virtual void convert(UInt32& val) const; virtual void convert(UInt32& 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 support the conversion.
virtual void convert(UInt64& val) const; virtual void convert(UInt64& 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 support the conversion.
virtual void convert(DateTime& val) const; virtual void convert(DateTime& 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 support the conversion.
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 support 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 support the conversion.
#ifndef POCO_LONG_IS_64_BIT #ifndef POCO_LONG_IS_64_BIT
@ -193,78 +193,78 @@ public:
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 support 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 support 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 support 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 support 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 support the conversion.
virtual void convert(Poco::UTF16String& val) const; virtual void convert(Poco::UTF16String& 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 support the conversion.
virtual bool isArray() const; virtual bool isArray() const;
/// Returns true. /// Returns true.
virtual bool isVector() const; virtual bool isVector() 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 support the diagnostic.
virtual bool isList() const; virtual bool isList() 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 support the diagnostic.
virtual bool isDeque() const; 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 support 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 support 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 support 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 support 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 support the diagnostic.
virtual bool isBoolean() const; virtual bool isBoolean() 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 support 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 support the diagnostic.
virtual bool isDate() const; virtual bool isDate() 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 support the diagnostic.
virtual bool isTime() const; virtual bool isTime() 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 support the diagnostic.
virtual bool isDateTime() const; virtual bool isDateTime() 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 support the diagnostic.
virtual std::size_t size() const; virtual std::size_t size() const;
/// Returns 1 iff Var is not empty or this function overriden. /// Returns 1 iff Var is not empty or this function overriden.
@ -281,7 +281,7 @@ protected:
/// pre-allocated buffer inside the holder). /// pre-allocated buffer inside the holder).
/// ///
/// Called from clone() member function of the implementation when /// Called from clone() member function of the implementation when
/// smal object optimization is enabled. /// small object optimization is enabled.
{ {
#ifdef POCO_NO_SOO #ifdef POCO_NO_SOO
(void)pVarHolder; (void)pVarHolder;
@ -332,7 +332,7 @@ protected:
template <typename F, typename T> template <typename F, typename T>
void convertToSmallerUnsigned(const F& from, T& to) const void convertToSmallerUnsigned(const F& from, T& to) const
/// This function is meant for converting unsigned integral data types, /// This function is meant for converting unsigned integral data types,
/// from larger to smaller type. Since lower limit is always 0 for unigned types, /// from larger to smaller type. Since lower limit is always 0 for unsigned types,
/// only the upper limit is checked, thus saving some cycles compared to the signed /// only the upper limit is checked, thus saving some cycles compared to the signed
/// version of the function. If the value to be converted is smaller than /// version of the function. If the value to be converted is smaller than
/// the maximum value for the target type, the conversion is performed. /// the maximum value for the target type, the conversion is performed.
@ -369,7 +369,7 @@ protected:
/// This function is meant for converting floating point data types to /// This function is meant for converting floating point data types to
/// unsigned integral data types. Negative values can not be converted and if one is /// unsigned integral data types. Negative values can not be converted and if one is
/// encountered, RangeException is thrown. /// encountered, RangeException is thrown.
/// If uper limit is within the target data type limits, the conversion is performed. /// If upper limit is within the target data type limits, the conversion is performed.
{ {
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);
@ -388,7 +388,7 @@ protected:
/// This function is meant for converting unsigned integral data types to /// This function is meant for converting unsigned integral data types to
/// unsigned data types. Negative values can not be converted and if one is /// unsigned data types. Negative values can not be converted and if one is
/// encountered, RangeException is thrown. /// encountered, RangeException is thrown.
/// If upper limit is within the target data type limits, the converiosn is performed. /// If upper limit is within the target data type limits, the conversion is performed.
{ {
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);

View File

@ -143,7 +143,7 @@ namespace std
template<> template<>
inline void swap<Poco::Dynamic::VarIterator>(Poco::Dynamic::VarIterator& s1, inline void swap<Poco::Dynamic::VarIterator>(Poco::Dynamic::VarIterator& s1,
Poco::Dynamic::VarIterator& s2) Poco::Dynamic::VarIterator& s2)
/// Full template specalization of std:::swap for VarIterator /// Full template specialization of std:::swap for VarIterator
{ {
s1.swap(s2); s1.swap(s2);
} }

View File

@ -54,7 +54,7 @@ class Foundation_API FileChannel: public Channel
/// ///
/// The rotation strategy can be specified with the /// The rotation strategy can be specified with the
/// "rotation" property, which can take one of the /// "rotation" property, which can take one of the
/// follwing values: /// following values:
/// ///
/// * never: no log rotation /// * never: no log rotation
/// * [day,][hh]:mm: the file is rotated on specified day/time /// * [day,][hh]:mm: the file is rotated on specified day/time
@ -152,7 +152,7 @@ class Foundation_API FileChannel: public Channel
// 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 (default). /// * true: Every message is immediately flushed to the log file (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 /// The rotateOnOpen property specifies whether an existing log file should be

View File

@ -124,7 +124,7 @@ class Foundation_API FileOutputStream: public FileIOS, public std::ostream
{ {
public: public:
FileOutputStream(); FileOutputStream();
/// Creats an unopened FileOutputStream. /// Creates an unopened FileOutputStream.
FileOutputStream(const std::string& path, std::ios::openmode mode = std::ios::out | std::ios::trunc); FileOutputStream(const std::string& path, std::ios::openmode mode = std::ios::out | std::ios::trunc);
/// Creates the FileOutputStream for the file given by path, using /// Creates the FileOutputStream for the file given by path, using
@ -161,7 +161,7 @@ class Foundation_API FileStream: public FileIOS, public std::iostream
{ {
public: public:
FileStream(); FileStream();
/// Creats an unopened FileStream. /// Creates an unopened FileStream.
FileStream(const std::string& path, std::ios::openmode mode = std::ios::out | std::ios::in); FileStream(const std::string& path, std::ios::openmode mode = std::ios::out | std::ios::in);
/// Creates the FileStream for the file given by path, using /// Creates the FileStream for the file given by path, using

View File

@ -30,7 +30,7 @@ namespace Poco {
template <class Engine> template <class Engine>
class HMACEngine: public DigestEngine class HMACEngine: public DigestEngine
/// This class implementes the HMAC message /// This class implements the HMAC message
/// authentication code algorithm, as specified /// authentication code algorithm, as specified
/// in RFC 2104. The underlying DigestEngine /// in RFC 2104. The underlying DigestEngine
/// (MD5Engine, SHA1Engine, etc.) must be given as /// (MD5Engine, SHA1Engine, etc.) must be given as

View File

@ -31,7 +31,7 @@ std::string Foundation_API toJSON(char c);
void Foundation_API toJSON(const std::string& value, std::ostream& out, bool wrap = true); void Foundation_API toJSON(const std::string& value, std::ostream& out, bool wrap = true);
/// Formats string value into the suplied output stream by /// Formats string value into the supplied output stream by
/// escaping control characters. /// escaping control characters.
/// If wrap is true, the resulting string is enclosed in double quotes /// If wrap is true, the resulting string is enclosed in double quotes

View File

@ -37,7 +37,7 @@ class LinearHashTable
/// This class implements a linear hash table. /// This class implements a linear hash table.
/// ///
/// In a linear hash table, the available address space /// In a linear hash table, the available address space
/// grows or shrinks dynamically. A linar hash table thus /// grows or shrinks dynamically. A linear hash table thus
/// supports any number of insertions or deletions without /// supports any number of insertions or deletions without
/// lookup or insertion performance deterioration. /// lookup or insertion performance deterioration.
/// ///

View File

@ -37,7 +37,7 @@ class ListMap
/// ordering of elements is not desirable. Naturally, this container will /// ordering of elements is not desirable. Naturally, this container will
/// have inferior data retrieval performance and it is not recommended for /// have inferior data retrieval performance and it is not recommended for
/// use with large datasets. The main purpose within POCO is for Internet /// use with large datasets. The main purpose within POCO is for Internet
/// messages (email message, http headers etc), to prevent autmomatic /// messages (email message, http headers etc), to prevent automatic
/// header entry reordering. /// header entry reordering.
{ {
public: public:
@ -103,7 +103,7 @@ public:
} }
ConstIterator find(const KeyType& key) const ConstIterator find(const KeyType& key) const
/// Finds the first occurence of the key and /// Finds the first occurrence of the key and
/// returns iterator pointing to the found entry /// returns iterator pointing to the found entry
/// or iterator pointing to the end if entry is /// or iterator pointing to the end if entry is
/// not found. /// not found.
@ -118,7 +118,7 @@ public:
} }
Iterator find(const KeyType& key) Iterator find(const KeyType& key)
/// Finds the first occurence of the key and /// Finds the first occurrence of the key and
/// returns iterator pointing to the found entry /// returns iterator pointing to the found entry
/// or iterator pointing to the end if entry is /// or iterator pointing to the end if entry is
/// not found. /// not found.

View File

@ -39,7 +39,7 @@ class Foundation_API LocalDateTime
/// i.e. UTC = local time - time zone differential. /// i.e. UTC = local time - time zone differential.
/// ///
/// Although LocalDateTime supports relational and arithmetic /// Although LocalDateTime supports relational and arithmetic
/// operators, all date/time comparisons and date/time arithmetics /// operators, all date/time comparisons and date/time arithmetic
/// should be done in UTC, using the DateTime or Timestamp /// should be done in UTC, using the DateTime or Timestamp
/// class for better performance. The relational operators /// class for better performance. The relational operators
/// normalize the dates/times involved to UTC before carrying out /// normalize the dates/times involved to UTC before carrying out
@ -171,11 +171,11 @@ public:
/// on a Saturday, week 1 will be the week starting on Monday, January 3. /// on a Saturday, week 1 will be the week starting on Monday, January 3.
/// January 1 and 2 will fall within week 0 (or the last week of the previous year). /// January 1 and 2 will fall within week 0 (or the last week of the previous year).
/// ///
/// For 2007, which starts on a Monday, week 1 will be the week startung on Monday, January 1. /// For 2007, which starts on a Monday, week 1 will be the week starting on Monday, January 1.
/// There will be no week 0 in 2007. /// There will be no week 0 in 2007.
int day() const; int day() const;
/// Returns the day witin the month (1 to 31). /// Returns the day within the month (1 to 31).
int dayOfWeek() const; int dayOfWeek() const;
/// Returns the weekday (0 to 6, where /// Returns the weekday (0 to 6, where
@ -210,7 +210,7 @@ public:
/// Returns the microsecond (0 to 999) /// Returns the microsecond (0 to 999)
double julianDay() const; double julianDay() const;
/// Returns the julian day for the date. /// Returns the Julian day for the date.
int tzd() const; int tzd() const;
/// Returns the time zone differential. /// Returns the time zone differential.

View File

@ -389,22 +389,22 @@ public:
/// Returns true if the log level is at least PRIO_TRACE. /// Returns true if the log level is at least PRIO_TRACE.
static std::string format(const std::string& fmt, const std::string& arg); static std::string format(const std::string& fmt, const std::string& arg);
/// Replaces all occurences of $0 in fmt with the string given in arg and /// Replaces all occurrences of $0 in fmt with the string given in arg and
/// returns the result. To include a dollar sign in the result string, /// returns the result. To include a dollar sign in the result string,
/// specify two dollar signs ($$) in the format string. /// specify two dollar signs ($$) in the format string.
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1); static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1);
/// Replaces all occurences of $<n> in fmt with the string given in arg<n> and /// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
/// returns the result. To include a dollar sign in the result string, /// returns the result. To include a dollar sign in the result string,
/// specify two dollar signs ($$) in the format string. /// specify two dollar signs ($$) in the format string.
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2); static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2);
/// Replaces all occurences of $<n> in fmt with the string given in arg<n> and /// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
/// returns the result. To include a dollar sign in the result string, /// returns the result. To include a dollar sign in the result string,
/// specify two dollar signs ($$) in the format string. /// specify two dollar signs ($$) in the format string.
static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2, const std::string& arg3); static std::string format(const std::string& fmt, const std::string& arg0, const std::string& arg1, const std::string& arg2, const std::string& arg3);
/// Replaces all occurences of $<n> in fmt with the string given in arg<n> and /// Replaces all occurrences of $<n> in fmt with the string given in arg<n> and
/// returns the result. To include a dollar sign in the result string, /// returns the result. To include a dollar sign in the result string,
/// specify two dollar signs ($$) in the format string. /// specify two dollar signs ($$) in the format string.
@ -450,7 +450,7 @@ public:
static Logger* has(const std::string& name); static Logger* has(const std::string& name);
/// Returns a pointer to the Logger with the given name if it /// Returns a pointer to the Logger with the given name if it
/// exists, or a null pointer otherwse. /// exists, or a null pointer otherwise.
static void destroy(const std::string& name); static void destroy(const std::string& name);
/// Destroys the logger with the specified name. Does nothing /// Destroys the logger with the specified name. Does nothing

View File

@ -51,7 +51,7 @@ namespace Poco {
class Foundation_API MD4Engine: public DigestEngine class Foundation_API MD4Engine: public DigestEngine
/// This class implementes the MD4 message digest algorithm, /// This class implements the MD4 message digest algorithm,
/// described in RFC 1320. /// described in RFC 1320.
{ {
public: public:

View File

@ -51,7 +51,7 @@ namespace Poco {
class Foundation_API MD5Engine: public DigestEngine class Foundation_API MD5Engine: public DigestEngine
/// This class implementes the MD5 message digest algorithm, /// This class implements the MD5 message digest algorithm,
/// described in RFC 1321. /// described in RFC 1321.
{ {
public: public:

View File

@ -180,7 +180,7 @@ public:
bool operator < (const Nullable<C>& other) const bool operator < (const Nullable<C>& other) const
/// Compares two Nullable objects. Return true if this object's /// Compares two Nullable objects. Return true if this object's
/// value is smaler than the other object's value. /// value is smaller than the other object's value.
/// Null value is smaller than a non-null value. /// Null value is smaller than a non-null value.
{ {
if (_isNull && other._isNull) return false; if (_isNull && other._isNull) return false;

View File

@ -81,7 +81,7 @@ 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 successful. If parsing was unsuccessful,
/// 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;
@ -514,7 +514,7 @@ Foundation_API bool strToFloat(const std::string&, float& result, char decSep =
/// If decimal separator and/or thousand separator are different from defaults, they should be /// If decimal separator and/or thousand separator are different from defaults, they should be
/// supplied to ensure proper conversion. /// supplied to ensure proper conversion.
/// ///
/// Returns true if succesful, false otherwise. /// Returns true if successful, false otherwise.
Foundation_API double strToDouble(const char* str); Foundation_API double strToDouble(const char* str);
@ -527,7 +527,7 @@ Foundation_API bool strToDouble(const std::string& str, double& result, char dec
/// If decimal separator and/or thousand separator are different from defaults, they should be /// If decimal separator and/or thousand separator are different from defaults, they should be
/// supplied to ensure proper conversion. /// supplied to ensure proper conversion.
/// ///
/// Returns true if succesful, false otherwise. /// Returns true if successful, false otherwise.
// //
// end double-conversion functions declarations // end double-conversion functions declarations

View File

@ -31,7 +31,7 @@ namespace Poco {
template <class PRF> template <class PRF>
class PBKDF2Engine: public DigestEngine class PBKDF2Engine: public DigestEngine
/// This class implementes the Password-Based Key Derivation Function 2, /// This class implements the Password-Based Key Derivation Function 2,
/// as specified in RFC 2898. The underlying DigestEngine (HMACEngine, etc.), /// as specified in RFC 2898. The underlying DigestEngine (HMACEngine, etc.),
/// which must accept the passphrase as constructor argument (std::string), /// which must accept the passphrase as constructor argument (std::string),
/// must be given as template argument. /// must be given as template argument.

View File

@ -170,7 +170,7 @@ public:
/// Appends the given path. /// Appends the given path.
Path& resolve(const Path& path); Path& resolve(const Path& path);
/// Resolves the given path agains the current one. /// Resolves the given path against the current one.
/// ///
/// If the given path is absolute, it replaces the current one. /// If the given path is absolute, it replaces the current one.
/// Otherwise, the relative path is appended to the current path. /// Otherwise, the relative path is appended to the current path.

View File

@ -136,7 +136,7 @@ private:
void parsePattern(); void parsePattern();
/// Will parse the _pattern string into the vector of PatternActions, /// Will parse the _pattern string into the vector of PatternActions,
/// which contains the message key, any text that needs to be written first /// which contains the message key, any text that needs to be written first
/// a proprety in case of %[] and required length. /// a property in case of %[] and required length.
std::vector<PatternAction> _patternActions; std::vector<PatternAction> _patternActions;
bool _localTime; bool _localTime;

View File

@ -112,11 +112,12 @@
#endif #endif
#ifndef POCO_OS_FAMILY_UNIX #ifndef __GNUC__
#define GCC_DIAG_OFF(x) #define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x) #define GCC_DIAG_ON(x)
#endif #endif
// //
// Hardware Architecture and Byte Order // Hardware Architecture and Byte Order
// //

View File

@ -44,25 +44,13 @@
#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 // GCC diagnostics enable/disable by Patrick Horgan, see
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html // http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
// use example: GCC_DIAG_OFF(unused-variable) // use example: GCC_DIAG_OFF(unused-variable)
// //
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) #ifdef __GNUC__
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406) && !defined(POCO_NO_GCC_DIAG)
#ifdef GCC_DIAG_OFF #ifdef GCC_DIAG_OFF
#undef GCC_DIAG_OFF #undef GCC_DIAG_OFF
#endif #endif
@ -85,7 +73,6 @@
#define GCC_DIAG_OFF(x) #define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x) #define GCC_DIAG_ON(x)
#endif #endif
#endif // __GNUC__ #endif // __GNUC__

View File

@ -53,7 +53,7 @@ class RecursiveDirectoryIterator
/// The class can follow different traversal strategies: /// The class can follow different traversal strategies:
/// * depth-first strategy; /// * depth-first strategy;
/// * siblings-first strategy. /// * siblings-first strategy.
/// The stategies are set by template parameter. /// The strategies are set by template parameter.
/// There are two corresponding typedefs: /// There are two corresponding typedefs:
/// * SimpleRecursiveDirectoryIterator; /// * SimpleRecursiveDirectoryIterator;
/// * SiblingsFirstRecursiveDirectoryIterator. /// * SiblingsFirstRecursiveDirectoryIterator.

View File

@ -49,7 +49,7 @@ class Foundation_API RegularExpression
/// (see http://www.pcre.org). /// (see http://www.pcre.org).
{ {
public: public:
enum Options // These must match the corresponsing options in pcre.h! enum Options // These must match the corresponding options in pcre.h!
/// Some of the following options can only be passed to the constructor; /// Some of the following options can only be passed to the constructor;
/// some can be passed only to matching functions, and some can be used /// some can be passed only to matching functions, and some can be used
/// everywhere. /// everywhere.
@ -83,7 +83,7 @@ public:
RE_NEWLINE_CRLF = 0x00300000, /// assume newline is CRLF ("\r\n") [ctor] RE_NEWLINE_CRLF = 0x00300000, /// assume newline is CRLF ("\r\n") [ctor]
RE_NEWLINE_ANY = 0x00400000, /// assume newline is any valid Unicode newline character [ctor] RE_NEWLINE_ANY = 0x00400000, /// assume newline is any valid Unicode newline character [ctor]
RE_NEWLINE_ANYCRLF = 0x00500000, /// assume newline is any of CR, LF, CRLF [ctor] RE_NEWLINE_ANYCRLF = 0x00500000, /// assume newline is any of CR, LF, CRLF [ctor]
RE_GLOBAL = 0x10000000, /// replace all occurences (/g) [subst] RE_GLOBAL = 0x10000000, /// replace all occurrences (/g) [subst]
RE_NO_VARS = 0x20000000 /// treat dollar in replacement string as ordinary character [subst] RE_NO_VARS = 0x20000000 /// treat dollar in replacement string as ordinary character [subst]
}; };
@ -187,19 +187,19 @@ public:
/// Substitute in subject all matches of the pattern with replacement. /// Substitute in subject all matches of the pattern with replacement.
/// If RE_GLOBAL is specified as option, all matches are replaced. Otherwise, /// If RE_GLOBAL is specified as option, all matches are replaced. Otherwise,
/// only the first match is replaced. /// only the first match is replaced.
/// Occurences of $<n> (for example, $1, $2, ...) in replacement are replaced /// Occurrences of $<n> (for example, $1, $2, ...) in replacement are replaced
/// with the corresponding captured string. $0 is the original subject string. /// with the corresponding captured string. $0 is the original subject string.
/// Returns the number of replaced occurences. /// Returns the number of replaced occurrences.
int subst(std::string& subject, std::string::size_type offset, const std::string& replacement, int options = 0) const; int subst(std::string& subject, std::string::size_type offset, const std::string& replacement, int options = 0) const;
/// Substitute in subject all matches of the pattern with replacement, /// Substitute in subject all matches of the pattern with replacement,
/// starting at offset. /// starting at offset.
/// If RE_GLOBAL is specified as option, all matches are replaced. Otherwise, /// If RE_GLOBAL is specified as option, all matches are replaced. Otherwise,
/// only the first match is replaced. /// only the first match is replaced.
/// Unless RE_NO_VARS is specified, occurences of $<n> (for example, $0, $1, $2, ... $9) /// Unless RE_NO_VARS is specified, occurrences of $<n> (for example, $0, $1, $2, ... $9)
/// in replacement are replaced with the corresponding captured string. /// in replacement are replaced with the corresponding captured string.
/// $0 is the captured substring. $1 ... $n are the substrings maching the subpatterns. /// $0 is the captured substring. $1 ... $n are the substrings matching the subpatterns.
/// Returns the number of replaced occurences. /// Returns the number of replaced occurrences.
static bool match(const std::string& subject, const std::string& pattern, int options = 0); static bool match(const std::string& subject, const std::string& pattern, int options = 0);
/// Matches the given subject string against the regular expression given in pattern, /// Matches the given subject string against the regular expression given in pattern,

View File

@ -34,7 +34,7 @@ namespace Poco {
class Foundation_API SHA1Engine: public DigestEngine class Foundation_API SHA1Engine: public DigestEngine
/// This class implementes the SHA-1 message digest algorithm. /// This class implements the SHA-1 message digest 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)
{ {
public: public:

View File

@ -52,7 +52,7 @@ public:
/// will generally ignore the hint. /// will generally ignore the hint.
char* begin() const; char* begin() const;
/// Returns the beginn address of the SharedMemory segment. Will be null for illegal segments. /// Returns the begin address of the SharedMemory segment. Will be null for illegal segments.
char* end() const; char* end() const;
/// Points past the last byte of the end address of the SharedMemory segment. Will be null for illegal segments. /// Points past the last byte of the end address of the SharedMemory segment. Will be null for illegal segments.

View File

@ -75,7 +75,7 @@ class Foundation_API SimpleFileChannel: public Channel
// 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 (default). /// * true: Every message is immediately flushed to the log file (default).
/// * false: Messages are not immediately flushed to the log file. /// * false: Messages are not immediately flushed to the log file.
/// ///
{ {

View File

@ -38,7 +38,7 @@ template <class Key, class Value, class KeyHashFunction = HashFunction<Key> >
class SimpleHashTable class SimpleHashTable
/// A SimpleHashTable stores a key value pair that can be looked up via a hashed key. /// A SimpleHashTable stores a key value pair that can be looked up via a hashed key.
/// ///
/// In comparision to a HashTable, this class handles collisions by sequentially searching the next /// In comparison to a HashTable, this class handles collisions by sequentially searching the next
/// free location. This also means that the maximum size of this table is limited, i.e. if the hash table /// free location. This also means that the maximum size of this table is limited, i.e. if the hash table
/// is full, it will throw an exception and that this class does not support remove operations. /// is full, it will throw an exception and that this class does not support remove operations.
/// On the plus side it is faster than the HashTable. /// On the plus side it is faster than the HashTable.

View File

@ -388,7 +388,7 @@ S translate(const S& str, const typename S::value_type* from, const typename S::
template <class S> template <class S>
S& translateInPlace(S& str, const S& from, const S& to) S& translateInPlace(S& str, const S& from, const S& to)
/// Replaces in str all occurences of characters in from /// Replaces in str all occurrences of characters in from
/// with the corresponding (by position) characters in to. /// with the corresponding (by position) characters in to.
/// If there is no corresponding character, the character /// If there is no corresponding character, the character
/// is removed. /// is removed.
@ -491,7 +491,7 @@ S& removeInPlace(S& str, const typename S::value_type ch, typename S::size_type
template <class S> template <class S>
S replace(const S& str, const S& from, const S& to, typename S::size_type start = 0) S replace(const S& str, const S& from, const S& to, typename S::size_type start = 0)
/// Replace all occurences of from (which must not be the empty string) /// Replace all occurrences of from (which must not be the empty string)
/// in str with to, starting at position start. /// in str with to, starting at position start.
{ {
S result(str); S result(str);

View File

@ -69,7 +69,7 @@ public:
/// Returns true if token exists, false otherwise. /// Returns true if token exists, false otherwise.
std::size_t find(const std::string& token, std::size_t pos = 0) const; std::size_t find(const std::string& token, std::size_t pos = 0) const;
/// Returns the index of the first occurence of the token /// Returns the index of the first occurrence of the token
/// starting at position pos. /// starting at position pos.
/// Throws a NotFoundException if the token is not found. /// Throws a NotFoundException if the token is not found.

View File

@ -122,7 +122,7 @@ class TaskCustomNotification: public TaskNotification
/// This is a template for "custom" notification. /// This is a template for "custom" notification.
/// Unlike other notifications, this notification /// Unlike other notifications, this notification
/// is instantiated and posted by the task itself. /// is instantiated and posted by the task itself.
/// The purpose is to provide generic notifiation /// The purpose is to provide generic notification
/// mechanism between the task and its observer(s). /// mechanism between the task and its observer(s).
{ {
public: public:

View File

@ -71,7 +71,7 @@ public:
/// Returns true if the given name is one of the names of this encoding. /// Returns true if the given name is one of the names of this encoding.
/// For example, the "ISO-8859-1" encoding is also known as "Latin-1". /// For example, the "ISO-8859-1" encoding is also known as "Latin-1".
/// ///
/// Encoding name comparision are be case insensitive. /// Encoding name comparisons are case insensitive.
virtual const CharacterMap& characterMap() const = 0; virtual const CharacterMap& characterMap() const = 0;
/// Returns the CharacterMap for the encoding. /// Returns the CharacterMap for the encoding.
@ -97,22 +97,22 @@ public:
/// ///
/// The queryConvert function must return the Unicode scalar value /// The queryConvert function must return the Unicode scalar value
/// represented by this byte sequence or -1 if the byte sequence is malformed /// represented by this byte sequence or -1 if the byte sequence is malformed
/// or -n where n is number of bytes requested for the sequence, if lenght is /// or -n where n is number of bytes requested for the sequence, if length is
/// shorter than the sequence. /// shorter than the sequence.
/// The length of the sequence might not be determined by the first byte, /// The length of the sequence might not be determined by the first byte,
/// in which case the conversion becomes an iterative process: /// in which case the conversion becomes an iterative process:
/// First call with length == 1 might return -2, /// First call with length == 1 might return -2,
/// Then a second call with lenght == 2 might return -4 /// Then a second call with length == 2 might return -4
/// Eventually, the third call with length == 4 should return either a /// Eventually, the third call with length == 4 should return either a
/// Unicode scalar value, or -1 if the byte sequence is malformed. /// Unicode scalar value, or -1 if the byte sequence is malformed.
/// The default implementation returns (int) bytes[0]. /// The default implementation returns (int) bytes[0].
virtual int sequenceLength(const unsigned char* bytes, int length) const; virtual int sequenceLength(const unsigned char* bytes, int length) const;
/// The sequenceLength function is used to get the lenth of the sequence pointed /// The sequenceLength function is used to get the lenth of the sequence pointed
/// by bytes. The length paramater should be greater or equal to the length of /// by bytes. The length parameter should be greater or equal to the length of
/// the sequence. /// the sequence.
/// ///
/// The sequenceLength function must return the lenght of the sequence /// The sequenceLength function must return the length of the sequence
/// represented by this byte sequence or a negative value -n if length is /// represented by this byte sequence or a negative value -n if length is
/// shorter than the sequence, where n is the number of byte requested /// shorter than the sequence, where n is the number of byte requested
/// to determine the length of the sequence. /// to determine the length of the sequence.
@ -120,7 +120,7 @@ public:
/// in which case the conversion becomes an iterative process as long as the /// in which case the conversion becomes an iterative process as long as the
/// result is negative: /// result is negative:
/// First call with length == 1 might return -2, /// First call with length == 1 might return -2,
/// Then a second call with lenght == 2 might return -4 /// Then a second call with length == 2 might return -4
/// Eventually, the third call with length == 4 should return 4. /// Eventually, the third call with length == 4 should return 4.
/// The default implementation returns 1. /// The default implementation returns 1.

View File

@ -111,7 +111,7 @@ public:
void setOSPriority(int prio, int policy = POLICY_DEFAULT); void setOSPriority(int prio, int policy = POLICY_DEFAULT);
/// Sets the thread's priority, using an operating system specific /// Sets the thread's priority, using an operating system specific
/// priority value. Use getMinOSPriority() and getMaxOSPriority() to /// priority value. Use getMinOSPriority() and getMaxOSPriority() to
/// obtain mininum and maximum priority values. Additionally, /// obtain minimum and maximum priority values. Additionally,
/// a scheduling policy can be specified. The policy is currently /// a scheduling policy can be specified. The policy is currently
/// only used on POSIX platforms where the values SCHED_OTHER (default), /// only used on POSIX platforms where the values SCHED_OTHER (default),
/// SCHED_FIFO and SCHED_RR are supported. /// SCHED_FIFO and SCHED_RR are supported.

View File

@ -42,7 +42,7 @@ class Foundation_API ThreadPool
/// Threads in a thread pool are re-used once they become /// Threads in a thread pool are re-used once they become
/// available again. /// available again.
/// The thread pool always keeps a minimum number of threads /// The thread pool always keeps a minimum number of threads
/// running. If the demans for threads increases, additional /// running. If the demand for threads increases, additional
/// threads are created. Once the demand for threads sinks /// threads are created. Once the demand for threads sinks
/// again, no-longer used threads are stopped and removed /// again, no-longer used threads are stopped and removed
/// from the pool. /// from the pool.

View File

@ -34,7 +34,7 @@ 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 arithmetic is 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

View File

@ -304,7 +304,7 @@ struct TypeAppender<TypeList<Head, Tail>, T>
template <class Head, class T> template <class Head, class T>
struct TypeOneEraser; struct TypeOneEraser;
/// TypeOneEraser erases the first occurence of the type T in Head. /// TypeOneEraser erases the first occurrence of the type T in Head.
/// Usage: /// Usage:
/// ///
/// typedef TypeListType<char, int, float>::HeadType Type3; /// typedef TypeListType<char, int, float>::HeadType Type3;
@ -336,7 +336,7 @@ struct TypeOneEraser<TypeList<Head, Tail>, T>
template <class Head, class T> template <class Head, class T>
struct TypeAllEraser; struct TypeAllEraser;
/// TypeAllEraser erases all the occurences of the type T in Head. /// TypeAllEraser erases all the occurrences of the type T in Head.
/// Usage: /// Usage:
/// ///
/// typedef TypeListType<char, int, float, int>::HeadType Type4; /// typedef TypeListType<char, int, float, int>::HeadType Type4;
@ -368,7 +368,7 @@ struct TypeAllEraser<TypeList<Head, Tail>, T>
template <class Head> template <class Head>
struct TypeDuplicateEraser; struct TypeDuplicateEraser;
/// TypeDuplicateEraser erases all but the first occurence of the type T in Head. /// TypeDuplicateEraser erases all but the first occurrence of the type T in Head.
/// Usage: /// Usage:
/// ///
/// typedef TypeListType<char, int, float, int>::HeadType Type4; /// typedef TypeListType<char, int, float, int>::HeadType Type4;
@ -397,7 +397,7 @@ public:
template <class Head, class T, class R> template <class Head, class T, class R>
struct TypeOneReplacer; struct TypeOneReplacer;
/// TypeOneReplacer replaces the first occurence /// TypeOneReplacer replaces the first occurrence
/// of the type T in Head with type R. /// of the type T in Head with type R.
/// Usage: /// Usage:
/// ///
@ -430,7 +430,7 @@ struct TypeOneReplacer<TypeList<Head, Tail>, T, R>
template <class Head, class T, class R> template <class Head, class T, class R>
struct TypeAllReplacer; struct TypeAllReplacer;
/// TypeAllReplacer replaces all the occurences /// TypeAllReplacer replaces all the occurrences
/// of the type T in Head with type R. /// of the type T in Head with type R.
/// Usage: /// Usage:
/// ///

View File

@ -37,7 +37,7 @@ template <
> >
class UniqueAccessExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex> class UniqueAccessExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>
/// A UniqueAccessExpireLRUCache combines LRU caching and time based per entry expire caching. /// A UniqueAccessExpireLRUCache combines LRU caching and time based per entry expire caching.
/// One can define for each cache entry a seperate timepoint /// One can define for each cache entry a separate timepoint
/// but also limit the size of the cache (per default: 1024). /// but also limit the size of the cache (per default: 1024).
/// Each TValue object must thus offer the following method: /// Each TValue object must thus offer the following method:
/// ///

View File

@ -37,7 +37,7 @@ template <
> >
class UniqueExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex> class UniqueExpireLRUCache: public AbstractCache<TKey, TValue, StrategyCollection<TKey, TValue>, TMutex, TEventMutex>
/// A UniqueExpireLRUCache combines LRU caching and time based per entry expire caching. /// A UniqueExpireLRUCache combines LRU caching and time based per entry expire caching.
/// One can define for each cache entry a seperate timepoint /// One can define for each cache entry a separate timepoint
/// but also limit the size of the cache (per default: 1024). /// but also limit the size of the cache (per default: 1024).
/// Each TValue object must thus offer the following method: /// Each TValue object must thus offer the following method:
/// ///

View File

@ -189,8 +189,6 @@ int DeflatingStreamBuf::sync()
_zstr.next_out = (unsigned char*) _buffer; _zstr.next_out = (unsigned char*) _buffer;
_zstr.avail_out = DEFLATE_BUFFER_SIZE; _zstr.avail_out = DEFLATE_BUFFER_SIZE;
} }
_pOstr->flush();
return 0; return 0;
} }

View File

@ -255,7 +255,7 @@ const Var Var::operator -- (int)
bool Var::operator == (const Var& other) const bool Var::operator == (const Var& other) const
{ {
if (isEmpty() && !other.isEmpty()) return false; if (isEmpty() != other.isEmpty()) return false;
if (isEmpty() && other.isEmpty()) return true; if (isEmpty() && other.isEmpty()) return true;
return convert<std::string>() == other.convert<std::string>(); return convert<std::string>() == other.convert<std::string>();
} }

View File

@ -404,7 +404,7 @@ void LocalDateTimeTest::testTimezone()
// iterations. Do this with both a LocalDateTime object and // iterations. Do this with both a LocalDateTime object and
// a ANSI C time_t. Then create a LocalDateTime based on the // a ANSI C time_t. Then create a LocalDateTime based on the
// time_t and verify that the time_t calculated value is equal // time_t and verify that the time_t calculated value is equal
// to the LocalDateTime value. The comparision operator // to the LocalDateTime value. The comparison operator
// verifies the _dateTime and _tzd members. // verifies the _dateTime and _tzd members.
LocalDateTime dt2; LocalDateTime dt2;
t = std::time(NULL); t = std::time(NULL);

View File

@ -2465,6 +2465,11 @@ void VarTest::testEmpty()
assert (da == da); assert (da == da);
assert (!(da != da)); assert (!(da != da));
assert (da != Var(1));
assert (!(da == Var(1)));
assert (Var(1) != da);
assert (!(Var(1) == da));
da = "123"; da = "123";
int i = da.convert<int>(); int i = da.convert<int>();
assert (123 == i); assert (123 == i);

View File

@ -53,14 +53,14 @@ public:
void startObject(); void startObject();
/// The parser has read a '{'; a new object is started. /// The parser has read a '{'; a new object is started.
/// If indent is greater than zero, a newline will be apended. /// If indent is greater than zero, a newline will be appended.
void endObject(); void endObject();
/// The parser has read a '}'; the object is closed. /// The parser has read a '}'; the object is closed.
void startArray(); void startArray();
/// The parser has read a [; a new array will be started. /// The parser has read a [; a new array will be started.
/// If indent is greater than zero, a newline will be apended. /// If indent is greater than zero, a newline will be appended.
void endArray(); void endArray();
/// The parser has read a ]; the array is closed. /// The parser has read a ]; the array is closed.
@ -89,7 +89,7 @@ public:
#endif #endif
void value(const std::string& value); void value(const std::string& value);
/// A string value is read; it will be fromatted and written to the output. /// A string value is read; it will be formatted and written to the output.
void value(double d); void value(double d);
/// A double value is read; it will be written to the output. /// A double value is read; it will be written to the output.
@ -109,12 +109,14 @@ private:
unsigned indent(); unsigned indent();
bool printFlat() const; bool printFlat() const;
void arrayValue(); void arrayValue();
bool array() const;
std::ostream& _out; std::ostream& _out;
unsigned _indent; unsigned _indent;
std::string _tab; std::string _tab;
bool _array; int _array;
bool _value; bool _value;
bool _objStart;
}; };
@ -124,6 +126,13 @@ inline void PrintHandler::setIndent(unsigned indent)
} }
inline bool PrintHandler::array() const
{
return _array > 0;
}
}} // namespace Poco::JSON }} // namespace Poco::JSON

View File

@ -69,7 +69,7 @@ class JSON_API Template
/// ///
/// <? ifexist query ?> <? else ?> <? endif ?> /// <? ifexist query ?> <? else ?> <? endif ?>
/// ---- /// ----
/// This can be used to check the existance of the value. /// This can be used to check the existence of the value.
/// Use this for example when a zero value is ok (which returns false for <? if ?>. /// Use this for example when a zero value is ok (which returns false for <? if ?>.
/// ///
/// <? for variable query ?> <? endfor ?> /// <? for variable query ?> <? endfor ?>

View File

@ -26,8 +26,9 @@ namespace JSON {
PrintHandler::PrintHandler(unsigned indent): PrintHandler::PrintHandler(unsigned indent):
_out(std::cout), _out(std::cout),
_indent(indent), _indent(indent),
_array(false), _array(0),
_value(false) _value(false),
_objStart(false)
{ {
} }
@ -35,8 +36,9 @@ PrintHandler::PrintHandler(unsigned indent):
PrintHandler::PrintHandler(std::ostream& out, unsigned indent): PrintHandler::PrintHandler(std::ostream& out, unsigned indent):
_out(out), _out(out),
_indent(indent), _indent(indent),
_array(false), _array(0),
_value(false) _value(false),
_objStart(false)
{ {
} }
@ -50,7 +52,7 @@ void PrintHandler::reset()
{ {
_out.flush(); _out.flush();
_tab = ""; _tab = "";
_array = false; _array = 0;
_value = false; _value = false;
} }
@ -78,9 +80,11 @@ unsigned PrintHandler::indent()
void PrintHandler::startObject() void PrintHandler::startObject()
{ {
arrayValue();
_out << '{'; _out << '{';
_out << endLine(); _out << endLine();
_tab.append(indent(), ' '); _tab.append(indent(), ' ');
_objStart = true;
} }
@ -90,6 +94,7 @@ void PrintHandler::endObject()
_tab.erase(_tab.length() - indent()); _tab.erase(_tab.length() - indent());
_out << endLine() << _tab << '}'; _out << endLine() << _tab << '}';
if (array()) _value = true;
} }
@ -97,7 +102,7 @@ void PrintHandler::startArray()
{ {
_out << '[' << endLine(); _out << '[' << endLine();
_tab.append(indent(), ' '); _tab.append(indent(), ' ');
_array = true; ++_array;
_value = false; _value = false;
} }
@ -106,7 +111,8 @@ void PrintHandler::endArray()
{ {
_tab.erase(_tab.length() - indent()); _tab.erase(_tab.length() - indent());
_out << endLine() << _tab << ']'; _out << endLine() << _tab << ']';
_array = false; --_array;
poco_assert (_array >= 0);
_value = false; _value = false;
} }
@ -115,9 +121,10 @@ void PrintHandler::key(const std::string& k)
{ {
if (_value) if (_value)
{ {
comma(); if (!_objStart) comma();
_value = false; _value = false;
} }
_objStart = false;
_out << _tab; _out << _tab;
Stringifier::formatString(k, _out); Stringifier::formatString(k, _out);
if (!printFlat()) _out << ' '; if (!printFlat()) _out << ' ';
@ -201,7 +208,7 @@ void PrintHandler::comma()
void PrintHandler::arrayValue() void PrintHandler::arrayValue()
{ {
if (_array) if (array())
{ {
if (_value) comma(); if (_value) comma();
_out << _tab; _out << _tab;

View File

@ -1181,6 +1181,45 @@ void JSONTest::testPrintHandler()
" ]\n" " ]\n"
"}" "}"
); );
json =
"{"
"\"array\":"
"["
"{"
"\"key1\":"
"["
"1,2,3,"
"{"
"\"subkey\":"
"\"test\""
"}"
"]"
"},"
"{"
"\"key2\":"
"{"
"\"anotherSubKey\":"
"["
"1,"
"{"
"\"subSubKey\":"
"["
"4,5,6"
"]"
"}"
"]"
"}"
"}"
"]"
"}";
ostr.str("");
pHandler->setIndent(0);
parser.reset();
parser.parse(json);
assert (json == ostr.str());
} }

View File

@ -20,6 +20,8 @@ ifndef POCO_BUILD
export POCO_BUILD=$(POCO_BASE) export POCO_BUILD=$(POCO_BASE)
endif endif
LIBPREFIX ?= lib
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
# TESTS and SAMPLES are set in config.make # TESTS and SAMPLES are set in config.make

Some files were not shown because too many files have changed in this diff Show More