Add getName() to every non-base class Responder object.

This commit is contained in:
Aleric Inglewood
2013-01-11 04:15:55 +01:00
parent 741a160913
commit f9738cb611
53 changed files with 325 additions and 243 deletions

View File

@@ -196,6 +196,9 @@ public:
// Timeout policy to use.
virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const = 0;
// The name of the derived responder object. For debugging purposes.
virtual char const* getName(void) const = 0;
protected:
// Derived classes can override this to get the HTML headers that were received, when the message is completed.
// Only actually called for classes that implement a needsHeaders() that returns true.
@@ -378,6 +381,7 @@ public:
*/
class ResponderIgnore : public ResponderIgnoreBody {
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return responderIgnore_timeout;}
/*virtual*/ char const* getName(void) const { return "ResponderIgnore"; }
};
// A Responder is passed around as ResponderPtr, which causes it to automatically