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.

50 lines
1.5 KiB

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