This commit is contained in:
Aleksandar Fabijanic 2012-06-08 02:24:36 +00:00
Родитель cfbcce0481
Коммит 69bd6f6ee9
6 изменённых файлов: 17 добавлений и 14 удалений

Просмотреть файл

@ -12,8 +12,8 @@ objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel Base64Decoder Base64E
BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \
CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \
Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator \
Environment Event EventArgs ErrorHandler Exception FPEnvironment File Glob \
FileChannel Formatter FormattingChannel HexBinaryDecoder LineEndingConverter \
Environment Event EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \
FileChannel Formatter FormattingChannel Glob HexBinaryDecoder LineEndingConverter \
HexBinaryEncoder InflatingStream Latin1Encoding Latin2Encoding Latin9Encoding LogFile \
Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \
MemoryPool MD4Engine MD5Engine Manifest Message Mutex \

Просмотреть файл

@ -41,6 +41,7 @@
#include "Poco/Foundation.h"
#include "Poco/Exception.h"
#include <cstring>
#include <cstddef>
@ -134,7 +135,7 @@ public:
/// is thrown.
{
if (!_ownMem)
throw InvalidAccessException("Cannot resize buffer which does not own its storage.");
throw Poco::InvalidAccessException("Cannot resize buffer which does not own its storage.");
poco_assert(newCapacity);

Просмотреть файл

@ -132,8 +132,8 @@ class Foundation_API FIFOBufferStream: public FIFOIOS, public std::iostream
/// An output stream for writing to a FIFO.
{
public:
Poco::BasicEvent<bool>& readable;
Poco::BasicEvent<bool>& writable;
Poco::BasicEvent<bool>& readable;
explicit FIFOBufferStream(FIFOBuffer& buffer);
/// Creates the FIFOBufferStream with supplied buffer as initial value.

Просмотреть файл

@ -166,36 +166,36 @@ void FIFOIOS::close()
FIFOBufferStream::FIFOBufferStream(FIFOBuffer& fifoBuffer):
FIFOIOS(fifoBuffer),
std::iostream(&_buf),
readable(_buf.fifoBuffer().readable),
writable(_buf.fifoBuffer().writable),
std::iostream(&_buf)
writable(_buf.fifoBuffer().writable)
{
}
FIFOBufferStream::FIFOBufferStream(char* pBuffer, std::size_t length):
FIFOIOS(pBuffer, length),
std::iostream(&_buf),
readable(_buf.fifoBuffer().readable),
writable(_buf.fifoBuffer().writable),
std::iostream(&_buf)
writable(_buf.fifoBuffer().writable)
{
}
FIFOBufferStream::FIFOBufferStream(const char* pBuffer, std::size_t length):
FIFOIOS(pBuffer, length),
std::iostream(&_buf),
readable(_buf.fifoBuffer().readable),
writable(_buf.fifoBuffer().writable),
std::iostream(&_buf)
writable(_buf.fifoBuffer().writable)
{
}
FIFOBufferStream::FIFOBufferStream(std::size_t length):
FIFOIOS(length),
std::iostream(&_buf),
readable(_buf.fifoBuffer().readable),
writable(_buf.fifoBuffer().writable),
std::iostream(&_buf)
writable(_buf.fifoBuffer().writable)
{
}

Просмотреть файл

@ -15,7 +15,7 @@ objects = ActiveMethodTest ActivityTest ActiveDispatcherTest \
CountingStreamTest CryptTestSuite DateTimeFormatterTest \
DateTimeParserTest DateTimeTest LocalDateTimeTest DateTimeTestSuite DigestStreamTest \
Driver DynamicFactoryTest FPETest FileChannelTest FileTest GlobTest FilesystemTestSuite \
FoundationTestSuite HMACEngineTest HexBinaryTest LoggerTest \
FIFOBufferStreamTest FoundationTestSuite HMACEngineTest HexBinaryTest LoggerTest \
LoggingFactoryTest LoggingRegistryTest LoggingTestSuite LogStreamTest \
NamedEventTest NamedMutexTest ProcessesTestSuite ProcessTest \
MemoryPoolTest MD4EngineTest MD5EngineTest ManifestTest \

Просмотреть файл

@ -168,7 +168,9 @@ void FIFOBufferStreamTest::testNotify()
assert (1 == _notToReadable);
assert (1 == _writableToNot);
assert (1 == _notToWritable);
iostr.clear();
assert (iostr.good());
iostr << "This is a test " << 42 << std::ends << std::flush;
assert (iostr.rdbuf()->fifoBuffer().isFull());