| ASCIIEncoding.h | | ASCIIEncoding.h | |
| // | | // | |
| // ASCIIEncoding.h | | // ASCIIEncoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/ASCIIEncoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/ASCIIEncoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: ASCIIEncoding | | // Module: ASCIIEncoding | |
| // | | // | |
| // Definition of the ASCIIEncoding class. | | // Definition of the ASCIIEncoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| /// 7-bit ASCII text encoding. | | /// 7-bit ASCII text encoding. | |
| { | | { | |
| public: | | public: | |
| ASCIIEncoding(); | | ASCIIEncoding(); | |
| ~ASCIIEncoding(); | | ~ASCIIEncoding(); | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| private: | | private: | |
| static const char* _names[]; | | static const char* _names[]; | |
| static const CharacterMap _charMap; | | static const CharacterMap _charMap; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_ASCIIEncoding_INCLUDED | | #endif // Foundation_ASCIIEncoding_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| BinaryReader.h | | BinaryReader.h | |
| // | | // | |
| // BinaryReader.h | | // BinaryReader.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/BinaryReader.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/BinaryReader.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: BinaryReaderWriter | | // Module: BinaryReaderWriter | |
| // | | // | |
| // Definition of the BinaryReader class. | | // Definition of the BinaryReader class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 101 | | skipping to change at line 101 | |
| /// See BinaryWriter::write7BitEncoded() for a description | | /// See BinaryWriter::write7BitEncoded() for a description | |
| /// of the compression algorithm. | | /// of the compression algorithm. | |
| | | | |
| #if defined(POCO_HAVE_INT64) | | #if defined(POCO_HAVE_INT64) | |
| void read7BitEncoded(UInt64& value); | | void read7BitEncoded(UInt64& value); | |
| /// Reads a 64-bit unsigned integer in compressed format. | | /// Reads a 64-bit unsigned integer in compressed format. | |
| /// See BinaryWriter::write7BitEncoded() for a description | | /// See BinaryWriter::write7BitEncoded() for a description | |
| /// of the compression algorithm. | | /// of the compression algorithm. | |
| #endif | | #endif | |
| | | | |
|
| void readRaw(int length, std::string& value); | | void readRaw(std::streamsize length, std::string& value); | |
| /// Reads length bytes of raw data into value. | | /// Reads length bytes of raw data into value. | |
| | | | |
|
| | | void readRaw(char* buffer, std::streamsize length); | |
| | | /// Reads length bytes of raw data into buffer. | |
| | | | |
| void readBOM(); | | void readBOM(); | |
| /// Reads a byte-order mark from the stream and configures | | /// Reads a byte-order mark from the stream and configures | |
| /// the reader for the encountered byte order. | | /// the reader for the encountered byte order. | |
| /// A byte-order mark is a 16-bit integer with a value of 0x
FEFF, | | /// A byte-order mark is a 16-bit integer with a value of 0x
FEFF, | |
| /// written in host byte order. | | /// written in host byte order. | |
| | | | |
| bool good(); | | bool good(); | |
| /// Returns _istr.good(); | | /// Returns _istr.good(); | |
| | | | |
| bool fail(); | | bool fail(); | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 5 lines changed or added | |
|
| BinaryWriter.h | | BinaryWriter.h | |
| // | | // | |
| // BinaryWriter.h | | // BinaryWriter.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/BinaryWriter.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/BinaryWriter.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: BinaryReaderWriter | | // Module: BinaryReaderWriter | |
| // | | // | |
| // Definition of the BinaryWriter class. | | // Definition of the BinaryWriter class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 122 | | skipping to change at line 122 | |
| /// written after this one. | | /// written after this one. | |
| /// If value will fit in seven bits, it takes only one byte
of space. | | /// If value will fit in seven bits, it takes only one byte
of space. | |
| /// If value will not fit in seven bits, the high bit is set
on the first byte and | | /// If value will not fit in seven bits, the high bit is set
on the first byte and | |
| /// written out. value is then shifted by seven bits and the
next byte is written. | | /// written out. value is then shifted by seven bits and the
next byte is written. | |
| /// This process is repeated until the entire integer has be
en written. | | /// This process is repeated until the entire integer has be
en written. | |
| #endif | | #endif | |
| | | | |
| void writeRaw(const std::string& rawData); | | void writeRaw(const std::string& rawData); | |
| /// Writes the string as-is to the stream. | | /// Writes the string as-is to the stream. | |
| | | | |
|
| | | void writeRaw(const char* buffer, std::streamsize length); | |
| | | /// Writes length raw bytes from the given buffer to the str | |
| | | eam. | |
| | | | |
| void writeBOM(); | | void writeBOM(); | |
| /// Writes a byte-order mark to the stream. A byte order mar
k is | | /// Writes a byte-order mark to the stream. A byte order mar
k is | |
| /// a 16-bit integer with a value of 0xFEFF, written in host
byte-order. | | /// a 16-bit integer with a value of 0xFEFF, written in host
byte-order. | |
| /// A BinaryReader uses the byte-order mark to determine the
byte-order | | /// A BinaryReader uses the byte-order mark to determine the
byte-order | |
| /// of the stream. | | /// of the stream. | |
| | | | |
| void flush(); | | void flush(); | |
| /// Flushes the underlying stream. | | /// Flushes the underlying stream. | |
| | | | |
| bool good(); | | bool good(); | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| BufferedBidirectionalStreamBuf.h | | BufferedBidirectionalStreamBuf.h | |
| // | | // | |
| // BufferedBidirectionalStreamBuf.h | | // BufferedBidirectionalStreamBuf.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h
#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h
#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: StreamBuf | | // Module: StreamBuf | |
| // | | // | |
| // Definition of template BasicBufferedBidirectionalStreamBuf and class Buf
feredBidirectionalStreamBuf. | | // Definition of template BasicBufferedBidirectionalStreamBuf and class Buf
feredBidirectionalStreamBuf. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 114 | | skipping to change at line 114 | |
| virtual int_type underflow() | | virtual int_type underflow() | |
| { | | { | |
| if (!(_mode & IOS::in)) return char_traits::eof(); | | if (!(_mode & IOS::in)) return char_traits::eof(); | |
| | | | |
| if (this->gptr() && (this->gptr() < this->egptr())) | | if (this->gptr() && (this->gptr() < this->egptr())) | |
| return char_traits::to_int_type(*this->gptr()); | | return char_traits::to_int_type(*this->gptr()); | |
| | | | |
| int putback = int(this->gptr() - this->eback()); | | int putback = int(this->gptr() - this->eback()); | |
| if (putback > 4) putback = 4; | | if (putback > 4) putback = 4; | |
| | | | |
|
| char_traits::copy(_pReadBuffer + (4 - putback), this->gptr()
- putback, putback); | | char_traits::move(_pReadBuffer + (4 - putback), this->gptr()
- putback, putback); | |
| | | | |
| int n = readFromDevice(_pReadBuffer + 4, _bufsize - 4); | | int n = readFromDevice(_pReadBuffer + 4, _bufsize - 4); | |
| if (n <= 0) return char_traits::eof(); | | if (n <= 0) return char_traits::eof(); | |
| | | | |
| this->setg(_pReadBuffer + (4 - putback), _pReadBuffer + 4, _
pReadBuffer + 4 + n); | | this->setg(_pReadBuffer + (4 - putback), _pReadBuffer + 4, _
pReadBuffer + 4 + n); | |
| | | | |
| // return next character | | // return next character | |
| return char_traits::to_int_type(*this->gptr()); | | return char_traits::to_int_type(*this->gptr()); | |
| } | | } | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| BufferedStreamBuf.h | | BufferedStreamBuf.h | |
| // | | // | |
| // BufferedStreamBuf.h | | // BufferedStreamBuf.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/BufferedStreamBuf.h#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/BufferedStreamBuf.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: StreamBuf | | // Module: StreamBuf | |
| // | | // | |
| // Definition of template BasicBufferedStreamBuf and class BufferedStreamBu
f. | | // Definition of template BasicBufferedStreamBuf and class BufferedStreamBu
f. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 113 | | skipping to change at line 113 | |
| virtual int_type underflow() | | virtual int_type underflow() | |
| { | | { | |
| if (!(_mode & IOS::in)) return char_traits::eof(); | | if (!(_mode & IOS::in)) return char_traits::eof(); | |
| | | | |
| if (this->gptr() && (this->gptr() < this->egptr())) | | if (this->gptr() && (this->gptr() < this->egptr())) | |
| return char_traits::to_int_type(*this->gptr()); | | return char_traits::to_int_type(*this->gptr()); | |
| | | | |
| int putback = int(this->gptr() - this->eback()); | | int putback = int(this->gptr() - this->eback()); | |
| if (putback > 4) putback = 4; | | if (putback > 4) putback = 4; | |
| | | | |
|
| char_traits::copy(_pBuffer + (4 - putback), this->gptr() - p
utback, putback); | | char_traits::move(_pBuffer + (4 - putback), this->gptr() - p
utback, putback); | |
| | | | |
| int n = readFromDevice(_pBuffer + 4, _bufsize - 4); | | int n = readFromDevice(_pBuffer + 4, _bufsize - 4); | |
| if (n <= 0) return char_traits::eof(); | | if (n <= 0) return char_traits::eof(); | |
| | | | |
| this->setg(_pBuffer + (4 - putback), _pBuffer + 4, _pBuffer
+ 4 + n); | | this->setg(_pBuffer + (4 - putback), _pBuffer + 4, _pBuffer
+ 4 + n); | |
| | | | |
| // return next character | | // return next character | |
| return char_traits::to_int_type(*this->gptr()); | | return char_traits::to_int_type(*this->gptr()); | |
| } | | } | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| DateTime.h | | DateTime.h | |
| // | | // | |
| // DateTime.h | | // DateTime.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/DateTime.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/DateTime.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: DateTime | | // Module: DateTime | |
| // | | // | |
| // Definition of the DateTime class. | | // Definition of the DateTime class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 54 | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API DateTime | | class Foundation_API DateTime | |
| /// This class represents an instant in time, expressed | | /// This class represents an instant in time, expressed | |
| /// in years, months, days, hours, minutes, seconds | | /// in years, months, days, hours, minutes, seconds | |
| /// and milliseconds based on the Gregorian calendar. | | /// and milliseconds based on the Gregorian calendar. | |
| /// The class is mainly useful for conversions between | | /// The class is mainly useful for conversions between | |
| /// UTC, Julian day and Gregorian calendar dates. | | /// UTC, Julian day and Gregorian calendar dates. | |
| /// | | /// | |
|
| | | /// The date and time stored in a DateTime is always in UTC | |
| | | /// (Coordinated Universal Time) and thus independent of the | |
| | | /// timezone in effect on the system. | |
| | | /// | |
| /// Conversion calculations are based on algorithms | | /// Conversion calculations are based on algorithms | |
| /// collected and described by Peter Baum at | | /// collected and described by Peter Baum at | |
| /// http://vsg.cape.com/~pbaum/date/date0.htm | | /// http://vsg.cape.com/~pbaum/date/date0.htm | |
| /// | | /// | |
| /// Internally, this class stores a date/time in two | | /// Internally, this class stores a date/time in two | |
| /// forms (UTC and broken down) for performance reasons. Only use | | /// forms (UTC and broken down) for performance reasons. Only use | |
| /// this class for conversions between date/time representations. | | /// this class for conversions between date/time representations. | |
| /// Use the Timestamp class for everything else. | | /// Use the Timestamp class for everything else. | |
| /// | | /// | |
| /// Notes: | | /// Notes: | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| DateTimeParser.h | | DateTimeParser.h | |
| // | | // | |
| // DateTimeParser.h | | // DateTimeParser.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/DateTimeParser.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/DateTimeParser.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: DateTimeParser | | // Module: DateTimeParser | |
| // | | // | |
| // Definition of the DateTimeParser class. | | // Definition of the DateTimeParser class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| /// strings. | | /// strings. | |
| /// | | /// | |
| /// The returned DateTime will always contain a time in the same | | /// The returned DateTime will always contain a time in the same | |
| /// timezone as the time in the string. Call DateTime::makeUTC() | | /// timezone as the time in the string. Call DateTime::makeUTC() | |
| /// with the timeZoneDifferential returned by parse() to convert | | /// with the timeZoneDifferential returned by parse() to convert | |
| /// the DateTime to UTC. | | /// the DateTime to UTC. | |
| /// | | /// | |
| /// Note: When parsing a time in 12-hour (AM/PM) format, the hour | | /// Note: When parsing a time in 12-hour (AM/PM) format, the hour | |
| /// (%h) must be parsed before the AM/PM designator (%a, %A), | | /// (%h) must be parsed before the AM/PM designator (%a, %A), | |
| /// otherwise the AM/PM designator will be ignored. | | /// otherwise the AM/PM designator will be ignored. | |
|
| | | /// | |
| | | /// See the DateTimeFormatter class for a list of supported format s | |
| | | pecifiers. | |
| | | /// In addition to the format specifiers supported by DateTimeFormat | |
| | | ter, an | |
| | | /// additional specifier is supported: %r will parse a year given by | |
| | | either | |
| | | /// two or four digits. Years 69-00 are interpreted in the 20th cent | |
| | | ury | |
| | | /// (1969-2000), years 01-68 in the 21th century (2001-2068). | |
| { | | { | |
| public: | | public: | |
| static void parse(const std::string& fmt, const std::string& str, Da
teTime& dateTime, int& timeZoneDifferential); | | static void parse(const std::string& fmt, const std::string& str, Da
teTime& dateTime, int& timeZoneDifferential); | |
| /// Parses a date and time in the given format from the give
n string. | | /// Parses a date and time in the given format from the give
n string. | |
| /// Throws a SyntaxException if the string cannot be success
fully parsed. | | /// Throws a SyntaxException if the string cannot be success
fully parsed. | |
| /// Please see DateTimeFormatter::format() for a description
of the format string. | | /// Please see DateTimeFormatter::format() for a description
of the format string. | |
| /// Class DateTimeFormat defines format strings for various
standard date/time formats. | | /// Class DateTimeFormat defines format strings for various
standard date/time formats. | |
| | | | |
| static DateTime parse(const std::string& fmt, const std::string& str
, int& timeZoneDifferential); | | static DateTime parse(const std::string& fmt, const std::string& str
, int& timeZoneDifferential); | |
| /// Parses a date and time in the given format from the give
n string. | | /// Parses a date and time in the given format from the give
n string. | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 11 lines changed or added | |
|
| Environment.h | | Environment.h | |
| // | | // | |
| // Environment.h | | // Environment.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Environment.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Environment.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Environment | | // Module: Environment | |
| // | | // | |
| // Definition of the Environment class. | | // Definition of the Environment class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 93 | | skipping to change at line 93 | |
| /// Returns the Ethernet address of the first Ethernet | | /// Returns the Ethernet address of the first Ethernet | |
| /// adapter found on the system. | | /// adapter found on the system. | |
| /// | | /// | |
| /// Throws a SystemException if no Ethernet adapter is avail
able. | | /// Throws a SystemException if no Ethernet adapter is avail
able. | |
| | | | |
| static std::string nodeId(); | | static std::string nodeId(); | |
| /// Returns the Ethernet address (format "xx:xx:xx:xx:xx:xx"
) | | /// Returns the Ethernet address (format "xx:xx:xx:xx:xx:xx"
) | |
| /// of the first Ethernet adapter found on the system. | | /// of the first Ethernet adapter found on the system. | |
| /// | | /// | |
| /// Throws a SystemException if no Ethernet adapter is avail
able. | | /// Throws a SystemException if no Ethernet adapter is avail
able. | |
|
| | | | |
| | | static unsigned processorCount(); | |
| | | /// Returns the number of processors installed in the system | |
| | | . | |
| | | /// | |
| | | /// If the number of processors cannot be determined, return | |
| | | s 1. | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Environment_INCLUDED | | #endif // Foundation_Environment_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 8 lines changed or added | |
|
| Environment_UNIX.h | | Environment_UNIX.h | |
| // | | // | |
| // Environment_UNIX.h | | // Environment_UNIX.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Environment_UNIX.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Environment_UNIX.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Environment | | // Module: Environment | |
| // | | // | |
| // Definition of the EnvironmentImpl class for Unix. | | // Definition of the EnvironmentImpl class for Unix. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| typedef UInt8 NodeId[6]; /// Ethernet address. | | typedef UInt8 NodeId[6]; /// Ethernet address. | |
| | | | |
| static std::string getImpl(const std::string& name); | | static std::string getImpl(const std::string& name); | |
| static bool hasImpl(const std::string& name); | | static bool hasImpl(const std::string& name); | |
| static void setImpl(const std::string& name, const std::string& valu
e); | | static void setImpl(const std::string& name, const std::string& valu
e); | |
| static std::string osNameImpl(); | | static std::string osNameImpl(); | |
| static std::string osVersionImpl(); | | static std::string osVersionImpl(); | |
| static std::string osArchitectureImpl(); | | static std::string osArchitectureImpl(); | |
| static std::string nodeNameImpl(); | | static std::string nodeNameImpl(); | |
| static void nodeIdImpl(NodeId& id); | | static void nodeIdImpl(NodeId& id); | |
|
| | | static unsigned processorCountImpl(); | |
| | | | |
| private: | | private: | |
| typedef std::map<std::string, std::string> StringMap; | | typedef std::map<std::string, std::string> StringMap; | |
| | | | |
| static StringMap _map; | | static StringMap _map; | |
| static FastMutex _mutex; | | static FastMutex _mutex; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| Environment_VMS.h | | Environment_VMS.h | |
| // | | // | |
| // Environment_VMS.h | | // Environment_VMS.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Environment_VMS.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Environment_VMS.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Environment | | // Module: Environment | |
| // | | // | |
| // Definition of the EnvironmentImpl class for OpenVMS. | | // Definition of the EnvironmentImpl class for OpenVMS. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| typedef UInt8 NodeId[6]; /// Ethernet address. | | typedef UInt8 NodeId[6]; /// Ethernet address. | |
| | | | |
| static std::string getImpl(const std::string& name); | | static std::string getImpl(const std::string& name); | |
| static bool hasImpl(const std::string& name); | | static bool hasImpl(const std::string& name); | |
| static void setImpl(const std::string& name, const std::string& valu
e); | | static void setImpl(const std::string& name, const std::string& valu
e); | |
| static std::string osNameImpl(); | | static std::string osNameImpl(); | |
| static std::string osVersionImpl(); | | static std::string osVersionImpl(); | |
| static std::string osArchitectureImpl(); | | static std::string osArchitectureImpl(); | |
| static std::string nodeNameImpl(); | | static std::string nodeNameImpl(); | |
| static void nodeIdImpl(NodeId& id); | | static void nodeIdImpl(NodeId& id); | |
|
| | | static unsigned processorCountImpl(); | |
| | | | |
| static std::string getsyi(unsigned short code); | | static std::string getsyi(unsigned short code); | |
| /// a wrapper for $GETSYIW | | /// a wrapper for $GETSYIW | |
| | | | |
| static std::string trnlnm(const std::string& name); | | static std::string trnlnm(const std::string& name); | |
| | | | |
| private: | | private: | |
| static FastMutex _mutex; | | static FastMutex _mutex; | |
| }; | | }; | |
| | | | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| Environment_WIN32.h | | Environment_WIN32.h | |
| // | | // | |
| // Environment_WIN32.h | | // Environment_WIN32.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Environment | | // Module: Environment | |
| // | | // | |
| // Definition of the EnvironmentImpl class for WIN32. | | // Definition of the EnvironmentImpl class for WIN32. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| typedef UInt8 NodeId[6]; /// Ethernet address. | | typedef UInt8 NodeId[6]; /// Ethernet address. | |
| | | | |
| static std::string getImpl(const std::string& name); | | static std::string getImpl(const std::string& name); | |
| static bool hasImpl(const std::string& name); | | static bool hasImpl(const std::string& name); | |
| static void setImpl(const std::string& name, const std::string& valu
e); | | static void setImpl(const std::string& name, const std::string& valu
e); | |
| static std::string osNameImpl(); | | static std::string osNameImpl(); | |
| static std::string osVersionImpl(); | | static std::string osVersionImpl(); | |
| static std::string osArchitectureImpl(); | | static std::string osArchitectureImpl(); | |
| static std::string nodeNameImpl(); | | static std::string nodeNameImpl(); | |
| static void nodeIdImpl(NodeId& id); | | static void nodeIdImpl(NodeId& id); | |
|
| | | static unsigned processorCountImpl(); | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Environment_WIN32_INCLUDED | | #endif // Foundation_Environment_WIN32_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| Environment_WIN32U.h | | Environment_WIN32U.h | |
| // | | // | |
| // Environment_WIN32U.h | | // Environment_WIN32U.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32U.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Environment_WIN32U.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Environment | | // Module: Environment | |
| // | | // | |
| // Definition of the EnvironmentImpl class for WIN32. | | // Definition of the EnvironmentImpl class for WIN32. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| typedef UInt8 NodeId[6]; /// Ethernet address. | | typedef UInt8 NodeId[6]; /// Ethernet address. | |
| | | | |
| static std::string getImpl(const std::string& name); | | static std::string getImpl(const std::string& name); | |
| static bool hasImpl(const std::string& name); | | static bool hasImpl(const std::string& name); | |
| static void setImpl(const std::string& name, const std::string& valu
e); | | static void setImpl(const std::string& name, const std::string& valu
e); | |
| static std::string osNameImpl(); | | static std::string osNameImpl(); | |
| static std::string osVersionImpl(); | | static std::string osVersionImpl(); | |
| static std::string osArchitectureImpl(); | | static std::string osArchitectureImpl(); | |
| static std::string nodeNameImpl(); | | static std::string nodeNameImpl(); | |
| static void nodeIdImpl(NodeId& id); | | static void nodeIdImpl(NodeId& id); | |
|
| | | static unsigned processorCountImpl(); | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Environment_WIN32U_INCLUDED | | #endif // Foundation_Environment_WIN32U_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 2 lines changed or added | |
|
| Exception.h | | Exception.h | |
| // | | // | |
| // Exception.h | | // Exception.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Exception.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Exception.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Exception | | // Module: Exception | |
| // | | // | |
| // Definition of various Poco exception classes. | | // Definition of various Poco exception classes. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 112 | | skipping to change at line 112 | |
| /// (Re)Throws the exception. | | /// (Re)Throws the exception. | |
| /// | | /// | |
| /// This is useful for temporarily storing a | | /// This is useful for temporarily storing a | |
| /// copy of an exception (see clone()), then | | /// copy of an exception (see clone()), then | |
| /// throwing it again. | | /// throwing it again. | |
| | | | |
| protected: | | protected: | |
| Exception(int code = 0); | | Exception(int code = 0); | |
| /// Standard constructor. | | /// Standard constructor. | |
| | | | |
|
| | | void message(const std::string& msg); | |
| | | /// Sets the message for the exception. | |
| | | | |
| | | void extendedMessage(const std::string& arg); | |
| | | /// Sets the extended message for the exception. | |
| | | | |
| private: | | private: | |
| std::string _msg; | | std::string _msg; | |
| Exception* _pNested; | | Exception* _pNested; | |
| int _code; | | int _code; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline const Exception* Exception::nested() const | | inline const Exception* Exception::nested() const | |
| { | | { | |
| return _pNested; | | return _pNested; | |
| } | | } | |
| | | | |
| inline const std::string& Exception::message() const | | inline const std::string& Exception::message() const | |
| { | | { | |
| return _msg; | | return _msg; | |
| } | | } | |
| | | | |
|
| | | inline void Exception::message(const std::string& msg) | |
| | | { | |
| | | _msg = msg; | |
| | | } | |
| | | | |
| inline int Exception::code() const | | inline int Exception::code() const | |
| { | | { | |
| return _code; | | return _code; | |
| } | | } | |
| | | | |
| // | | // | |
| // Macros for quickly declaring and implementing exception classes. | | // Macros for quickly declaring and implementing exception classes. | |
| // Unfortunately, we cannot use a template here because character | | // Unfortunately, we cannot use a template here because character | |
| // pointers (which we need for specifying the exception name) | | // pointers (which we need for specifying the exception name) | |
| // are not allowed as template arguments. | | // are not allowed as template arguments. | |
| | | | |
| skipping to change at line 235 | | skipping to change at line 246 | |
| POCO_DECLARE_EXCEPTION(Foundation_API, PoolOverflowException, RuntimeExcept
ion) | | POCO_DECLARE_EXCEPTION(Foundation_API, PoolOverflowException, RuntimeExcept
ion) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, NoPermissionException, RuntimeExcept
ion) | | POCO_DECLARE_EXCEPTION(Foundation_API, NoPermissionException, RuntimeExcept
ion) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, OutOfMemoryException, RuntimeExcepti
on) | | POCO_DECLARE_EXCEPTION(Foundation_API, OutOfMemoryException, RuntimeExcepti
on) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, DataException, RuntimeException) | | POCO_DECLARE_EXCEPTION(Foundation_API, DataException, RuntimeException) | |
| | | | |
| POCO_DECLARE_EXCEPTION(Foundation_API, DataFormatException, DataException) | | POCO_DECLARE_EXCEPTION(Foundation_API, DataFormatException, DataException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, SyntaxException, DataException) | | POCO_DECLARE_EXCEPTION(Foundation_API, SyntaxException, DataException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, CircularReferenceException, DataExce
ption) | | POCO_DECLARE_EXCEPTION(Foundation_API, CircularReferenceException, DataExce
ption) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, PathSyntaxException, SyntaxException
) | | POCO_DECLARE_EXCEPTION(Foundation_API, PathSyntaxException, SyntaxException
) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, IOException, RuntimeException) | | POCO_DECLARE_EXCEPTION(Foundation_API, IOException, RuntimeException) | |
|
| | | POCO_DECLARE_EXCEPTION(Foundation_API, ProtocolException, IOException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, FileException, IOException) | | POCO_DECLARE_EXCEPTION(Foundation_API, FileException, IOException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, FileExistsException, FileException) | | POCO_DECLARE_EXCEPTION(Foundation_API, FileExistsException, FileException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, FileNotFoundException, FileException
) | | POCO_DECLARE_EXCEPTION(Foundation_API, FileNotFoundException, FileException
) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, PathNotFoundException, FileException
) | | POCO_DECLARE_EXCEPTION(Foundation_API, PathNotFoundException, FileException
) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, FileReadOnlyException, FileException
) | | POCO_DECLARE_EXCEPTION(Foundation_API, FileReadOnlyException, FileException
) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, FileAccessDeniedException, FileExcep
tion) | | POCO_DECLARE_EXCEPTION(Foundation_API, FileAccessDeniedException, FileExcep
tion) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, CreateFileException, FileException) | | POCO_DECLARE_EXCEPTION(Foundation_API, CreateFileException, FileException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, OpenFileException, FileException) | | POCO_DECLARE_EXCEPTION(Foundation_API, OpenFileException, FileException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, WriteFileException, FileException) | | POCO_DECLARE_EXCEPTION(Foundation_API, WriteFileException, FileException) | |
| POCO_DECLARE_EXCEPTION(Foundation_API, ReadFileException, FileException) | | POCO_DECLARE_EXCEPTION(Foundation_API, ReadFileException, FileException) | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 13 lines changed or added | |
|
| FTPClientSession.h | | FTPClientSession.h | |
| // | | // | |
| // FTPClientSession.h | | // FTPClientSession.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/FTPClientSession.h#1 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/FTPClientSession.h#2 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: FTP | | // Package: FTP | |
| // Module: FTPClientSession | | // Module: FTPClientSession | |
| // | | // | |
| // Definition of the FTPClientSession class. | | // Definition of the FTPClientSession class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 99 | | skipping to change at line 99 | |
| | | | |
| virtual ~FTPClientSession(); | | virtual ~FTPClientSession(); | |
| /// Destroys the FTPClientSession. | | /// Destroys the FTPClientSession. | |
| | | | |
| void setTimeout(const Poco::Timespan& timeout); | | void setTimeout(const Poco::Timespan& timeout); | |
| /// Sets the timeout for socket operations. | | /// Sets the timeout for socket operations. | |
| | | | |
| Poco::Timespan getTimeout() const; | | Poco::Timespan getTimeout() const; | |
| /// Returns the timeout for socket operations. | | /// Returns the timeout for socket operations. | |
| | | | |
|
| void setPassive(bool flag); | | void setPassive(bool flag, bool useRFC1738 = true); | |
| /// Enables (default) or disables FTP passive mode for this
session. | | /// Enables (default) or disables FTP passive mode for this
session. | |
|
| | | /// | |
| | | /// If useRFC1738 is true (the default), the RFC 1738 | |
| | | /// EPSV command is used (with a fallback to PASV if EPSV fa | |
| | | ils) | |
| | | /// for switching to passive mode. The same applies to | |
| | | /// EPRT and PORT for active connections. | |
| | | | |
| bool getPassive() const; | | bool getPassive() const; | |
| /// Returns true iff passive mode is enabled for this connec
tion. | | /// Returns true iff passive mode is enabled for this connec
tion. | |
| | | | |
| void login(const std::string& username, const std::string& password)
; | | void login(const std::string& username, const std::string& password)
; | |
| /// Authenticates the user against the FTP server. Must be | | /// Authenticates the user against the FTP server. Must be | |
| /// called before any other commands (except QUIT) can be se
nt. | | /// called before any other commands (except QUIT) can be se
nt. | |
| /// | | /// | |
| /// Sends a USER command followed by a PASS command with the | | /// Sends a USER command followed by a PASS command with the | |
| /// respective arguments to the server. | | /// respective arguments to the server. | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|
| FileStream.h | | FileStream.h | |
| // | | // | |
| // FileStream.h | | // FileStream.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/FileStream.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/FileStream.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: FileStream | | // Module: FileStream | |
| // | | // | |
| // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | |
| // | | // | |
| // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 84 | |
| | | | |
| void open(const std::string& path, std::ios::openmode mode); | | void open(const std::string& path, std::ios::openmode mode); | |
| /// Opens the file specified by path, using the given mode. | | /// Opens the file specified by path, using the given mode. | |
| /// | | /// | |
| /// Throws a FileException (or a similar exception) if the f
ile | | /// Throws a FileException (or a similar exception) if the f
ile | |
| /// does not exist or is not accessible for other reasons an
d | | /// does not exist or is not accessible for other reasons an
d | |
| /// a new file cannot be created. | | /// a new file cannot be created. | |
| | | | |
| void close(); | | void close(); | |
| /// Closes the file stream. | | /// Closes the file stream. | |
|
| | | /// | |
| | | /// If, for an output stream, the close operation fails (bec | |
| | | ause | |
| | | /// the contents of the stream buffer cannot synced back to | |
| | | /// the filesystem), the bad bit is set in the stream state. | |
| | | | |
| FileStreamBuf* rdbuf(); | | FileStreamBuf* rdbuf(); | |
| /// Returns a pointer to the underlying streambuf. | | /// Returns a pointer to the underlying streambuf. | |
| | | | |
| protected: | | protected: | |
| FileStreamBuf _buf; | | FileStreamBuf _buf; | |
| std::ios::openmode _defaultMode; | | std::ios::openmode _defaultMode; | |
| }; | | }; | |
| | | | |
| class Foundation_API FileInputStream: public FileIOS, public std::istream | | class Foundation_API FileInputStream: public FileIOS, public std::istream | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| FileStream_POSIX.h | | FileStream_POSIX.h | |
| // | | // | |
| // FileStream_POSIX.h | | // FileStream_POSIX.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/FileStream_POSIX.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/FileStream_POSIX.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: FileStream | | // Module: FileStream | |
| // | | // | |
| // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | |
| // | | // | |
| // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 61 | | skipping to change at line 61 | |
| public: | | public: | |
| FileStreamBuf(); | | FileStreamBuf(); | |
| /// Creates a FileStreamBuf. | | /// Creates a FileStreamBuf. | |
| | | | |
| ~FileStreamBuf(); | | ~FileStreamBuf(); | |
| /// Destroys the FileStream. | | /// Destroys the FileStream. | |
| | | | |
| void open(const std::string& path, std::ios::openmode mode); | | void open(const std::string& path, std::ios::openmode mode); | |
| /// Opens the given file in the given mode. | | /// Opens the given file in the given mode. | |
| | | | |
|
| void close(); | | bool close(); | |
| /// Closes the File stream buffer. | | /// Closes the File stream buffer. Returns true if successfu | |
| | | l, | |
| | | /// false otherwise. | |
| | | | |
| std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, st
d::ios::openmode mode = std::ios::in | std::ios::out); | | std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, st
d::ios::openmode mode = std::ios::in | std::ios::out); | |
| /// Change position by offset, according to way and mode. | | /// Change position by offset, according to way and mode. | |
| | | | |
| std::streampos seekpos(std::streampos pos, std::ios::openmode mode =
std::ios::in | std::ios::out); | | std::streampos seekpos(std::streampos pos, std::ios::openmode mode =
std::ios::in | std::ios::out); | |
| /// Change to specified position, according to mode. | | /// Change to specified position, according to mode. | |
| | | | |
| protected: | | protected: | |
| enum | | enum | |
| { | | { | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 5 lines changed or added | |
|
| FileStream_WIN32.h | | FileStream_WIN32.h | |
| // | | // | |
| // FileStream_WIN32.h | | // FileStream_WIN32.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/FileStream_WIN32.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/FileStream_WIN32.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: FileStream | | // Module: FileStream | |
| // | | // | |
| // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | | // Definition of the FileStreamBuf, FileInputStream and FileOutputStream cl
asses. | |
| // | | // | |
| // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| public: | | public: | |
| FileStreamBuf(); | | FileStreamBuf(); | |
| /// Creates a FileStreamBuf. | | /// Creates a FileStreamBuf. | |
| | | | |
| ~FileStreamBuf(); | | ~FileStreamBuf(); | |
| /// Destroys the FileStream. | | /// Destroys the FileStream. | |
| | | | |
| void open(const std::string& path, std::ios::openmode mode); | | void open(const std::string& path, std::ios::openmode mode); | |
| /// Opens the given file in the given mode. | | /// Opens the given file in the given mode. | |
| | | | |
|
| void close(); | | bool close(); | |
| /// Closes the File stream buffer | | /// Closes the File stream buffer. Returns true if successfu | |
| | | l, | |
| | | /// false otherwise. | |
| | | | |
| std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, st
d::ios::openmode mode = std::ios::in | std::ios::out); | | std::streampos seekoff(std::streamoff off, std::ios::seekdir dir, st
d::ios::openmode mode = std::ios::in | std::ios::out); | |
| /// change position by offset, according to way and mode | | /// change position by offset, according to way and mode | |
| | | | |
| std::streampos seekpos(std::streampos pos, std::ios::openmode mode =
std::ios::in | std::ios::out); | | std::streampos seekpos(std::streampos pos, std::ios::openmode mode =
std::ios::in | std::ios::out); | |
| /// change to specified position, according to mode | | /// change to specified position, according to mode | |
| | | | |
| protected: | | protected: | |
| enum | | enum | |
| { | | { | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 5 lines changed or added | |
|
| Format.h | | Format.h | |
| // | | // | |
| // Format.h | | // Format.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Format.h#5 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Format.h#6 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Format | | // Module: Format | |
| // | | // | |
| // Definition of the format freestanding function. | | // Definition of the format freestanding function. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
|
| // All rights reserved. | | // and Contributors. | |
| // | | | |
| // Redistribution and use in source and binary forms, with or without | | | |
| // modification, are permitted provided that the following conditions | | | |
| // are met: | | | |
| // | | | |
| // 1. Redistributions of source code must retain the above copyright | | | |
| // notice, this list of conditions and the following disclaimer. | | | |
| // | | // | |
|
| // 2. Redistributions in binary form must reproduce the above copyright | | // Permission is hereby granted, free of charge, to any person or organizat | |
| // notice, this list of conditions and the following disclaimer in the | | ion | |
| // documentation and/or other materials provided with the distribution. | | // obtaining a copy of the software and accompanying documentation covered | |
| | | by | |
| | | // this license (the "Software") to use, reproduce, display, distribute, | |
| | | // execute, and transmit the Software, and to prepare derivative works of t | |
| | | he | |
| | | // Software, and to permit third-parties to whom the Software is furnished | |
| | | to | |
| | | // do so, all subject to the following: | |
| // | | // | |
|
| // 3. Redistributions in any form must be accompanied by information on | | // The copyright notices in the Software and this entire statement, includi | |
| // how to obtain complete source code for this software and any | | ng | |
| // accompanying software that uses this software. The source code | | // the above license grant, this restriction and the following disclaimer, | |
| // must either be included in the distribution or be available for no | | // must be included in all copies of the Software, in whole or in part, and | |
| // more than the cost of distribution plus a nominal fee, and must be | | // all derivative works of the Software, unless such copies or derivative | |
| // freely redistributable under reasonable conditions. For an | | // works are solely in the form of machine-executable object code generated | |
| // executable file, complete source code means the source code for all | | by | |
| // modules it contains. It does not include source code for modules or | | // a source language processor. | |
| // files that typically accompany the major components of the operating | | | |
| // system on which the executable file runs. | | | |
| // | | // | |
|
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | | OR | |
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | | // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVEN | |
| // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | | T | |
| // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | | // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | |
| // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | | E | |
| // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | | // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | |
| // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | SE, | |
| // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | |
| // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | HER | |
| // POSSIBILITY OF SUCH DAMAGE. | | // DEALINGS IN THE SOFTWARE. | |
| // | | // | |
| | | | |
| #ifndef Foundation_Format_INCLUDED | | #ifndef Foundation_Format_INCLUDED | |
| #define Foundation_Format_INCLUDED | | #define Foundation_Format_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include "Poco/Any.h" | | #include "Poco/Any.h" | |
| #include <vector> | | #include <vector> | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
End of changes. 5 change blocks. |
| 34 lines changed or deleted | | 32 lines changed or added | |
|
| Foundation.h | | Foundation.h | |
| // | | // | |
| // Foundation.h | | // Foundation.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Foundation.h#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Foundation.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Foundation | | // Module: Foundation | |
| // | | // | |
| // Basic definitions for the POCO Foundation library. | | // Basic definitions for the POCO Foundation library. | |
| // This file must be the first file included by every other Foundation | | // This file must be the first file included by every other Foundation | |
| // header file. | | // header file. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL
E | | // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL
E | |
| // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI
SE, | | // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI
SE, | |
| // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | |
| // DEALINGS IN THE SOFTWARE. | | // DEALINGS IN THE SOFTWARE. | |
| // | | // | |
| | | | |
| #ifndef Foundation_Foundation_INCLUDED | | #ifndef Foundation_Foundation_INCLUDED | |
| #define Foundation_Foundation_INCLUDED | | #define Foundation_Foundation_INCLUDED | |
| | | | |
| // | | // | |
|
| | | // Version Information | |
| | | // | |
| | | #define POCO_VERSION 0x01030600 | |
| | | | |
| | | // | |
| // Include library configuration | | // Include library configuration | |
| // | | // | |
| #include "Poco/Config.h" | | #include "Poco/Config.h" | |
| | | | |
| // | | // | |
| // Ensure that POCO_DLL is default unless POCO_STATIC is defined | | // Ensure that POCO_DLL is default unless POCO_STATIC is defined | |
| // | | // | |
| #if defined(_WIN32) && defined(_DLL) | | #if defined(_WIN32) && defined(_DLL) | |
| #if !defined(POCO_DLL) && !defined(POCO_STATIC) | | #if !defined(POCO_DLL) && !defined(POCO_STATIC) | |
| #define POCO_DLL | | #define POCO_DLL | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| Hash.h | | Hash.h | |
| // | | // | |
| // Hash.h | | // Hash.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Hash.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Hash.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Hashing | | // Package: Hashing | |
| // Module: Hash | | // Module: Hash | |
| // | | // | |
| // Definition of the Hash class. | | // Definition of the Hash class. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 46 | | skipping to change at line 46 | |
| // | | // | |
| | | | |
| #ifndef Foundation_Hash_INCLUDED | | #ifndef Foundation_Hash_INCLUDED | |
| #define Foundation_Hash_INCLUDED | | #define Foundation_Hash_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include <cstddef> | | #include <cstddef> | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
|
| template <class T> | | | |
| struct Hash | | | |
| /// A generic hash function. | | | |
| { | | | |
| std::size_t operator () (T value) const | | | |
| /// Returns the hash for the given value. | | | |
| { | | | |
| return hash(value); | | | |
| } | | | |
| }; | | | |
| | | | |
| std::size_t Foundation_API hash(Int8 n); | | std::size_t Foundation_API hash(Int8 n); | |
| std::size_t Foundation_API hash(UInt8 n); | | std::size_t Foundation_API hash(UInt8 n); | |
| std::size_t Foundation_API hash(Int16 n); | | std::size_t Foundation_API hash(Int16 n); | |
| std::size_t Foundation_API hash(UInt16 n); | | std::size_t Foundation_API hash(UInt16 n); | |
| std::size_t Foundation_API hash(Int32 n); | | std::size_t Foundation_API hash(Int32 n); | |
| std::size_t Foundation_API hash(UInt32 n); | | std::size_t Foundation_API hash(UInt32 n); | |
| std::size_t Foundation_API hash(Int64 n); | | std::size_t Foundation_API hash(Int64 n); | |
| std::size_t Foundation_API hash(UInt64 n); | | std::size_t Foundation_API hash(UInt64 n); | |
| std::size_t Foundation_API hash(const std::string& str); | | std::size_t Foundation_API hash(const std::string& str); | |
| | | | |
|
| | | template <class T> | |
| | | struct Hash | |
| | | /// A generic hash function. | |
| | | { | |
| | | std::size_t operator () (T value) const | |
| | | /// Returns the hash for the given value. | |
| | | { | |
| | | return Poco::hash(value); | |
| | | } | |
| | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline std::size_t hash(Int8 n) | | inline std::size_t hash(Int8 n) | |
| { | | { | |
| return static_cast<std::size_t>(n)*2654435761U; | | return static_cast<std::size_t>(n)*2654435761U; | |
| } | | } | |
| | | | |
| inline std::size_t hash(UInt8 n) | | inline std::size_t hash(UInt8 n) | |
| { | | { | |
| | | | |
End of changes. 3 change blocks. |
| 12 lines changed or deleted | | 12 lines changed or added | |
|
| HashFunction.h | | HashFunction.h | |
| // | | // | |
| // HashFunction.h | | // HashFunction.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/HashFunction.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/HashFunction.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Hashing | | // Package: Hashing | |
| // Module: HashFunction | | // Module: HashFunction | |
| // | | // | |
| // Definition of the HashFunction class. | | // Definition of the HashFunction class. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 54 | | skipping to change at line 54 | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| //@ deprecated | | //@ deprecated | |
| template <class T> | | template <class T> | |
| struct HashFunction | | struct HashFunction | |
| /// A generic hash function. | | /// A generic hash function. | |
| { | | { | |
| UInt32 operator () (T key, UInt32 maxValue) const | | UInt32 operator () (T key, UInt32 maxValue) const | |
| /// Returns the hash value for the given key. | | /// Returns the hash value for the given key. | |
| { | | { | |
|
| return ((UInt32) hash(key)) % maxValue; | | return static_cast<UInt32>(Poco::hash(key)) % maxValue; | |
| } | | } | |
| }; | | }; | |
| | | | |
| //@ deprecated | | //@ deprecated | |
| template <> | | template <> | |
| struct HashFunction<std::string> | | struct HashFunction<std::string> | |
| /// A generic hash function. | | /// A generic hash function. | |
| { | | { | |
| UInt32 operator () (const std::string& key, UInt32 maxValue) const | | UInt32 operator () (const std::string& key, UInt32 maxValue) const | |
| /// Returns the hash value for the given key. | | /// Returns the hash value for the given key. | |
| { | | { | |
|
| return ((UInt32) hash(key)) % maxValue; | | return static_cast<UInt32>(Poco::hash(key)) % maxValue; | |
| } | | } | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_HashFunctions_INCLUDED | | #endif // Foundation_HashFunctions_INCLUDED | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 3 lines changed or added | |
|
| ICMPEventArgs.h | | ICMPEventArgs.h | |
| // | | // | |
| // ICMPEventArgs.h | | // ICMPEventArgs.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/ICMPEventArgs.h#1 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/ICMPEventArgs.h#2 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: ICMP | | // Package: ICMP | |
| // Module: ICMPEventArgs | | // Module: ICMPEventArgs | |
| // | | // | |
| // Definition of ICMPEventArgs. | | // Definition of ICMPEventArgs. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | |
| // DEALINGS IN THE SOFTWARE. | | // DEALINGS IN THE SOFTWARE. | |
| // | | // | |
| | | | |
| #ifndef Net_ICMPEventArgs_INCLUDED | | #ifndef Net_ICMPEventArgs_INCLUDED | |
| #define Net_ICMPEventArgs_INCLUDED | | #define Net_ICMPEventArgs_INCLUDED | |
| | | | |
| #include "Poco/Net/Net.h" | | #include "Poco/Net/Net.h" | |
| #include "Poco/Net/SocketAddress.h" | | #include "Poco/Net/SocketAddress.h" | |
| #include <vector> | | #include <vector> | |
|
| #undef min // macros collide with valarray::min() and valarray::max() | | #include <algorithm> | |
| #undef max | | | |
| #include <valarray> | | | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| namespace Net { | | namespace Net { | |
| | | | |
| class Net_API ICMPEventArgs | | class Net_API ICMPEventArgs | |
| /// The purpose of the ICMPEventArgs class is to be used as template
parameter | | /// The purpose of the ICMPEventArgs class is to be used as template
parameter | |
| /// to instantiate event members in ICMPClient class. | | /// to instantiate event members in ICMPClient class. | |
| /// When clients register for an event notification, the reference t
o the class is | | /// When clients register for an event notification, the reference t
o the class is | |
| /// passed to the handler function to provide information about
the event. | | /// passed to the handler function to provide information about
the event. | |
| { | | { | |
| | | | |
| skipping to change at line 117 | | skipping to change at line 115 | |
| private: | | private: | |
| ICMPEventArgs(); | | ICMPEventArgs(); | |
| | | | |
| void setRepetitions(int repetitions); | | void setRepetitions(int repetitions); | |
| void setDataSize(int dataSize); | | void setDataSize(int dataSize); | |
| void setTTL(int ttl); | | void setTTL(int ttl); | |
| void setReplyTime(int index, int time); | | void setReplyTime(int index, int time); | |
| void setError(int index, const std::string& text); | | void setError(int index, const std::string& text); | |
| ICMPEventArgs& operator ++ (); | | ICMPEventArgs& operator ++ (); | |
| ICMPEventArgs operator ++ (int); | | ICMPEventArgs operator ++ (int); | |
|
| static int zeroVal(int n); | | | |
| | | | |
| SocketAddress _address; | | SocketAddress _address; | |
| int _sent; | | int _sent; | |
| int _dataSize; | | int _dataSize; | |
| int _ttl; | | int _ttl; | |
|
| std::valarray<int> _rtt; | | std::vector<int> _rtt; | |
| std::vector<std::string> _errors; | | std::vector<std::string> _errors; | |
| | | | |
| friend class ICMPClient; | | friend class ICMPClient; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline int ICMPEventArgs::repetitions() const | | inline int ICMPEventArgs::repetitions() const | |
| { | | { | |
| | | | |
| skipping to change at line 164 | | skipping to change at line 161 | |
| return _ttl; | | return _ttl; | |
| } | | } | |
| | | | |
| inline int ICMPEventArgs::sent() const | | inline int ICMPEventArgs::sent() const | |
| { | | { | |
| return _sent; | | return _sent; | |
| } | | } | |
| | | | |
| inline int ICMPEventArgs::minRTT() const | | inline int ICMPEventArgs::minRTT() const | |
| { | | { | |
|
| return _rtt.min(); | | return *std::min_element(_rtt.begin(), _rtt.end()); | |
| } | | } | |
| | | | |
| inline int ICMPEventArgs::maxRTT() const | | inline int ICMPEventArgs::maxRTT() const | |
| { | | { | |
|
| return _rtt.max(); | | return *std::max_element(_rtt.begin(), _rtt.end()); | |
| } | | } | |
| | | | |
| } } // namespace Poco::Net | | } } // namespace Poco::Net | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 8 lines changed or deleted | | 5 lines changed or added | |
|
| InflatingStream.h | | InflatingStream.h | |
| // | | // | |
| // InflatingStream.h | | // InflatingStream.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/InflatingStream.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/InflatingStream.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Streams | | // Package: Streams | |
| // Module: ZLibStream | | // Module: ZLibStream | |
| // | | // | |
| // Definition of the InflatingInputStream and InflatingOutputStream classes
. | | // Definition of the InflatingInputStream and InflatingOutputStream classes
. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 68 | |
| { | | { | |
| STREAM_ZLIB, | | STREAM_ZLIB, | |
| STREAM_GZIP, | | STREAM_GZIP, | |
| STREAM_ZIP // ZIP is handled as STREAM_ZLIB, except that we
do not check the ADLER32 value (must be checked by an outside class!) | | STREAM_ZIP // ZIP is handled as STREAM_ZLIB, except that we
do not check the ADLER32 value (must be checked by an outside class!) | |
| }; | | }; | |
| | | | |
| InflatingStreamBuf(std::istream& istr, StreamType type); | | InflatingStreamBuf(std::istream& istr, StreamType type); | |
| InflatingStreamBuf(std::ostream& ostr, StreamType type); | | InflatingStreamBuf(std::ostream& ostr, StreamType type); | |
| ~InflatingStreamBuf(); | | ~InflatingStreamBuf(); | |
| int close(); | | int close(); | |
|
| | | void reset(); | |
| | | | |
| protected: | | protected: | |
| int readFromDevice(char* buffer, std::streamsize length); | | int readFromDevice(char* buffer, std::streamsize length); | |
| int writeToDevice(const char* buffer, std::streamsize length); | | int writeToDevice(const char* buffer, std::streamsize length); | |
| | | | |
| private: | | private: | |
| enum | | enum | |
| { | | { | |
| STREAM_BUFFER_SIZE = 1024, | | STREAM_BUFFER_SIZE = 1024, | |
| INFLATE_BUFFER_SIZE = 32768 | | INFLATE_BUFFER_SIZE = 32768 | |
| | | | |
| skipping to change at line 107 | | skipping to change at line 108 | |
| ~InflatingIOS(); | | ~InflatingIOS(); | |
| InflatingStreamBuf* rdbuf(); | | InflatingStreamBuf* rdbuf(); | |
| | | | |
| protected: | | protected: | |
| InflatingStreamBuf _buf; | | InflatingStreamBuf _buf; | |
| }; | | }; | |
| | | | |
| class Foundation_API InflatingOutputStream: public InflatingIOS, public std
::ostream | | class Foundation_API InflatingOutputStream: public InflatingIOS, public std
::ostream | |
| /// This stream decompresses all data passing through it | | /// This stream decompresses all data passing through it | |
| /// using zlib's inflate algorithm. | | /// using zlib's inflate algorithm. | |
|
| | | /// | |
| /// After all data has been written to the stream, close() | | /// After all data has been written to the stream, close() | |
| /// must be called to ensure completion of decompression. | | /// must be called to ensure completion of decompression. | |
| { | | { | |
| public: | | public: | |
| InflatingOutputStream(std::ostream& ostr, InflatingStreamBuf::Stream
Type type = InflatingStreamBuf::STREAM_ZLIB); | | InflatingOutputStream(std::ostream& ostr, InflatingStreamBuf::Stream
Type type = InflatingStreamBuf::STREAM_ZLIB); | |
| ~InflatingOutputStream(); | | ~InflatingOutputStream(); | |
| int close(); | | int close(); | |
| }; | | }; | |
| | | | |
| class Foundation_API InflatingInputStream: public InflatingIOS, public std:
:istream | | class Foundation_API InflatingInputStream: public InflatingIOS, public std:
:istream | |
| /// This stream decompresses all data passing through it | | /// This stream decompresses all data passing through it | |
| /// using zlib's inflate algorithm. | | /// using zlib's inflate algorithm. | |
| /// Example: | | /// Example: | |
| /// std::ifstream istr("data.gz", std::ios::binary); | | /// std::ifstream istr("data.gz", std::ios::binary); | |
| /// InflatingInputStream inflater(istr, InflatingStreamBuf::STRE
AM_GZIP); | | /// InflatingInputStream inflater(istr, InflatingStreamBuf::STRE
AM_GZIP); | |
| /// std::string data; | | /// std::string data; | |
| /// istr >> data; | | /// istr >> data; | |
|
| | | /// | |
| | | /// The underlying input stream can contain more than one gzip/defla | |
| | | te stream. | |
| | | /// After a gzip/deflate stream has been processed, reset() can be c | |
| | | alled | |
| | | /// to inflate the next stream. | |
| { | | { | |
| public: | | public: | |
| InflatingInputStream(std::istream& istr, InflatingStreamBuf::StreamT
ype type = InflatingStreamBuf::STREAM_ZLIB); | | InflatingInputStream(std::istream& istr, InflatingStreamBuf::StreamT
ype type = InflatingStreamBuf::STREAM_ZLIB); | |
| ~InflatingInputStream(); | | ~InflatingInputStream(); | |
|
| | | void reset(); | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_InflatingStream_INCLUDED | | #endif // Foundation_InflatingStream_INCLUDED | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| Latin1Encoding.h | | Latin1Encoding.h | |
| // | | // | |
| // Latin1Encoding.h | | // Latin1Encoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Latin1Encoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Latin1Encoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: Latin1Encoding | | // Module: Latin1Encoding | |
| // | | // | |
| // Definition of the Latin1Encoding class. | | // Definition of the Latin1Encoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| /// ISO Latin-1 (8859-1) text encoding. | | /// ISO Latin-1 (8859-1) text encoding. | |
| { | | { | |
| public: | | public: | |
| Latin1Encoding(); | | Latin1Encoding(); | |
| ~Latin1Encoding(); | | ~Latin1Encoding(); | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| private: | | private: | |
| static const char* _names[]; | | static const char* _names[]; | |
| static const CharacterMap _charMap; | | static const CharacterMap _charMap; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Latin1Encoding_INCLUDED | | #endif // Foundation_Latin1Encoding_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| Latin9Encoding.h | | Latin9Encoding.h | |
| // | | // | |
| // Latin9Encoding.h | | // Latin9Encoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Latin9Encoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Latin9Encoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: Latin9Encoding | | // Module: Latin9Encoding | |
| // | | // | |
| // Definition of the Latin9Encoding class. | | // Definition of the Latin9Encoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| /// some other minor changes. | | /// some other minor changes. | |
| { | | { | |
| public: | | public: | |
| Latin9Encoding(); | | Latin9Encoding(); | |
| ~Latin9Encoding(); | | ~Latin9Encoding(); | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| private: | | private: | |
| static const char* _names[]; | | static const char* _names[]; | |
| static const CharacterMap _charMap; | | static const CharacterMap _charMap; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Latin9Encoding_INCLUDED | | #endif // Foundation_Latin9Encoding_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| LocalDateTime.h | | LocalDateTime.h | |
| // | | // | |
| // LocalDateTime.h | | // LocalDateTime.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/LocalDateTime.h#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/LocalDateTime.h#6 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: LocalDateTime | | // Module: LocalDateTime | |
| // | | // | |
| // Definition of the LocalDateTime class. | | // Definition of the LocalDateTime class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 78 | |
| /// since the time zone is unknown. Each of the constructors | | /// since the time zone is unknown. Each of the constructors | |
| /// accepting a tzd parameter have been marked as deprecated and | | /// accepting a tzd parameter have been marked as deprecated and | |
| /// may be removed in a future revision. | | /// may be removed in a future revision. | |
| { | | { | |
| public: | | public: | |
| LocalDateTime(); | | LocalDateTime(); | |
| /// Creates a LocalDateTime with the current date/time | | /// Creates a LocalDateTime with the current date/time | |
| /// for the current time zone. | | /// for the current time zone. | |
| | | | |
| LocalDateTime(int year, int month, int day, int hour = 0, int minute
= 0, int second = 0, int millisecond = 0, int microsecond = 0); | | LocalDateTime(int year, int month, int day, int hour = 0, int minute
= 0, int second = 0, int millisecond = 0, int microsecond = 0); | |
|
| /// Creates a DateTime for the given Gregorian local date an
d time. | | /// Creates a LocalDateTime for the given Gregorian local da
te and time. | |
| /// * year is from 0 to 9999. | | /// * year is from 0 to 9999. | |
| /// * month is from 1 to 12. | | /// * month is from 1 to 12. | |
| /// * day is from 1 to 31. | | /// * day is from 1 to 31. | |
| /// * hour is from 0 to 23. | | /// * hour is from 0 to 23. | |
| /// * minute is from 0 to 59. | | /// * minute is from 0 to 59. | |
| /// * second is from 0 to 59. | | /// * second is from 0 to 59. | |
| /// * millisecond is from 0 to 999. | | /// * millisecond is from 0 to 999. | |
| /// * microsecond is from 0 to 999. | | /// * microsecond is from 0 to 999. | |
| | | | |
| //@ deprecated | | //@ deprecated | |
| LocalDateTime(int tzd, int year, int month, int day, int hour, int m
inute, int second, int millisecond, int microsecond); | | LocalDateTime(int tzd, int year, int month, int day, int hour, int m
inute, int second, int millisecond, int microsecond); | |
|
| /// Creates a DateTime for the given Gregorian date and time
in the | | /// Creates a LocalDateTime for the given Gregorian date and
time in the | |
| /// time zone denoted by the time zone differential in tzd. | | /// time zone denoted by the time zone differential in tzd. | |
| /// * tzd is in seconds. | | /// * tzd is in seconds. | |
| /// * year is from 0 to 9999. | | /// * year is from 0 to 9999. | |
| /// * month is from 1 to 12. | | /// * month is from 1 to 12. | |
| /// * day is from 1 to 31. | | /// * day is from 1 to 31. | |
| /// * hour is from 0 to 23. | | /// * hour is from 0 to 23. | |
| /// * minute is from 0 to 59. | | /// * minute is from 0 to 59. | |
| /// * second is from 0 to 59. | | /// * second is from 0 to 59. | |
| /// * millisecond is from 0 to 999. | | /// * millisecond is from 0 to 999. | |
| /// * microsecond is from 0 to 999. | | /// * microsecond is from 0 to 999. | |
| | | | |
| skipping to change at line 268 | | skipping to change at line 268 | |
| | | | |
| void determineTzd(bool adjust = false); | | void determineTzd(bool adjust = false); | |
| /// Recalculate the tzd based on the _dateTime member based | | /// Recalculate the tzd based on the _dateTime member based | |
| /// on the current timezone using the Standard C runtime fun
ctions. | | /// on the current timezone using the Standard C runtime fun
ctions. | |
| /// If adjust is true, then adjustForTzd() is called after t
he | | /// If adjust is true, then adjustForTzd() is called after t
he | |
| /// differential is calculated. | | /// differential is calculated. | |
| | | | |
| void adjustForTzd(); | | void adjustForTzd(); | |
| /// Adjust the _dateTime member based on the _tzd member. | | /// Adjust the _dateTime member based on the _tzd member. | |
| | | | |
|
| | | std::time_t dstOffset(int& dstOffset) const; | |
| | | /// Determine the DST offset for the current date/time. | |
| | | | |
| private: | | private: | |
| DateTime _dateTime; | | DateTime _dateTime; | |
| int _tzd; | | int _tzd; | |
| | | | |
| friend class DateTimeFormatter; | | friend class DateTimeFormatter; | |
| friend class DateTimeParser; | | friend class DateTimeParser; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 6 lines changed or added | |
|
| Logger.h | | Logger.h | |
| // | | // | |
| // Logger.h | | // Logger.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Logger.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Logger.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Logging | | // Package: Logging | |
| // Module: Logger | | // Module: Logger | |
| // | | // | |
| // Definition of the Logger class. | | // Definition of the Logger class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 320 | | skipping to change at line 320 | |
| int _level; | | int _level; | |
| | | | |
| static LoggerMap* _pLoggerMap; | | static LoggerMap* _pLoggerMap; | |
| static Mutex _mapMtx; | | static Mutex _mapMtx; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // convenience macros | | // convenience macros | |
| // | | // | |
| #define poco_fatal(logger, msg) \ | | #define poco_fatal(logger, msg) \ | |
|
| if ((logger).fatal()) (logger).fatal(msg) else (void) 0 | | if ((logger).fatal()) (logger).fatal(msg); else (void) 0 | |
| | | | |
| #define poco_critical(logger, msg) \ | | #define poco_critical(logger, msg) \ | |
|
| if ((logger).critical()) (logger).critical(msg) else (void) 0 | | if ((logger).critical()) (logger).critical(msg); else (void) 0 | |
| | | | |
| #define poco_error(logger, msg) \ | | #define poco_error(logger, msg) \ | |
|
| if ((logger).error()) (logger).error(msg) else (void) 0 | | if ((logger).error()) (logger).error(msg); else (void) 0 | |
| | | | |
| #define poco_warning(logger, msg) \ | | #define poco_warning(logger, msg) \ | |
|
| if ((logger).warning()) (logger).warning(msg) else (void) 0 | | if ((logger).warning()) (logger).warning(msg); else (void) 0 | |
| | | | |
| #define poco_notice(logger, msg) \ | | #define poco_notice(logger, msg) \ | |
|
| if ((logger).notice()) (logger).notice(msg) else (void) 0 | | if ((logger).notice()) (logger).notice(msg); else (void) 0 | |
| | | | |
| #define poco_information(logger, msg) \ | | #define poco_information(logger, msg) \ | |
|
| if ((logger).information()) (logger).information(msg) else (void) 0 | | if ((logger).information()) (logger).information(msg); else (void) 0 | |
| | | | |
| #if defined(_DEBUG) | | #if defined(_DEBUG) | |
| #define poco_debug(logger, msg) \ | | #define poco_debug(logger, msg) \ | |
|
| if ((logger).debug()) (logger).debug(msg) else (void) 0 | | if ((logger).debug()) (logger).debug(msg); else (void) 0 | |
| | | | |
| #define poco_trace(logger, msg) \ | | #define poco_trace(logger, msg) \ | |
|
| if ((logger).trace()) (logger).trace(msg) else (void) 0 | | if ((logger).trace()) (logger).trace(msg); else (void) 0 | |
| #else | | #else | |
| #define poco_debug(logger, msg) | | #define poco_debug(logger, msg) | |
| #define poco_trace(logger, msg) | | #define poco_trace(logger, msg) | |
| #endif | | #endif | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline const std::string& Logger::name() const | | inline const std::string& Logger::name() const | |
| { | | { | |
| | | | |
End of changes. 9 change blocks. |
| 9 lines changed or deleted | | 9 lines changed or added | |
|
| MailMessage.h | | MailMessage.h | |
| // | | // | |
| // MailMessage.h | | // MailMessage.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/MailMessage.h#2 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/MailMessage.h#3 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Mail | | // Package: Mail | |
| // Module: MailMessage | | // Module: MailMessage | |
| // | | // | |
| // Definition of the MailMessage class. | | // Definition of the MailMessage class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 98 | | skipping to change at line 98 | |
| /// Destroys the MailMessage. | | /// Destroys the MailMessage. | |
| | | | |
| void addRecipient(const MailRecipient& recipient); | | void addRecipient(const MailRecipient& recipient); | |
| /// Adds a recipient for the message. | | /// Adds a recipient for the message. | |
| | | | |
| const Recipients& recipients() const; | | const Recipients& recipients() const; | |
| /// Returns the recipients of the message. | | /// Returns the recipients of the message. | |
| | | | |
| void setSubject(const std::string& subject); | | void setSubject(const std::string& subject); | |
| /// Sets the subject of the message. | | /// Sets the subject of the message. | |
|
| | | /// | |
| | | /// The subject must not contain any non-ASCII | |
| | | /// characters. To include non-ASCII characters | |
| | | /// in the subject, use RFC 2047 word encoding | |
| | | /// (see encodeWord()). | |
| | | | |
| const std::string& getSubject() const; | | const std::string& getSubject() const; | |
| /// Returns the subject of the message. | | /// Returns the subject of the message. | |
| | | | |
| void setSender(const std::string& sender); | | void setSender(const std::string& sender); | |
| /// Sets the sender of the message (which | | /// Sets the sender of the message (which | |
| /// ends up in the From header field). | | /// ends up in the From header field). | |
| /// | | /// | |
| /// The sender must either be a valid email | | /// The sender must either be a valid email | |
| /// address, or a real name followed by | | /// address, or a real name followed by | |
| /// an email address enclosed in < and >. | | /// an email address enclosed in < and >. | |
|
| | | /// | |
| | | /// The sender must not contain any non-ASCII | |
| | | /// characters. To include non-ASCII characters | |
| | | /// in the sender, use RFC 2047 word encoding | |
| | | /// (see encodeWord()). | |
| | | | |
| const std::string& getSender() const; | | const std::string& getSender() const; | |
| /// Returns the sender of the message (taken | | /// Returns the sender of the message (taken | |
| /// from the From header field). | | /// from the From header field). | |
| | | | |
| void setContent(const std::string& content, ContentTransferEncoding
encoding = ENCODING_QUOTED_PRINTABLE); | | void setContent(const std::string& content, ContentTransferEncoding
encoding = ENCODING_QUOTED_PRINTABLE); | |
| /// Sets the content of the mail message. | | /// Sets the content of the mail message. | |
| /// | | /// | |
| /// If the content transfer encoding is ENCODING_7BIT or | | /// If the content transfer encoding is ENCODING_7BIT or | |
| /// ENCODING_8BIT, the content string must be formatted | | /// ENCODING_8BIT, the content string must be formatted | |
| | | | |
| skipping to change at line 183 | | skipping to change at line 193 | |
| | | | |
| void read(std::istream& istr); | | void read(std::istream& istr); | |
| /// Reads the MailMessage from the given input stream. | | /// Reads the MailMessage from the given input stream. | |
| /// | | /// | |
| /// The raw message (including all MIME parts) is stored | | /// The raw message (including all MIME parts) is stored | |
| /// in a string and available by calling getContent(). | | /// in a string and available by calling getContent(). | |
| | | | |
| void write(std::ostream& ostr) const; | | void write(std::ostream& ostr) const; | |
| /// Writes the mail message to the given output stream. | | /// Writes the mail message to the given output stream. | |
| | | | |
|
| | | static std::string encodeWord(const std::string& text, const std::st | |
| | | ring& charset = "UTF-8"); | |
| | | /// If the given string contains non-ASCII characters, | |
| | | /// encodes the given string using RFC 2047 "Q" word encodin | |
| | | g. | |
| | | /// | |
| | | /// The given text must already be encoded in the character | |
| | | set | |
| | | /// given in charset (default is UTF-8). | |
| | | /// | |
| | | /// Returns the encoded string, or the original string if it | |
| | | /// consists only of ASCII characters. | |
| | | | |
| protected: | | protected: | |
| struct Part | | struct Part | |
| { | | { | |
| std::string name; | | std::string name; | |
| PartSource* pSource; | | PartSource* pSource; | |
| ContentDisposition disposition; | | ContentDisposition disposition; | |
| ContentTransferEncoding encoding; | | ContentTransferEncoding encoding; | |
| }; | | }; | |
| typedef std::vector<Part> PartVec; | | typedef std::vector<Part> PartVec; | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 1 lines changed or deleted | | 24 lines changed or added | |
|
| Net.h | | Net.h | |
| // | | // | |
| // Net.h | | // Net.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/Net.h#2 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/Net.h#3 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: NetCore | | // Package: NetCore | |
| // Module: IPAddress | | // Module: IPAddress | |
| // | | // | |
| // Basic definitions for the Poco Net library. | | // Basic definitions for the Poco Net library. | |
| // This file must be the first file included by every other Net | | // This file must be the first file included by every other Net | |
| // header file. | | // header file. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| | | | |
| skipping to change at line 86 | | skipping to change at line 86 | |
| #else | | #else | |
| #if defined(_DEBUG) | | #if defined(_DEBUG) | |
| #pragma comment(lib, "PocoNetmtd.lib") | | #pragma comment(lib, "PocoNetmtd.lib") | |
| #else | | #else | |
| #pragma comment(lib, "PocoNetmt.lib") | | #pragma comment(lib, "PocoNetmt.lib") | |
| #endif | | #endif | |
| #endif | | #endif | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
|
| | | namespace Poco { | |
| | | namespace Net { | |
| | | | |
| | | void initializeNetwork(); | |
| | | /// Initialize the network subsystem. | |
| | | /// Calls WSAStartup() on Windows, does nothing | |
| | | /// on other platforms. | |
| | | | |
| | | void uninitializeNetwork(); | |
| | | /// Uninitialize the network subsystem. | |
| | | /// Calls WSACleanup() on Windows, does nothing | |
| | | /// on other platforms. | |
| | | | |
| | | } } // namespace Poco::Net | |
| | | | |
| #endif // Net_Net_INCLUDED | | #endif // Net_Net_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 16 lines changed or added | |
|
| NotificationCenter.h | | NotificationCenter.h | |
| // | | // | |
| // NotificationCenter.h | | // NotificationCenter.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/NotificationCenter.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/NotificationCenter.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Notifications | | // Package: Notifications | |
| // Module: NotificationCenter | | // Module: NotificationCenter | |
| // | | // | |
| // Definition of the NotificationCenter class. | | // Definition of the NotificationCenter class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 44 | | skipping to change at line 44 | |
| // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
HER | |
| // DEALINGS IN THE SOFTWARE. | | // DEALINGS IN THE SOFTWARE. | |
| // | | // | |
| | | | |
| #ifndef Foundation_NotificationCenter_INCLUDED | | #ifndef Foundation_NotificationCenter_INCLUDED | |
| #define Foundation_NotificationCenter_INCLUDED | | #define Foundation_NotificationCenter_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include "Poco/Notification.h" | | #include "Poco/Notification.h" | |
| #include "Poco/Mutex.h" | | #include "Poco/Mutex.h" | |
|
| #include <list> | | #include "Poco/SharedPtr.h" | |
| | | #include <vector> | |
| | | #include <cstddef> | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class AbstractObserver; | | class AbstractObserver; | |
| | | | |
| class Foundation_API NotificationCenter | | class Foundation_API NotificationCenter | |
| /// A NotificationCenter is essentially a notification dispatcher. | | /// A NotificationCenter is essentially a notification dispatcher. | |
| /// It notifies all observers of notifications meeting specific crit
eria. | | /// It notifies all observers of notifications meeting specific crit
eria. | |
| /// This information is encapsulated in Notification objects. | | /// This information is encapsulated in Notification objects. | |
| /// Client objects register themselves with the notification center
as observers of | | /// Client objects register themselves with the notification center
as observers of | |
| | | | |
| skipping to change at line 132 | | skipping to change at line 134 | |
| /// a call like | | /// a call like | |
| /// notificationCenter.postNotification(new MyNotificatio
n); | | /// notificationCenter.postNotification(new MyNotificatio
n); | |
| /// does not result in a memory leak. | | /// does not result in a memory leak. | |
| | | | |
| bool hasObservers() const; | | bool hasObservers() const; | |
| /// Returns true iff there is at least one registered observ
er. | | /// Returns true iff there is at least one registered observ
er. | |
| /// | | /// | |
| /// Can be used to improve performance if an expensive notif
ication | | /// Can be used to improve performance if an expensive notif
ication | |
| /// shall only be created and posted if there are any observ
ers. | | /// shall only be created and posted if there are any observ
ers. | |
| | | | |
|
| | | std::size_t countObservers() const; | |
| | | /// Returns the number of registered observers. | |
| | | | |
| static NotificationCenter& defaultCenter(); | | static NotificationCenter& defaultCenter(); | |
| /// Returns a reference to the default | | /// Returns a reference to the default | |
| /// NotificationCenter. | | /// NotificationCenter. | |
| | | | |
| private: | | private: | |
|
| typedef std::list<AbstractObserver*> ObserverList; | | typedef Poco::SharedPtr<AbstractObserver> AbstractObserverPtr; | |
| | | typedef std::vector<AbstractObserverPtr> ObserverList; | |
| | | | |
| ObserverList _observers; | | ObserverList _observers; | |
| mutable Mutex _mutex; | | mutable Mutex _mutex; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_NotificationCenter_INCLUDED | | #endif // Foundation_NotificationCenter_INCLUDED | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 9 lines changed or added | |
|
| ParserEngine.h | | ParserEngine.h | |
| // | | // | |
| // ParserEngine.h | | // ParserEngine.h | |
| // | | // | |
|
| // $Id: //poco/1.3/XML/include/Poco/XML/ParserEngine.h#2 $ | | // $Id: //poco/1.3/XML/include/Poco/XML/ParserEngine.h#3 $ | |
| // | | // | |
| // Library: XML | | // Library: XML | |
| // Package: XML | | // Package: XML | |
| // Module: ParserEngine | | // Module: ParserEngine | |
| // | | // | |
| // Definition of the ParseEngine class. | | // Definition of the ParseEngine class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 159 | |
| | | | |
| LexicalHandler* getLexicalHandler() const; | | LexicalHandler* getLexicalHandler() const; | |
| /// Return the current lexical handler. | | /// Return the current lexical handler. | |
| | | | |
| void setErrorHandler(ErrorHandler* pErrorHandler); | | void setErrorHandler(ErrorHandler* pErrorHandler); | |
| /// Allow an application to register an error event handler. | | /// Allow an application to register an error event handler. | |
| | | | |
| ErrorHandler* getErrorHandler() const; | | ErrorHandler* getErrorHandler() const; | |
| /// Return the current error handler. | | /// Return the current error handler. | |
| | | | |
|
| | | void setEnablePartialReads(bool flag = true); | |
| | | /// Enable or disable partial reads from the input source. | |
| | | /// | |
| | | /// This is useful for parsing XML from a socket stream for | |
| | | /// a protocol like XMPP, where basically single elements | |
| | | /// are read one at a time from the input source's stream, a | |
| | | nd | |
| | | /// following elements depend upon responses sent back to | |
| | | /// the peer. | |
| | | /// | |
| | | /// Normally, the parser always reads blocks of PARSE_BUFFER | |
| | | _SIZE | |
| | | /// at a time, and blocks until a complete block has been re | |
| | | ad (or | |
| | | /// the end of the stream has been reached). | |
| | | /// This allows for efficient parsing of "complete" XML docu | |
| | | ments, | |
| | | /// but fails in a case such as XMPP, where only XML fragmen | |
| | | ts | |
| | | /// are sent at a time. | |
| | | | |
| | | bool getEnablePartialReads() const; | |
| | | /// Returns true if partial reads are enabled (see | |
| | | /// setEnablePartialReads()), false otherwise. | |
| | | | |
| void parse(InputSource* pInputSource); | | void parse(InputSource* pInputSource); | |
| /// Parse an XML document from the given InputSource. | | /// Parse an XML document from the given InputSource. | |
| | | | |
| void parse(const char* pBuffer, std::size_t size); | | void parse(const char* pBuffer, std::size_t size); | |
| /// Parses an XML document from the given buffer. | | /// Parses an XML document from the given buffer. | |
| | | | |
| // Locator | | // Locator | |
| XMLString getPublicId() const; | | XMLString getPublicId() const; | |
| /// Return the public identifier for the current document ev
ent. | | /// Return the public identifier for the current document ev
ent. | |
| | | | |
| | | | |
| skipping to change at line 188 | | skipping to change at line 208 | |
| protected: | | protected: | |
| void init(); | | void init(); | |
| /// initializes expat | | /// initializes expat | |
| | | | |
| void parseByteInputStream(XMLByteInputStream& istr); | | void parseByteInputStream(XMLByteInputStream& istr); | |
| /// Parses an entity from the given stream. | | /// Parses an entity from the given stream. | |
| | | | |
| void parseCharInputStream(XMLCharInputStream& istr); | | void parseCharInputStream(XMLCharInputStream& istr); | |
| /// Parses an entity from the given stream. | | /// Parses an entity from the given stream. | |
| | | | |
|
| | | std::streamsize readBytes(XMLByteInputStream& istr, char* pBuffer, s | |
| | | td::streamsize bufferSize); | |
| | | /// Reads at most bufferSize bytes from the given stream int | |
| | | o the given buffer. | |
| | | | |
| | | std::streamsize readChars(XMLCharInputStream& istr, XMLChar* pBuffer | |
| | | , std::streamsize bufferSize); | |
| | | /// Reads at most bufferSize chars from the given stream int | |
| | | o the given buffer. | |
| | | | |
| void handleError(int errorNo); | | void handleError(int errorNo); | |
| /// Throws an XMLException with a message corresponding | | /// Throws an XMLException with a message corresponding | |
| /// to the given Expat error code. | | /// to the given Expat error code. | |
| | | | |
| void parseExternal(XML_Parser extParser, InputSource* pInputSource); | | void parseExternal(XML_Parser extParser, InputSource* pInputSource); | |
| /// Parse an XML document from the given InputSource. | | /// Parse an XML document from the given InputSource. | |
| | | | |
| void parseExternalByteInputStream(XML_Parser extParser, XMLByteInput
Stream& istr); | | void parseExternalByteInputStream(XML_Parser extParser, XMLByteInput
Stream& istr); | |
| /// Parses an external entity from the given stream, with a
separate parser. | | /// Parses an external entity from the given stream, with a
separate parser. | |
| | | | |
| | | | |
| skipping to change at line 250 | | skipping to change at line 276 | |
| typedef std::map<XMLString, Poco::TextEncoding*> EncodingMap; | | typedef std::map<XMLString, Poco::TextEncoding*> EncodingMap; | |
| typedef std::vector<ContextLocator*> ContextStack; | | typedef std::vector<ContextLocator*> ContextStack; | |
| | | | |
| XML_Parser _parser; | | XML_Parser _parser; | |
| char* _pBuffer; | | char* _pBuffer; | |
| bool _encodingSpecified; | | bool _encodingSpecified; | |
| XMLString _encoding; | | XMLString _encoding; | |
| bool _expandInternalEntities; | | bool _expandInternalEntities; | |
| bool _externalGeneralEntities; | | bool _externalGeneralEntities; | |
| bool _externalParameterEntities; | | bool _externalParameterEntities; | |
|
| | | bool _enablePartialReads; | |
| NamespaceStrategy* _pNamespaceStrategy; | | NamespaceStrategy* _pNamespaceStrategy; | |
| EncodingMap _encodings; | | EncodingMap _encodings; | |
| ContextStack _context; | | ContextStack _context; | |
| | | | |
| EntityResolver* _pEntityResolver; | | EntityResolver* _pEntityResolver; | |
| DTDHandler* _pDTDHandler; | | DTDHandler* _pDTDHandler; | |
| DeclHandler* _pDeclHandler; | | DeclHandler* _pDeclHandler; | |
| ContentHandler* _pContentHandler; | | ContentHandler* _pContentHandler; | |
| LexicalHandler* _pLexicalHandler; | | LexicalHandler* _pLexicalHandler; | |
| ErrorHandler* _pErrorHandler; | | ErrorHandler* _pErrorHandler; | |
| | | | |
| skipping to change at line 323 | | skipping to change at line 350 | |
| inline LexicalHandler* ParserEngine::getLexicalHandler() const | | inline LexicalHandler* ParserEngine::getLexicalHandler() const | |
| { | | { | |
| return _pLexicalHandler; | | return _pLexicalHandler; | |
| } | | } | |
| | | | |
| inline ErrorHandler* ParserEngine::getErrorHandler() const | | inline ErrorHandler* ParserEngine::getErrorHandler() const | |
| { | | { | |
| return _pErrorHandler; | | return _pErrorHandler; | |
| } | | } | |
| | | | |
|
| | | inline bool ParserEngine::getEnablePartialReads() const | |
| | | { | |
| | | return _enablePartialReads; | |
| | | } | |
| | | | |
| } } // namespace Poco::XML | | } } // namespace Poco::XML | |
| | | | |
| #endif // XML_ParserEngine_INCLUDED | | #endif // XML_ParserEngine_INCLUDED | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 42 lines changed or added | |
|
| PriorityNotificationQueue.h | | PriorityNotificationQueue.h | |
| // | | // | |
| // PriorityNotificationQueue.h | | // PriorityNotificationQueue.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/PriorityNotificationQueue.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/PriorityNotificationQueue.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Notifications | | // Package: Notifications | |
| // Module: PriorityNotificationQueue | | // Module: PriorityNotificationQueue | |
| // | | // | |
| // Definition of the PriorityNotificationQueue class. | | // Definition of the PriorityNotificationQueue class. | |
| // | | // | |
| // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 111 | | skipping to change at line 111 | |
| /// It is highly recommended that the result is immediately | | /// It is highly recommended that the result is immediately | |
| /// assigned to a Notification::Ptr, to avoid potential | | /// assigned to a Notification::Ptr, to avoid potential | |
| /// memory management issues. | | /// memory management issues. | |
| | | | |
| Notification* waitDequeueNotification(); | | Notification* waitDequeueNotification(); | |
| /// Dequeues the next pending notification. | | /// Dequeues the next pending notification. | |
| /// If no notification is available, waits for a notificatio
n | | /// If no notification is available, waits for a notificatio
n | |
| /// to be enqueued. | | /// to be enqueued. | |
| /// The caller gains ownership of the notification and | | /// The caller gains ownership of the notification and | |
| /// is expected to release it when done with it. | | /// is expected to release it when done with it. | |
|
| /// This method returns 0 (null) if wakeUpWaitingThreads() | | /// This method returns 0 (null) if wakeUpAll() | |
| /// has been called by another thread. | | /// has been called by another thread. | |
| /// | | /// | |
| /// It is highly recommended that the result is immediately | | /// It is highly recommended that the result is immediately | |
| /// assigned to a Notification::Ptr, to avoid potential | | /// assigned to a Notification::Ptr, to avoid potential | |
| /// memory management issues. | | /// memory management issues. | |
| | | | |
| Notification* waitDequeueNotification(long milliseconds); | | Notification* waitDequeueNotification(long milliseconds); | |
| /// Dequeues the next pending notification. | | /// Dequeues the next pending notification. | |
| /// If no notification is available, waits for a notificatio
n | | /// If no notification is available, waits for a notificatio
n | |
| /// to be enqueued up to the specified time. | | /// to be enqueued up to the specified time. | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| Process.h | | Process.h | |
| // | | // | |
| // Process.h | | // Process.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Process.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Process.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Processes | | // Package: Processes | |
| // Module: Process | | // Module: Process | |
| // | | // | |
| // Definition of the Process class. | | // Definition of the Process class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 135 | | skipping to change at line 135 | |
| /// | | /// | |
| /// After a Pipe has been passed as inPipe, only write opera
tions | | /// After a Pipe has been passed as inPipe, only write opera
tions | |
| /// are valid. After a Pipe has been passed as outPipe or er
rPipe, | | /// are valid. After a Pipe has been passed as outPipe or er
rPipe, | |
| /// only read operations are valid. | | /// only read operations are valid. | |
| /// | | /// | |
| /// It is forbidden to pass the same pipe as inPipe and outP
ipe or errPipe. | | /// It is forbidden to pass the same pipe as inPipe and outP
ipe or errPipe. | |
| /// | | /// | |
| /// Usage example: | | /// Usage example: | |
| /// Pipe outPipe; | | /// Pipe outPipe; | |
| /// Process::Args args; | | /// Process::Args args; | |
|
| /// ProcessHandle ph(launch("/bin/ps", args, &outPipe, 0
, 0)); | | /// ProcessHandle ph(launch("/bin/ps", args, 0, &outPipe
, 0)); | |
| /// PipeInputStream istr(outPipe); | | /// PipeInputStream istr(outPipe); | |
| /// ... // read output of ps from istr | | /// ... // read output of ps from istr | |
| /// int rc = ph.wait(); | | /// int rc = ph.wait(); | |
| | | | |
| static int wait(const ProcessHandle& handle); | | static int wait(const ProcessHandle& handle); | |
| /// Waits for the process specified by handle to terminate | | /// Waits for the process specified by handle to terminate | |
| /// and returns the exit code of the process. | | /// and returns the exit code of the process. | |
| | | | |
| static void kill(PID pid); | | static void kill(PID pid); | |
| /// Kills the process with the given pid. | | /// Kills the process with the given pid. | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| RWLock.h | | RWLock.h | |
| // | | // | |
| // RWLock.h | | // RWLock.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/RWLock.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/RWLock.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: RWLock | | // Module: RWLock | |
| // | | // | |
| // Definition of the RWLock class. | | // Definition of the RWLock class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| | | | |
| #if defined(POCO_OS_FAMILY_WINDOWS) | | #if defined(POCO_OS_FAMILY_WINDOWS) | |
| #include "Poco/RWLock_WIN32.h" | | #include "Poco/RWLock_WIN32.h" | |
| #else | | #else | |
| #include "Poco/RWLock_POSIX.h" | | #include "Poco/RWLock_POSIX.h" | |
| #endif | | #endif | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class ScopedRWLock; | | class ScopedRWLock; | |
|
| | | class ScopedReadRWLock; | |
| | | class ScopedWriteRWLock; | |
| | | | |
| class Foundation_API RWLock: private RWLockImpl | | class Foundation_API RWLock: private RWLockImpl | |
| /// A reader writer lock allows multiple concurrent | | /// A reader writer lock allows multiple concurrent | |
| /// readers or one exclusive writer. | | /// readers or one exclusive writer. | |
| { | | { | |
| public: | | public: | |
| typedef ScopedRWLock ScopedLock; | | typedef ScopedRWLock ScopedLock; | |
|
| | | typedef ScopedReadRWLock ScopedReadLock; | |
| | | typedef ScopedWriteRWLock ScopedWriteLock; | |
| | | | |
| RWLock(); | | RWLock(); | |
| /// Creates the Reader/Writer lock. | | /// Creates the Reader/Writer lock. | |
| | | | |
| ~RWLock(); | | ~RWLock(); | |
| /// Destroys the Reader/Writer lock. | | /// Destroys the Reader/Writer lock. | |
| | | | |
| void readLock(); | | void readLock(); | |
| /// Acquires a read lock. If another thread currently holds
a write lock, | | /// Acquires a read lock. If another thread currently holds
a write lock, | |
| /// waits until the write lock is released. | | /// waits until the write lock is released. | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 113 | |
| ~ScopedRWLock(); | | ~ScopedRWLock(); | |
| | | | |
| private: | | private: | |
| RWLock& _rwl; | | RWLock& _rwl; | |
| | | | |
| ScopedRWLock(); | | ScopedRWLock(); | |
| ScopedRWLock(const ScopedRWLock&); | | ScopedRWLock(const ScopedRWLock&); | |
| ScopedRWLock& operator = (const ScopedRWLock&); | | ScopedRWLock& operator = (const ScopedRWLock&); | |
| }; | | }; | |
| | | | |
|
| | | class Foundation_API ScopedReadRWLock : public ScopedRWLock | |
| | | /// A variant of ScopedLock for reader locks. | |
| | | { | |
| | | public: | |
| | | ScopedReadRWLock(RWLock& rwl); | |
| | | ~ScopedReadRWLock(); | |
| | | }; | |
| | | | |
| | | class Foundation_API ScopedWriteRWLock : public ScopedRWLock | |
| | | /// A variant of ScopedLock for writer locks. | |
| | | { | |
| | | public: | |
| | | ScopedWriteRWLock(RWLock& rwl); | |
| | | ~ScopedWriteRWLock(); | |
| | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline void RWLock::readLock() | | inline void RWLock::readLock() | |
| { | | { | |
| readLockImpl(); | | readLockImpl(); | |
| } | | } | |
| | | | |
| inline bool RWLock::tryReadLock() | | inline bool RWLock::tryReadLock() | |
| { | | { | |
| | | | |
| skipping to change at line 150 | | skipping to change at line 170 | |
| _rwl.writeLock(); | | _rwl.writeLock(); | |
| else | | else | |
| _rwl.readLock(); | | _rwl.readLock(); | |
| } | | } | |
| | | | |
| inline ScopedRWLock::~ScopedRWLock() | | inline ScopedRWLock::~ScopedRWLock() | |
| { | | { | |
| _rwl.unlock(); | | _rwl.unlock(); | |
| } | | } | |
| | | | |
|
| | | inline ScopedReadRWLock::ScopedReadRWLock(RWLock& rwl): ScopedRWLock(rwl, f | |
| | | alse) | |
| | | { | |
| | | } | |
| | | | |
| | | inline ScopedReadRWLock::~ScopedReadRWLock() | |
| | | { | |
| | | } | |
| | | | |
| | | inline ScopedWriteRWLock::ScopedWriteRWLock(RWLock& rwl): ScopedRWLock(rwl, | |
| | | true) | |
| | | { | |
| | | } | |
| | | | |
| | | inline ScopedWriteRWLock::~ScopedWriteRWLock() | |
| | | { | |
| | | } | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_RWLock_INCLUDED | | #endif // Foundation_RWLock_INCLUDED | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 39 lines changed or added | |
|
| SAXParser.h | | SAXParser.h | |
| // | | // | |
| // SAXParser.h | | // SAXParser.h | |
| // | | // | |
|
| // $Id: //poco/1.3/XML/include/Poco/SAX/SAXParser.h#2 $ | | // $Id: //poco/1.3/XML/include/Poco/SAX/SAXParser.h#3 $ | |
| // | | // | |
| // Library: XML | | // Library: XML | |
| // Package: SAX | | // Package: SAX | |
| // Module: SAX | | // Module: SAX | |
| // | | // | |
| // Implementation of the XMLReader interface. | | // Implementation of the XMLReader interface. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 58 | |
| class XML_API SAXParser: public XMLReader | | class XML_API SAXParser: public XMLReader | |
| /// This class provides a SAX2 (Simple API for XML) interface to exp
at, | | /// This class provides a SAX2 (Simple API for XML) interface to exp
at, | |
| /// the XML parser toolkit. | | /// the XML parser toolkit. | |
| /// The following SAX2 features and properties are supported: | | /// The following SAX2 features and properties are supported: | |
| /// * http://xml.org/sax/features/external-general-entities | | /// * http://xml.org/sax/features/external-general-entities | |
| /// * http://xml.org/sax/features/external-parameter-entities | | /// * http://xml.org/sax/features/external-parameter-entities | |
| /// * http://xml.org/sax/features/namespaces | | /// * http://xml.org/sax/features/namespaces | |
| /// * http://xml.org/sax/features/namespace-prefixes | | /// * http://xml.org/sax/features/namespace-prefixes | |
| /// * http://xml.org/sax/properties/lexical-handler | | /// * http://xml.org/sax/properties/lexical-handler | |
| /// * http://xml.org/sax/properties/declaration-handler | | /// * http://xml.org/sax/properties/declaration-handler | |
|
| | | /// | |
| | | /// The following proprietary extensions are supported: | |
| | | /// * http://www.appinf.com/features/enable-partial-reads -- | |
| | | /// see ParserEngine::setEnablePartialReads() | |
| { | | { | |
| public: | | public: | |
| SAXParser(); | | SAXParser(); | |
| /// Creates an SAXParser. | | /// Creates an SAXParser. | |
| | | | |
| SAXParser(const XMLString& encoding); | | SAXParser(const XMLString& encoding); | |
| /// Creates an SAXParser with the given encoding. | | /// Creates an SAXParser with the given encoding. | |
| | | | |
| ~SAXParser(); | | ~SAXParser(); | |
| /// Destroys the SAXParser. | | /// Destroys the SAXParser. | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 106 | |
| void setProperty(const XMLString& propertyId, const XMLString& value
); | | void setProperty(const XMLString& propertyId, const XMLString& value
); | |
| void setProperty(const XMLString& propertyId, void* value); | | void setProperty(const XMLString& propertyId, void* value); | |
| void* getProperty(const XMLString& propertyId) const; | | void* getProperty(const XMLString& propertyId) const; | |
| void parse(InputSource* pSource); | | void parse(InputSource* pSource); | |
| void parse(const XMLString& systemId); | | void parse(const XMLString& systemId); | |
| void parseMemoryNP(const char* xml, std::size_t size); | | void parseMemoryNP(const char* xml, std::size_t size); | |
| | | | |
| /// Extensions | | /// Extensions | |
| void parseString(const std::string& xml); | | void parseString(const std::string& xml); | |
| | | | |
|
| | | static const XMLString FEATURE_PARTIAL_READS; | |
| | | | |
| protected: | | protected: | |
| void setupParse(); | | void setupParse(); | |
| | | | |
| private: | | private: | |
| ParserEngine _engine; | | ParserEngine _engine; | |
| bool _namespaces; | | bool _namespaces; | |
| bool _namespacePrefixes; | | bool _namespacePrefixes; | |
| }; | | }; | |
| | | | |
| } } // namespace Poco::XML | | } } // namespace Poco::XML | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 7 lines changed or added | |
|
| ScopedLock.h | | ScopedLock.h | |
| // | | // | |
| // ScopedLock.h | | // ScopedLock.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/ScopedLock.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/ScopedLock.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: Mutex | | // Module: Mutex | |
| // | | // | |
| // Definition of the ScopedLock template class. | | // Definition of the ScopedLock template class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 53 | | skipping to change at line 53 | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| template <class M> | | template <class M> | |
| class ScopedLock | | class ScopedLock | |
| /// A class that simplifies thread synchronization | | /// A class that simplifies thread synchronization | |
| /// with a mutex. | | /// with a mutex. | |
| /// The constructor accepts a Mutex and locks it. | | /// The constructor accepts a Mutex and locks it. | |
| /// The destructor unlocks the mutex. | | /// The destructor unlocks the mutex. | |
| { | | { | |
| public: | | public: | |
|
| inline ScopedLock(M& mutex): _mutex(mutex) | | ScopedLock(M& mutex): _mutex(mutex) | |
| { | | { | |
| _mutex.lock(); | | _mutex.lock(); | |
| } | | } | |
|
| inline ~ScopedLock() | | | |
| | | ~ScopedLock() | |
| { | | { | |
| _mutex.unlock(); | | _mutex.unlock(); | |
| } | | } | |
| | | | |
| private: | | private: | |
| M& _mutex; | | M& _mutex; | |
| | | | |
| ScopedLock(); | | ScopedLock(); | |
| ScopedLock(const ScopedLock&); | | ScopedLock(const ScopedLock&); | |
| ScopedLock& operator = (const ScopedLock&); | | ScopedLock& operator = (const ScopedLock&); | |
| }; | | }; | |
| | | | |
|
| | | template <class M> | |
| | | class ScopedLockWithUnlock | |
| | | /// A class that simplifies thread synchronization | |
| | | /// with a mutex. | |
| | | /// The constructor accepts a Mutex and locks it. | |
| | | /// The destructor unlocks the mutex. | |
| | | /// The unlock() member function allows for manual | |
| | | /// unlocking of the mutex. | |
| | | { | |
| | | public: | |
| | | ScopedLockWithUnlock(M& mutex): _pMutex(&mutex) | |
| | | { | |
| | | _pMutex->lock(); | |
| | | } | |
| | | | |
| | | ~ScopedLockWithUnlock() | |
| | | { | |
| | | unlock(); | |
| | | } | |
| | | | |
| | | void unlock() | |
| | | { | |
| | | if (_pMutex) | |
| | | { | |
| | | _pMutex->unlock(); | |
| | | _pMutex = 0; | |
| | | } | |
| | | } | |
| | | | |
| | | private: | |
| | | M* _pMutex; | |
| | | | |
| | | ScopedLockWithUnlock(); | |
| | | ScopedLockWithUnlock(const ScopedLockWithUnlock&); | |
| | | ScopedLockWithUnlock& operator = (const ScopedLockWithUnlock&); | |
| | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_ScopedLock_INCLUDED | | #endif // Foundation_ScopedLock_INCLUDED | |
| | | | |
End of changes. 4 change blocks. |
| 3 lines changed or deleted | | 41 lines changed or added | |
|
| SharedPtr.h | | SharedPtr.h | |
| // | | // | |
| // SharedPtr.h | | // SharedPtr.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/SharedPtr.h#7 $ | | // $Id: //poco/1.3/Foundation/include/Poco/SharedPtr.h#8 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: SharedPtr | | // Module: SharedPtr | |
| // | | // | |
| // Definition of the SharedPtr template class. | | // Definition of the SharedPtr template class. | |
| // | | // | |
| // Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 89 | | skipping to change at line 89 | |
| { | | { | |
| public: | | public: | |
| static void release(C* pObj) | | static void release(C* pObj) | |
| /// Delete the object. | | /// Delete the object. | |
| /// Note that pObj can be 0. | | /// Note that pObj can be 0. | |
| { | | { | |
| delete pObj; | | delete pObj; | |
| } | | } | |
| }; | | }; | |
| | | | |
|
| | | template <class C> | |
| | | class ReleaseArrayPolicy | |
| | | /// The release policy for SharedPtr holding arrays. | |
| | | { | |
| | | public: | |
| | | static void release(C* pObj) | |
| | | /// Delete the object. | |
| | | /// Note that pObj can be 0. | |
| | | { | |
| | | delete [] pObj; | |
| | | } | |
| | | }; | |
| | | | |
| template <class C, class RC = ReferenceCounter, class RP = ReleasePolicy<C>
> | | template <class C, class RC = ReferenceCounter, class RP = ReleasePolicy<C>
> | |
| class SharedPtr | | class SharedPtr | |
| /// SharedPtr is a "smart" pointer for classes implementing | | /// SharedPtr is a "smart" pointer for classes implementing | |
| /// reference counting based garbage collection. | | /// reference counting based garbage collection. | |
| /// SharedPtr is thus similar to AutoPtr. Unlike the | | /// SharedPtr is thus similar to AutoPtr. Unlike the | |
| /// AutoPtr template, which can only be used with | | /// AutoPtr template, which can only be used with | |
| /// classes that support reference counting, SharedPtr | | /// classes that support reference counting, SharedPtr | |
| /// can be used with any class. For this to work, a | | /// can be used with any class. For this to work, a | |
| /// SharedPtr manages a reference count for the object | | /// SharedPtr manages a reference count for the object | |
| /// it manages. | | /// it manages. | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 14 lines changed or added | |
|
| Socket.h | | Socket.h | |
| // | | // | |
| // Socket.h | | // Socket.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/Socket.h#3 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/Socket.h#4 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Sockets | | // Package: Sockets | |
| // Module: Socket | | // Module: Socket | |
| // | | // | |
| // Definition of the Socket class. | | // Definition of the Socket class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 132 | | skipping to change at line 132 | |
| /// Returns the number of sockets ready. | | /// Returns the number of sockets ready. | |
| /// | | /// | |
| /// After return, | | /// After return, | |
| /// * readList contains those sockets ready for reading, | | /// * readList contains those sockets ready for reading, | |
| /// * writeList contains those sockets ready for writing, | | /// * writeList contains those sockets ready for writing, | |
| /// * exceptList contains those sockets with a pending err
or. | | /// * exceptList contains those sockets with a pending err
or. | |
| /// | | /// | |
| /// If the total number of sockets passed in readList, write
List and | | /// If the total number of sockets passed in readList, write
List and | |
| /// exceptList is zero, select() will return immediately and
the | | /// exceptList is zero, select() will return immediately and
the | |
| /// return value will be 0. | | /// return value will be 0. | |
|
| | | /// | |
| | | /// If one of the sockets passed to select() is closed while | |
| | | /// select() runs, select will return immediately. However, | |
| | | /// the closed socket will not be included in any list. | |
| | | /// In this case, the return value may be greater than the s | |
| | | um | |
| | | /// of all sockets in all list. | |
| | | | |
| bool poll(const Poco::Timespan& timeout, int mode) const; | | bool poll(const Poco::Timespan& timeout, int mode) const; | |
| /// Determines the status of the socket, using a | | /// Determines the status of the socket, using a | |
| /// call to select(). | | /// call to select(). | |
| /// | | /// | |
| /// The mode argument is constructed by combining the values | | /// The mode argument is constructed by combining the values | |
| /// of the SelectMode enumeration. | | /// of the SelectMode enumeration. | |
| /// | | /// | |
| /// Returns true if the next operation corresponding to | | /// Returns true if the next operation corresponding to | |
| /// mode will not block, false otherwise. | | /// mode will not block, false otherwise. | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 8 lines changed or added | |
|
| SocketImpl.h | | SocketImpl.h | |
| // | | // | |
| // SocketImpl.h | | // SocketImpl.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/SocketImpl.h#6 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/SocketImpl.h#7 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Sockets | | // Package: Sockets | |
| // Module: SocketImpl | | // Module: SocketImpl | |
| // | | // | |
| // Definition of the SocketImpl class. | | // Definition of the SocketImpl class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 134 | | skipping to change at line 134 | |
| virtual void shutdown(); | | virtual void shutdown(); | |
| /// Shuts down both the receiving and the sending part | | /// Shuts down both the receiving and the sending part | |
| /// of the socket connection. | | /// of the socket connection. | |
| | | | |
| virtual int sendBytes(const void* buffer, int length, int flags = 0)
; | | virtual int sendBytes(const void* buffer, int length, int flags = 0)
; | |
| /// Sends the contents of the given buffer through | | /// Sends the contents of the given buffer through | |
| /// the socket. | | /// the socket. | |
| /// | | /// | |
| /// Returns the number of bytes sent, which may be | | /// Returns the number of bytes sent, which may be | |
| /// less than the number of bytes specified. | | /// less than the number of bytes specified. | |
|
| | | /// | |
| | | /// Certain socket implementations may also return a negativ | |
| | | e | |
| | | /// value denoting a certain condition. | |
| | | | |
| virtual int receiveBytes(void* buffer, int length, int flags = 0); | | virtual int receiveBytes(void* buffer, int length, int flags = 0); | |
| /// Receives data from the socket and stores it | | /// Receives data from the socket and stores it | |
| /// in buffer. Up to length bytes are received. | | /// in buffer. Up to length bytes are received. | |
| /// | | /// | |
| /// Returns the number of bytes received. | | /// Returns the number of bytes received. | |
|
| | | /// | |
| | | /// Certain socket implementations may also return a negativ | |
| | | e | |
| | | /// value denoting a certain condition. | |
| | | | |
| virtual int sendTo(const void* buffer, int length, const SocketAddre
ss& address, int flags = 0); | | virtual int sendTo(const void* buffer, int length, const SocketAddre
ss& address, int flags = 0); | |
| /// Sends the contents of the given buffer through | | /// Sends the contents of the given buffer through | |
| /// the socket to the given address. | | /// the socket to the given address. | |
| /// | | /// | |
| /// Returns the number of bytes sent, which may be | | /// Returns the number of bytes sent, which may be | |
| /// less than the number of bytes specified. | | /// less than the number of bytes specified. | |
| | | | |
| virtual int receiveFrom(void* buffer, int length, SocketAddress& add
ress, int flags = 0); | | virtual int receiveFrom(void* buffer, int length, SocketAddress& add
ress, int flags = 0); | |
| /// Receives data from the socket and stores it | | /// Receives data from the socket and stores it | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 9 lines changed or added | |
|
| SocketNotifier.h | | SocketNotifier.h | |
| // | | // | |
| // SocketNotifier.h | | // SocketNotifier.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/SocketNotifier.h#2 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/SocketNotifier.h#3 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Reactor | | // Package: Reactor | |
| // Module: SocketNotifier | | // Module: SocketNotifier | |
| // | | // | |
| // Definition of the SocketNotifier class. | | // Definition of the SocketNotifier class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 78 | | skipping to change at line 78 | |
| | | | |
| bool accepts(SocketNotification* pNotification); | | bool accepts(SocketNotification* pNotification); | |
| /// Returns true if there is at least one observer for the g
iven notification. | | /// Returns true if there is at least one observer for the g
iven notification. | |
| | | | |
| void dispatch(SocketNotification* pNotification); | | void dispatch(SocketNotification* pNotification); | |
| /// Dispatches the notification to all observers. | | /// Dispatches the notification to all observers. | |
| | | | |
| bool hasObservers() const; | | bool hasObservers() const; | |
| /// Returns true if there are subscribers. | | /// Returns true if there are subscribers. | |
| | | | |
|
| | | std::size_t countObservers() const; | |
| | | /// Returns the number of subscribers; | |
| | | | |
| protected: | | protected: | |
| ~SocketNotifier(); | | ~SocketNotifier(); | |
| /// Destroys the SocketNotifier. | | /// Destroys the SocketNotifier. | |
| | | | |
| private: | | private: | |
| typedef std::multiset<SocketNotification*> EventSet; | | typedef std::multiset<SocketNotification*> EventSet; | |
| | | | |
| EventSet _events; | | EventSet _events; | |
| Poco::NotificationCenter _nc; | | Poco::NotificationCenter _nc; | |
| Socket _socket; | | Socket _socket; | |
| | | | |
| skipping to change at line 103 | | skipping to change at line 106 | |
| inline bool SocketNotifier::accepts(SocketNotification* pNotification) | | inline bool SocketNotifier::accepts(SocketNotification* pNotification) | |
| { | | { | |
| return _events.find(pNotification) != _events.end(); | | return _events.find(pNotification) != _events.end(); | |
| } | | } | |
| | | | |
| inline bool SocketNotifier::hasObservers() const | | inline bool SocketNotifier::hasObservers() const | |
| { | | { | |
| return _nc.hasObservers(); | | return _nc.hasObservers(); | |
| } | | } | |
| | | | |
|
| | | inline std::size_t SocketNotifier::countObservers() const | |
| | | { | |
| | | return _nc.countObservers(); | |
| | | } | |
| | | | |
| } } // namespace Poco::Net | | } } // namespace Poco::Net | |
| | | | |
| #endif // Net_SocketNotifier_INCLUDED | | #endif // Net_SocketNotifier_INCLUDED | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 9 lines changed or added | |
|
| Stopwatch.h | | Stopwatch.h | |
| // | | // | |
| // Stopwatch.h | | // Stopwatch.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Stopwatch.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Stopwatch.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: Stopwatch | | // Module: Stopwatch | |
| // | | // | |
| // Definition of the Stopwatch class. | | // Definition of the Stopwatch class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 49 | | skipping to change at line 49 | |
| #define Foundation_Stopwatch_INCLUDED | | #define Foundation_Stopwatch_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include "Poco/Timestamp.h" | | #include "Poco/Timestamp.h" | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API Stopwatch | | class Foundation_API Stopwatch | |
| /// A simple facility to measure time intervals | | /// A simple facility to measure time intervals | |
| /// with microsecond resolution. | | /// with microsecond resolution. | |
|
| | | /// | |
| | | /// Note that Stopwatch is based on the Timestamp | |
| | | /// class. Therefore, if during a Stopwatch run, | |
| | | /// the system time is changed, the measured time | |
| | | /// will not be correct. | |
| { | | { | |
| public: | | public: | |
| Stopwatch(); | | Stopwatch(); | |
| ~Stopwatch(); | | ~Stopwatch(); | |
| | | | |
| void start(); | | void start(); | |
| /// Starts (or restarts) the stopwatch. | | /// Starts (or restarts) the stopwatch. | |
| | | | |
| void stop(); | | void stop(); | |
| /// Stops or pauses the stopwatch. | | /// Stops or pauses the stopwatch. | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 6 lines changed or added | |
|
| StreamSocket.h | | StreamSocket.h | |
| // | | // | |
| // StreamSocket.h | | // StreamSocket.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/StreamSocket.h#3 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/StreamSocket.h#4 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Sockets | | // Package: Sockets | |
| // Module: StreamSocket | | // Module: StreamSocket | |
| // | | // | |
| // Definition of the StreamSocket class. | | // Definition of the StreamSocket class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 122 | | skipping to change at line 122 | |
| void shutdown(); | | void shutdown(); | |
| /// Shuts down both the receiving and the sending part | | /// Shuts down both the receiving and the sending part | |
| /// of the socket connection. | | /// of the socket connection. | |
| | | | |
| int sendBytes(const void* buffer, int length, int flags = 0); | | int sendBytes(const void* buffer, int length, int flags = 0); | |
| /// Sends the contents of the given buffer through | | /// Sends the contents of the given buffer through | |
| /// the socket. | | /// the socket. | |
| /// | | /// | |
| /// Returns the number of bytes sent, which may be | | /// Returns the number of bytes sent, which may be | |
| /// less than the number of bytes specified. | | /// less than the number of bytes specified. | |
|
| | | /// | |
| | | /// Certain socket implementations may also return a negativ | |
| | | e | |
| | | /// value denoting a certain condition. | |
| | | | |
| int receiveBytes(void* buffer, int length, int flags = 0); | | int receiveBytes(void* buffer, int length, int flags = 0); | |
| /// Receives data from the socket and stores it | | /// Receives data from the socket and stores it | |
| /// in buffer. Up to length bytes are received. | | /// in buffer. Up to length bytes are received. | |
| /// | | /// | |
| /// Returns the number of bytes received. | | /// Returns the number of bytes received. | |
| /// A return value of 0 means a graceful shutdown | | /// A return value of 0 means a graceful shutdown | |
| /// of the connection from the peer. | | /// of the connection from the peer. | |
| /// | | /// | |
| /// Throws a TimeoutException if a receive timeout has | | /// Throws a TimeoutException if a receive timeout has | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 5 lines changed or added | |
|
| StreamSocketImpl.h | | StreamSocketImpl.h | |
| // | | // | |
| // StreamSocketImpl.h | | // StreamSocketImpl.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Net/include/Poco/Net/StreamSocketImpl.h#2 $ | | // $Id: //poco/1.3/Net/include/Poco/Net/StreamSocketImpl.h#3 $ | |
| // | | // | |
| // Library: Net | | // Library: Net | |
| // Package: Sockets | | // Package: Sockets | |
| // Module: StreamSocketImpl | | // Module: StreamSocketImpl | |
| // | | // | |
| // Definition of the StreamSocketImpl class. | | // Definition of the StreamSocketImpl class. | |
| // | | // | |
| // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 62 | | skipping to change at line 62 | |
| /// Creates a StreamSocketImpl. | | /// Creates a StreamSocketImpl. | |
| | | | |
| explicit StreamSocketImpl(IPAddress::Family addressFamily); | | explicit StreamSocketImpl(IPAddress::Family addressFamily); | |
| /// Creates a SocketImpl, with the underlying | | /// Creates a SocketImpl, with the underlying | |
| /// socket initialized for the given address family. | | /// socket initialized for the given address family. | |
| | | | |
| StreamSocketImpl(poco_socket_t sockfd); | | StreamSocketImpl(poco_socket_t sockfd); | |
| /// Creates a StreamSocketImpl using the given native socket
. | | /// Creates a StreamSocketImpl using the given native socket
. | |
| | | | |
| virtual int sendBytes(const void* buffer, int length, int flags = 0)
; | | virtual int sendBytes(const void* buffer, int length, int flags = 0)
; | |
|
| /// Ensures that all data in buffer is sent. | | /// Ensures that all data in buffer is sent if the socket | |
| | | /// is blocking. In case of a non-blocking socket, sends as | |
| | | /// many bytes as possible. | |
| | | /// | |
| | | /// Returns the number of bytes sent. The return value may a | |
| | | lso be | |
| | | /// negative to denote some special condition. | |
| | | | |
| protected: | | protected: | |
| virtual ~StreamSocketImpl(); | | virtual ~StreamSocketImpl(); | |
| }; | | }; | |
| | | | |
| } } // namespace Poco::Net | | } } // namespace Poco::Net | |
| | | | |
| #endif // Net_StreamSocketImpl_INCLUDED | | #endif // Net_StreamSocketImpl_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|
| TextEncoding.h | | TextEncoding.h | |
| // | | // | |
| // TextEncoding.h | | // TextEncoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/TextEncoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/TextEncoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: TextEncoding | | // Module: TextEncoding | |
| // | | // | |
| // Definition of the abstract TextEncoding class. | | // Definition of the abstract TextEncoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 102 | | skipping to change at line 102 | |
| /// Returns the CharacterMap for the encoding. | | /// Returns the CharacterMap for the encoding. | |
| /// The CharacterMap should be kept in a static member. As | | /// The CharacterMap should be kept in a static member. As | |
| /// characterMap() can be called frequently, it should be | | /// characterMap() can be called frequently, it should be | |
| /// implemented in such a way that it just returns a static | | /// implemented in such a way that it just returns a static | |
| /// map. If the map is built at runtime, this should be | | /// map. If the map is built at runtime, this should be | |
| /// done in the constructor. | | /// done in the constructor. | |
| | | | |
| virtual int convert(const unsigned char* bytes) const; | | virtual int convert(const unsigned char* bytes) const; | |
| /// The convert function is used to convert multibyte sequen
ces; | | /// The convert function is used to convert multibyte sequen
ces; | |
| /// bytes will point to a byte sequence of n bytes where | | /// bytes will point to a byte sequence of n bytes where | |
|
| /// getCharacterMap()[*bytes] == -n. | | /// sequenceLength(bytes, length) == -n, with length >= n. | |
| /// | | /// | |
| /// The convert function must return the Unicode scalar valu
e | | /// The convert function must return the Unicode scalar valu
e | |
| /// represented by this byte sequence or -1 if the byte sequ
ence is malformed. | | /// represented by this byte sequence or -1 if the byte sequ
ence is malformed. | |
| /// The default implementation returns (int) bytes[0]. | | /// The default implementation returns (int) bytes[0]. | |
| | | | |
|
| | | virtual int queryConvert(const unsigned char* bytes, int length) con | |
| | | st; | |
| | | /// The queryConvert function is used to convert single byte | |
| | | characters | |
| | | /// or multibyte sequences; | |
| | | /// bytes will point to a byte sequence of length bytes. | |
| | | /// | |
| | | /// The queryConvert function must return the Unicode scalar | |
| | | value | |
| | | /// represented by this byte sequence or -1 if the byte sequ | |
| | | ence is malformed | |
| | | /// or -n where n is number of bytes requested for the seque | |
| | | nce, if lenght is | |
| | | /// shorter than the sequence. | |
| | | /// The length of the sequence might not be determined by th | |
| | | e first byte, | |
| | | /// in which case the conversion becomes an iterative proces | |
| | | s: | |
| | | /// First call with length == 1 might return -2, | |
| | | /// Then a second call with lenght == 2 might return -4 | |
| | | /// Eventually, the third call with length == 4 should retur | |
| | | n either a | |
| | | /// Unicode scalar value, or -1 if the byte sequence is malf | |
| | | ormed. | |
| | | /// The default implementation returns (int) bytes[0]. | |
| | | | |
| | | virtual int sequenceLength(const unsigned char* bytes, int length) c | |
| | | onst; | |
| | | /// The sequenceLength function is used to get the lenth of | |
| | | the sequence pointed | |
| | | /// by bytes. The length paramater should be greater or equa | |
| | | l to the length of | |
| | | /// the sequence. | |
| | | /// | |
| | | /// The sequenceLength function must return the lenght of th | |
| | | e sequence | |
| | | /// 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 | |
| | | /// to determine the length of the sequence. | |
| | | /// The length of the sequence might not be determined by th | |
| | | e first byte, | |
| | | /// in which case the conversion becomes an iterative proces | |
| | | s as long as the | |
| | | /// result is negative: | |
| | | /// First call with length == 1 might return -2, | |
| | | /// Then a second call with lenght == 2 might return -4 | |
| | | /// Eventually, the third call with length == 4 should retur | |
| | | n 4. | |
| | | /// The default implementation returns 1. | |
| | | | |
| virtual int convert(int ch, unsigned char* bytes, int length) const; | | virtual int convert(int ch, unsigned char* bytes, int length) const; | |
| /// Transform the Unicode character ch into the encoding's | | /// Transform the Unicode character ch into the encoding's | |
| /// byte sequence. The method returns the number of bytes | | /// byte sequence. The method returns the number of bytes | |
| /// used. The method must not use more than length character
s. | | /// used. The method must not use more than length character
s. | |
| /// Bytes and length can also be null - in this case only th
e number | | /// Bytes and length can also be null - in this case only th
e number | |
| /// of bytes required to represent ch is returned. | | /// of bytes required to represent ch is returned. | |
| /// If the character cannot be converted, 0 is returned and | | /// If the character cannot be converted, 0 is returned and | |
| /// the byte sequence remains unchanged. | | /// the byte sequence remains unchanged. | |
| /// The default implementation simply returns 0. | | /// The default implementation simply returns 0. | |
| | | | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 54 lines changed or added | |
|
| Thread.h | | Thread.h | |
| // | | // | |
| // Thread.h | | // Thread.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Thread.h#5 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Thread.h#6 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: Thread | | // Module: Thread | |
| // | | // | |
| // Definition of the Thread class. | | // Definition of the Thread class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 65 | | skipping to change at line 65 | |
| class Foundation_API Thread: private ThreadImpl | | class Foundation_API Thread: private ThreadImpl | |
| /// This class implements a platform-independent | | /// This class implements a platform-independent | |
| /// wrapper to an operating system thread. | | /// wrapper to an operating system thread. | |
| /// | | /// | |
| /// Every Thread object gets a unique (within | | /// Every Thread object gets a unique (within | |
| /// its process) numeric thread ID. | | /// its process) numeric thread ID. | |
| /// Furthermore, a thread can be assigned a name. | | /// Furthermore, a thread can be assigned a name. | |
| /// The name of a thread can be changed at any time. | | /// The name of a thread can be changed at any time. | |
| { | | { | |
| public: | | public: | |
|
| | | typedef ThreadImpl::TIDImpl TID; | |
| | | | |
| using ThreadImpl::Callable; | | using ThreadImpl::Callable; | |
| | | | |
| enum Priority | | enum Priority | |
| /// Thread priorities. | | /// Thread priorities. | |
| { | | { | |
| PRIO_LOWEST = PRIO_LOWEST_IMPL, /// The lowest thread prior
ity. | | PRIO_LOWEST = PRIO_LOWEST_IMPL, /// The lowest thread prior
ity. | |
| PRIO_LOW = PRIO_LOW_IMPL, /// A lower than normal thr
ead priority. | | PRIO_LOW = PRIO_LOW_IMPL, /// A lower than normal thr
ead priority. | |
| PRIO_NORMAL = PRIO_NORMAL_IMPL, /// The normal thread prior
ity. | | PRIO_NORMAL = PRIO_NORMAL_IMPL, /// The normal thread prior
ity. | |
| PRIO_HIGH = PRIO_HIGH_IMPL, /// A higher than normal th
read priority. | | PRIO_HIGH = PRIO_HIGH_IMPL, /// A higher than normal th
read priority. | |
| PRIO_HIGHEST = PRIO_HIGHEST_IMPL /// The highest thread prio
rity. | | PRIO_HIGHEST = PRIO_HIGHEST_IMPL /// The highest thread prio
rity. | |
| | | | |
| skipping to change at line 89 | | skipping to change at line 91 | |
| | | | |
| Thread(const std::string& name); | | Thread(const std::string& name); | |
| /// Creates a named thread. Call start() to start it. | | /// Creates a named thread. Call start() to start it. | |
| | | | |
| ~Thread(); | | ~Thread(); | |
| /// Destroys the thread. | | /// Destroys the thread. | |
| | | | |
| int id() const; | | int id() const; | |
| /// Returns the unique thread ID of the thread. | | /// Returns the unique thread ID of the thread. | |
| | | | |
|
| | | TID tid() const; | |
| | | /// Returns the native thread ID of the thread. | |
| | | | |
| std::string name() const; | | std::string name() const; | |
| /// Returns the name of the thread. | | /// Returns the name of the thread. | |
| | | | |
| std::string getName() const; | | std::string getName() const; | |
| /// Returns teh name of the thread. | | /// Returns teh name of the thread. | |
| | | | |
| void setName(const std::string& name); | | void setName(const std::string& name); | |
| /// Sets the name of the thread. | | /// Sets the name of the thread. | |
| | | | |
| void setPriority(Priority prio); | | void setPriority(Priority prio); | |
| | | | |
| skipping to change at line 169 | | skipping to change at line 174 | |
| /// Suspends the current thread for the specified | | /// Suspends the current thread for the specified | |
| /// amount of time. | | /// amount of time. | |
| | | | |
| static void yield(); | | static void yield(); | |
| /// Yields cpu to other threads. | | /// Yields cpu to other threads. | |
| | | | |
| static Thread* current(); | | static Thread* current(); | |
| /// Returns the Thread object for the currently active threa
d. | | /// Returns the Thread object for the currently active threa
d. | |
| /// If the current thread is the main thread, 0 is returned. | | /// If the current thread is the main thread, 0 is returned. | |
| | | | |
|
| | | static TID currentTid(); | |
| | | /// Returns the native thread ID for the current thread. | |
| | | | |
| protected: | | protected: | |
| ThreadLocalStorage& tls(); | | ThreadLocalStorage& tls(); | |
| /// Returns a reference to the thread's local storage. | | /// Returns a reference to the thread's local storage. | |
| | | | |
| void clearTLS(); | | void clearTLS(); | |
| /// Clears the thread's local storage. | | /// Clears the thread's local storage. | |
| | | | |
| std::string makeName(); | | std::string makeName(); | |
| /// Creates a unique name for a thread. | | /// Creates a unique name for a thread. | |
| | | | |
| | | | |
| skipping to change at line 198 | | skipping to change at line 206 | |
| ThreadLocalStorage* _pTLS; | | ThreadLocalStorage* _pTLS; | |
| mutable FastMutex _mutex; | | mutable FastMutex _mutex; | |
| | | | |
| friend class ThreadLocalStorage; | | friend class ThreadLocalStorage; | |
| friend class PooledThread; | | friend class PooledThread; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
|
| | | inline Thread::TID Thread::tid() const | |
| | | { | |
| | | return tidImpl(); | |
| | | } | |
| | | | |
| inline int Thread::id() const | | inline int Thread::id() const | |
| { | | { | |
| return _id; | | return _id; | |
| } | | } | |
| | | | |
| inline std::string Thread::name() const | | inline std::string Thread::name() const | |
| { | | { | |
| FastMutex::ScopedLock lock(_mutex); | | FastMutex::ScopedLock lock(_mutex); | |
| | | | |
| return _name; | | return _name; | |
| | | | |
| skipping to change at line 267 | | skipping to change at line 280 | |
| inline void Thread::setStackSize(int size) | | inline void Thread::setStackSize(int size) | |
| { | | { | |
| setStackSizeImpl(size); | | setStackSizeImpl(size); | |
| } | | } | |
| | | | |
| inline int Thread::getStackSize() const | | inline int Thread::getStackSize() const | |
| { | | { | |
| return getStackSizeImpl(); | | return getStackSizeImpl(); | |
| } | | } | |
| | | | |
|
| | | inline Thread::TID Thread::currentTid() | |
| | | { | |
| | | return currentTidImpl(); | |
| | | } | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Thread_INCLUDED | | #endif // Foundation_Thread_INCLUDED | |
| | | | |
End of changes. 6 change blocks. |
| 1 lines changed or deleted | | 19 lines changed or added | |
|
| Thread_POSIX.h | | Thread_POSIX.h | |
| // | | // | |
| // Thread_POSIX.h | | // Thread_POSIX.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Thread_POSIX.h#9 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Thread_POSIX.h#10 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: Thread | | // Module: Thread | |
| // | | // | |
| // Definition of the ThreadImpl class for POSIX Threads. | | // Definition of the ThreadImpl class for POSIX Threads. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 60 | | skipping to change at line 60 | |
| #if !defined(POCO_NO_SYS_SELECT_H) | | #if !defined(POCO_NO_SYS_SELECT_H) | |
| #include <sys/select.h> | | #include <sys/select.h> | |
| #endif | | #endif | |
| #include <errno.h> | | #include <errno.h> | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API ThreadImpl | | class Foundation_API ThreadImpl | |
| { | | { | |
| public: | | public: | |
|
| | | typedef pthread_t TIDImpl; | |
| typedef void (*Callable)(void*); | | typedef void (*Callable)(void*); | |
| | | | |
| enum Priority | | enum Priority | |
| { | | { | |
| PRIO_LOWEST_IMPL, | | PRIO_LOWEST_IMPL, | |
| PRIO_LOW_IMPL, | | PRIO_LOW_IMPL, | |
| PRIO_NORMAL_IMPL, | | PRIO_NORMAL_IMPL, | |
| PRIO_HIGH_IMPL, | | PRIO_HIGH_IMPL, | |
| PRIO_HIGHEST_IMPL | | PRIO_HIGHEST_IMPL | |
| }; | | }; | |
| | | | |
| skipping to change at line 84 | | skipping to change at line 85 | |
| { | | { | |
| } | | } | |
| | | | |
| Callable callback; | | Callable callback; | |
| void* pData; | | void* pData; | |
| }; | | }; | |
| | | | |
| ThreadImpl(); | | ThreadImpl(); | |
| ~ThreadImpl(); | | ~ThreadImpl(); | |
| | | | |
|
| | | TIDImpl tidImpl() const; | |
| void setPriorityImpl(int prio); | | void setPriorityImpl(int prio); | |
| int getPriorityImpl() const; | | int getPriorityImpl() const; | |
| void setOSPriorityImpl(int prio); | | void setOSPriorityImpl(int prio); | |
| int getOSPriorityImpl() const; | | int getOSPriorityImpl() const; | |
| static int getMinOSPriorityImpl(); | | static int getMinOSPriorityImpl(); | |
| static int getMaxOSPriorityImpl(); | | static int getMaxOSPriorityImpl(); | |
| void setStackSizeImpl(int size); | | void setStackSizeImpl(int size); | |
| int getStackSizeImpl() const; | | int getStackSizeImpl() const; | |
| void startImpl(Runnable& target); | | void startImpl(Runnable& target); | |
| void startImpl(Callable target, void* pData = 0); | | void startImpl(Callable target, void* pData = 0); | |
| | | | |
| void joinImpl(); | | void joinImpl(); | |
| bool joinImpl(long milliseconds); | | bool joinImpl(long milliseconds); | |
| bool isRunningImpl() const; | | bool isRunningImpl() const; | |
| static void sleepImpl(long milliseconds); | | static void sleepImpl(long milliseconds); | |
| static void yieldImpl(); | | static void yieldImpl(); | |
| static ThreadImpl* currentImpl(); | | static ThreadImpl* currentImpl(); | |
|
| | | static TIDImpl currentTidImpl(); | |
| | | | |
| protected: | | protected: | |
| static void* runnableEntry(void* pThread); | | static void* runnableEntry(void* pThread); | |
| static void* callableEntry(void* pThread); | | static void* callableEntry(void* pThread); | |
| static int mapPrio(int prio); | | static int mapPrio(int prio); | |
| static int reverseMapPrio(int osPrio); | | static int reverseMapPrio(int osPrio); | |
| | | | |
| private: | | private: | |
| class CurrentThreadHolder | | class CurrentThreadHolder | |
| { | | { | |
| | | | |
| skipping to change at line 194 | | skipping to change at line 197 | |
| inline void ThreadImpl::yieldImpl() | | inline void ThreadImpl::yieldImpl() | |
| { | | { | |
| sched_yield(); | | sched_yield(); | |
| } | | } | |
| | | | |
| inline int ThreadImpl::getStackSizeImpl() const | | inline int ThreadImpl::getStackSizeImpl() const | |
| { | | { | |
| return _pData->stackSize; | | return _pData->stackSize; | |
| } | | } | |
| | | | |
|
| | | inline ThreadImpl::TIDImpl ThreadImpl::tidImpl() const | |
| | | { | |
| | | return _pData->thread; | |
| | | } | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Thread_POSIX_INCLUDED | | #endif // Foundation_Thread_POSIX_INCLUDED | |
| | | | |
End of changes. 5 change blocks. |
| 1 lines changed or deleted | | 9 lines changed or added | |
|
| Thread_WIN32.h | | Thread_WIN32.h | |
| // | | // | |
| // Thread_WIN32.h | | // Thread_WIN32.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Thread_WIN32.h#8 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Thread_WIN32.h#10 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: Thread | | // Module: Thread | |
| // | | // | |
| // Definition of the ThreadImpl class for WIN32. | | // Definition of the ThreadImpl class for WIN32. | |
| // | | // | |
| // Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2009, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 50 | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include "Poco/Runnable.h" | | #include "Poco/Runnable.h" | |
| #include "Poco/UnWindows.h" | | #include "Poco/UnWindows.h" | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API ThreadImpl | | class Foundation_API ThreadImpl | |
| { | | { | |
| public: | | public: | |
|
| | | typedef DWORD TIDImpl; | |
| typedef void (*Callable)(void*); | | typedef void (*Callable)(void*); | |
| | | | |
| #if defined(_DLL) | | #if defined(_DLL) | |
| typedef DWORD (WINAPI *Entry)(LPVOID); | | typedef DWORD (WINAPI *Entry)(LPVOID); | |
| #else | | #else | |
| typedef unsigned (__stdcall *Entry)(void*); | | typedef unsigned (__stdcall *Entry)(void*); | |
| #endif | | #endif | |
| | | | |
| struct CallbackData | | struct CallbackData | |
| { | | { | |
| | | | |
| skipping to change at line 80 | | skipping to change at line 81 | |
| PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | | PRIO_LOWEST_IMPL = THREAD_PRIORITY_LOWEST, | |
| PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | | PRIO_LOW_IMPL = THREAD_PRIORITY_BELOW_NORMAL, | |
| PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | | PRIO_NORMAL_IMPL = THREAD_PRIORITY_NORMAL, | |
| PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | | PRIO_HIGH_IMPL = THREAD_PRIORITY_ABOVE_NORMAL, | |
| PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | | PRIO_HIGHEST_IMPL = THREAD_PRIORITY_HIGHEST | |
| }; | | }; | |
| | | | |
| ThreadImpl(); | | ThreadImpl(); | |
| ~ThreadImpl(); | | ~ThreadImpl(); | |
| | | | |
|
| | | TIDImpl tidImpl() const; | |
| void setPriorityImpl(int prio); | | void setPriorityImpl(int prio); | |
| int getPriorityImpl() const; | | int getPriorityImpl() const; | |
| void setOSPriorityImpl(int prio); | | void setOSPriorityImpl(int prio); | |
| int getOSPriorityImpl() const; | | int getOSPriorityImpl() const; | |
| static int getMinOSPriorityImpl(); | | static int getMinOSPriorityImpl(); | |
| static int getMaxOSPriorityImpl(); | | static int getMaxOSPriorityImpl(); | |
| void setStackSizeImpl(int size); | | void setStackSizeImpl(int size); | |
| int getStackSizeImpl() const; | | int getStackSizeImpl() const; | |
| void startImpl(Runnable& target); | | void startImpl(Runnable& target); | |
| void startImpl(Callable target, void* pData = 0); | | void startImpl(Callable target, void* pData = 0); | |
| | | | |
| void joinImpl(); | | void joinImpl(); | |
| bool joinImpl(long milliseconds); | | bool joinImpl(long milliseconds); | |
| bool isRunningImpl() const; | | bool isRunningImpl() const; | |
| static void sleepImpl(long milliseconds); | | static void sleepImpl(long milliseconds); | |
| static void yieldImpl(); | | static void yieldImpl(); | |
| static ThreadImpl* currentImpl(); | | static ThreadImpl* currentImpl(); | |
|
| | | static TIDImpl currentTidImpl(); | |
| | | | |
| protected: | | protected: | |
| #if defined(_DLL) | | #if defined(_DLL) | |
| static DWORD WINAPI runnableEntry(LPVOID pThread); | | static DWORD WINAPI runnableEntry(LPVOID pThread); | |
| #else | | #else | |
| static unsigned __stdcall runnableEntry(void* pThread); | | static unsigned __stdcall runnableEntry(void* pThread); | |
| #endif | | #endif | |
| | | | |
| #if defined(_DLL) | | #if defined(_DLL) | |
| static DWORD WINAPI callableEntry(LPVOID pThread); | | static DWORD WINAPI callableEntry(LPVOID pThread); | |
| | | | |
| skipping to change at line 143 | | skipping to change at line 146 | |
| TlsSetValue(_slot, pThread); | | TlsSetValue(_slot, pThread); | |
| } | | } | |
| | | | |
| private: | | private: | |
| DWORD _slot; | | DWORD _slot; | |
| }; | | }; | |
| | | | |
| Runnable* _pRunnableTarget; | | Runnable* _pRunnableTarget; | |
| CallbackData _callbackTarget; | | CallbackData _callbackTarget; | |
| HANDLE _thread; | | HANDLE _thread; | |
|
| | | DWORD _threadId; | |
| int _prio; | | int _prio; | |
| int _stackSize; | | int _stackSize; | |
| | | | |
| static CurrentThreadHolder _currentThreadHolder; | | static CurrentThreadHolder _currentThreadHolder; | |
| }; | | }; | |
| | | | |
| // | | // | |
| // inlines | | // inlines | |
| // | | // | |
| inline int ThreadImpl::getPriorityImpl() const | | inline int ThreadImpl::getPriorityImpl() const | |
| | | | |
| skipping to change at line 192 | | skipping to change at line 196 | |
| inline void ThreadImpl::setStackSizeImpl(int size) | | inline void ThreadImpl::setStackSizeImpl(int size) | |
| { | | { | |
| _stackSize = size; | | _stackSize = size; | |
| } | | } | |
| | | | |
| inline int ThreadImpl::getStackSizeImpl() const | | inline int ThreadImpl::getStackSizeImpl() const | |
| { | | { | |
| return _stackSize; | | return _stackSize; | |
| } | | } | |
| | | | |
|
| | | inline ThreadImpl::TIDImpl ThreadImpl::tidImpl() const | |
| | | { | |
| | | return _threadId; | |
| | | } | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Thread_WIN32_INCLUDED | | #endif // Foundation_Thread_WIN32_INCLUDED | |
| | | | |
End of changes. 6 change blocks. |
| 1 lines changed or deleted | | 10 lines changed or added | |
|
| TimedNotificationQueue.h | | TimedNotificationQueue.h | |
| // | | // | |
| // TimedNotificationQueue.h | | // TimedNotificationQueue.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/TimedNotificationQueue.h#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/TimedNotificationQueue.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Notifications | | // Package: Notifications | |
| // Module: TimedNotificationQueue | | // Module: TimedNotificationQueue | |
| // | | // | |
| // Definition of the TimedNotificationQueue class. | | // Definition of the TimedNotificationQueue class. | |
| // | | // | |
| // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2009, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 104 | | skipping to change at line 104 | |
| /// It is highly recommended that the result is immediately | | /// It is highly recommended that the result is immediately | |
| /// assigned to a Notification::Ptr, to avoid potential | | /// assigned to a Notification::Ptr, to avoid potential | |
| /// memory management issues. | | /// memory management issues. | |
| | | | |
| Notification* waitDequeueNotification(); | | Notification* waitDequeueNotification(); | |
| /// Dequeues the next pending notification. | | /// Dequeues the next pending notification. | |
| /// If no notification is available, waits for a notificatio
n | | /// If no notification is available, waits for a notificatio
n | |
| /// to be enqueued. | | /// to be enqueued. | |
| /// The caller gains ownership of the notification and | | /// The caller gains ownership of the notification and | |
| /// is expected to release it when done with it. | | /// is expected to release it when done with it. | |
|
| /// This method returns 0 (null) if wakeUpWaitingThreads() | | | |
| /// has been called by another thread. | | | |
| /// | | /// | |
| /// It is highly recommended that the result is immediately | | /// It is highly recommended that the result is immediately | |
| /// assigned to a Notification::Ptr, to avoid potential | | /// assigned to a Notification::Ptr, to avoid potential | |
| /// memory management issues. | | /// memory management issues. | |
| | | | |
| Notification* waitDequeueNotification(long milliseconds); | | Notification* waitDequeueNotification(long milliseconds); | |
| /// Dequeues the next pending notification. | | /// Dequeues the next pending notification. | |
| /// If no notification is available, waits for a notificatio
n | | /// If no notification is available, waits for a notificatio
n | |
| /// to be enqueued up to the specified time. | | /// to be enqueued up to the specified time. | |
| /// Returns 0 (null) if no notification is available. | | /// Returns 0 (null) if no notification is available. | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 1 lines changed or added | |
|
| Timer.h | | Timer.h | |
| // | | // | |
| // Timer.h | | // Timer.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Timer.h#5 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Timer.h#6 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Threading | | // Package: Threading | |
| // Module: Timer | | // Module: Timer | |
| // | | // | |
| // Definition of the Timer and related classes. | | // Definition of the Timer and related classes. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 159 | | skipping to change at line 159 | |
| | | | |
| protected: | | protected: | |
| void run(); | | void run(); | |
| | | | |
| private: | | private: | |
| volatile long _startInterval; | | volatile long _startInterval; | |
| volatile long _periodicInterval; | | volatile long _periodicInterval; | |
| Event _wakeUp; | | Event _wakeUp; | |
| Event _done; | | Event _done; | |
| AbstractTimerCallback* _pCallback; | | AbstractTimerCallback* _pCallback; | |
|
| Poco::Timestamp _nextInvocation; | | Timestamp _nextInvocation; | |
| mutable FastMutex _mutex; | | mutable FastMutex _mutex; | |
| | | | |
| Timer(const Timer&); | | Timer(const Timer&); | |
| Timer& operator = (const Timer&); | | Timer& operator = (const Timer&); | |
| }; | | }; | |
| | | | |
| class Foundation_API AbstractTimerCallback | | class Foundation_API AbstractTimerCallback | |
| /// This is the base class for all instantiations of | | /// This is the base class for all instantiations of | |
| /// the TimerCallback template. | | /// the TimerCallback template. | |
| { | | { | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| Timestamp.h | | Timestamp.h | |
| // | | // | |
| // Timestamp.h | | // Timestamp.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Timestamp.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Timestamp.h#3 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: Timestamp | | // Module: Timestamp | |
| // | | // | |
| // Definition of the Timestamp class. | | // Definition of the Timestamp class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 47 | |
| | | | |
| #ifndef Foundation_Timestamp_INCLUDED | | #ifndef Foundation_Timestamp_INCLUDED | |
| #define Foundation_Timestamp_INCLUDED | | #define Foundation_Timestamp_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| #include <ctime> | | #include <ctime> | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API Timestamp | | class Foundation_API Timestamp | |
|
| /// A Timestamp stores a monotonic time value | | /// A Timestamp stores a monotonic* time value | |
| /// with (theoretical) microseconds resolution. | | /// with (theoretical) microseconds resolution. | |
| /// Timestamps can be compared with each other | | /// Timestamps can be compared with each other | |
| /// and simple arithmetics are supported. | | /// and simple arithmetics are supported. | |
|
| | | /// | |
| | | /// [*] Note that Timestamp values are only monotonic as | |
| | | /// long as the systems's clock is monotonic as well | |
| | | /// (and not, e.g. set back). | |
| | | /// | |
| /// Timestamps are UTC (Coordinated Universal Time) | | /// Timestamps are UTC (Coordinated Universal Time) | |
| /// based and thus independent of the timezone | | /// based and thus independent of the timezone | |
| /// in effect on the system. | | /// in effect on the system. | |
| { | | { | |
| public: | | public: | |
| typedef Int64 TimeVal; /// monotonic UTC time value in microsecon
d resolution | | typedef Int64 TimeVal; /// monotonic UTC time value in microsecon
d resolution | |
| typedef Int64 UtcTimeVal; /// monotonic UTC time value in 100 nanose
cond resolution | | typedef Int64 UtcTimeVal; /// monotonic UTC time value in 100 nanose
cond resolution | |
| typedef Int64 TimeDiff; /// difference between two timestamps in m
icroseconds | | typedef Int64 TimeDiff; /// difference between two timestamps in m
icroseconds | |
| | | | |
| Timestamp(); | | Timestamp(); | |
| | | | |
End of changes. 3 change blocks. |
| 2 lines changed or deleted | | 7 lines changed or added | |
|
| Timezone.h | | Timezone.h | |
| // | | // | |
| // Timezone.h | | // Timezone.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Timezone.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Timezone.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: DateTime | | // Package: DateTime | |
| // Module: Timezone | | // Module: Timezone | |
| // | | // | |
| // Definition of the Timezone class. | | // Definition of the Timezone class. | |
| // | | // | |
| // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 52 | | skipping to change at line 52 | |
| #include "Poco/Timestamp.h" | | #include "Poco/Timestamp.h" | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API Timezone | | class Foundation_API Timezone | |
| /// This class provides information about the current timezone. | | /// This class provides information about the current timezone. | |
| { | | { | |
| public: | | public: | |
| static int utcOffset(); | | static int utcOffset(); | |
| /// Returns the offset of local time to UTC, in seconds. | | /// Returns the offset of local time to UTC, in seconds. | |
|
| /// local time = UTC + utcOffset(). | | /// local time = UTC + utcOffset() + dst(). | |
| | | | |
| static int dst(); | | static int dst(); | |
| /// Returns the daylight saving time offset in seconds if | | /// Returns the daylight saving time offset in seconds if | |
| /// daylight saving time is in use. | | /// daylight saving time is in use. | |
| /// local time = UTC + utcOffset() + dst(). | | /// local time = UTC + utcOffset() + dst(). | |
| | | | |
| static bool isDst(const Timestamp& timestamp); | | static bool isDst(const Timestamp& timestamp); | |
| /// Returns true if daylight saving time is in effect | | /// Returns true if daylight saving time is in effect | |
| /// for the given time. Depending on the operating system | | /// for the given time. Depending on the operating system | |
| /// platform this might only work reliably for certain | | /// platform this might only work reliably for certain | |
| | | | |
End of changes. 2 change blocks. |
| 2 lines changed or deleted | | 2 lines changed or added | |
|
| UTF16Encoding.h | | UTF16Encoding.h | |
| // | | // | |
| // UTF16Encoding.h | | // UTF16Encoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/UTF16Encoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/UTF16Encoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: UTF16Encoding | | // Module: UTF16Encoding | |
| // | | // | |
| // Definition of the UTF16Encoding class. | | // Definition of the UTF16Encoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 90 | | skipping to change at line 90 | |
| void setByteOrder(int byteOrderMark); | | void setByteOrder(int byteOrderMark); | |
| /// Sets the byte order according to the given | | /// Sets the byte order according to the given | |
| /// byte order mark, which is the Unicode | | /// byte order mark, which is the Unicode | |
| /// character 0xFEFF. | | /// character 0xFEFF. | |
| | | | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| private: | | private: | |
| bool _flipBytes; | | bool _flipBytes; | |
| static const char* _names[]; | | static const char* _names[]; | |
| static const CharacterMap _charMap; | | static const CharacterMap _charMap; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_UTF16Encoding_INCLUDED | | #endif // Foundation_UTF16Encoding_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| UTF8Encoding.h | | UTF8Encoding.h | |
| // | | // | |
| // UTF8Encoding.h | | // UTF8Encoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/UTF8Encoding.h#3 $ | | // $Id: //poco/1.3/Foundation/include/Poco/UTF8Encoding.h#6 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: UTF8Encoding | | // Module: UTF8Encoding | |
| // | | // | |
| // Definition of the UTF8Encoding class. | | // Definition of the UTF8Encoding class. | |
| // | | // | |
| // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| /// UTF-8 text encoding, as defined in RFC 2279. | | /// UTF-8 text encoding, as defined in RFC 2279. | |
| { | | { | |
| public: | | public: | |
| UTF8Encoding(); | | UTF8Encoding(); | |
| ~UTF8Encoding(); | | ~UTF8Encoding(); | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| static bool isLegal(const unsigned char *bytes, int length); | | static bool isLegal(const unsigned char *bytes, int length); | |
| /// Utility routine to tell whether a sequence of bytes is l
egal UTF-8. | | /// Utility routine to tell whether a sequence of bytes is l
egal UTF-8. | |
| /// This must be called with the length pre-determined by th
e first byte. | | /// This must be called with the length pre-determined by th
e first byte. | |
| /// The sequence is illegal right away if there aren't enoug
h bytes | | /// The sequence is illegal right away if there aren't enoug
h bytes | |
| /// available. If presented with a length > 4, this function
returns false. | | /// available. If presented with a length > 4, this function
returns false. | |
| /// The Unicode definition of UTF-8 goes up to 4-byte sequen
ces. | | /// The Unicode definition of UTF-8 goes up to 4-byte sequen
ces. | |
| /// | | /// | |
| /// Adapted from ftp://ftp.unicode.org/Public/PROGRAMS/CVTUT
F/ConvertUTF.c | | /// Adapted from ftp://ftp.unicode.org/Public/PROGRAMS/CVTUT
F/ConvertUTF.c | |
| /// Copyright 2001-2004 Unicode, Inc. | | /// Copyright 2001-2004 Unicode, Inc. | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| Void.h | | Void.h | |
| // | | // | |
| // Void.h | | // Void.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Void.h#1 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Void.h#2 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Core | | // Package: Core | |
| // Module: Void | | // Module: Void | |
| // | | // | |
| // Definition of the Void class. | | // Definition of the Void class. | |
| // | | // | |
| // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2006, Applied Informatics Software Engineering GmbH. | |
|
| // All rights reserved. | | // and Contributors. | |
| // | | | |
| // Redistribution and use in source and binary forms, with or without | | | |
| // modification, are permitted provided that the following conditions | | | |
| // are met: | | | |
| // | | | |
| // 1. Redistributions of source code must retain the above copyright | | | |
| // notice, this list of conditions and the following disclaimer. | | | |
| // | | // | |
|
| // 2. Redistributions in binary form must reproduce the above copyright | | // Permission is hereby granted, free of charge, to any person or organizat | |
| // notice, this list of conditions and the following disclaimer in the | | ion | |
| // documentation and/or other materials provided with the distribution. | | // obtaining a copy of the software and accompanying documentation covered | |
| | | by | |
| | | // this license (the "Software") to use, reproduce, display, distribute, | |
| | | // execute, and transmit the Software, and to prepare derivative works of t | |
| | | he | |
| | | // Software, and to permit third-parties to whom the Software is furnished | |
| | | to | |
| | | // do so, all subject to the following: | |
| // | | // | |
|
| // 3. Redistributions in any form must be accompanied by information on | | // The copyright notices in the Software and this entire statement, includi | |
| // how to obtain complete source code for this software and any | | ng | |
| // accompanying software that uses this software. The source code | | // the above license grant, this restriction and the following disclaimer, | |
| // must either be included in the distribution or be available for no | | // must be included in all copies of the Software, in whole or in part, and | |
| // more than the cost of distribution plus a nominal fee, and must be | | // all derivative works of the Software, unless such copies or derivative | |
| // freely redistributable under reasonable conditions. For an | | // works are solely in the form of machine-executable object code generated | |
| // executable file, complete source code means the source code for all | | by | |
| // modules it contains. It does not include source code for modules or | | // a source language processor. | |
| // files that typically accompany the major components of the operating | | | |
| // system on which the executable file runs. | | | |
| // | | // | |
|
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
| // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | | OR | |
| // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | | // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVEN | |
| // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | | T | |
| // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | | // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL | |
| // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | | E | |
| // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | | // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI | |
| // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | SE, | |
| // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | | // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT | |
| // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | HER | |
| // POSSIBILITY OF SUCH DAMAGE. | | // DEALINGS IN THE SOFTWARE. | |
| // | | // | |
| | | | |
| #ifndef Foundation_Void_INCLUDED | | #ifndef Foundation_Void_INCLUDED | |
| #define Foundation_Void_INCLUDED | | #define Foundation_Void_INCLUDED | |
| | | | |
| #include "Poco/Foundation.h" | | #include "Poco/Foundation.h" | |
| | | | |
| namespace Poco { | | namespace Poco { | |
| | | | |
| class Foundation_API Void | | class Foundation_API Void | |
| | | | |
End of changes. 5 change blocks. |
| 34 lines changed or deleted | | 32 lines changed or added | |
|
| Windows1252Encoding.h | | Windows1252Encoding.h | |
| // | | // | |
| // Windows1252Encoding.h | | // Windows1252Encoding.h | |
| // | | // | |
|
| // $Id: //poco/1.3/Foundation/include/Poco/Windows1252Encoding.h#2 $ | | // $Id: //poco/1.3/Foundation/include/Poco/Windows1252Encoding.h#4 $ | |
| // | | // | |
| // Library: Foundation | | // Library: Foundation | |
| // Package: Text | | // Package: Text | |
| // Module: Windows1252Encoding | | // Module: Windows1252Encoding | |
| // | | // | |
| // Definition of the Windows1252Encoding class. | | // Definition of the Windows1252Encoding class. | |
| // | | // | |
| // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | | // Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH. | |
| // and Contributors. | | // and Contributors. | |
| // | | // | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 57 | |
| /// Windows Codepage 1252 text encoding. | | /// Windows Codepage 1252 text encoding. | |
| { | | { | |
| public: | | public: | |
| Windows1252Encoding(); | | Windows1252Encoding(); | |
| ~Windows1252Encoding(); | | ~Windows1252Encoding(); | |
| const char* canonicalName() const; | | const char* canonicalName() const; | |
| bool isA(const std::string& encodingName) const; | | bool isA(const std::string& encodingName) const; | |
| const CharacterMap& characterMap() const; | | const CharacterMap& characterMap() const; | |
| int convert(const unsigned char* bytes) const; | | int convert(const unsigned char* bytes) const; | |
| int convert(int ch, unsigned char* bytes, int length) const; | | int convert(int ch, unsigned char* bytes, int length) const; | |
|
| | | int queryConvert(const unsigned char* bytes, int length) const; | |
| | | int sequenceLength(const unsigned char* bytes, int length) const; | |
| | | | |
| private: | | private: | |
| static const char* _names[]; | | static const char* _names[]; | |
| static const CharacterMap _charMap; | | static const CharacterMap _charMap; | |
| }; | | }; | |
| | | | |
| } // namespace Poco | | } // namespace Poco | |
| | | | |
| #endif // Foundation_Windows1252Encoding_INCLUDED | | #endif // Foundation_Windows1252Encoding_INCLUDED | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|