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