File indexing completed on 2026-05-19 08:08:33
0001
0002
0003 #ifndef _CL_SV_INTEGER_H
0004 #define _CL_SV_INTEGER_H
0005
0006 #include "cln/number.h"
0007 #include "cln/SV_rational.h"
0008 #include "cln/integer_class.h"
0009 #include "cln/io.h"
0010
0011 namespace cln {
0012
0013
0014
0015 typedef cl_heap_SV<cl_I> cl_heap_SV_I;
0016
0017 struct cl_SV_I : public cl_SV<cl_I,cl_SV_RA> {
0018 public:
0019
0020 cl_SV_I () : cl_SV<cl_I,cl_SV_RA> ((cl_heap_SV_I*) (cl_heap_SV_number*) cl_null_SV_number) {};
0021 cl_SV_I (const cl_SV_I&);
0022 explicit cl_SV_I (std::size_t len) : cl_SV<cl_I,cl_SV_RA> ((cl_heap_SV_I*) cl_make_heap_SV_number(len)) {};
0023
0024 cl_SV_I& operator= (const cl_SV_I&);
0025 };
0026 inline cl_SV_I::cl_SV_I (const cl_SV_I& x) : cl_SV<cl_I,cl_SV_RA> (as_cl_private_thing(x)) {}
0027 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SV_I,cl_SV_I)
0028
0029
0030 inline const cl_SV_I copy (const cl_SV_I& vector)
0031 {
0032 return The(cl_SV_I) (copy((const cl_SV_RA&) vector));
0033 }
0034
0035
0036 inline void fprint (std::ostream& stream, const cl_SV_I& x)
0037 {
0038 extern cl_print_flags default_print_flags;
0039 extern void print_vector (std::ostream& stream, const cl_print_flags& flags, void (* fun) (std::ostream&, const cl_print_flags&, const cl_number&), const cl_SV_number& vector);
0040 extern void print_integer (std::ostream& stream, const cl_print_flags& flags, const cl_I& z);
0041 print_vector(stream, default_print_flags,
0042 (void (*) (std::ostream&, const cl_print_flags&, const cl_number&))
0043 (void (*) (std::ostream&, const cl_print_flags&, const cl_I&))
0044 &print_integer,
0045 x);
0046 }
0047 CL_DEFINE_PRINT_OPERATOR(cl_SV_I)
0048
0049 }
0050
0051 #endif