File indexing completed on 2026-05-19 08:08:30
0001
0002
0003 #ifndef _CL_COMPLEX_CLASS_H
0004 #define _CL_COMPLEX_CLASS_H
0005
0006 #include "cln/number.h"
0007
0008 namespace cln {
0009
0010 class cl_N : public cl_number {
0011 public:
0012
0013 cl_N ();
0014
0015 cl_N (const cl_N&);
0016
0017
0018 cl_N& operator= (const cl_N&);
0019
0020 cl_N (const int);
0021 cl_N (const unsigned int);
0022 cl_N (const long);
0023 cl_N (const unsigned long);
0024 cl_N (const long long);
0025 cl_N (const unsigned long long);
0026 cl_N (const float);
0027 cl_N (const double);
0028 cl_N& operator= (const int);
0029 cl_N& operator= (const unsigned int);
0030 cl_N& operator= (const long);
0031 cl_N& operator= (const unsigned long);
0032 cl_N& operator= (const float);
0033 cl_N& operator= (const double);
0034 cl_N& operator= (const long long);
0035 cl_N& operator= (const unsigned long long);
0036
0037 cl_N (const char *);
0038
0039 cl_N (cl_private_thing);
0040 cl_N (struct cl_heap_complex *);
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_N::cl_N (cl_private_thing ptr) : cl_number (ptr) {}
0051
0052 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_N, cl_N)
0053
0054 inline cl_N::cl_N ()
0055 : cl_number ((cl_private_thing) cl_combine(cl_FN_tag,0)) {}
0056
0057 CL_DEFINE_COPY_CONSTRUCTOR2(cl_N,cl_number)
0058
0059 CL_DEFINE_INT_CONSTRUCTORS(cl_N)
0060 CL_DEFINE_INT_ASSIGNMENT_OPERATORS(cl_N)
0061 CL_DEFINE_LONG_CONSTRUCTORS(cl_N)
0062 CL_DEFINE_LONG_ASSIGNMENT_OPERATORS(cl_N)
0063 CL_DEFINE_LONGLONG_CONSTRUCTORS(cl_N)
0064 CL_DEFINE_LONGLONG_ASSIGNMENT_OPERATORS(cl_N)
0065 CL_DEFINE_FLOAT_CONSTRUCTOR(cl_N)
0066 CL_DEFINE_DOUBLE_CONSTRUCTOR(cl_N)
0067
0068 }
0069
0070 #endif