Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-19 08:08:32

0001 // Concrete class of short float numbers.
0002 
0003 #ifndef _CL_SFLOAT_CLASS_H
0004 #define _CL_SFLOAT_CLASS_H
0005 
0006 #include "cln/number.h"
0007 #include "cln/float_class.h"
0008 
0009 namespace cln {
0010 
0011 class cl_SF : public cl_F {
0012 public:
0013 // Default constructor.
0014     cl_SF ();
0015 // Assignment operators.
0016     cl_SF& operator= (const cl_SF&);
0017 // Optimization of method pointer_p().
0018     bool pointer_p() const
0019         { return false; }
0020 // Faster pointer_p() gives a faster copy constructor (but not destructor!!!).
0021     cl_SF (const cl_SF& x);
0022 // Other constructors.
0023     cl_SF (const char *);
0024 // Private constructor.
0025     cl_SF (cl_private_thing);
0026     cl_SF (struct cl_sfloat * /* NULL! */, cl_uint);
0027 public: // Ability to place an object at a given address.
0028     void* operator new (size_t size) { return malloc_hook(size); }
0029     void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
0030     void operator delete (void* ptr) { free_hook(ptr); }
0031 };
0032 
0033 // Private constructors.
0034 inline cl_SF::cl_SF (cl_private_thing ptr) : cl_F (ptr) {}
0035 // The assignment operators:
0036 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SF, cl_SF)
0037 // The default constructors.
0038 inline cl_SF::cl_SF ()
0039     : cl_F ((cl_private_thing) cl_combine(cl_SF_tag,0)) {}
0040 // The copy constructors.
0041 CL_DEFINE_COPY_CONSTRUCTOR2(cl_SF,cl_F)
0042 
0043 }  // namespace cln
0044 
0045 #endif /* _CL_SFLOAT_CLASS_H */