print_helpers.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef __PRINT_HELPERS_HPP
  2. #define __PRINT_HELPERS_HPP
  3. #include <iomanip>
  4. #include <istream>
  5. #include <ostream>
  6. #include <iostream>
  7. #include <cstring>
  8. #include <string>
  9. extern "C" {
  10. #include "fp12e.h"
  11. #include "fp6e.h"
  12. #include "fp2e.h"
  13. #include "fpe.h"
  14. }
  15. class Fp12e {
  16. public:
  17. Fp12e();
  18. Fp12e(const fp12e_t& input);
  19. friend std::ostream& operator<<(std::ostream& os, const Fp12e& output);
  20. friend std::istream& operator>>(std::istream& is, Fp12e& input);
  21. fp12e_t data;
  22. };
  23. class Fp6e {
  24. public:
  25. Fp6e();
  26. Fp6e(const fp6e_t& input);
  27. friend std::ostream& operator<<(std::ostream& os, const Fp6e& output);
  28. friend std::istream& operator>>(std::istream& is, Fp6e& input);
  29. fp6e_t data;
  30. };
  31. class Fp2e {
  32. public:
  33. Fp2e();
  34. Fp2e(const fp2e_t& input);
  35. friend std::ostream& operator<<(std::ostream& os, const Fp2e& output);
  36. friend std::istream& operator>>(std::istream& is, Fp2e& input);
  37. fp2e_t data;
  38. };
  39. class Fpe {
  40. public:
  41. Fpe();
  42. Fpe(const fpe_t& input);
  43. friend std::ostream& operator<<(std::ostream& os, const Fpe& output);
  44. friend std::istream& operator>>(std::istream& is, Fpe& input);
  45. fpe_t data;
  46. };
  47. std::ostream& hex_double(std::ostream& os, double d);
  48. std::istream& hex_double(std::istream& is, double& d);
  49. std::ostream& raw_double(std::ostream& os, double d);
  50. std::istream& raw_double(std::istream& is, double& d);
  51. #endif