/[svn]/linuxsampler/trunk/src/engines/EngineFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/EngineFactory.cpp

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

revision 420 by schoenebeck, Thu Mar 3 03:25:17 2005 UTC revision 880 by schoenebeck, Tue Jun 27 22:57:37 2006 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2005 Christian Schoenebeck                              *   *   Copyright (C) 2005, 2006 Christian Schoenebeck                        *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   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 31  namespace LinuxSampler { Line 31  namespace LinuxSampler {
31      // all currently existing engine instances      // all currently existing engine instances
32      static std::set<LinuxSampler::Engine*> engines;      static std::set<LinuxSampler::Engine*> engines;
33    
34      LinuxSampler::Engine* EngineFactory::Create(String EngineType) throw (LinuxSamplerException) {      LinuxSampler::Engine* EngineFactory::Create(String EngineType) throw (Exception) {
35          if (!strcasecmp(EngineType.c_str(),"GigEngine") || !strcasecmp(EngineType.c_str(),"gig")) {          if (!strcasecmp(EngineType.c_str(),"GigEngine") || !strcasecmp(EngineType.c_str(),"gig")) {
36              Engine* pEngine = new gig::Engine;              Engine* pEngine = new gig::Engine;
37              engines.insert(pEngine);              engines.insert(pEngine);
38              return pEngine;              return pEngine;
39          }          }
40          throw LinuxSamplerException("Unknown engine type");                  throw Exception("Unknown engine type");
41      }      }
42    
43      void EngineFactory::Destroy(LinuxSampler::Engine* pEngine) {      void EngineFactory::Destroy(LinuxSampler::Engine* pEngine) {
44          engines.erase(pEngine);          engines.erase(pEngine);
45      }      }
46    
47      std::set<LinuxSampler::Engine*> EngineFactory::EngineInstances() {      const std::set<LinuxSampler::Engine*>& EngineFactory::EngineInstances() {
48          return engines;          return engines;
49      }      }
50    
51  } // namepsace LinuxSampler  } // namespace LinuxSampler

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

  ViewVC Help
Powered by ViewVC