25 |
|
|
26 |
#include <map> |
#include <map> |
27 |
#include <vector> |
#include <vector> |
|
#include <sstream> |
|
28 |
|
|
29 |
#include "../common/global.h" |
#include "../common/global.h" |
30 |
#include "../common/optional.h" |
#include "../common/optional.h" |
185 |
virtual void OnSetValue(bool b) throw (LinuxSamplerException) = 0; |
virtual void OnSetValue(bool b) throw (LinuxSamplerException) = 0; |
186 |
protected: |
protected: |
187 |
bool bVal; |
bool bVal; |
|
private: |
|
188 |
void InitWithDefault(); |
void InitWithDefault(); |
189 |
|
private: |
190 |
}; |
}; |
191 |
|
|
192 |
class DeviceCreationParameterInt : public DeviceCreationParameter { |
class DeviceCreationParameterInt : public DeviceCreationParameter { |
213 |
virtual void OnSetValue(int i) throw (LinuxSamplerException) = 0; |
virtual void OnSetValue(int i) throw (LinuxSamplerException) = 0; |
214 |
protected: |
protected: |
215 |
int iVal; |
int iVal; |
|
private: |
|
216 |
void InitWithDefault(); |
void InitWithDefault(); |
217 |
|
private: |
218 |
}; |
}; |
219 |
|
|
220 |
class DeviceCreationParameterFloat : public DeviceCreationParameter { |
class DeviceCreationParameterFloat : public DeviceCreationParameter { |
241 |
virtual void OnSetValue(float f) throw (LinuxSamplerException) = 0; |
virtual void OnSetValue(float f) throw (LinuxSamplerException) = 0; |
242 |
protected: |
protected: |
243 |
float fVal; |
float fVal; |
|
private: |
|
244 |
void InitWithDefault(); |
void InitWithDefault(); |
245 |
|
private: |
246 |
}; |
}; |
247 |
|
|
248 |
class DeviceCreationParameterString : public DeviceCreationParameter { |
class DeviceCreationParameterString : public DeviceCreationParameter { |
261 |
virtual void OnSetValue(String s) throw (LinuxSamplerException) = 0; |
virtual void OnSetValue(String s) throw (LinuxSamplerException) = 0; |
262 |
protected: |
protected: |
263 |
String sVal; |
String sVal; |
|
private: |
|
264 |
void InitWithDefault(); |
void InitWithDefault(); |
265 |
|
private: |
266 |
}; |
}; |
267 |
|
|
268 |
class DeviceCreationParameterStrings : public DeviceCreationParameter { |
class DeviceCreationParameterStrings : public DeviceCreationParameter { |
286 |
virtual void OnSetValue(std::vector<String> vS) throw (LinuxSamplerException) = 0; |
virtual void OnSetValue(std::vector<String> vS) throw (LinuxSamplerException) = 0; |
287 |
protected: |
protected: |
288 |
std::vector<String> sVals; |
std::vector<String> sVals; |
|
private: |
|
289 |
void InitWithDefault(); |
void InitWithDefault(); |
290 |
|
private: |
291 |
}; |
}; |
292 |
|
|
|
template <class T> |
|
|
inline String ToString(T o) { |
|
|
std::stringstream ss; |
|
|
ss << o; |
|
|
return ss.str(); |
|
|
} |
|
|
|
|
293 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |
294 |
|
|
295 |
#endif // __LS_DEVICE_PARAMETER_H__ |
#endif // __LS_DEVICE_PARAMETER_H__ |