/[svn]/linuxsampler/trunk/src/drivers/DeviceParameterFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/drivers/DeviceParameterFactory.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 880 by schoenebeck, Tue Jun 27 22:57:37 2006 UTC revision 1049 by schoenebeck, Wed Feb 28 06:53:42 2007 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 30  namespace LinuxSampler { Line 30  namespace LinuxSampler {
30          return InnerFactories[ParameterName]->Create(val);          return InnerFactories[ParameterName]->Create(val);
31      }      }
32    
33      DeviceCreationParameter* DeviceParameterFactory::Create(String ParameterName) throw (Exception) {      DeviceCreationParameter* DeviceParameterFactory::Create(String ParameterName, std::map<String,String> Parameters) throw (Exception) {
34          if (!InnerFactories.count(ParameterName)) throw Exception("No such parameter: '" + ParameterName + "'.");          if (!InnerFactories.count(ParameterName)) throw Exception("No such parameter: '" + ParameterName + "'.");
35          return InnerFactories[ParameterName]->Create();          return InnerFactories[ParameterName]->Create(Parameters);
36      }      }
37    
38      /* This method is used by the device factory to create parameters _before_ creating a device      /* This method is used by the device factory to create parameters _before_ creating a device
# Line 48  namespace LinuxSampler { Line 48  namespace LinuxSampler {
48                  if (Parameters.count(paramName)) { //Parameter with this name was specified                  if (Parameters.count(paramName)) { //Parameter with this name was specified
49                          param = iter->second->Create(Parameters[paramName]);                          param = iter->second->Create(Parameters[paramName]);
50                  } else { //Not specified, create default                  } else { //Not specified, create default
51                          param = iter->second->Create();                          param = iter->second->Create(Parameters);
52                  }                  }
53                  result[paramName] = param;                  result[paramName] = param;
54          }          }

Legend:
Removed from v.880  
changed lines
  Added in v.1049

  ViewVC Help
Powered by ViewVC