--- linuxsampler/trunk/src/drivers/DeviceParameter.h 2006/06/27 22:53:17 879 +++ linuxsampler/trunk/src/drivers/DeviceParameter.h 2006/06/27 22:57:37 880 @@ -3,6 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * + * Copyright (C) 2005, 2006 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -28,7 +29,7 @@ #include "../common/global.h" #include "../common/optional.h" -#include "../common/LinuxSamplerException.h" +#include "../common/Exception.h" #include "Device.h" namespace LinuxSampler { @@ -45,7 +46,7 @@ virtual optional RangeMax() = 0; virtual optional Possibilities() = 0; virtual String Value() = 0; - virtual void SetValue(String val) throw (LinuxSamplerException) = 0; + virtual void SetValue(String val) throw (Exception) = 0; }; class DeviceRuntimeParameterBool : public DeviceRuntimeParameter { @@ -57,12 +58,12 @@ virtual optional RangeMax(); virtual optional Possibilities(); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual bool ValueAsBool(); - virtual void SetValue(bool b) throw (LinuxSamplerException); + virtual void SetValue(bool b) throw (Exception); - virtual void OnSetValue(bool b) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(bool b) throw (Exception) = 0; protected: bool bVal; }; @@ -76,15 +77,15 @@ virtual optional RangeMax(); virtual optional Possibilities(); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual int ValueAsInt(); - virtual void SetValue(int i) throw (LinuxSamplerException); + virtual void SetValue(int i) throw (Exception); virtual optional RangeMinAsInt() = 0; virtual optional RangeMaxAsInt() = 0; virtual std::vector PossibilitiesAsInt() = 0; - virtual void OnSetValue(int i) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(int i) throw (Exception) = 0; protected: int iVal; }; @@ -98,10 +99,10 @@ virtual optional RangeMax(); virtual optional Possibilities(); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual float ValueAsFloat(); - virtual void SetValue(float f) throw (LinuxSamplerException); + virtual void SetValue(float f) throw (Exception); virtual optional RangeMinAsFloat() = 0; virtual optional RangeMaxAsFloat() = 0; @@ -121,10 +122,10 @@ virtual optional RangeMax(); virtual optional Possibilities(); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual String ValueAsString(); - virtual void SetValueAsString(String s) throw (LinuxSamplerException); + virtual void SetValueAsString(String s) throw (Exception); virtual std::vector PossibilitiesAsString() = 0; virtual void OnSetValue(String s) = 0; @@ -142,10 +143,10 @@ virtual optional RangeMax(); virtual optional Possibilities(); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual std::vector ValueAsStrings(); - virtual void SetValue(std::vector vS) throw (LinuxSamplerException); + virtual void SetValue(std::vector vS) throw (Exception); virtual std::vector PossibilitiesAsString() = 0; virtual void OnSetValue(std::vector vS) = 0; @@ -177,7 +178,7 @@ class DeviceCreationParameterBool : public DeviceCreationParameter { public: DeviceCreationParameterBool(bool bVal = false); - DeviceCreationParameterBool(String val) throw (LinuxSamplerException); + DeviceCreationParameterBool(String val) throw (Exception); virtual String Type(); virtual bool Multiplicity(); virtual optional Default(std::map Parameters); @@ -185,13 +186,13 @@ virtual optional RangeMax(std::map Parameters); virtual optional Possibilities(std::map Parameters); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual bool ValueAsBool(); - virtual void SetValue(bool b) throw (LinuxSamplerException); + virtual void SetValue(bool b) throw (Exception); virtual optional DefaultAsBool(std::map Parameters) = 0; - virtual void OnSetValue(bool b) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(bool b) throw (Exception) = 0; protected: bool bVal; void InitWithDefault(); @@ -201,7 +202,7 @@ class DeviceCreationParameterInt : public DeviceCreationParameter { public: DeviceCreationParameterInt(int iVal = 0); - DeviceCreationParameterInt(String val) throw (LinuxSamplerException); + DeviceCreationParameterInt(String val) throw (Exception); virtual String Type(); virtual bool Multiplicity(); virtual optional Default(std::map Parameters); @@ -209,16 +210,16 @@ virtual optional RangeMax(std::map Parameters); virtual optional Possibilities(std::map Parameters); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual int ValueAsInt(); - virtual void SetValue(int i) throw (LinuxSamplerException); + virtual void SetValue(int i) throw (Exception); virtual optional DefaultAsInt(std::map Parameters) = 0; virtual optional RangeMinAsInt(std::map Parameters) = 0; virtual optional RangeMaxAsInt(std::map Parameters) = 0; virtual std::vector PossibilitiesAsInt(std::map Parameters) = 0; - virtual void OnSetValue(int i) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(int i) throw (Exception) = 0; protected: int iVal; void InitWithDefault(); @@ -228,7 +229,7 @@ class DeviceCreationParameterFloat : public DeviceCreationParameter { public: DeviceCreationParameterFloat(float fVal = 0.0); - DeviceCreationParameterFloat(String val) throw (LinuxSamplerException); + DeviceCreationParameterFloat(String val) throw (Exception); virtual String Type(); virtual bool Multiplicity(); virtual optional Default(std::map Parameters); @@ -236,16 +237,16 @@ virtual optional RangeMax(std::map Parameters); virtual optional Possibilities(std::map Parameters); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual float ValueAsFloat(); - virtual void SetValue(float f) throw (LinuxSamplerException); + virtual void SetValue(float f) throw (Exception); virtual optional DefaultAsFloat(std::map Parameters) = 0; virtual optional RangeMinAsFloat(std::map Parameters) = 0; virtual optional RangeMaxAsFloat(std::map Parameters) = 0; virtual std::vector PossibilitiesAsFloat(std::map Parameters) = 0; - virtual void OnSetValue(float f) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(float f) throw (Exception) = 0; protected: float fVal; void InitWithDefault(); @@ -263,14 +264,14 @@ virtual optional RangeMax(std::map Parameters); virtual optional Possibilities(std::map Parameters); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual String ValueAsString(); - virtual void SetValueAsString(String s) throw (LinuxSamplerException); + virtual void SetValueAsString(String s) throw (Exception); virtual optional DefaultAsString(std::map Parameters) = 0; virtual std::vector PossibilitiesAsString(std::map Parameters) = 0; - virtual void OnSetValue(String s) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(String s) throw (Exception) = 0; protected: String sVal; void InitWithDefault(); @@ -281,7 +282,7 @@ public: DeviceCreationParameterStrings(); DeviceCreationParameterStrings(std::vector sVals); - DeviceCreationParameterStrings(String val) throw (LinuxSamplerException); + DeviceCreationParameterStrings(String val) throw (Exception); virtual ~DeviceCreationParameterStrings(){} virtual String Type(); virtual bool Multiplicity(); @@ -290,14 +291,14 @@ virtual optional RangeMax(std::map Parameters); virtual optional Possibilities(std::map Parameters); virtual String Value(); - virtual void SetValue(String val) throw (LinuxSamplerException); + virtual void SetValue(String val) throw (Exception); virtual std::vector ValueAsStrings(); - virtual void SetValue(std::vector vS) throw (LinuxSamplerException); + virtual void SetValue(std::vector vS) throw (Exception); virtual std::vector DefaultAsStrings(std::map Parameters) = 0; virtual std::vector PossibilitiesAsString(std::map Parameters) = 0; - virtual void OnSetValue(std::vector vS) throw (LinuxSamplerException) = 0; + virtual void OnSetValue(std::vector vS) throw (Exception) = 0; protected: std::vector sVals; void InitWithDefault();