RefCount<StoreHashIndex> sd;
private:
- CBDATA_CLASS2(StoreSearchHashIndex);
void copyBucket();
void (*callback)(void *cbdata);
void *cbdata;
bool _done;
int bucket;
Vector<StoreEntry *> entries;
+
+ // keep this last. it plays with private/public
+ CBDATA_CLASS2(StoreSearchHashIndex);
};
#endif /* SQUID_STOREHASHINDEX_H */
*/
#define cbdataReferenceValidDone(var, ptr) cbdataInternalReferenceDoneValid((void **)&(var), (ptr))
-/// \ingroup CBDATAAPI
+/**
+ * \ingroup CBDATAAPI
+ *
+ * This needs to be defined LAST in teh class definition. It plays with private/public states in C++.
+ */
#define CBDATA_CLASS2(type) \
+ private: \
static cbdata_type CBDATA_##type; \
public: \
void *operator new(size_t size) { \
void operator delete (void *address) { \
if (address) cbdataInternalFree(address);\
} \
- void *toCbdata() { return this; } \
- private:
+ void *toCbdata() { return this; }
#endif /* !CBDATA_DEBUG */
/**
\todo CODE: make this a private field.
*/
void *data; /* the wrapped data */
+
private:
CBDATA_CLASS2(generic_cbdata);
};
static void abort(void*);
private:
- CBDATA_CLASS2(FwdState);
Pointer self;
ErrorState *err;
int client_fd;
} flags;
IpAddress src; /* Client address for this connection. Needed for transparent operations. */
+
+ // NP: keep this last. It plays with private/public
+ CBDATA_CLASS2(FwdState);
};
#endif /* SQUID_FORWARD_H */