--- linuxsampler/trunk/src/drivers/DeviceParameter.h 2004/07/03 20:08:07 170 +++ linuxsampler/trunk/src/drivers/DeviceParameter.h 2004/07/06 03:27:38 174 @@ -29,6 +29,7 @@ #include "../common/global.h" #include "../common/optional.h" #include "../common/LinuxSamplerException.h" +#include "InputOutputDevice.h" namespace LinuxSampler { @@ -151,6 +152,7 @@ class DeviceCreationParameter : public DeviceRuntimeParameter { public: + DeviceCreationParameter ( void ) { pDevice = NULL; } virtual bool Mandatory() = 0; virtual optional Depends(); virtual std::map DependsAsParameters() = 0; @@ -162,12 +164,14 @@ virtual optional RangeMax(std::map Parameters) = 0; virtual optional Possibilities(); virtual optional Possibilities(std::map Parameters) = 0; + void Attach(InputOutputDevice* pDevice) { this->pDevice = pDevice; } + protected: + InputOutputDevice* pDevice; }; class DeviceCreationParameterBool : public DeviceCreationParameter { public: - DeviceCreationParameterBool(); - DeviceCreationParameterBool(bool bVal); + DeviceCreationParameterBool(bool bVal = false); DeviceCreationParameterBool(String val) throw (LinuxSamplerException); virtual String Type(); virtual bool Multiplicity(); @@ -191,8 +195,7 @@ class DeviceCreationParameterInt : public DeviceCreationParameter { public: - DeviceCreationParameterInt(); - DeviceCreationParameterInt(int iVal); + DeviceCreationParameterInt(int iVal = 0); DeviceCreationParameterInt(String val) throw (LinuxSamplerException); virtual String Type(); virtual bool Multiplicity(); @@ -219,8 +222,7 @@ class DeviceCreationParameterFloat : public DeviceCreationParameter { public: - DeviceCreationParameterFloat(); - DeviceCreationParameterFloat(float fVal); + DeviceCreationParameterFloat(float fVal = 0.0); DeviceCreationParameterFloat(String val) throw (LinuxSamplerException); virtual String Type(); virtual bool Multiplicity(); @@ -247,8 +249,7 @@ class DeviceCreationParameterString : public DeviceCreationParameter { public: - DeviceCreationParameterString(); - DeviceCreationParameterString(String sVal); + DeviceCreationParameterString(String sVal = String()); virtual String Type(); virtual bool Multiplicity(); virtual optional RangeMin(std::map Parameters);