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