File indexing completed on 2026-05-19 08:08:31
0001
0002
0003 #ifndef _CL_PROPLIST_H
0004 #define _CL_PROPLIST_H
0005
0006 #include "cln/symbol.h"
0007 #include "cln/malloc.h"
0008
0009 namespace cln {
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 struct cl_property {
0021 private:
0022 cl_property* next;
0023 public:
0024 cl_symbol key;
0025
0026 cl_property (const cl_symbol& k) : next (NULL), key (k) {}
0027
0028 virtual ~cl_property () {}
0029
0030 void* operator new (size_t size) { return malloc_hook(size); }
0031 void operator delete (void* ptr) { free_hook(ptr); }
0032 private:
0033 virtual void dummy ();
0034
0035 friend class cl_property_list;
0036 };
0037 #define SUBCLASS_cl_property() \
0038 void* operator new (size_t size) { return malloc_hook(size); } \
0039 void operator delete (void* ptr) { free_hook(ptr); }
0040
0041 struct cl_property_list {
0042 private:
0043 cl_property* list;
0044 public:
0045 cl_property* get_property (const cl_symbol& key);
0046 void add_property (cl_property* new_property);
0047
0048 cl_property_list () : list (NULL) {}
0049
0050 ~cl_property_list ();
0051 };
0052
0053 }
0054
0055 #endif