You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.5 KiB

25 years ago
  1. // General vectors of numbers.
  2. #ifndef _CL_GV_NUMBER_H
  3. #define _CL_GV_NUMBER_H
  4. #include "cl_number.h"
  5. #include "cl_GV.h"
  6. typedef cl_heap_GV<cl_number> cl_heap_GV_number;
  7. struct cl_GV_number : public cl_GV<cl_number,cl_GV_any> {
  8. public:
  9. // Constructors.
  10. cl_GV_number ();
  11. cl_GV_number (const cl_GV_number&);
  12. explicit cl_GV_number (uintL len);
  13. // Assignment operators.
  14. cl_GV_number& operator= (const cl_GV_number&);
  15. // Private pointer manipulations.
  16. cl_GV_number (cl_heap_GV_number* p) : cl_GV<cl_number,cl_GV_any> (p) {}
  17. cl_GV_number (cl_private_thing p) : cl_GV<cl_number,cl_GV_any> (p) {}
  18. };
  19. inline cl_GV_number::cl_GV_number (const cl_GV_number& x) : cl_GV<cl_number,cl_GV_any> (as_cl_private_thing(x)) {}
  20. CL_DEFINE_ASSIGNMENT_OPERATOR(cl_GV_number,cl_GV_number)
  21. extern cl_heap_GV_number* cl_make_heap_GV_number (uintL len);
  22. inline cl_GV_number::cl_GV_number (uintL len)
  23. : cl_GV<cl_number,cl_GV_any> (cl_make_heap_GV_number(len)) {}
  24. // Private pointer manipulations. Never throw away a `struct cl_heap_GV_number *'!
  25. extern const cl_GV_number cl_null_GV_number;
  26. inline cl_GV_number::cl_GV_number ()
  27. : cl_GV<cl_number,cl_GV_any> ((cl_heap_GV_number*) cl_null_GV_number) {}
  28. CL_REQUIRE(cl_GV_number)
  29. // Copy a vector.
  30. extern const cl_GV_number copy (const cl_GV_number&);
  31. // Debugging support.
  32. #ifdef CL_DEBUG
  33. extern int cl_GV_number_debug_module;
  34. static void* const cl_GV_number_debug_dummy[] = { &cl_GV_number_debug_dummy,
  35. &cl_GV_number_debug_module
  36. };
  37. #endif
  38. #endif /* _CL_GV_NUMBER_H */