removed exception specifications. thread exceptions weren't

being listed and they'd have to be added to every one.  just
doesn't seem worth the trouble.
This commit is contained in:
crs
2001-10-14 16:58:01 +00:00
parent c6ed114410
commit 6aba3a6f57
50 changed files with 269 additions and 272 deletions

View File

@@ -27,7 +27,7 @@ CBufferedInputStream::~CBufferedInputStream()
}
void CBufferedInputStream::write(
const void* data, UInt32 n) throw()
const void* data, UInt32 n)
{
if (!m_hungup && n > 0) {
m_buffer.write(data, n);
@@ -36,14 +36,14 @@ void CBufferedInputStream::write(
}
}
void CBufferedInputStream::hangup() throw()
void CBufferedInputStream::hangup()
{
m_hungup = true;
m_empty.broadcast();
}
UInt32 CBufferedInputStream::readNoLock(
void* dst, UInt32 n) throw(XIO)
void* dst, UInt32 n)
{
if (m_closed) {
throw XIOClosed();
@@ -74,12 +74,12 @@ UInt32 CBufferedInputStream::readNoLock(
return n;
}
UInt32 CBufferedInputStream::getSizeNoLock() const throw()
UInt32 CBufferedInputStream::getSizeNoLock() const
{
return m_buffer.getSize();
}
void CBufferedInputStream::close() throw(XIO)
void CBufferedInputStream::close()
{
CLock lock(m_mutex);
if (m_closed) {
@@ -93,13 +93,13 @@ void CBufferedInputStream::close() throw(XIO)
}
UInt32 CBufferedInputStream::read(
void* dst, UInt32 n) throw(XIO)
void* dst, UInt32 n)
{
CLock lock(m_mutex);
return readNoLock(dst, n);
}
UInt32 CBufferedInputStream::getSize() const throw()
UInt32 CBufferedInputStream::getSize() const
{
CLock lock(m_mutex);
return getSizeNoLock();

View File

@@ -19,25 +19,25 @@ class CBufferedInputStream : public IInputStream {
// manipulators
// write() appends n bytes to the buffer
void write(const void*, UInt32 n) throw();
void write(const void*, UInt32 n);
// causes read() to always return immediately. if there is no
// more data then it returns 0. further writes are discarded.
void hangup() throw();
void hangup();
// same as read() but caller must lock the mutex
UInt32 readNoLock(void*, UInt32 count) throw(XIO);
UInt32 readNoLock(void*, UInt32 count);
// accessors
// same as getSize() but caller must lock the mutex
UInt32 getSizeNoLock() const throw();
UInt32 getSizeNoLock() const;
// IInputStream overrides
// these all lock the mutex for their duration
virtual void close() throw(XIO);
virtual UInt32 read(void*, UInt32 count) throw(XIO);
virtual UInt32 getSize() const throw();
virtual void close();
virtual UInt32 read(void*, UInt32 count);
virtual UInt32 getSize() const;
private:
CMutex* m_mutex;

View File

@@ -23,22 +23,22 @@ CBufferedOutputStream::~CBufferedOutputStream()
delete m_closeCB;
}
const void* CBufferedOutputStream::peek(UInt32 n) throw()
const void* CBufferedOutputStream::peek(UInt32 n)
{
return m_buffer.peek(n);
}
void CBufferedOutputStream::pop(UInt32 n) throw()
void CBufferedOutputStream::pop(UInt32 n)
{
m_buffer.pop(n);
}
UInt32 CBufferedOutputStream::getSize() const throw()
UInt32 CBufferedOutputStream::getSize() const
{
return m_buffer.getSize();
}
void CBufferedOutputStream::close() throw(XIO)
void CBufferedOutputStream::close()
{
CLock lock(m_mutex);
if (m_closed) {
@@ -52,7 +52,7 @@ void CBufferedOutputStream::close() throw(XIO)
}
UInt32 CBufferedOutputStream::write(
const void* data, UInt32 n) throw(XIO)
const void* data, UInt32 n)
{
CLock lock(m_mutex);
if (m_closed) {
@@ -63,7 +63,7 @@ UInt32 CBufferedOutputStream::write(
return n;
}
void CBufferedOutputStream::flush() throw(XIO)
void CBufferedOutputStream::flush()
{
// wait until all data is written
while (getSizeWithLock() > 0) {
@@ -71,7 +71,7 @@ void CBufferedOutputStream::flush() throw(XIO)
}
}
UInt32 CBufferedOutputStream::getSizeWithLock() const throw()
UInt32 CBufferedOutputStream::getSizeWithLock() const
{
CLock lock(m_mutex);
return m_buffer.getSize();

View File

@@ -19,22 +19,22 @@ class CBufferedOutputStream : public IOutputStream {
// peek() returns a buffer of n bytes (which must be <= getSize()).
// pop() discards the next n bytes.
const void* peek(UInt32 n) throw();
void pop(UInt32 n) throw();
const void* peek(UInt32 n);
void pop(UInt32 n);
// accessors
// return the number of bytes in the buffer
UInt32 getSize() const throw();
UInt32 getSize() const;
// IOutputStream overrides
// these all lock the mutex for their duration
virtual void close() throw(XIO);
virtual UInt32 write(const void*, UInt32 count) throw(XIO);
virtual void flush() throw(XIO);
virtual void close();
virtual UInt32 write(const void*, UInt32 count);
virtual void flush();
private:
UInt32 getSizeWithLock() const throw();
UInt32 getSizeWithLock() const;
private:
CMutex* m_mutex;

View File

@@ -19,7 +19,7 @@ CInputStreamFilter::~CInputStreamFilter()
}
}
IInputStream* CInputStreamFilter::getStream() const throw()
IInputStream* CInputStreamFilter::getStream() const
{
return m_stream;
}

View File

@@ -13,12 +13,12 @@ class CInputStreamFilter : public IInputStream {
// accessors
// IInputStream overrides
virtual void close() throw(XIO) = 0;
virtual UInt32 read(void*, UInt32 maxCount) throw(XIO) = 0;
virtual UInt32 getSize() const throw() = 0;
virtual void close() = 0;
virtual UInt32 read(void*, UInt32 maxCount) = 0;
virtual UInt32 getSize() const = 0;
protected:
IInputStream* getStream() const throw();
IInputStream* getStream() const;
private:
IInputStream* m_stream;

View File

@@ -19,7 +19,7 @@ COutputStreamFilter::~COutputStreamFilter()
}
}
IOutputStream* COutputStreamFilter::getStream() const throw()
IOutputStream* COutputStreamFilter::getStream() const
{
return m_stream;
}

View File

@@ -13,12 +13,12 @@ class COutputStreamFilter : public IOutputStream {
// accessors
// IOutputStream overrides
virtual void close() throw(XIO) = 0;
virtual UInt32 write(const void*, UInt32 count) throw(XIO) = 0;
virtual void flush() throw(XIO) = 0;
virtual void close() = 0;
virtual UInt32 write(const void*, UInt32 count) = 0;
virtual void flush() = 0;
protected:
IOutputStream* getStream() const throw();
IOutputStream* getStream() const;
private:
IOutputStream* m_stream;

View File

@@ -17,7 +17,7 @@ CStreamBuffer::~CStreamBuffer()
// do nothing
}
const void* CStreamBuffer::peek(UInt32 n) throw()
const void* CStreamBuffer::peek(UInt32 n)
{
assert(n <= m_size);
@@ -36,7 +36,7 @@ const void* CStreamBuffer::peek(UInt32 n) throw()
return reinterpret_cast<const void*>(head->begin());
}
void CStreamBuffer::pop(UInt32 n) throw()
void CStreamBuffer::pop(UInt32 n)
{
m_size -= n;
@@ -58,7 +58,7 @@ void CStreamBuffer::pop(UInt32 n) throw()
}
void CStreamBuffer::write(
const void* vdata, UInt32 n) throw()
const void* vdata, UInt32 n)
{
assert(vdata != NULL);
@@ -100,7 +100,7 @@ void CStreamBuffer::write(
}
}
UInt32 CStreamBuffer::getSize() const throw()
UInt32 CStreamBuffer::getSize() const
{
return m_size;
}

View File

@@ -14,16 +14,16 @@ class CStreamBuffer {
// peek() returns a buffer of n bytes (which must be <= getSize()).
// pop() discards the next n bytes.
const void* peek(UInt32 n) throw();
void pop(UInt32 n) throw();
const void* peek(UInt32 n);
void pop(UInt32 n);
// write() appends n bytes to the buffer
void write(const void*, UInt32 n) throw();
void write(const void*, UInt32 n);
// accessors
// return the number of bytes in the buffer
UInt32 getSize() const throw();
UInt32 getSize() const;
private:
static const UInt32 kChunkSize;

View File

@@ -10,12 +10,12 @@ class IInputStream : public IInterface {
// manipulators
// close the stream
virtual void close() throw(XIO) = 0;
virtual void close() = 0;
// read up to maxCount bytes into buffer, return number read.
// blocks if no data is currently available. if buffer is NULL
// then the data is discarded.
virtual UInt32 read(void* buffer, UInt32 maxCount) throw(XIO) = 0;
virtual UInt32 read(void* buffer, UInt32 maxCount) = 0;
// accessors
@@ -23,7 +23,7 @@ class IInputStream : public IInterface {
// (i.e. a number not greater than the actual number of bytes).
// some streams may not be able to determine this and will always
// return zero.
virtual UInt32 getSize() const throw() = 0;
virtual UInt32 getSize() const = 0;
};
#endif

View File

@@ -10,13 +10,13 @@ class IOutputStream : public IInterface {
// manipulators
// close the stream
virtual void close() throw(XIO) = 0;
virtual void close() = 0;
// write count bytes to stream
virtual UInt32 write(const void*, UInt32 count) throw(XIO) = 0;
virtual UInt32 write(const void*, UInt32 count) = 0;
// flush the stream
virtual void flush() throw(XIO) = 0;
virtual void flush() = 0;
// accessors
};