Compile fix.
Move the destructor (and copy constructor while I was at it) to the .cpp file in order to avoid instantiating the destructor of boost::intrusive_ptr<ThreadSafeBufferedCurlEasyRequest> from a header, which would require the class ThreadSafeBufferedCurlEasyRequest to be defined in that header, which is unnecessary. In other words, this avoid the need to include "aicurl.h" in headers using AIPerService[Ptr]. Also fixed indentation of a comment.
This commit is contained in:
@@ -81,6 +81,15 @@ AIPerService::AIPerService(void) :
|
||||
{
|
||||
}
|
||||
|
||||
AIPerService::~AIPerService()
|
||||
{
|
||||
}
|
||||
|
||||
// Fake copy constructor.
|
||||
AIPerService::AIPerService(AIPerService const&) : mHTTPBandwidth(0)
|
||||
{
|
||||
}
|
||||
|
||||
// url must be of the form
|
||||
// (see http://www.ietf.org/rfc/rfc3986.txt Appendix A for definitions not given here):
|
||||
//
|
||||
|
||||
@@ -92,6 +92,9 @@ class AIPerService {
|
||||
friend class AIThreadSafeSimpleDC<AIPerService>; //threadsafe_PerServiceRequestQueue
|
||||
AIPerService(void);
|
||||
|
||||
public:
|
||||
~AIPerService();
|
||||
|
||||
public:
|
||||
typedef instance_map_type::iterator iterator;
|
||||
typedef instance_map_type::const_iterator const_iterator;
|
||||
@@ -159,7 +162,7 @@ class AIPerService {
|
||||
|
||||
private:
|
||||
// Disallow copying.
|
||||
AIPerService(AIPerService const&) : mHTTPBandwidth(0) { }
|
||||
AIPerService(AIPerService const&);
|
||||
};
|
||||
|
||||
namespace AICurlPrivate {
|
||||
|
||||
@@ -305,7 +305,7 @@ class CurlEasyRequest : public CurlEasyHandle {
|
||||
|
||||
AIHTTPTimeoutPolicy const* mTimeoutPolicy;
|
||||
std::string mLowercaseServicename; // Lowercase hostname:port (canonicalized) extracted from the url.
|
||||
AIPerServicePtr mPerServicePtr; // Pointer to the corresponding AIPerService.
|
||||
AIPerServicePtr mPerServicePtr; // Pointer to the corresponding AIPerService.
|
||||
LLPointer<curlthread::HTTPTimeout> mTimeout;// Timeout administration object associated with last created CurlSocketInfo.
|
||||
bool mTimeoutIsOrphan; // Set to true when mTimeout is not (yet) associated with a CurlSocketInfo.
|
||||
#if defined(CWDEBUG) || defined(DEBUG_CURLIO)
|
||||
|
||||
Reference in New Issue
Block a user