libart-paperback 0.1.0-a.1.20260122225059.e5fea306241a
PDF (1.4) library for C++
real.hxx
1#ifndef art__paperback__carousel__real_hxx_
2#define art__paperback__carousel__real_hxx_
3
4#include <art/paperback/types.hxx>
5#include <art/paperback/forward.hxx>
6
7#include <art/paperback/carousel/object-model.hxx>
8
10{
11
12 /// Represents a COS real.
13 ///
14 class Real
16 {
17 public:
18 /// Constructor.
19 ///
20 Real();
21
22 /// Constructor.
23 ///
24 Real(double);
25
26 /// Constructor.
27 ///
28 Real(Real const&);
29
30 /// Constructor.
31 ///
32 Real(Real&&);
33
34 /// Destructor.
35 ///
36 ~Real() noexcept;
37
38 /// Access real.
39 ///
40 double const&
41 operator*() const;
42
43 /// Assignment.
44 ///
45 Real&
46 operator=(Real const&);
47
48 /// Assignment.
49 ///
50 Real&
51 operator=(Real&&);
52
53 /// Comparison.
54 ///
55 bool
56 operator==(Real const&) const;
57
58 /// Comparison.
59 ///
60 bool
61 operator!=(Real const&) const;
62
63 private:
64 double _data{};
65
66 };
67
68} // namespace Art::Paperback::Carousel
69
70#endif
Base class for value types.
Definition object-model.hxx:295
~Real() noexcept
Destructor.
Definition real.cxx:26
bool operator!=(Real const &) const
Comparison.
Definition real.cxx:67
double const & operator*() const
Access real.
Definition real.cxx:31
Real & operator=(Real const &)
Assignment.
Definition real.cxx:38
Real()
Constructor.
Definition real.cxx:7
bool operator==(Real const &) const
Comparison.
Definition real.cxx:60
COS file format implementation namespace.
Definition array.cxx:6