File indexing completed on 2026-05-19 08:08:30
0001
0002
0003 #ifndef _CL_DFLOAT_CLASS_H
0004 #define _CL_DFLOAT_CLASS_H
0005
0006 #include "cln/number.h"
0007 #include "cln/float_class.h"
0008
0009 namespace cln {
0010
0011 class cl_DF : public cl_F {
0012 public:
0013
0014 cl_DF ();
0015
0016 cl_DF& operator= (const cl_DF&);
0017
0018 bool pointer_p() const
0019 { return true; }
0020
0021 cl_DF (const cl_DF& x);
0022
0023 cl_DF (const double);
0024 cl_DF& operator= (const double);
0025
0026 cl_DF (const char *);
0027
0028 cl_DF (cl_private_thing);
0029 cl_DF (struct cl_heap_dfloat *);
0030
0031 operator struct cl_heap_dfloat * () const;
0032 public:
0033 void* operator new (size_t size) { return malloc_hook(size); }
0034 void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
0035 void operator delete (void* ptr) { free_hook(ptr); }
0036 private:
0037
0038 };
0039
0040
0041 inline cl_DF::cl_DF (cl_private_thing ptr) : cl_F (ptr) {}
0042
0043 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_DF, cl_DF)
0044
0045
0046 inline cl_DF::operator struct cl_heap_dfloat * () const
0047 {
0048 struct cl_heap_dfloat * hpointer = (struct cl_heap_dfloat *) pointer;
0049 cl_inc_refcount(*this);
0050 return hpointer;
0051 }
0052 extern const cl_DF cl_DF_0;
0053 inline cl_DF::cl_DF ()
0054 : cl_F ((cl_private_thing) (struct cl_heap_dfloat *) cl_DF_0) {}
0055 class cl_DF_globals_init_helper
0056 {
0057 static int count;
0058 public:
0059 cl_DF_globals_init_helper();
0060 ~cl_DF_globals_init_helper();
0061 };
0062 static cl_DF_globals_init_helper cl_DF_globals_init_helper_instance;
0063
0064 #if 0
0065 inline cl_DF::cl_DF (struct cl_heap_dfloat * ptr)
0066 : cl_F ((cl_private_thing) ptr) {}
0067 #endif
0068
0069 CL_DEFINE_COPY_CONSTRUCTOR2(cl_DF,cl_F)
0070
0071 CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_DF)
0072
0073 }
0074
0075 #endif