comparison data/model/EditableDenseThreeDimensionalModel.h @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents 48410857b03c
children cc27f35aa75c
comparison
equal deleted inserted replaced
928:6a94bb528e9d 929:59e7fe1b1003
40 { 40 {
41 NoCompression, 41 NoCompression,
42 BasicMultirateCompression 42 BasicMultirateCompression
43 }; 43 };
44 44
45 EditableDenseThreeDimensionalModel(size_t sampleRate, 45 EditableDenseThreeDimensionalModel(int sampleRate,
46 size_t resolution, 46 int resolution,
47 size_t yBinCount, 47 int yBinCount,
48 CompressionType compression, 48 CompressionType compression,
49 bool notifyOnAdd = true); 49 bool notifyOnAdd = true);
50 50
51 virtual bool isOK() const; 51 virtual bool isOK() const;
52 52
53 virtual size_t getSampleRate() const; 53 virtual int getSampleRate() const;
54 virtual size_t getStartFrame() const; 54 virtual int getStartFrame() const;
55 virtual size_t getEndFrame() const; 55 virtual int getEndFrame() const;
56 56
57 virtual Model *clone() const; 57 virtual Model *clone() const;
58 58
59 59
60 /** 60 /**
61 * Set the frame offset of the first column. 61 * Set the frame offset of the first column.
62 */ 62 */
63 virtual void setStartFrame(size_t); 63 virtual void setStartFrame(int);
64 64
65 /** 65 /**
66 * Return the number of sample frames covered by each set of bins. 66 * Return the number of sample frames covered by each set of bins.
67 */ 67 */
68 virtual size_t getResolution() const; 68 virtual int getResolution() const;
69 69
70 /** 70 /**
71 * Set the number of sample frames covered by each set of bins. 71 * Set the number of sample frames covered by each set of bins.
72 */ 72 */
73 virtual void setResolution(size_t sz); 73 virtual void setResolution(int sz);
74 74
75 /** 75 /**
76 * Return the number of columns. 76 * Return the number of columns.
77 */ 77 */
78 virtual size_t getWidth() const; 78 virtual int getWidth() const;
79 79
80 /** 80 /**
81 * Return the number of bins in each set of bins. 81 * Return the number of bins in each set of bins.
82 */ 82 */
83 virtual size_t getHeight() const; 83 virtual int getHeight() const;
84 84
85 /** 85 /**
86 * Set the number of bins in each set of bins. 86 * Set the number of bins in each set of bins.
87 */ 87 */
88 virtual void setHeight(size_t sz); 88 virtual void setHeight(int sz);
89 89
90 /** 90 /**
91 * Return the minimum value of the value in each bin. 91 * Return the minimum value of the value in each bin.
92 */ 92 */
93 virtual float getMinimumLevel() const; 93 virtual float getMinimumLevel() const;
108 virtual void setMaximumLevel(float sz); 108 virtual void setMaximumLevel(float sz);
109 109
110 /** 110 /**
111 * Return true if there are data available for the given column. 111 * Return true if there are data available for the given column.
112 */ 112 */
113 virtual bool isColumnAvailable(size_t x) const { return x < getWidth(); } 113 virtual bool isColumnAvailable(int x) const { return x < getWidth(); }
114 114
115 /** 115 /**
116 * Get the set of bin values at the given column. 116 * Get the set of bin values at the given column.
117 */ 117 */
118 virtual Column getColumn(size_t x) const; 118 virtual Column getColumn(int x) const;
119 119
120 /** 120 /**
121 * Get a single value, from the n'th bin of the given column. 121 * Get a single value, from the n'th bin of the given column.
122 */ 122 */
123 virtual float getValueAt(size_t x, size_t n) const; 123 virtual float getValueAt(int x, int n) const;
124 124
125 /** 125 /**
126 * Set the entire set of bin values at the given column. 126 * Set the entire set of bin values at the given column.
127 */ 127 */
128 virtual void setColumn(size_t x, const Column &values); 128 virtual void setColumn(int x, const Column &values);
129 129
130 /** 130 /**
131 * Return the name of bin n. This is a single label per bin that 131 * Return the name of bin n. This is a single label per bin that
132 * does not vary from one column to the next. 132 * does not vary from one column to the next.
133 */ 133 */
134 virtual QString getBinName(size_t n) const; 134 virtual QString getBinName(int n) const;
135 135
136 /** 136 /**
137 * Set the name of bin n. 137 * Set the name of bin n.
138 */ 138 */
139 virtual void setBinName(size_t n, QString); 139 virtual void setBinName(int n, QString);
140 140
141 /** 141 /**
142 * Set the names of all bins. 142 * Set the names of all bins.
143 */ 143 */
144 virtual void setBinNames(std::vector<QString> names); 144 virtual void setBinNames(std::vector<QString> names);
154 /** 154 /**
155 * Return the value of bin n, if any. This is a "vertical scale" 155 * Return the value of bin n, if any. This is a "vertical scale"
156 * value which does not vary from one column to the next. This is 156 * value which does not vary from one column to the next. This is
157 * only meaningful if hasBinValues() returns true. 157 * only meaningful if hasBinValues() returns true.
158 */ 158 */
159 virtual float getBinValue(size_t n) const; 159 virtual float getBinValue(int n) const;
160 160
161 /** 161 /**
162 * Set the values of all bins (separate from their labels). These 162 * Set the values of all bins (separate from their labels). These
163 * are "vertical scale" values which do not vary from one column 163 * are "vertical scale" values which do not vary from one column
164 * to the next. 164 * to the next.
188 virtual int getCompletion() const { return m_completion; } 188 virtual int getCompletion() const { return m_completion; }
189 189
190 QString getTypeName() const { return tr("Editable Dense 3-D"); } 190 QString getTypeName() const { return tr("Editable Dense 3-D"); }
191 191
192 virtual QString toDelimitedDataString(QString delimiter) const; 192 virtual QString toDelimitedDataString(QString delimiter) const;
193 virtual QString toDelimitedDataString(QString delimiter, size_t f0, size_t f1) const; 193 virtual QString toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const;
194 194
195 virtual void toXml(QTextStream &out, 195 virtual void toXml(QTextStream &out,
196 QString indent = "", 196 QString indent = "",
197 QString extraAttributes = "") const; 197 QString extraAttributes = "") const;
198 198
207 // as to remove the duplicate elements. If the equal elements are 207 // as to remove the duplicate elements. If the equal elements are
208 // at the bottom, then m_trunc[x] will contain x'-x (a negative 208 // at the bottom, then m_trunc[x] will contain x'-x (a negative
209 // value). If m_trunc[x] is 0 then the whole of column x is 209 // value). If m_trunc[x] is 0 then the whole of column x is
210 // stored. 210 // stored.
211 std::vector<signed char> m_trunc; 211 std::vector<signed char> m_trunc;
212 void truncateAndStore(size_t index, const Column & values); 212 void truncateAndStore(int index, const Column & values);
213 Column expandAndRetrieve(size_t index) const; 213 Column expandAndRetrieve(int index) const;
214 214
215 std::vector<QString> m_binNames; 215 std::vector<QString> m_binNames;
216 std::vector<float> m_binValues; 216 std::vector<float> m_binValues;
217 QString m_binValueUnit; 217 QString m_binValueUnit;
218 218
219 size_t m_startFrame; 219 int m_startFrame;
220 size_t m_sampleRate; 220 int m_sampleRate;
221 size_t m_resolution; 221 int m_resolution;
222 size_t m_yBinCount; 222 int m_yBinCount;
223 CompressionType m_compression; 223 CompressionType m_compression;
224 float m_minimum; 224 float m_minimum;
225 float m_maximum; 225 float m_maximum;
226 bool m_haveExtents; 226 bool m_haveExtents;
227 bool m_notifyOnAdd; 227 bool m_notifyOnAdd;