int32_32_t.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 #include <audio/types.hpp>
8 
9 namespace audio {
15  class int32_32_t {
16  private:
17  int32_t m_data;
18  public:
19  int32_32_t() {}
20  int32_32_t(int32_t _value) :
21  m_data(_value) {
22  // nothing to do
23  }
24  // transformation operator:
25  int32_32_t(const audio::int8_8_t& _val);
26  int32_32_t(const audio::int8_16_t& _val);
27  int32_32_t(const audio::int16_16_t& _val);
28  int32_32_t(const audio::int16_32_t& _val);
29  int32_32_t(const audio::int24_24_t& _val);
30  int32_32_t(const audio::int24_32_t& _val);
31  int32_32_t(const audio::int32_32_t& _val);
32  int32_32_t(const audio::int32_64_t& _val);
33  int32_32_t(const audio::int64_64_t& _val);
34  int32_32_t(const audio::float_t& _val);
35  int32_32_t(const audio::double_t& _val);
36  // set operator
37  int32_32_t(int64_t _value, int32_t _flotingPointPosition);
38  void set(int64_t _value, int32_t _flotingPointPosition);
39  void set(int32_t _value);
40  int32_t get() const;
41  float getFloat() const;
42  double getDouble() const;
43  /* ****************************************************
44  * = assigment
45  *****************************************************/
46  const int32_32_t& operator= (const int32_32_t& _obj);
47  /* ****************************************************
48  * == operator
49  *****************************************************/
50  bool operator== (const int32_32_t& _obj) const;
51  /* ****************************************************
52  * != operator
53  *****************************************************/
54  bool operator!= (const int32_32_t& _obj) const;
55  /* ****************************************************
56  * < operator
57  *****************************************************/
58  bool operator< (const audio::int32_32_t& _obj) const;
59  /* ****************************************************
60  * < operator
61  *****************************************************/
62  bool operator<= (const audio::int32_32_t& _obj) const;
63  /* ****************************************************
64  * < operator
65  *****************************************************/
66  bool operator> (const audio::int32_32_t& _obj) const;
67  /* ****************************************************
68  * < operator
69  *****************************************************/
70  bool operator>= (const audio::int32_32_t& _obj) const;
71  /* ****************************************************
72  * += operator
73  *****************************************************/
74  const int32_32_t& operator+= (const int32_32_t& _obj);
75  /* ****************************************************
76  * + operator
77  *****************************************************/
78  int32_32_t operator+ (const int32_32_t& _obj) const;
79  /* ****************************************************
80  * -= operator
81  *****************************************************/
82  const int32_32_t& operator-= (const int32_32_t& _obj);
83  /* ****************************************************
84  * - operator
85  *****************************************************/
86  int32_32_t operator- (const int32_32_t& _obj) const;
87  /* ****************************************************
88  * *= operator
89  *****************************************************/
90  const int32_32_t& operator*= (const int32_32_t& _obj);
91  /* ****************************************************
92  * * operator
93  *****************************************************/
94  int32_32_t operator* (const int32_32_t& _obj) const;
95  /* ****************************************************
96  * /= operator
97  *****************************************************/
98  const int32_32_t& operator/= (const int32_32_t& _obj);
99  /* ****************************************************
100  * / operator
101  *****************************************************/
102  int32_32_t operator/ (const int32_32_t& _obj) const;
103  /* ****************************************************
104  * ++ operator
105  *****************************************************/
106  int32_32_t& operator++();
107  int32_32_t operator++(int _unused);
108  /* ****************************************************
109  * -- operator
110  *****************************************************/
111  int32_32_t& operator--();
112  int32_32_t operator--(int _unused);
113  };
114  std::ostream& operator <<(std::ostream& _os, const audio::int32_32_t& _obj);
115 }
116 
Definition: int32_32_t.hpp:15
Definition: int8_16_t.hpp:17
Definition: int64_64_t.hpp:10
Definition: int24_24_t.hpp:17
Definition: int24_32_t.hpp:17
Definition: int16_32_t.hpp:17
Definition: int16_16_t.hpp:17
Definition: float_t.hpp:11
Audio library namespace.
Definition: channel.hpp:70
Definition: int32_64_t.hpp:10
Definition: int8_8_t.hpp:15
Definition: double_t.hpp:10