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