MainFramework::MainFramework(GraphicsManagerPtr gmgr, GUIManagerPtr guimgr):m_endParsing(false){ m_rManager = ResourceManagerPtr(new ResourceManager); m_gManager = gmgr; m_guiManager = guimgr; m_messageStackMutex = MutexPtr(new boost::mutex); m_parseCondition = ConditionPtr(new boost::condition_variable); m_minerGUI = MinerGUIPtr(new MinerGUI(m_guiManager)); //m_GPUManagers["DirectX"] = GraphicsManagerPtr(new DirectXManager); m_GPUManagers["CUDA"] = GraphicsManagerPtr(new CUDAManager); //m_GPUManagers["OpenCL"] = GraphicsManagerPtr(new OpenCLManager); }
ConditionPtr Filter::Factory::create(const ConditionFactoryContext *ctx) const { Filter* c = new Filter(ctx->filters); return ConditionPtr(c); }
ConditionPtr And::Factory::create(const ConditionFactoryContext *ctx) const { if (ctx->conditions.size() < 2) return ConditionPtr(); return ConditionPtr(new And(ctx->conditions)); }
ConditionPtr Not::Factory::create(const ConditionFactoryContext *ctx) const { if (ctx->conditions.size() != 1) return ConditionPtr(); return ConditionPtr(new Not(ctx->conditions.front())); }