File indexing completed on 2026-05-19 08:08:30
0001
0002
0003 #ifndef _CL_CONDITION_H
0004 #define _CL_CONDITION_H
0005
0006 #include "cln/malloc.h"
0007 #include "cln/io.h"
0008
0009 namespace cln {
0010
0011 struct cl_condition {
0012
0013 void* operator new (size_t size) { return malloc_hook(size); }
0014
0015 void operator delete (void* ptr) { free_hook(ptr); }
0016
0017 virtual const char * name () const = 0;
0018
0019 virtual void print (std::ostream&) const = 0;
0020
0021 virtual ~cl_condition () = 0;
0022 private:
0023 virtual void dummy ();
0024 };
0025 #define SUBCLASS_cl_condition() \
0026 public: \
0027 \
0028 void* operator new (size_t size) { return malloc_hook(size); } \
0029 \
0030 void operator delete (void* ptr) { free_hook(ptr); }
0031
0032
0033
0034
0035
0036
0037 }
0038
0039 #endif