1 // Concrete class of short float numbers.
3 #ifndef _CL_SFLOAT_CLASS_H
4 #define _CL_SFLOAT_CLASS_H
6 #include "cln/number.h"
7 #include "cln/float_class.h"
11 class cl_SF : public cl_F {
13 // Default constructor.
15 // Assignment operators.
16 cl_SF& operator= (const cl_SF&);
17 // Optimization of method pointer_p().
18 bool pointer_p() const
20 // Faster pointer_p() gives a faster copy constructor (but not destructor!!!).
21 cl_SF (const cl_SF& x);
22 // Other constructors.
24 // Private constructor.
25 cl_SF (cl_private_thing);
26 cl_SF (struct cl_sfloat * /* NULL! */, cl_uint);
27 public: // Ability to place an object at a given address.
28 void* operator new (size_t size) { return malloc_hook(size); }
29 void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
30 void operator delete (void* ptr) { free_hook(ptr); }
33 // Private constructors.
34 inline cl_SF::cl_SF (cl_private_thing ptr) : cl_F (ptr) {}
35 // The assignment operators:
36 CL_DEFINE_ASSIGNMENT_OPERATOR(cl_SF, cl_SF)
37 // The default constructors.
38 inline cl_SF::cl_SF ()
39 : cl_F ((cl_private_thing) cl_combine(cl_SF_tag,0)) {}
40 // The copy constructors.
41 CL_DEFINE_COPY_CONSTRUCTOR2(cl_SF,cl_F)
45 #endif /* _CL_SFLOAT_CLASS_H */