use epics_throws macro
This commit is contained in:
@@ -27,56 +27,58 @@
|
||||
#ifndef comQueRecvh
|
||||
#define comQueRecvh
|
||||
|
||||
#include "comBuf.h"
|
||||
|
||||
class comQueRecv {
|
||||
public:
|
||||
comQueRecv ( comBufMemoryManager & ) throw ();
|
||||
~comQueRecv () throw ();
|
||||
unsigned occupiedBytes () const throw ();
|
||||
unsigned copyOutBytes ( epicsInt8 *pBuf, unsigned nBytes ) throw ();
|
||||
unsigned removeBytes ( unsigned nBytes ) throw ();
|
||||
void pushLastComBufReceived ( comBuf & ) throw ();
|
||||
void clear () throw ();
|
||||
epicsInt8 popInt8 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsUInt8 popUInt8 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsInt16 popInt16 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsUInt16 popUInt16 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsInt32 popInt32 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsUInt32 popUInt32 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsFloat32 popFloat32 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsFloat64 popFloat64 () throw ( comBuf::insufficentBytesAvailable );
|
||||
void popString ( epicsOldString * ) throw ( comBuf::insufficentBytesAvailable );
|
||||
comQueRecv ( comBufMemoryManager & ) epics_throws (());
|
||||
~comQueRecv () epics_throws (());
|
||||
unsigned occupiedBytes () const epics_throws (());
|
||||
unsigned copyOutBytes ( epicsInt8 *pBuf, unsigned nBytes ) epics_throws (());
|
||||
unsigned removeBytes ( unsigned nBytes ) epics_throws (());
|
||||
void pushLastComBufReceived ( comBuf & ) epics_throws (());
|
||||
void clear () epics_throws (());
|
||||
epicsInt8 popInt8 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsUInt8 popUInt8 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsInt16 popInt16 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsUInt16 popUInt16 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsInt32 popInt32 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsUInt32 popUInt32 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsFloat32 popFloat32 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsFloat64 popFloat64 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
void popString ( epicsOldString * ) epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
private:
|
||||
tsDLList < comBuf > bufs;
|
||||
comBufMemoryManager & comBufMemMgr;
|
||||
unsigned nBytesPending;
|
||||
epicsUInt16 multiBufferPopUInt16 () throw ( comBuf::insufficentBytesAvailable );
|
||||
epicsUInt32 multiBufferPopUInt32 () throw ( comBuf::insufficentBytesAvailable );
|
||||
void removeAndDestroyBuf ( comBuf & ) throw ();
|
||||
comQueRecv ( const comQueRecv & ) throw ();
|
||||
comQueRecv & operator = ( const comQueRecv & ) throw ();
|
||||
epicsUInt16 multiBufferPopUInt16 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
epicsUInt32 multiBufferPopUInt32 () epics_throws (( comBuf::insufficentBytesAvailable ));
|
||||
void removeAndDestroyBuf ( comBuf & ) epics_throws (());
|
||||
comQueRecv ( const comQueRecv & ) epics_throws (());
|
||||
comQueRecv & operator = ( const comQueRecv & ) epics_throws (());
|
||||
};
|
||||
|
||||
inline unsigned comQueRecv::occupiedBytes () const
|
||||
throw ()
|
||||
epics_throws (())
|
||||
{
|
||||
return this->nBytesPending;
|
||||
}
|
||||
|
||||
inline epicsInt8 comQueRecv::popInt8 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
return static_cast < epicsInt8 > ( this->popUInt8() );
|
||||
}
|
||||
|
||||
inline epicsInt16 comQueRecv::popInt16 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
return static_cast < epicsInt16 > ( this->popInt8() << 8u
|
||||
| this->popInt8() << 0u );
|
||||
}
|
||||
|
||||
inline epicsInt32 comQueRecv::popInt32 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
epicsInt32 tmp ;
|
||||
tmp = this->popInt8() << 24u;
|
||||
@@ -87,7 +89,7 @@ inline epicsInt32 comQueRecv::popInt32 ()
|
||||
}
|
||||
|
||||
inline epicsFloat32 comQueRecv::popFloat32 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
epicsFloat32 tmp;
|
||||
epicsUInt8 wire[ sizeof ( tmp ) ];
|
||||
@@ -100,7 +102,7 @@ inline epicsFloat32 comQueRecv::popFloat32 ()
|
||||
}
|
||||
|
||||
inline epicsFloat64 comQueRecv::popFloat64 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
epicsFloat64 tmp;
|
||||
epicsUInt8 wire[ sizeof ( tmp ) ];
|
||||
@@ -113,7 +115,7 @@ inline epicsFloat64 comQueRecv::popFloat64 ()
|
||||
}
|
||||
|
||||
inline epicsUInt8 comQueRecv::popUInt8 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
comBuf * pComBuf = this->bufs.first ();
|
||||
if ( ! pComBuf ) {
|
||||
@@ -129,7 +131,7 @@ inline epicsUInt8 comQueRecv::popUInt8 ()
|
||||
|
||||
// optimization here complicates this function somewhat
|
||||
inline epicsUInt16 comQueRecv::popUInt16 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
comBuf *pComBuf = this->bufs.first ();
|
||||
if ( ! pComBuf ) {
|
||||
@@ -155,7 +157,7 @@ inline epicsUInt16 comQueRecv::popUInt16 ()
|
||||
|
||||
// optimization here complicates this function somewhat
|
||||
inline epicsUInt32 comQueRecv::popUInt32 ()
|
||||
throw ( comBuf::insufficentBytesAvailable )
|
||||
epics_throws (( comBuf::insufficentBytesAvailable ))
|
||||
{
|
||||
comBuf *pComBuf = this->bufs.first ();
|
||||
if ( ! pComBuf ) {
|
||||
|
||||
Reference in New Issue
Block a user