Exemplo n.º 1
0
EnginePtr EngineFactory::create(const std::string& type, const Config& cfg) {
    if (type == "threephase") {
        return EnginePtr(new ThreephaseEngine(cfg));
    }
    throw std::invalid_argument("Cannot intantiate Engine of type " + type);
}
Exemplo n.º 2
0
 /** Singleton management */
 EnginePtr create()
 {
     GPGPU_ASSERT(theEngine.isNull(), "GPGPU engine was already created");
     theEngine = EnginePtr(new GLEngine());
     return theEngine;
 }