use epics_throws macro
This commit is contained in:
@@ -40,56 +40,56 @@
|
||||
//
|
||||
class comQueSend {
|
||||
public:
|
||||
comQueSend ( wireSendAdapter &, comBufMemoryManager & ) throw ();
|
||||
~comQueSend () throw ();
|
||||
void clear () throw ();
|
||||
void beginMsg () throw ();
|
||||
void commitMsg () throw ();
|
||||
unsigned occupiedBytes () const throw ();
|
||||
bool flushEarlyThreshold ( unsigned nBytesThisMsg ) const throw ();
|
||||
bool flushBlockThreshold ( unsigned nBytesThisMsg ) const throw ();
|
||||
bool dbr_type_ok ( unsigned type ) throw ();
|
||||
void pushUInt16 ( const ca_uint16_t value ) throw ();
|
||||
void pushUInt32 ( const ca_uint32_t value ) throw ();
|
||||
void pushFloat32 ( const ca_float32_t value ) throw ();
|
||||
void pushString ( const char *pVal, unsigned nChar ) throw ();
|
||||
comQueSend ( wireSendAdapter &, comBufMemoryManager & ) epics_throws (());
|
||||
~comQueSend () epics_throws (());
|
||||
void clear () epics_throws (());
|
||||
void beginMsg () epics_throws (());
|
||||
void commitMsg () epics_throws (());
|
||||
unsigned occupiedBytes () const epics_throws (());
|
||||
bool flushEarlyThreshold ( unsigned nBytesThisMsg ) const epics_throws (());
|
||||
bool flushBlockThreshold ( unsigned nBytesThisMsg ) const epics_throws (());
|
||||
bool dbr_type_ok ( unsigned type ) epics_throws (());
|
||||
void pushUInt16 ( const ca_uint16_t value ) epics_throws (());
|
||||
void pushUInt32 ( const ca_uint32_t value ) epics_throws (());
|
||||
void pushFloat32 ( const ca_float32_t value ) epics_throws (());
|
||||
void pushString ( const char *pVal, unsigned nChar ) epics_throws (());
|
||||
void insertRequestHeader (
|
||||
ca_uint16_t request, ca_uint32_t payloadSize,
|
||||
ca_uint16_t dataType, ca_uint32_t nElem, ca_uint32_t cid,
|
||||
ca_uint32_t requestDependent, bool v49Ok )
|
||||
throw ( cacChannel::outOfBounds );
|
||||
epics_throws (( cacChannel::outOfBounds ));
|
||||
void insertRequestWithPayLoad (
|
||||
ca_uint16_t request, unsigned dataType, ca_uint32_t nElem,
|
||||
ca_uint32_t cid, ca_uint32_t requestDependent,
|
||||
const void * pPayload, bool v49Ok )
|
||||
throw ( cacChannel::outOfBounds );
|
||||
void push_dbr_type ( unsigned type, const void *pVal, unsigned nElem ) throw ();
|
||||
comBuf * popNextComBufToSend () throw ();
|
||||
epics_throws (( cacChannel::outOfBounds ));
|
||||
void push_dbr_type ( unsigned type, const void *pVal, unsigned nElem ) epics_throws (());
|
||||
comBuf * popNextComBufToSend () epics_throws (());
|
||||
private:
|
||||
comBufMemoryManager & comBufMemMgr;
|
||||
tsDLList < comBuf > bufs;
|
||||
tsDLIter < comBuf > pFirstUncommited;
|
||||
wireSendAdapter & wire;
|
||||
unsigned nBytesPending;
|
||||
void copy_dbr_string ( const void *pValue, unsigned nElem ) throw ();
|
||||
void copy_dbr_short ( const void *pValue, unsigned nElem ) throw ();
|
||||
void copy_dbr_float ( const void *pValue, unsigned nElem ) throw ();
|
||||
void copy_dbr_char ( const void *pValue, unsigned nElem ) throw ();
|
||||
void copy_dbr_long ( const void *pValue, unsigned nElem ) throw ();
|
||||
void copy_dbr_double ( const void *pValue, unsigned nElem ) throw ();
|
||||
void pushComBuf ( comBuf & ) throw ();
|
||||
void copy_dbr_string ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void copy_dbr_short ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void copy_dbr_float ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void copy_dbr_char ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void copy_dbr_long ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void copy_dbr_double ( const void *pValue, unsigned nElem ) epics_throws (());
|
||||
void pushComBuf ( comBuf & ) epics_throws (());
|
||||
typedef void ( comQueSend::*copyFunc_t ) (
|
||||
const void *pValue, unsigned nElem );
|
||||
static const copyFunc_t dbrCopyVector [39];
|
||||
|
||||
void clearUncommitted () throw ();
|
||||
void clearUncommitted () epics_throws (());
|
||||
|
||||
//
|
||||
// visual C++ versions 6 & 7 do not allow out of
|
||||
// class member template function definition
|
||||
//
|
||||
template < class T >
|
||||
inline void push ( const T *pVal, const unsigned nElem ) throw ()
|
||||
inline void push ( const T *pVal, const unsigned nElem ) epics_throws (())
|
||||
{
|
||||
comBuf * pLastBuf = this->bufs.last ();
|
||||
unsigned nCopied;
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
// class member template function definition
|
||||
//
|
||||
template < class T >
|
||||
inline void push ( const T & val ) throw ()
|
||||
inline void push ( const T & val ) epics_throws (())
|
||||
{
|
||||
comBuf * pComBuf = this->bufs.last ();
|
||||
if ( pComBuf && pComBuf->push ( val ) ) {
|
||||
@@ -124,13 +124,13 @@ private:
|
||||
this->pushComBuf ( *pComBuf );
|
||||
}
|
||||
|
||||
comQueSend ( const comQueSend & ) throw ();
|
||||
comQueSend & operator = ( const comQueSend & ) throw ();
|
||||
comQueSend ( const comQueSend & ) epics_throws (());
|
||||
comQueSend & operator = ( const comQueSend & ) epics_throws (());
|
||||
};
|
||||
|
||||
extern const char cacNillBytes[];
|
||||
|
||||
inline bool comQueSend::dbr_type_ok ( unsigned type ) throw ()
|
||||
inline bool comQueSend::dbr_type_ok ( unsigned type ) epics_throws (())
|
||||
{
|
||||
if ( type >= ( sizeof ( this->dbrCopyVector ) / sizeof ( this->dbrCopyVector[0] ) ) ) {
|
||||
return false;
|
||||
@@ -141,34 +141,34 @@ inline bool comQueSend::dbr_type_ok ( unsigned type ) throw ()
|
||||
return true;
|
||||
}
|
||||
|
||||
inline void comQueSend::pushUInt16 ( const ca_uint16_t value ) throw ()
|
||||
inline void comQueSend::pushUInt16 ( const ca_uint16_t value ) epics_throws (())
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushUInt32 ( const ca_uint32_t value ) throw ()
|
||||
inline void comQueSend::pushUInt32 ( const ca_uint32_t value ) epics_throws (())
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushFloat32 ( const ca_float32_t value ) throw ()
|
||||
inline void comQueSend::pushFloat32 ( const ca_float32_t value ) epics_throws (())
|
||||
{
|
||||
this->push ( value );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushString ( const char *pVal, unsigned nChar ) throw ()
|
||||
inline void comQueSend::pushString ( const char *pVal, unsigned nChar ) epics_throws (())
|
||||
{
|
||||
this->push ( pVal, nChar );
|
||||
}
|
||||
|
||||
// it is assumed that dbr_type_ok() was called prior to calling this routine
|
||||
// to check the type code
|
||||
inline void comQueSend::push_dbr_type ( unsigned type, const void *pVal, unsigned nElem ) throw ()
|
||||
inline void comQueSend::push_dbr_type ( unsigned type, const void *pVal, unsigned nElem ) epics_throws (())
|
||||
{
|
||||
( this->*dbrCopyVector [type] ) ( pVal, nElem );
|
||||
}
|
||||
|
||||
inline void comQueSend::pushComBuf ( comBuf & cb ) throw ()
|
||||
inline void comQueSend::pushComBuf ( comBuf & cb ) epics_throws (())
|
||||
{
|
||||
this->bufs.add ( cb );
|
||||
if ( ! this->pFirstUncommited.valid() ) {
|
||||
@@ -176,22 +176,22 @@ inline void comQueSend::pushComBuf ( comBuf & cb ) throw ()
|
||||
}
|
||||
}
|
||||
|
||||
inline unsigned comQueSend::occupiedBytes () const throw ()
|
||||
inline unsigned comQueSend::occupiedBytes () const epics_throws (())
|
||||
{
|
||||
return this->nBytesPending;
|
||||
}
|
||||
|
||||
inline bool comQueSend::flushBlockThreshold ( unsigned nBytesThisMsg ) const throw ()
|
||||
inline bool comQueSend::flushBlockThreshold ( unsigned nBytesThisMsg ) const epics_throws (())
|
||||
{
|
||||
return ( this->nBytesPending + nBytesThisMsg > 16 * comBuf::capacityBytes () );
|
||||
}
|
||||
|
||||
inline bool comQueSend::flushEarlyThreshold ( unsigned nBytesThisMsg ) const throw ()
|
||||
inline bool comQueSend::flushEarlyThreshold ( unsigned nBytesThisMsg ) const epics_throws (())
|
||||
{
|
||||
return ( this->nBytesPending + nBytesThisMsg > 4 * comBuf::capacityBytes () );
|
||||
}
|
||||
|
||||
inline void comQueSend::beginMsg () throw ()
|
||||
inline void comQueSend::beginMsg () epics_throws (())
|
||||
{
|
||||
if ( this->pFirstUncommited.valid() ) {
|
||||
this->clearUncommitted ();
|
||||
|
||||
Reference in New Issue
Block a user