added comments

This commit is contained in:
Emiel Bruijntjes 2018-05-11 11:58:55 +02:00
parent ab603ce007
commit 976e948cb0
4 changed files with 39 additions and 13 deletions

View File

@ -5,7 +5,7 @@
* around a buffer of bytes
*
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
* @copyright 2014 Copernica BV
* @copyright 2014 - 2018 Copernica BV
*/
/**
@ -114,7 +114,10 @@ public:
*/
virtual const char *data(size_t pos, size_t size) const override
{
// make sure compilers dont complain about unused parameters
(void) size;
// expose the data
return _data + pos;
}

View File

@ -6,7 +6,7 @@
* of methods that are called when data needs to be sent, or when the
* AMQP connection ends up in a broken state.
*
* @copyright 2014 Copernica BV
* @copyright 2014 - 2018 Copernica BV
*/
/**
@ -62,9 +62,11 @@ public:
*/
virtual uint16_t onNegotiate(Connection *connection, uint16_t interval)
{
// default implementation, disable heartbeats
// make sure compilers dont complain about unused parameters
(void) connection;
(void) interval;
// default implementation, disable heartbeats
return 0;
}
@ -90,7 +92,11 @@ public:
*
* @param connection The connection over which the heartbeat was received
*/
virtual void onHeartbeat(Connection *connection) { (void) connection; }
virtual void onHeartbeat(Connection *connection)
{
// make sure compilers dont complain about unused parameters
(void) connection;
}
/**
* When the connection ends up in an error state this method is called.
@ -108,6 +114,7 @@ public:
*/
virtual void onError(Connection *connection, const char *message)
{
// make sure compilers dont complain about unused parameters
(void) connection;
(void) message;
}
@ -126,7 +133,11 @@ public:
*
* @param connection The connection that can now be used
*/
virtual void onConnected(Connection *connection) { (void) connection; }
virtual void onConnected(Connection *connection)
{
// make sure compilers dont complain about unused parameters
(void) connection;
}
/**
* Method that is called when the connection was closed.
@ -136,8 +147,11 @@ public:
*
* @param connection The connection that was closed and that is now unusable
*/
virtual void onClosed(Connection *connection) { (void) connection; }
virtual void onClosed(Connection *connection)
{
// make sure compilers dont complain about unused parameters
(void) connection;
}
};
/**

View File

@ -5,7 +5,7 @@
* possibly happen in the future that can be
* caught.
*
* @copyright 2014 Copernica BV
* @copyright 2014 - 2018 Copernica BV
*/
/**
@ -97,10 +97,12 @@ protected:
*/
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name, uint32_t messagecount, uint32_t consumercount) const
{
// this is the same as a regular success message
// make sure compilers dont complain about unused parameters
(void) name;
(void) messagecount;
(void) consumercount;
// this is the same as a regular success message
return reportSuccess();
}
@ -111,8 +113,10 @@ protected:
*/
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount) const
{
// this is the same as a regular success message
// make sure compilers dont complain about unused parameters
(void) messagecount;
// this is the same as a regular success message
return reportSuccess();
}
@ -125,10 +129,12 @@ protected:
*/
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount, uint64_t deliveryTag, bool redelivered)
{
// this is the same as a regular success message
// make sure compilers dont complain about unused parameters
(void) messagecount;
(void) deliveryTag;
(void) redelivered;
// this is the same as a regular success message
return reportSuccess();
}
@ -139,8 +145,10 @@ protected:
*/
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name)
{
// this is the same as a regular success message
// make sure compilers dont complain about unused parameters
(void) name;
// this is the same as a regular success message
return reportSuccess();
}

View File

@ -4,7 +4,7 @@
* Base class for frames. This base class can not be constructed from outside
* the library, and is only used internally.
*
* @copyright 2014 Copernica BV
* @copyright 2014 - 2018 Copernica BV
*/
/**
@ -90,6 +90,7 @@ public:
*/
virtual bool process(ConnectionImpl *connection)
{
// make sure compilers dont complain about unused parameters
(void) connection;
// this is an exception