File indexing completed on 2026-05-19 08:08:32
0001
0002
0003 #ifndef _CL_REAL_CLASS_H
0004 #define _CL_REAL_CLASS_H
0005
0006 #include "cln/number.h"
0007 #include "cln/complex_class.h"
0008
0009 namespace cln {
0010
0011 class cl_R : public cl_N {
0012 public:
0013
0014 cl_R ();
0015
0016 cl_R (const cl_R&);
0017
0018
0019 cl_R& operator= (const cl_R&);
0020
0021 cl_R (const int);
0022 cl_R (const unsigned int);
0023 cl_R (const long);
0024 cl_R (const unsigned long);
0025 cl_R (const long long);
0026 cl_R (const unsigned long long);
0027 cl_R (const float);
0028 cl_R (const double);
0029 cl_R& operator= (const int);
0030 cl_R& operator= (const unsigned int);
0031 cl_R& operator= (const long);
0032 cl_R& operator= (const unsigned long);
0033 cl_R& operator= (const float);
0034 cl_R& operator= (const double);
0035 cl_R& operator= (const long long);
0036 cl_R& operator= (const unsigned long long);
0037
0038 cl_R (const char *);
0039
0040 cl_R (cl_private_thing);
0041 public:
0042 void* operator new (size_t size) { return malloc_hook(size); }
0043 void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
0044 void operator delete (void* ptr) { free_hook(ptr); }
0045 private:
0046
0047 };
0048
0049
0050 inline cl_R::cl_R (cl_private_thing ptr) : cl_N (ptr) {}
0051
0052 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_R, cl_R)
0053
0054 inline cl_R::cl_R ()
0055 : cl_N ((cl_private_thing) cl_combine(cl_FN_tag,0)) {}
0056
0057 CL_DEFINE_COPY_CONSTRUCTOR2(cl_R,cl_N)
0058
0059 CL_DEFINE_INT_CONSTRUCTORS(cl_R)
0060 CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_R)
0061 CL_DEFINE_LONG_CONSTRUCTORS(cl_R)
0062 CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_R)
0063 CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_R)
0064 CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_R)
0065 CL_DEFINE_FLOAT_CONSTRUCTOR(cl_R)
0066 CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_R)
0067
0068 }
0069
0070 #endif