/*
- * $Id: List.h,v 1.2 2003/03/04 01:40:22 robertc Exp $
+ * $Id: List.h,v 1.3 2003/08/04 22:14:37 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#define SQUID_LIST_H
template <class C>
+
class List
{
public:
- void *operator new (size_t);
- void operator delete (void *);
- void deleteSelf() const;
- List (C const &);
- ~List();
-
- bool find(C const &)const;
- bool findAndTune(C const &);
- List *next;
- C element;
+ void *operator new (size_t);
+ void operator delete (void *);
+ List (C const &);
+ ~List();
+
+ bool find(C const &)const;
+ bool findAndTune(C const &);
+ List *next;
+ C element;
+
private:
- CBDATA_CLASS(List);
+ CBDATA_CLASS(List);
#if 0
- static MemPool *Pool;
+
+ static MemPool *Pool;
#endif
};
template<class C>
+
class ListContainer
{
- public:
+
+public:
ListContainer();
~ListContainer();
List<C> *push_back (C const &);
#if 0
template <class C>
MemPool *List<C>::Pool(NULL);
+
#endif
template <class C>
cbdata_type List<C>::CBDATA_List = CBDATA_UNKNOWN;
#if 0
/* derived classes with different sizes must implement their own new */
assert (byteCount == sizeof (List<C>));
+
if (!Pool)
- Pool = memPoolCreate("List", sizeof (List<C>));
+ Pool = memPoolCreate("List", sizeof (List<C>));
+
return memPoolAlloc(Pool);
+
#endif
+
CBDATA_INIT_TYPE(List);
+
List<C> *result = cbdataAlloc(List);
+
return result;
}
cbdataFree(address);
}
-template <class C>
-void
-List<C>::deleteSelf() const
-{
- delete this;
-}
-
template <class C>
List<C>::List(C const &value) : next(NULL), element (value)
-{
-}
+{}
template <class C>
List<C>::~List()
{
if (next)
- next->deleteSelf();
+ delete next;
}
template <class C>
List<C>::find (C const &toFind) const
{
List<C> const *node = NULL;
+
for (node = this; node; node = node->next)
- if (node->element == toFind)
- return true;
+ if (node->element == toFind)
+ return true;
+
return false;
}
List<C>::findAndTune(C const & toFind)
{
List<C> *prev = NULL;
- for (List<C> *node = this; node; node = node->next) {
- if (node->element == toFind) {
- if (prev != NULL) {
- /* shift the element just found to the second position
- * in the list */
- prev->next = node->next;
- node->next = this->next;
- this->next = node;
- }
- return true;
- }
- prev = node;
+
+ for (List<C> *node = this; node; node = node->
+ next) {
+ if (node->element == toFind) {
+ if (prev != NULL) {
+ /* shift the element just found to the second position
+ * in the list */
+ prev->next = node->next;
+ node->next = this->next;
+ this->next = node;
+ }
+
+ return true;
+ }
+
+ prev = node;
}
+
return false;
}
template <class C>
ListContainer<C>::ListContainer() : head (NULL)
-{
-}
+{}
template <class C>
ListContainer<C>::~ListContainer()
{
if (head)
- head->deleteSelf();
+ delete head;
}
template <class C>
ListContainer<C>::push_back (C const &element)
{
List<C> *node = new List<C> (element);
+
if (head) {
- List<C> *tempNode = NULL;
- for (tempNode = head; tempNode->next; tempNode = tempNode->next);
- tempNode->next = node;
+ List<C> *tempNode = NULL;
+
+ for (tempNode = head; tempNode->next; tempNode = tempNode->next)
+
+ ;
+ tempNode->next = node;
} else
- head = node;
+ head = node;
+
return node;
}
template <class C>
-C
+C
ListContainer<C>::pop_front()
{
if (head) {
- C result = head->element;
- List<C> *node = head;
- head = head->next;
- node->next = NULL;
- node->deleteSelf();
- return result;
+ C result = head->element;
+ List<C> *node = head;
+ head = head->next;
+ node->next = NULL;
+ delete node;
+ return result;
}
+
return C();
}
template <class C>
-bool
+bool
ListContainer<C>::empty() const
{
return head == NULL;
}
+
#endif /* SQUID_LIST_H */
/*
- * $Id: RefCount.h,v 1.7 2003/07/12 23:44:27 robertc Exp $
+ * $Id: RefCount.h,v 1.8 2003/08/04 22:14:37 robertc Exp $
*
* DEBUG: section xx Refcount allocator
* AUTHOR: Robert Collins
void dereference(C const *newP = NULL)
{
/* Setting p_ first is important:
- * we may be freed ourselves as a result of
- * p_->deleteSelf();
- */
+ * we may be freed ourselves as a result of
+ * delete p_;
+ */
C const (*tempP_) (p_);
- p_ = newP;
+ p_ = newP;
+
if (tempP_ && tempP_->RefCountDereference() == 0)
- tempP_->deleteSelf();
+ delete tempP_;
}
void reference (const RefCount& p)
virtual ~RefCountable_(){}
- virtual void deleteSelf() const = 0;
/* Not private, to allow class hierarchies */
void RefCountReference() const
{
/*
- * $Id: splay.h,v 1.21 2003/06/26 12:51:57 robertc Exp $
+ * $Id: splay.h,v 1.22 2003/08/04 22:14:37 robertc Exp $
*/
#ifndef SQUID_SPLAY_H
typedef int SPLAYCMP(Value const &a, Value const &b);
typedef void SPLAYFREE(Value &);
typedef void SPLAYWALKEE(Value const & nodedata, void *state);
- static void DefaultFree (Value &aValue) {aValue->deleteSelf();}
+ static void DefaultFree (Value &aValue) {delete aValue;}
Value data;
mutable SplayNode<V> *left;
/*
- * $Id: ACL.h,v 1.9 2003/07/06 21:50:55 hno Exp $
+ * $Id: ACL.h,v 1.10 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const = 0;
static ACL *Factory (char const *);
static void ParseAclLine(acl ** head);
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
bool containsPURGE() const;
allow_t allow;
acl_list *aclList;
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLList();
void negated(bool isNegated);
/*
- * $Id: ACLARP.cc,v 1.3 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLARP.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLARP::deleteSelf() const
-{
- delete this;
-}
-
ACLARP::~ACLARP()
{
if (data)
/*
- * $Id: ACLARP.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLARP.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
struct acl_arp_data
{
char eth[6];
- void deleteSelf() const {delete this;}
};
class ACLARP : public ACL
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLARP(char const *);
ACLARP(ACLARP const &);
/*
- * $Id: ACLASN.h,v 1.3 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLASN.h,v 1.4 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual ~ACLASN();
/*
- * $Id: ACLCertificateData.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLCertificateData.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLCertificateData::deleteSelf() const
-{
- delete this;
-}
-
-
ACLCertificateData::ACLCertificateData(SSLGETATTRIBUTE *sslStrategy) : attribute (NULL), values (), sslAttributeCall (sslStrategy)
{}
/*
- * $Id: ACLCertificateData.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLCertificateData.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLCertificateData(SSLGETATTRIBUTE *);
ACLCertificateData(ACLCertificateData const &);
/*
- * $Id: ACLChecklist.cc,v 1.13 2003/07/11 01:40:33 robertc Exp $
+ * $Id: ACLChecklist.cc,v 1.14 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
if (cbdataReferenceValidDone(callback_data, &cbdata_))
callback_(answer, cbdata_);
- deleteSelf();
+ delete this;
}
void
cbdataReferenceDone (t);
}
-void
-ACLChecklist::deleteSelf() const
-{
- delete this;
-}
-
ACLChecklist::ACLChecklist() : accessList (NULL), my_port (0), request (NULL),
reply (NULL),
auth_user_request (NULL)
/*
- * $Id: ACLChecklist.h,v 1.14 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ACLChecklist.h,v 1.15 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
void *operator new(size_t);
void operator delete(void *);
- void deleteSelf() const;
ACLChecklist();
~ACLChecklist();
/*
- * $Id: ACLData.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLData.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- virtual void deleteSelf() const =0;
virtual ~ACLData() {}
/*
- * $Id: ACLDestinationDomain.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLDestinationDomain.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLDestinationDomain::deleteSelf() const
-{
- delete this;
-}
-
ACLDestinationDomain::~ACLDestinationDomain()
{
- data->deleteSelf();
+ delete data;
}
ACLDestinationDomain::ACLDestinationDomain(ACLData<char const *> *newData, char const *theType) : data (newData), type_(theType) {}
/*
- * $Id: ACLDestinationDomain.h,v 1.4 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLDestinationDomain.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
~ACLDestinationDomain();
ACLDestinationDomain(ACLData<char const *> *, char const *);
memPoolFree (Pool, address);
}
-void
-ACLDestinationIP::deleteSelf() const
-{
- delete this;
-}
-
char const *
ACLDestinationIP::typeString() const
{
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual char const *typeString() const;
virtual int match(ACLChecklist *checklist);
/*
- * $Id: ACLDomainData.cc,v 1.4 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLDomainData.cc,v 1.5 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLDomainData::deleteSelf() const
-{
- delete this;
-}
-
template<class T>
inline void
xRefFree(T &thing)
/*
- * $Id: ACLDomainData.h,v 1.3 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLDomainData.h,v 1.4 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual ~ACLDomainData();
bool match(char const *);
/*
- * $Id: ACLExtUser.cc,v 1.3 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLExtUser.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLExtUser::deleteSelf() const
-{
- delete this;
-}
-
ACLExtUser::~ACLExtUser()
{
- data->deleteSelf();
+ delete data;
}
ACLExtUser::ACLExtUser(ACLData<char const *> *newData, char const *newType) : data (newData), type_ (newType) {}
/*
- * $Id: ACLExtUser.h,v 1.1 2003/06/27 22:32:31 hno Exp $
+ * $Id: ACLExtUser.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLExtUser(ACLData<char const *> *newData, char const *);
ACLExtUser (ACLExtUser const &old);
memPoolFree (Pool, address);
}
-void
-acl_ip_data::deleteSelf() const
-{
- delete this;
-}
-
acl_ip_data::acl_ip_data () :addr1(any_addr), addr2(any_addr), mask (any_addr), next (NULL) {}
acl_ip_data::acl_ip_data (struct in_addr const &anAddress1, struct in_addr const &anAddress2, struct in_addr const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext){}
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
static acl_ip_data *FactoryParse(char const *);
static int NetworkCompare(acl_ip_data * const & a, acl_ip_data * const &b);
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const = 0;
ACLIP() : data(NULL){}
memPoolFree (Pool, address);
}
-void
-ACLIdent::deleteSelf() const
-{
- delete this;
-}
-
ACLIdent::~ACLIdent()
{
- data->deleteSelf();
+ delete data;
}
ACLIdent::ACLIdent(ACLData<char const *> *newData, char const *newType) : data (newData), type_ (newType) {}
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLIdent(ACLData<char const *> *newData, char const *);
ACLIdent (ACLIdent const &old);
/*
- * $Id: ACLIntRange.cc,v 1.1 2003/02/25 12:16:55 robertc Exp $
+ * $Id: ACLIntRange.cc,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Robert Collins
return false;
}
-void
-ACLIntRange::deleteSelf() const
-{
- delete this;
-}
-
ACLData<int> *
ACLIntRange::clone() const
{
ACLIntRange::~ACLIntRange ()
{
if (ranges)
- ranges->deleteSelf();
+ delete ranges;
}
wordlist *
/*
- * $Id: ACLIntRange.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLIntRange.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- virtual void deleteSelf() const;
-
ACLIntRange() : ranges(NULL) {}
virtual ~ACLIntRange();
/*
- * $Id: ACLMaxConnection.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLMaxConnection.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLMaxConnection::deleteSelf() const
-{
- delete this;
-}
-
ACLMaxConnection::~ACLMaxConnection()
{}
/*
- * $Id: ACLMaxConnection.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLMaxConnection.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLMaxConnection(char const *);
ACLMaxConnection(ACLMaxConnection const &);
/*
- * $Id: ACLMaxUserIP.cc,v 1.3 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLMaxUserIP.cc,v 1.4 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLMaxUserIP::deleteSelf() const
-{
- delete this;
-}
-
ACLMaxUserIP::~ACLMaxUserIP()
{}
/*
- * $Id: ACLMaxUserIP.h,v 1.2 2003/03/10 11:13:36 robertc Exp $
+ * $Id: ACLMaxUserIP.h,v 1.3 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLMaxUserIP(char const *);
ACLMaxUserIP(ACLMaxUserIP const &);
/*
- * $Id: ACLMethodData.cc,v 1.2 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLMethodData.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLMethodData::deleteSelf() const
-{
- delete this;
-}
-
-
ACLMethodData::ACLMethodData() : values (NULL)
{}
ACLMethodData::~ACLMethodData()
{
if (values)
- values->deleteSelf();
+ delete values;
}
bool
/*
- * $Id: ACLMethodData.h,v 1.1 2003/02/25 12:22:33 robertc Exp $
+ * $Id: ACLMethodData.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLMethodData();
ACLMethodData(ACLMethodData const &);
memPoolFree (Pool, address);
}
-void
-ACLMyIP::deleteSelf() const
-{
- delete this;
-}
-
char const *
ACLMyIP::typeString() const
{
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
static ACLMyIP const &RegistryEntry();
virtual char const *typeString() const;
/*
- * $Id: ACLProtocolData.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLProtocolData.cc,v 1.3 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLProtocolData::deleteSelf() const
-{
- delete this;
-}
-
-
ACLProtocolData::ACLProtocolData() : values (NULL)
{}
ACLProtocolData::~ACLProtocolData()
{
if (values)
- values->deleteSelf();
+ delete values;
}
bool
/*
- * $Id: ACLProtocolData.h,v 1.1 2003/02/25 12:22:34 robertc Exp $
+ * $Id: ACLProtocolData.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLProtocolData();
ACLProtocolData(ACLProtocolData const &);
memPoolFree (Pool, address);
}
-void
-ACLProxyAuth::deleteSelf() const
-{
- delete this;
-}
-
ACLProxyAuth::~ACLProxyAuth()
{
- data->deleteSelf();
+ delete data;
}
ACLProxyAuth::ACLProxyAuth(ACLData<char const *> *newData, char const *theType) : data (newData), type_(theType) {}
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
~ACLProxyAuth();
ACLProxyAuth(ACLData<char const *> *, char const *);
/*
- * $Id: ACLRegexData.cc,v 1.5 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLRegexData.cc,v 1.6 2003/08/04 22:14:38 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLRegexData::deleteSelf() const
-{
- delete this;
-}
-
static void aclDestroyRegexList(relist * data);
void
aclDestroyRegexList(relist * data)
/*
- * $Id: ACLRegexData.h,v 1.3 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLRegexData.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual ~ACLRegexData();
virtual bool match(char const *user);
memPoolFree (Pool, address);
}
-void
-ACLSourceIP::deleteSelf() const
-{
- delete this;
-}
-
char const *
ACLSourceIP::typeString() const
{
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual char const *typeString() const;
virtual int match(ACLChecklist *checklist);
/*
- * $Id: ACLStrategised.h,v 1.4 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLStrategised.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef M MatchType;
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
~ACLStrategised();
ACLStrategised(ACLData<MatchType> *, ACLStrategy<MatchType> *, char const *);
memPoolFree (Pool, address);
}
-template <class MatchType>
-void
-ACLStrategised<MatchType>::deleteSelf() const
-{
- delete this;
-}
-
template <class MatchType>
ACLStrategised<MatchType>::~ACLStrategised()
{
- data->deleteSelf();
+ delete data;
}
template <class MatchType>
/*
- * $Id: ACLStringData.cc,v 1.2 2003/07/14 08:21:56 robertc Exp $
+ * $Id: ACLStringData.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLStringData::deleteSelf() const
-{
- delete this;
-}
-
-
ACLStringData::ACLStringData() : values (NULL)
{}
/*
- * $Id: ACLStringData.h,v 1.1 2003/02/25 12:22:34 robertc Exp $
+ * $Id: ACLStringData.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLStringData();
ACLStringData(ACLStringData const &);
/*
- * $Id: ACLTimeData.cc,v 1.3 2003/07/14 08:21:57 robertc Exp $
+ * $Id: ACLTimeData.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-ACLTimeData::deleteSelf() const
-{
- delete this;
-}
-
ACLTimeData::ACLTimeData () : weekbits (0), start (0), stop (0), next (NULL) {}
ACLTimeData::ACLTimeData(ACLTimeData const &old) : weekbits(old.weekbits), start (old.start), stop (old.stop), next (NULL)
ACLTimeData::~ACLTimeData()
{
if (next)
- next->deleteSelf();
+ delete next;
}
bool
debug(28, 0) ("aclParseTimeSpec: IGNORING Bad time range\n");
if (q != this)
- q->deleteSelf();
+ delete q;
return;
}
debug(28, 0) ("aclParseTimeSpec: IGNORING Reversed time range\n");
if (q != this)
- q->deleteSelf();
+ delete q;
return;
}
/*
- * $Id: ACLTimeData.h,v 1.2 2003/02/21 22:50:04 robertc Exp $
+ * $Id: ACLTimeData.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
ACLTimeData();
ACLTimeData(ACLTimeData const &);
memPoolFree (Pool, address);
}
-void
-ACLUserData::deleteSelf() const
-{
- delete this;
-}
-
template<class T>
inline void
xRefFree(T &thing)
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
virtual ~ACLUserData();
bool match(char const *user);
/*
- * $Id: CommonPool.h,v 1.2 2003/02/21 22:50:05 robertc Exp $
+ * $Id: CommonPool.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
static CommonPool *Factory (unsigned char _class, CompositePoolNode::Pointer&);
char const* theClassTypeLabel() const {return typeLabel.buf();}
/*
- * $Id: CompositePoolNode.h,v 1.4 2003/05/20 12:17:38 robertc Exp $
+ * $Id: CompositePoolNode.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
typedef RefCount<CompositePoolNode> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
virtual ~CompositePoolNode(){}
virtual void stats(StoreEntry * sentry) =0;
/*
- * $Id: DelayIdComposite.h,v 1.3 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayIdComposite.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
public:
typedef RefCount<DelayIdComposite> Pointer;
- virtual void deleteSelf() const = 0;
virtual inline ~DelayIdComposite(){}
virtual int bytesWanted (int min, int max) const =0;
/*
- * $Id: DelayPool.cc,v 1.4 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayPool.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
void
DelayPool::freeData()
{
- pool->deleteSelf();
+ delete pool;
pool = NULL;
}
/*
- * $Id: DelayTagged.cc,v 1.3 2003/05/22 11:14:43 robertc Exp $
+ * $Id: DelayTagged.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
::operator delete (address);
}
-void
-DelayTagged::deleteSelf() const
-{
- delete this;
-}
-
DelayTagged::DelayTagged()
{
DelayPools::registerForUpdates (this);
::operator delete (address);
}
-void
-DelayTagged::Id::deleteSelf() const
-{
- delete this;
-}
-
void *
DelayTaggedBucket::operator new(size_t size)
{
/*
- * $Id: DelayTagged.h,v 1.3 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayTagged.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
typedef RefCount<DelayTaggedBucket> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const {delete this;}
void stats(StoreEntry *)const;
DelayTaggedBucket(String &aTag);
typedef RefCount<DelayTagged> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
DelayTagged();
virtual ~DelayTagged();
virtual void stats(StoreEntry * sentry);
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Id (RefCount<DelayTagged>, String &);
~Id();
virtual int bytesWanted (int min, int max) const;
/*
- * $Id: DelayUser.cc,v 1.5 2003/05/20 12:17:38 robertc Exp $
+ * $Id: DelayUser.cc,v 1.6 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
::operator delete (address);
}
-void
-DelayUser::deleteSelf() const
-{
- delete this;
-}
-
DelayUser::DelayUser()
{
DelayPools::registerForUpdates (this);
::operator delete (address);
}
-void
-DelayUser::Id::deleteSelf() const
-{
- delete this;
-}
-
void *
DelayUserBucket::operator new(size_t size)
{
/*
- * $Id: DelayUser.h,v 1.6 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayUser.h,v 1.7 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
typedef RefCount<DelayUserBucket> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const {delete this;}
void stats(StoreEntry *)const;
DelayUserBucket(AuthUser *);
typedef RefCount<DelayUser> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
DelayUser();
virtual ~DelayUser();
virtual void stats(StoreEntry * sentry);
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Id (RefCount<DelayUser>, AuthUser *);
~Id();
virtual int bytesWanted (int min, int max) const;
/*
- * $Id: DelayVector.cc,v 1.8 2003/05/20 12:17:38 robertc Exp $
+ * $Id: DelayVector.cc,v 1.9 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
::operator delete (address);
}
-void
-DelayVector::deleteSelf() const
-{
- delete this;
-}
-
DelayVector::DelayVector()
{
DelayPools::registerForUpdates (this);
::operator delete (address);
}
-void
-DelayVector::Id::deleteSelf() const
-{
- delete this;
-}
-
DelayVector::Id::Id(DelayVector::Pointer aDelayVector, CompositeSelectionDetails &details) : theVector(aDelayVector)
{
debug(77,3)("DelayVector::Id::Id\n");
/*
- * $Id: DelayVector.h,v 1.8 2003/08/03 09:03:48 robertc Exp $
+ * $Id: DelayVector.h,v 1.9 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef RefCount<DelayVector> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
DelayVector();
virtual ~DelayVector();
virtual void stats(StoreEntry * sentry);
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Id (RefCount<DelayVector>,CompositeSelectionDetails &);
~Id();
/*
- * $Id: ESI.cc,v 1.4 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESI.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
{
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf()const;
~esiComment();
esiComment();
Pointer makeCacheable() const;
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiRemove();
void render(ESISegment::Pointer);
{
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiTry(esiTreeParentPtr aParent);
~esiTry();
{
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiChoose(esiTreeParentPtr);
~esiChoose();
{
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *);
~esiWhen();
Pointer makeCacheable() const;
{
// void *operator new (size_t byteCount);
// void operator delete (void *address);
- void deleteSelf() const;
esiOtherwise(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
;
cbdataReferenceDone (address);
}
-void
-ESIContext::deleteSelf() const
-{
- delete this;
-}
-
void
ESIContext::setError()
{
ESISegmentFreeList (buffered);
ESISegmentFreeList (outbound);
ESISegmentFreeList (outboundtail);
- varState->deleteSelf();
+ delete varState;
/* don't touch incoming, it's a pointer into buffered anyway */
}
memPoolFree (pool, address);
}
-void
-esiComment::deleteSelf() const
-{
- delete this;
-}
-
esiComment::esiComment()
{}
memPoolFree (pool, address);
}
-void
-esiLiteral::deleteSelf() const
-{
- delete this;
-}
-
esiLiteral::~esiLiteral()
{
debug (86, 5) ("esiLiteral::~esiLiteral: %p\n", this);
cbdataFree (address);
}
-void
-esiRemove::deleteSelf() const
-{
- delete this;
-}
-
ESIElement *
esiRemoveNew ()
{
memPoolFree (Pool, address);
}
-void
-esiTry::deleteSelf() const
-{
- delete this;
-}
-
esiTry::esiTry(esiTreeParentPtr aParent) : parent (aParent) , exceptbuffer(NULL)
{}
}
#endif
-void
-esiAttempt::deleteSelf() const
-{
- delete this;
-}
/* esiExcept */
#if 0
}
#endif
-void
-esiExcept::deleteSelf() const
-{
- delete this;
-}
/* ESIVar */
#if 0
#endif
-void
-ESIVar::deleteSelf() const
-{
- delete this;
-}
-
/* esiChoose */
esiChoose::~esiChoose()
{
memPoolFree (Pool, address);
}
-void
-esiChoose::deleteSelf() const
-{
- delete this;
-}
-
esiChoose::esiChoose(esiTreeParentPtr aParent) : elements (), chosenelement (-1),parent (aParent)
{}
memPoolFree(Pool, address);
}
-void
-esiWhen::deleteSelf() const
-{
- delete this;
-}
-
esiWhen::esiWhen (esiTreeParentPtr aParent, int attrcount, const char **attr,ESIVarState *aVar) : esiSequence (aParent)
{
varState = NULL;
#endif
-void
-esiOtherwise::deleteSelf() const
-{
- delete this;
-}
-
/* TODO: implement surrogate targeting and control processing */
int
esiEnableProcessing (HttpReply *rep)
/*
- * $Id: ESIAssign.cc,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIAssign.cc,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
memPoolFree (Pool, address);
}
-void
-ESIAssign::deleteSelf() const
-{
- delete this;
-}
-
ESIAssign::~ESIAssign()
{
if (value)
/*
- * $Id: ESIAssign.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIAssign.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
ESIAssign (esiTreeParentPtr, int, const char **, ESIContext *);
ESIAssign (ESIAssign const &);
ESIAssign &operator=(ESIAssign const &);
/*
- * $Id: ESIAttempt.h,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIAttempt.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
{
// void *operator new (size_t byteCount);
// void operator delete (void *address);
- void deleteSelf() const;
esiAttempt(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
;
/*
- * $Id: ESIContext.h,v 1.3 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESIContext.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef RefCount<ESIContext> Pointer;
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
ESIContext():reading_(true) {}
~ESIContext();
/*
- * $Id: ESICustomParser.cc,v 1.3 2003/07/15 23:12:02 robertc Exp $
+ * $Id: ESICustomParser.cc,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
return SearchTrie;
}
-void
-ESICustomParser::deleteSelf() const
-{
- delete this;
-}
-
ESICustomParser::ESICustomParser(ESIParserClient *aClient) : theClient (aClient)
{}
/*
- * $Id: ESICustomParser.h,v 1.3 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESICustomParser.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- virtual void deleteSelf() const;
ESICustomParser(ESIParserClient *);
~ESICustomParser();
/* true on success */
/*
- * $Id: ESIElement.h,v 1.3 2003/07/14 20:29:28 robertc Exp $
+ * $Id: ESIElement.h,v 1.4 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
return ESI_PROCESS_COMPLETE;
}
- virtual void deleteSelf() const = 0;
-
virtual bool mayFail() const
{
return true;
/*
- * $Id: ESIExcept.h,v 1.2 2003/07/15 23:12:02 robertc Exp $
+ * $Id: ESIExcept.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
public:
// void *operator new (size_t byteCount);
// void operator delete (void *address);
- void deleteSelf() const;
esiExcept(esiTreeParentPtr aParent) : esiSequence (aParent) {}}
;
/*
- * $Id: ESIExpatParser.cc,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIExpatParser.cc,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
#include "squid.h"
#include "ESIExpatParser.h"
-void
-ESIExpatParser::deleteSelf() const
-{
- delete this;
-}
-
ESIExpatParser::ESIExpatParser(ESIParserClient *aClient) : theClient (aClient)
{
/* TODO: grab the document encoding from the headers */
/*
- * $Id: ESIExpatParser.h,v 1.1 2003/03/10 04:56:35 robertc Exp $
+ * $Id: ESIExpatParser.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- virtual void deleteSelf() const;
ESIExpatParser(ESIParserClient *);
~ESIExpatParser();
/* true on success */
/*
- * $Id: ESIInclude.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $
+ * $Id: ESIInclude.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
cbdataReferenceDone (address);
}
-void
-ESIStreamContext::deleteSelf() const
-{
- delete this;
-}
-
ESIStreamContext *
ESIStreamContextNew (ESIIncludePtr include)
{
memPoolFree (Pool, address);
}
-void
-ESIInclude::deleteSelf() const
-{
- delete this;
-}
-
ESIElement::Pointer
ESIInclude::makeCacheable() const
{
/*
- * $Id: ESIInclude.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIInclude.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
typedef RefCount<ESIStreamContext> Pointer;
void *operator new(size_t);
void operator delete(void *);
- void deleteSelf() const;
ESIStreamContext();
~ESIStreamContext();
void freeResources();
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
~ESIInclude();
/*
- * $Id: ESILiteral.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESILiteral.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
{
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiLiteral(ESISegment::Pointer);
esiLiteral(ESIContext *, const char *s, int len);
/*
- * $Id: ESIParser.h,v 1.1 2003/03/10 04:56:36 robertc Exp $
+ * $Id: ESIParser.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef RefCount<ESIParser> Pointer;
static Pointer NewParser(ESIParserClient *aClient);
static char *Type;
- virtual void deleteSelf() const =0;
/* true on success */
virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) = 0;
virtual size_t lineNumber() const =0;
/*
- * $Id: ESISegment.cc,v 1.2 2003/03/11 08:24:42 robertc Exp $
+ * $Id: ESISegment.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
cbdataFree (address);
}
-void
-ESISegment::deleteSelf() const
-{
- delete this;
-}
-
/* XXX: if needed, make this iterative */
ESISegment::Pointer
ESISegment::cloneList () const
/*
- * $Id: ESISegment.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISegment.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
static void ListTransfer (Pointer &from, Pointer &to);
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
ESISegment();
ESISegment(ESISegment const &);
/*
- * $Id: ESISequence.cc,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISequence.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
MemPool *esiSequence::Pool = NULL;
-void
-esiSequence::deleteSelf() const
-{
- delete this;
-}
-
esiSequence::~esiSequence ()
{
debug (86,5)("esiSequence::~esiSequence %p\n", this);
/*
- * $Id: ESISequence.h,v 1.2 2003/07/14 14:15:56 robertc Exp $
+ * $Id: ESISequence.h,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
esiSequence(esiTreeParentPtr, bool = false);
~esiSequence();
/*
- * $Id: ESIVar.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIVar.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
public:
// void *operator new (size_t byteCount);
// void operator delete (void *address);
- void deleteSelf() const;
ESIVar(esiTreeParentPtr aParent) : esiSequence (aParent)
{
flags.dovars = 1;
/*
- * $Id: ESIVarState.cc,v 1.2 2003/07/23 10:41:20 robertc Exp $
+ * $Id: ESIVarState.cc,v 1.3 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 86 ESI processing
* AUTHOR: Robert Collins
cbdataFree (address);
}
-void
-ESIVarState::deleteSelf() const
-{
- delete this;
-}
-
char *
ESIVariableUserAgent::getProductVersion (char const *s)
{
/*
- * $Id: ESIVarState.h,v 1.1 2003/07/14 14:15:55 robertc Exp $
+ * $Id: ESIVarState.h,v 1.2 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
void freeResources();
ESIVarState (HttpHeader const *hdr, char const *uri);
~ESIVarState();
/*
- * $Id: ExternalACL.h,v 1.4 2003/05/20 12:17:38 robertc Exp $
+ * $Id: ExternalACL.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *, EAH * callback, void *callback_data);
/*
- * $Id: ExternalACLEntry.cc,v 1.4 2003/07/09 14:14:57 hno Exp $
+ * $Id: ExternalACLEntry.cc,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
cbdataFree (address);
}
-void
-ExternalACLEntry::deleteSelf() const
-{
- delete this;
-}
-
ExternalACLEntry::ExternalACLEntry()
{
lru.next = lru.prev = NULL;
/*
- * $Id: ExternalACLEntry.h,v 1.4 2003/07/09 14:14:57 hno Exp $
+ * $Id: ExternalACLEntry.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
public:
void *operator new (size_t bytesToAllocate);
void operator delete (void *address);
- void deleteSelf() const;
ExternalACLEntry();
~ExternalACLEntry();
/*
- * $Id: HttpHdrRange.cc,v 1.36 2003/07/14 14:15:56 robertc Exp $
+ * $Id: HttpHdrRange.cc,v 1.37 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
memPoolFree(Pool, spec);
}
-void
-HttpHdrRangeSpec::deleteSelf() const
-{
- delete this;
-}
-
HttpHdrRangeSpec::HttpHdrRangeSpec() : offset(UnknownPosition), length(UnknownPosition){}
/* parses range-spec and returns new object on success */
memPoolFree(Pool, address);
}
-void
-HttpHdrRange::deleteSelf() const
-{
- delete this;
-}
-
HttpHdrRange::HttpHdrRange () : clen (HttpHdrRangeSpec::UnknownPosition)
{}
HttpHdrRange *r = new HttpHdrRange;
if (!r->parseInit(range_spec)) {
- r->deleteSelf();
+ delete r;
r = NULL;
}
HttpHdrRange::~HttpHdrRange()
{
while (specs.size())
- specs.pop_back()->deleteSelf();
+ delete specs.pop_back();
}
HttpHdrRange::HttpHdrRange(HttpHdrRange const &old) : specs()
while (i != basis.end()) {
if (specs.size() && (*i)->mergeWith(specs.back())) {
/* merged with current so get rid of the prev one */
- specs.pop_back()->deleteSelf();
+ delete specs.pop_back();
continue; /* re-iterate */
}
if ((*pos)->canonize(clen))
copy.push_back (*pos);
else
- (*pos)->deleteSelf();
+ delete (*pos);
}
debug(64, 3) ("HttpHdrRange::getCanonizedSpecs: found %d bad specs\n",
/*
- * $Id: HttpHeaderRange.h,v 1.4 2003/07/14 23:53:40 robertc Exp $
+ * $Id: HttpHeaderRange.h,v 1.5 2003/08/04 22:14:40 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
typedef Range<ssize_t> HttpRange;
static ssize_t const UnknownPosition;
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
static size_t ParsedCount;
/* Http Range Header Field */
/*
- * $Id: HttpRequest.cc,v 1.41 2003/07/15 11:33:21 robertc Exp $
+ * $Id: HttpRequest.cc,v 1.42 2003/08/04 22:14:40 robertc Exp $
*
* DEBUG: section 73 HTTP Request
* AUTHOR: Duane Wessels
memPoolFree (Pool, address);
}
-void
-HttpRequest::deleteSelf() const
-{
- delete this;
-}
-
HttpRequest::HttpRequest() : header(hoRequest)
{
/* We should initialise these ... */
httpHdrCcDestroy(req->cache_control);
if (req->range)
- req->range->deleteSelf();
+ delete req->range;
req->tag.clean();
req->extacl_log.clean();
- req->deleteSelf();
+ delete req;
}
request_t *
/*
- * $Id: HttpRequest.h,v 1.5 2003/07/15 11:33:21 robertc Exp $
+ * $Id: HttpRequest.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
HttpRequest();
virtual ~HttpRequest() {}
/*
- * $Id: NullDelayId.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: NullDelayId.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
::operator delete (address);
}
-void
-NullDelayId::deleteSelf() const
-{
- delete this;
-}
-
#endif
/*
- * $Id: NullDelayId.h,v 1.3 2003/03/10 11:13:36 robertc Exp $
+ * $Id: NullDelayId.h,v 1.4 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
virtual int bytesWanted (int minimum, int maximum) const {return max(minimum,maximum);}
virtual void bytesIn(int qty) {}}
/*
- * $Id: StoreIOState.h,v 1.5 2003/07/22 15:23:01 robertc Exp $
+ * $Id: StoreIOState.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* storeIOState does not get mempooled - it's children do */
void *operator new (size_t amount);
void operator delete (void *address);
- virtual void deleteSelf() const = 0;
virtual ~storeIOState();
storeIOState();
/*
- * $Id: StoreMeta.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMeta.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
}
if (!result->validLength(len)) {
- result->deleteSelf();
+ delete result;
return NULL;
}
while ((node = *head) != NULL) {
*head = node->next;
xfree(node->value);
- node->deleteSelf();
+ delete node;
}
}
return true;
}
-
-void
-StoreMeta::deleteSelf()
-{
- delete this;
-}
/*
- * $Id: StoreMeta.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMeta.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
{
public:
- virtual void deleteSelf() = 0;
static bool validType(char);
static int const MaximumTLVLength;
static int const MinimumTLVLength;
/*
- * $Id: StoreMetaMD5.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaMD5.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
memPoolFree(pool, address);
}
-void
-StoreMetaMD5::deleteSelf()
-{
- delete this;
-}
-
bool
StoreMetaMD5::validLength(int len) const
{
/*
- * $Id: StoreMetaMD5.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaMD5.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf();
char getType() const {return STORE_META_KEY_MD5;}
/*
- * $Id: StoreMetaSTD.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaSTD.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
memPoolFree(pool, address);
}
-void
-StoreMetaSTD::deleteSelf()
-{
- delete this;
-}
-
bool
StoreMetaSTD::validLength(int len) const
{
/*
- * $Id: StoreMetaSTD.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaSTD.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf();
char getType() const {return STORE_META_STD;}
/*
- * $Id: StoreMetaURL.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaURL.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
memPoolFree(pool, address);
}
-void
-StoreMetaURL::deleteSelf()
-{
- delete this;
-}
-
bool
StoreMetaURL::checkConsistency(StoreEntry *e) const
{
/*
- * $Id: StoreMetaURL.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaURL.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf();
char getType() const {return STORE_META_URL;}
/*
- * $Id: StoreMetaVary.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaVary.cc,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
memPoolFree(pool, address);
}
-void
-StoreMetaVary::deleteSelf()
-{
- delete this;
-}
-
bool
StoreMetaVary::checkConsistency(StoreEntry *e) const
{
/*
- * $Id: StoreMetaVary.h,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaVary.h,v 1.3 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf();
char getType() const {return STORE_META_VARY_HEADERS;}
/*
- * $Id: StoreSwapLogData.cc,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: StoreSwapLogData.cc,v 1.2 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
{
memPoolFree (Pool, address);
}
-
-void
-StoreSwapLogData::deleteSelf() const
-{
- delete this;
-}
/*
- * $Id: StoreSwapLogData.h,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: StoreSwapLogData.h,v 1.2 2003/08/04 22:14:41 robertc Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
StoreSwapLogData();
char op;
sfileno swap_filen;
/*
- * $Id: acl.cc,v 1.309 2003/07/16 05:27:17 robertc Exp $
+ * $Id: acl.cc,v 1.310 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
if (!A->valid()) {
debug(28, 0) ("aclParseAclLine: IGNORING invalid ACL: %s\n",
A->cfgline);
- A->deleteSelf();
+ delete A;
/* Do we need this? */
A = NULL;
return;
debug(28, 0) ("%s line %d: %s\n",
cfg_filename, config_lineno, config_input_line);
debug(28, 0) ("aclParseAccessLine: ACL name '%s' not found.\n", t);
- L->deleteSelf();
+ delete L;
continue;
}
for (acl *a = *head; a; a = next) {
next = a->next;
- a->deleteSelf();
+ delete a;
}
*head = NULL;
for (l = *head; l; l = *head) {
*head = l->next;
- l->deleteSelf();
+ delete l;
}
}
memPoolFree (Pool, address);
}
-void
-ACLList::deleteSelf() const
-{
- delete this;
-}
-
CBDATA_CLASS_INIT(acl_access);
void *
cbdataFree(t);
}
-void
-acl_access::deleteSelf () const
-{
- delete this;
-}
-
ACL::Prototype::Prototype() : prototype (NULL), typeString (NULL) {}
ACL::Prototype::Prototype (ACL const *aPrototype, char const *aType) : prototype (aPrototype), typeString (aType)
/*
- * $Id: asn.cc,v 1.95 2003/07/14 14:15:58 robertc Exp $
+ * $Id: asn.cc,v 1.96 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
while (data) {
prev = data;
data = data->next;
- prev->deleteSelf();
+ delete prev;
}
- data->deleteSelf();
+ delete data;
}
static int
memPoolFree (Pool, address);
}
-void
-ACLASN::deleteSelf() const
-{
- delete this;
-}
-
ACLASN::~ACLASN()
{
if (data)
- data->deleteSelf();
+ delete data;
}
bool
/*
- * $Id: auth_digest.cc,v 1.27 2003/07/14 14:16:21 robertc Exp $
+ * $Id: auth_digest.cc,v 1.28 2003/08/04 22:14:48 robertc Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
memPoolFree (Pool, address);
}
-void
-digest_user_h::deleteSelf() const
-{
- delete this;
-}
-
digest_user_h::digest_user_h () : username (NULL), HA1created (0)
{}
memPoolFree (Pool, address);
}
-void
-digest_request_h::deleteSelf() const
-{
- delete this;
-}
-
digest_request_h::digest_request_h () : theUser (NULL)
, credentials_ok (Unchecked)
{}
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
digest_user_h();
~digest_user_h();
enum CredentialsState {Unchecked, Ok, Pending, Failed};
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
digest_request_h();
digest_request_h(auth_user_t *);
/*
- * $Id: auth_ntlm.cc,v 1.35 2003/08/03 08:09:30 robertc Exp $
+ * $Id: auth_ntlm.cc,v 1.36 2003/08/04 22:14:53 robertc Exp $
*
* DEBUG: section 29 NTLM Authenticator
* AUTHOR: Robert Collins
{
memPoolFree (Pool, address);
}
-
-void
-ntlm_request_t::deleteSelf() const
-{
- delete this;
-}
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
~ntlm_request_t();
virtual int authenticated() const;
/*
- * $Id: authenticate.cc,v 1.61 2003/07/29 11:34:56 robertc Exp $
+ * $Id: authenticate.cc,v 1.62 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
if (authscheme_list[auth_user->auth_module - 1].requestFree != NULL)
authscheme_list[auth_user->auth_module - 1].requestFree(this);
else {
- state()->deleteSelf();
+ delete state();
state(NULL);
}
}
/*
- * $Id: authenticate.h,v 1.11 2003/07/14 14:15:59 robertc Exp $
+ * $Id: authenticate.h,v 1.12 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- virtual void deleteSelf() const = 0;
virtual ~AuthUserRequestState(){}
virtual int authenticated() const = 0;
/*
- * $Id: client_side.cc,v 1.651 2003/07/15 06:50:41 robertc Exp $
+ * $Id: client_side.cc,v 1.652 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
cbdataFree (address);
}
-void
-ClientSocketContext::deleteSelf() const
-{
- delete this;
-}
-
/* Local functions */
/* ClientSocketContext */
static ClientSocketContext *ClientSocketContextNew(clientHttpRequest *);
if (range_err) {
/* XXX Why do we do this here, and not when parsing the request ? */
debug(33, 3) ("clientBuildRangeHeader: will not do ranges: %s.\n", range_err);
- http->request->range->deleteSelf();
+ delete http->request->range;
http->request->range = NULL;
} else {
/* XXX: TODO: Review, this unconditional set may be wrong. - TODO: review. */
cbdataFree(t);
}
-void
-ConnStateData::deleteSelf () const
-{
- delete this;
-}
-
ConnStateData::ConnStateData() : transparent_ (false), reading_ (false), openReference (this)
{}
/*
- * $Id: client_side.h,v 1.5 2003/07/12 12:39:56 robertc Exp $
+ * $Id: client_side.h,v 1.6 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef RefCount<ClientSocketContext> Pointer;
void *operator new(size_t);
void operator delete(void *);
- void deleteSelf() const;
ClientSocketContext();
~ClientSocketContext();
bool startOfOutput() const;
typedef RefCount<ConnStateData> Pointer;
void * operator new (size_t);
void operator delete (void *);
- void deleteSelf() const;
ConnStateData();
~ConnStateData();
/*
- * $Id: client_side_reply.cc,v 1.62 2003/07/23 11:21:37 robertc Exp $
+ * $Id: client_side_reply.cc,v 1.63 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
cbdataFree (tmp);
}
-void
-clientReplyContext::deleteSelf() const
-{
- delete this;
-}
-
void
clientReplyContext::saveState()
{
/*
- * $Id: client_side_reply.h,v 1.4 2003/06/20 01:01:00 robertc Exp $
+ * $Id: client_side_reply.h,v 1.5 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t byteCount);
void operator delete (void *address);
- void deleteSelf() const;
static STCB CacheHit;
static STCB HandleIMSReply;
static STCB SendMoreData;
/*
- * $Id: client_side_request.cc,v 1.29 2003/08/03 08:09:26 robertc Exp $
+ * $Id: client_side_request.cc,v 1.30 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 85 Client-side Request Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
public:
void *operator new(size_t);
void operator delete(void *);
- void deleteSelf() const;
ClientRequestContext();
ClientRequestContext(ClientHttpRequest *);
cbdataReferenceDone (t);
}
-void
-ClientRequestContext::deleteSelf() const
-{
- delete this;
-}
-
/* Local functions */
/* other */
static void clientAccessCheckDone(int, void *);
cbdataReferenceDone(http);
if (acl_checklist)
- acl_checklist->deleteSelf();
+ delete acl_checklist;
}
ClientRequestContext::ClientRequestContext() : acl_checklist (NULL), redirect_state (REDIRECT_NONE), http(NULL)
cbdataReferenceDone (temp);
}
-void
-ClientHttpRequest::deleteSelf() const
-{
- delete this;
-}
-
ClientHttpRequest::ClientHttpRequest()
{
/* reset range iterator */
clientHttpRequest *http_ = context->http;
if (!cbdataReferenceValid (http_)) {
- context->deleteSelf();
+ delete context;
return;
}
} else {
/* Send an error */
clientStreamNode *node = (clientStreamNode *)http->client_stream.tail->prev->data;
- context->deleteSelf();
+ delete context;
debug(85, 5) ("Access Denied: %s\n", http->uri);
debug(85, 5) ("AclMatchedName = %s\n",
AclMatchedName ? AclMatchedName : "<null>");
clientHttpRequest *http_ = context->http;
if (!cbdataReferenceValid (http_)) {
- context->deleteSelf();
+ delete context;
return;
}
clientHttpRequest *http_ = http;
if (!cbdataReferenceValid (http_)) {
- deleteSelf();
+ delete this;
return;
}
- deleteSelf();
+ delete this;
http_->request->flags.cachable = answer;
http_->processRequest();
}
/*
- * $Id: client_side_request.h,v 1.15 2003/07/14 14:16:00 robertc Exp $
+ * $Id: client_side_request.h,v 1.16 2003/08/04 22:14:41 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf() const;
ClientHttpRequest();
~ClientHttpRequest();
/*
- * $Id: comm.cc,v 1.385 2003/08/03 09:21:29 robertc Exp $
+ * $Id: comm.cc,v 1.386 2003/08/04 22:14:41 robertc Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf() const;
static void Connect (int fd, void *me);
void connect();
void callCallback(comm_err_t status, int xerrno);
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
CommCallbackData(CommCommonCallback const &);
virtual ~CommCallbackData() {}
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
CommReadCallbackData(CommCommonCallback const &, CallBack<IOCB> aCallback, int);
virtual comm_callback_t getType() const { return COMM_CB_READ; }
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
CommAcceptCallbackData(int const anFd, CallBack<IOACB>, comm_err_t, int, int, ConnectionDetail const &);
virtual void callCallback();
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
CommFillCallbackData(int const anFd, CallBack<IOFCB> aCallback, comm_err_t, int);
virtual void callCallback();
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
CommWriteCallbackData(int const anFd, CallBack<IOWCB> aCallback, comm_err_t, int, int);
virtual void callCallback();
memPoolFree (Pool, address);
}
-void
-CommCallbackData::deleteSelf() const
-{
- delete this;
-}
-
MemPool (*CommReadCallbackData::Pool)(NULL);
void *
CommReadCallbackData::operator new (size_t byteCount)
memPoolFree (Pool, address);
}
-void
-CommReadCallbackData::deleteSelf() const
-{
- delete this;
-}
-
MemPool (*CommAcceptCallbackData::Pool)(NULL);
void *
CommAcceptCallbackData::operator new (size_t byteCount)
memPoolFree (Pool, address);
}
-void
-CommAcceptCallbackData::deleteSelf() const
-{
- delete this;
-}
-
MemPool (*CommFillCallbackData::Pool)(NULL);
void *
CommFillCallbackData::operator new (size_t byteCount)
memPoolFree (Pool, address);
}
-void
-CommFillCallbackData::deleteSelf() const
-{
- delete this;
-}
-
-
MemPool (*CommWriteCallbackData::Pool)(NULL);
void *
CommWriteCallbackData::operator new (size_t byteCount)
memPoolFree (Pool, address);
}
-void
-CommWriteCallbackData::deleteSelf() const
-{
- delete this;
-}
-
CommCallbackData::CommCallbackData(CommCommonCallback const &newResults) : result (newResults)
{
assert(fdc_table[result.fd].active == 1);
dlink_node *node = (dlink_node *)CommCallbackList.head;
cio = (CommCallbackData *)node->data;
cio->callACallback();
- cio->deleteSelf();
+ delete cio;
}
PROF_stop(comm_calliocallback);
cbdataFree(address);
}
-void
-ConnectStateData::deleteSelf() const
-{
- delete this;
-}
-
void
commConnectStart(int fd, const char *host, u_short port, CNCB * callback, void *data)
{
debug(5, 3) ("commConnectFree: FD %d\n", fd);
cbdataReferenceDone(cs->callback.data);
safe_free(cs->host);
- cs->deleteSelf();
+ delete cs;
}
static void
/* We're closing! */
cio->fdClosing();
cio->callACallback();
- cio->deleteSelf();
+ delete cio;
}
commCallCloseHandlers(fd);
/*
- * $Id: delay_pools.cc,v 1.41 2003/08/03 09:03:49 robertc Exp $
+ * $Id: delay_pools.cc,v 1.42 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
typedef RefCount<Aggregate> Pointer;
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Aggregate();
~Aggregate();
virtual DelaySpec *rate() {return &spec;}
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
AggregateId (RefCount<Aggregate>);
virtual int bytesWanted (int min, int max) const;
virtual void bytesIn(int qty);
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Id (RefCount<VectorPool>, int);
virtual int bytesWanted (int min, int max) const;
virtual void bytesIn(int qty);
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
protected:
virtual char const *label() const {return "Individual";}
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
protected:
virtual char const *label() const {return "Network";}
public:
void *operator new(size_t);
void operator delete (void *);
- virtual void deleteSelf() const;
Id (RefCount<ClassCHostPool>, unsigned char, unsigned char);
virtual int bytesWanted (int min, int max) const;
virtual void bytesIn(int qty);
::operator delete (address);
}
-void
-CommonPool::deleteSelf() const
-{
- delete this;
-}
-
CommonPool *
CommonPool::Factory(unsigned char _class, CompositePoolNode::Pointer& compositeCopy)
{
::operator delete (address);
}
-void
-CompositePoolNode::deleteSelf() const
-{
- delete this;
-}
-
void *
Aggregate::operator new(size_t size)
{
::operator delete (address);
}
-void
-Aggregate::deleteSelf() const
-{
- delete this;
-}
-
Aggregate::Aggregate()
{
theBucket.init (*rate());
::operator delete (address);
}
-void
-Aggregate::AggregateId::deleteSelf() const
-{
- delete this;
-}
-
Aggregate::AggregateId::AggregateId(RefCount<Aggregate> anAggregate) : theAggregate(anAggregate)
{}
::operator delete (address);
}
-void
-IndividualPool::deleteSelf() const
-{
- delete this;
-}
-
VectorPool::VectorPool()
{
DelayPools::registerForUpdates (this);
::operator delete (address);
}
-void
-VectorPool::Id::deleteSelf() const
-{
- delete this;
-}
-
VectorPool::Id::Id (VectorPool::Pointer aPool, int anIndex) : theVector (aPool), theIndex (anIndex)
{}
::operator delete (address);
}
-void
-ClassCNetPool::deleteSelf() const
-{
- delete this;
-}
-
unsigned int const
ClassCNetPool::makeKey (struct in_addr &src_addr) const
::operator delete (address);
}
-void
-ClassCHostPool::Id::deleteSelf() const
-{
- delete this;
-}
-
ClassCHostPool::Id::Id (ClassCHostPool::Pointer aPool, unsigned char aNet, unsigned char aHost) : theClassCHost (aPool), theNet (aNet), theHost (aHost)
{}
/*
- * $Id: external_acl.cc,v 1.51 2003/07/14 08:21:56 robertc Exp $
+ * $Id: external_acl.cc,v 1.52 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 82 External ACL
* AUTHOR: Henrik Nordstrom, MARA Systems AB
hash_remove_link(def->cache, entry);
dlinkDelete(&entry->lru, &def->lru_list);
def->cache_entries -= 1;
- entry->deleteSelf();
+ delete entry;
}
/******************************************************************
memPoolFree (Pool, address);
}
-void
-ACLExternal::deleteSelf() const
-{
- delete this;
-}
-
char const *
ACLExternal::typeString() const
{
{
public:
- virtual void deleteSelf() const;
void * operator new (size_t);
void operator delete (void *);
AUFSFile (char const *path, AufsIO *);
AufsIO();
virtual bool shedLoad();
virtual int load();
- virtual void deleteSelf() const;
virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
virtual DiskFile::Pointer newFile(char const *path);
virtual void unlinkFile (char const *);
return loadav;
}
-void
-AufsIO::deleteSelf() const
-{
- /* do nothing, we use a single instance */
-}
-
StoreIOState::Pointer
AufsIO::createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const
{
cbdataReferenceDone (t);
}
-void
-AUFSFile::deleteSelf() const {delete this;}
-
AUFSFile::AUFSFile (char const *aPath, AufsIO *anIO):fd(-1), errorOccured (false), IO(anIO),
inProgressIOs (0)
{
{
public:
- virtual void deleteSelf() const {delete this;}
-
void * operator new (size_t);
void operator delete (void *);
CossState(CossSwapDir *);
{
public:
- virtual void deleteSelf() const;
void * operator new (size_t);
void operator delete (void *);
DiskdFile (char const *path, DiskdIO *);
public:
DiskdIO();
virtual bool shedLoad();
- virtual void deleteSelf() const;
virtual void openFailed();
virtual int load();
virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
/*
- * $Id: store_io_diskd.cc,v 1.35 2003/07/29 11:34:57 robertc Exp $
+ * $Id: store_io_diskd.cc,v 1.36 2003/08/04 22:14:53 robertc Exp $
*
* DEBUG: section 79 Squid-side DISKD I/O functions.
* AUTHOR: Duane Wessels
return away * 1000 / magic2;
}
-void
-DiskdIO::deleteSelf() const
-{
- /* do nothing, we use a single instance */
-}
-
void
DiskdIO::openFailed()
{
cbdataReferenceDone (t);
}
-void
-DiskdFile::deleteSelf() const {delete this;}
-
DiskdFile::DiskdFile (char const *aPath, DiskdIO *anIO) : errorOccured (false), IO(anIO),
inProgressIOs (0)
{
/*
- * $Id: store_dir_ufs.cc,v 1.61 2003/08/03 10:05:20 robertc Exp $
+ * $Id: store_dir_ufs.cc,v 1.62 2003/08/04 22:14:53 robertc Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
filemapFreeMemory(map);
if (IO)
- IO->deleteSelf();
+ delete IO;
IO = NULL;
}
/*
- * $Id: store_io_ufs.cc,v 1.21 2003/07/28 09:27:29 robertc Exp $
+ * $Id: store_io_ufs.cc,v 1.22 2003/08/04 22:14:53 robertc Exp $
*
* DEBUG: section 79 Storage Manager UFS Interface
* AUTHOR: Duane Wessels
return 999;
}
-void
-UfsIO::deleteSelf() const
-{
- /* Do nothing, we use a single instance */
-}
-
StoreIOState::Pointer
UfsIO::createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const
{
cbdataReferenceDone (t);
}
-void
-UFSFile::deleteSelf() const {delete this;}
-
UFSFile::UFSFile (char const *aPath) : fd (-1), closed (true), error_(false)
{
assert (aPath);
public:
void *operator new(size_t);
void operator delete(void *);
- virtual void deleteSelf() const;
UFSFile (char const *path);
~UFSFile();
virtual void open (int, mode_t, IORequestor::Pointer);
public:
virtual bool shedLoad();
virtual int load();
- virtual void deleteSelf() const;
virtual StoreIOState::Pointer createState(SwapDir *SD, StoreEntry *e, STIOCB * callback, void *callback_data) const;
virtual DiskFile::Pointer newFile (char const *path);
virtual void unlinkFile (char const *);
/*
- * $Id: ftp.cc,v 1.350 2003/06/20 01:01:00 robertc Exp $
+ * $Id: ftp.cc,v 1.351 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
public:
void *operator new (size_t);
void operator delete (void *);
- void deleteSelf() const;
~FtpStateData();
StoreEntry *entry;
request_t *request;
cbdataFree(t);
}
-void
-FtpStateData::deleteSelf () const
-{
- delete this;
-}
-
typedef struct
{
char type;
ftpStateFree(int fdnotused, void *data)
{
FtpStateData *ftpState = (FtpStateData *)data;
- ftpState->deleteSelf();
+ delete ftpState;
}
FtpStateData::~FtpStateData()
/*
- * $Id: helper.cc,v 1.59 2003/07/15 11:33:22 robertc Exp $
+ * $Id: helper.cc,v 1.60 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 84 Helper process maintenance
* AUTHOR: Harvest Derived?
{
cbdataReferenceDone(r->data);
xfree(r->buf);
- r->deleteSelf();
+ delete r;
}
MemPool (*helper_request::Pool)(NULL);
memPoolFree (Pool, address);
}
-void
-helper_request::deleteSelf() const
-{
- delete this;
-}
-
static void
helperStatefulRequestFree(helper_stateful_request * r)
{
cbdataReferenceDone(r->data);
xfree(r->buf);
- r->deleteSelf();
+ delete r;
}
MemPool (*helper_stateful_request::Pool)(NULL);
{
memPoolFree (Pool, address);
}
-
-void
-helper_stateful_request::deleteSelf() const
-{
- delete this;
-}
/*
- * $Id: helper.h,v 1.1 2003/07/15 11:33:21 robertc Exp $
+ * $Id: helper.h,v 1.2 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 84 Helper process maintenance
* AUTHOR: Harvest Derived?
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
char *buf;
HLPCB *callback;
void *data;
public:
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
char *buf;
HLPSCB *callback;
int placeholder; /* if 1, this is a dummy request waiting for a stateful helper to become available for deferred requests.*/
/*
- * $Id: http.cc,v 1.424 2003/07/29 11:34:56 robertc Exp $
+ * $Id: http.cc,v 1.425 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
/* don't cache the result */
orig_request->flags.cachable = 0;
/* pretend it's not a range request */
- orig_request->range->deleteSelf();
+ delete orig_request->range;
orig_request->range = NULL;
orig_request->flags.range = 0;
}
/*
- * $Id: mem_node.cc,v 1.4 2003/06/26 12:51:57 robertc Exp $
+ * $Id: mem_node.cc,v 1.5 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 19 Store Memory Primitives
* AUTHOR: Robert Collins
memPoolFree(pool, address);
}
-void
-mem_node::deleteSelf() const
-{
- delete this;
-}
-
mem_node::mem_node(off_t offset):nodeBuffer(0,offset,data)
{}
/*
- * $Id: mem_node.h,v 1.4 2003/06/26 12:51:57 robertc Exp $
+ * $Id: mem_node.h,v 1.5 2003/08/04 22:14:42 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
void operator delete (void *);
void *operator new (size_t);
- void deleteSelf() const;
mem_node(off_t);
~mem_node();
size_t space() const;
/*
- * $Id: peer_digest.cc,v 1.97 2003/07/16 20:22:26 wessels Exp $
+ * $Id: peer_digest.cc,v 1.98 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
cbdataFree(t);
}
-void
-PeerDigest::deleteSelf () const
-{
- delete this;
-}
-
/* allocate new peer digest, call Init, and lock everything */
PeerDigest *
peerDigestCreate(peer * p)
peerDigestClean(pd);
- pd->deleteSelf();
+ delete pd;
}
/* called by peer to indicate that somebody actually needs this digest */
/*
- * $Id: protos.h,v 1.486 2003/07/28 09:27:28 robertc Exp $
+ * $Id: protos.h,v 1.487 2003/08/04 22:14:42 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
FreeObject(void *address)
{
O *anObject = static_cast <O *>(address);
- anObject->deleteSelf();
+ delete anObject;
}
SQUIDCEXTERN void file_write(int, off_t, void const *, int len, DWCB *, void *, FREE *);
/*
- * $Id: stmem.cc,v 1.79 2003/06/26 12:51:57 robertc Exp $
+ * $Id: stmem.cc,v 1.80 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 19 Store Memory Primitives
* AUTHOR: Harvest Derived
mem_hdr::unlink(mem_node *aNode)
{
nodes.remove (aNode, NodeCompare);
- aNode->deleteSelf();
+ delete aNode;
}
int
/*
- * $Id: store_swapmeta.cc,v 1.21 2003/02/21 22:50:12 robertc Exp $
+ * $Id: store_swapmeta.cc,v 1.22 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 20 Storage Manager Swapfile Metadata
* AUTHOR: Kostas Anagnostakis
while ((t = n) != NULL) {
n = t->next;
xfree(t->value);
- t->deleteSelf();
+ delete t;
}
}
/*
- * $Id: structs.h,v 1.476 2003/07/22 15:23:02 robertc Exp $
+ * $Id: structs.h,v 1.477 2003/08/04 22:14:42 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
public:
void *operator new (size_t);
void operator delete(void *);
- void deleteSelf() const;
struct _peer *peer; /* pointer back to peer structure, argh */
CacheDigest *cd; /* actual digest structure */
/*
- * $Id: tunnel.cc,v 1.143 2003/07/15 06:50:43 robertc Exp $
+ * $Id: tunnel.cc,v 1.144 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 26 Secure Sockets Layer Proxy
* AUTHOR: Duane Wessels
class Connection;
void *operator new(size_t);
void operator delete (void *);
- void deleteSelf() const;
static void ReadClient(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data);
static void ReadServer(int fd, char *buf, size_t len, comm_err_t errcode, int xerrno, void *data);
static void WriteClientDone(int fd, char *buf, size_t len, comm_err_t flag, int xerrno, void *data);
sslState->host = NULL;
requestUnlink(sslState->request);
sslState->request = NULL;
- sslState->deleteSelf();
+ delete sslState;
}
SslStateData::Connection::~Connection()
cbdataFree(t);
}
-void
-SslStateData::deleteSelf () const
-{
- delete this;
-}
-
void
SslStateData::Connection::fd(int const newFD)
{
/*
- * $Id: ufscommon.cc,v 1.10 2003/07/15 11:33:22 robertc Exp $
+ * $Id: ufscommon.cc,v 1.11 2003/08/04 22:14:42 robertc Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Robert Collins
cbdataReferenceDone (t);
}
-void
-RebuildState::deleteSelf() const
-{
- delete this;
-}
-
RebuildState::~RebuildState()
{
store_dirs_rebuilding--;
if (fd == -2) {
debug(47, 1) ("Done scanning %s swaplog (%d entries)\n",
sd->path, n_read);
- deleteSelf();
+ delete this;
return;
} else if (fd < 0) {
continue;
/*
- * $Id: ufscommon.h,v 1.7 2003/07/22 15:23:03 robertc Exp $
+ * $Id: ufscommon.h,v 1.8 2003/08/04 22:14:42 robertc Exp $
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
* ----------------------------------------------------------
public:
typedef RefCount<DiskFile> Pointer;
- virtual void deleteSelf() const = 0;
virtual void open (int, mode_t, IORequestor::Pointer) = 0;
virtual void create (int, mode_t, IORequestor::Pointer) = 0;
virtual void read(char *, off_t, size_t) = 0;
public:
virtual bool shedLoad() = 0;
- virtual void deleteSelf() const = 0;
virtual void openFailed(){}
virtual int load(){return -1;}
operator C *() {return const_cast<C *>(theInstance);}
- // This will go when we remove the deleteSelf idiom
- virtual void deleteSelf() const {delete const_cast<InstanceToSingletonAdapter*>(this);}
-
private:
C const *theInstance;
};
{
public:
- virtual void deleteSelf() const {delete this;}
-
void * operator new (size_t);
void operator delete (void *);
UFSStoreState(SwapDir * SD, StoreEntry * anEntry, STIOCB * callback_, void *callback_data_);
public:
void *operator new(size_t);
void operator delete(void *);
- void deleteSelf() const;
static EVH RebuildFromDirectory;
static EVH RebuildFromSwapLog;
/*
- * $Id: http_range_test.cc,v 1.8 2003/08/03 22:06:10 robertc Exp $
+ * $Id: http_range_test.cc,v 1.9 2003/08/04 22:14:56 robertc Exp $
*
* DEBUG: section 64 HTTP Range Header
* AUTHOR: Alex Rousskov
assert (*pos);
- range->deleteSelf();
+ delete range;
}
HttpHdrRange *
assert (range->specs.count == 3);
- range->deleteSelf();
+ delete range;
range=rangeFromString("bytes=0-3, 1-, -2");
if (!range->canonize(4))
exit(1);
- range->deleteSelf();
+ delete range;
range=rangeFromString("bytes=3-6");
if (range->canonize(3))
exit(1);
- range->deleteSelf();
+ delete range;
range=rangeFromString("bytes=3-6");
if (!range->canonize(4))
exit(1);
- range->deleteSelf();
+ delete range;
range=rangeFromString("bytes=1-1,2-3");
assert (range->specs.count == 2);
- range->deleteSelf();
+ delete range;
}
int
/*
- * $Id: mem_node_test.cc,v 1.4 2003/06/26 12:52:00 robertc Exp $
+ * $Id: mem_node_test.cc,v 1.5 2003/08/04 22:14:57 robertc Exp $
*
* DEBUG: section 19 Store Memory Primitives
* AUTHOR: Robert Collins
assert (mem_node (0) < mem_node (2));
assert (!(mem_node (0) < mem_node (0)));
assert (!(mem_node (2) < mem_node (0)));
- aNode->deleteSelf();
+ delete aNode;
assert (mem_node::InUseCount() == 0);
return 0;
}
/*
- * $Id: refcount.cc,v 1.3 2003/01/23 00:38:34 robertc Exp $
+ * $Id: refcount.cc,v 1.4 2003/08/04 22:14:58 robertc Exp $
*
* DEBUG: section xx Refcount allocator
* AUTHOR: Robert Collins
#include "squid.h"
#include "RefCount.h"
-class _ToRefCount :public RefCountable {
+class _ToRefCount :public RefCountable
+{
+
public:
_ToRefCount () {++Instances;}
+
~_ToRefCount() {--Instances;}
- int someMethod() {if (!this) exit(1);
- return 1;}
- void deleteSelf() const {delete this;}
+
+ int someMethod()
+ {
+ if (!this)
+ exit(1);
+
+ return 1;
+ }
+
static int Instances;
+
private:
};
/* Must be zero at the end for the test to pass. */
int _ToRefCount::Instances = 0;
-class AlsoRefCountable : public RefCountable, public _ToRefCount {
- public:
+class AlsoRefCountable : public RefCountable, public _ToRefCount
+{
+
+public:
typedef RefCount<AlsoRefCountable> Pointer;
- int doSomething() { if (!this) exit (1); return 1;}
+
+ int doSomething() { if (!this)
+ exit (1); return 1;}
};
int
main (int argc, char **argv)
{
{
- ToRefCount anObject(new _ToRefCount);
- anObject->someMethod();
- anObject = anObject;
- ToRefCount objectTwo (anObject);
- anObject = objectTwo;
- {
- ToRefCount anotherObject(new _ToRefCount);
- anObject = anotherObject;
- }
- {
- ToRefCount aForthObject (anObject);
- anObject = ToRefCount(NULL);
- aForthObject->someMethod();
- aForthObject = NULL;
- }
+ ToRefCount anObject(new _ToRefCount);
+ anObject->someMethod();
+ anObject = anObject;
+ ToRefCount objectTwo (anObject);
+ anObject = objectTwo;
+ {
+ ToRefCount anotherObject(new _ToRefCount);
+ anObject = anotherObject;
+ }
+
+ {
+ ToRefCount aForthObject (anObject);
+ anObject = ToRefCount(NULL);
+ aForthObject->someMethod();
+ aForthObject = NULL;
+ }
}
+
/* Test creating an object, using it , and then making available as a
* refcounted one:
*/
{
- _ToRefCount *aPointer = new _ToRefCount;
- aPointer->someMethod();
- ToRefCount anObject(aPointer);
+ _ToRefCount *aPointer = new _ToRefCount;
+ aPointer->someMethod();
+ ToRefCount anObject(aPointer);
}
/* standalone pointers should be usable */
{
- ToRefCount anObject;
+ ToRefCount anObject;
}
/* Can we check pointers for equality */
{
- ToRefCount anObject;
- ToRefCount anotherObject(new _ToRefCount);
- if (anObject == anotherObject)
- exit (1);
- anotherObject = NULL;
- if (!(anObject == anotherObject))
- exit (1);
+ ToRefCount anObject;
+ ToRefCount anotherObject(new _ToRefCount);
+
+ if (anObject == anotherObject)
+ exit (1);
+
+ anotherObject = NULL;
+
+ if (!(anObject == anotherObject))
+ exit (1);
}
/* Can we get the pointer for a const object */
{
- ToRefCount anObject (new _ToRefCount);
- ToRefCount const aConstObject (anObject);
- _ToRefCount const *aPointer = aConstObject.getRaw();
- if (aPointer != anObject.getRaw())
- exit (2);
+ ToRefCount anObject (new _ToRefCount);
+ ToRefCount const aConstObject (anObject);
+ _ToRefCount const *aPointer = aConstObject.getRaw();
+
+ if (aPointer != anObject.getRaw())
+ exit (2);
}
/* Can we get a refcounted pointer from a const object */
{
- _ToRefCount const * aPointer = new _ToRefCount;
- ToRefCount anObject (aPointer);
+ _ToRefCount const * aPointer = new _ToRefCount;
+ ToRefCount anObject (aPointer);
}
/* Can we get a pointer to nonconst from a nonconst refcounter */
{
- ToRefCount anObject (new _ToRefCount);
- _ToRefCount *aPointer = anObject.getRaw();
- aPointer = NULL;
+ ToRefCount anObject (new _ToRefCount);
+ _ToRefCount *aPointer = anObject.getRaw();
+ aPointer = NULL;
}
/* Create a doubley inheriting refcount instance,
* cast to a single inheritance instance,
* then hope :}
*/
{
- ToRefCount aBaseObject;
- {
- AlsoRefCountable::Pointer anObject (new AlsoRefCountable);
- aBaseObject = anObject.getRaw();
- }
+ ToRefCount aBaseObject;
+ {
+ AlsoRefCountable::Pointer anObject (new AlsoRefCountable);
+ aBaseObject = anObject.getRaw();
+ }
}
return _ToRefCount::Instances == 0 ? 0 : 1;
}