void RhrController::sendConfigObject() const { if (m_module->rank() == 0) { CERR << "sending rhr config object" << std::endl; static_cast<Module *>(m_module)->addObject(m_imageOutPort, getConfigObject()); } }
void Config::Close(){ if(_innerobj==0) return; config_struct* cfg = (config_struct*)_innerobj; _innerobj = 0; if(_cfglock){ cfg->Tree.SaveToFile(cfg->FileName); cfg->Lock.Unlock(); _cfglock = false; } getConfigObject(0,cfg); }
void RhrController::removeClient(const Port *client) { auto it = m_clients.find(client); if (it == m_clients.end()) { CERR << "did not find disconnected destination port " << *client << std::endl; return; } m_clients.erase(it); if (m_clients.empty()) { m_rhr.reset(); } if (m_module->rank() == 0) { CERR << "sending rhr config object" << std::endl; static_cast<Module *>(m_module)->addObject(m_imageOutPort, getConfigObject()); } }
bool Config::Create(LPCWSTR fname){ if(_innerobj) return 1; _innerobj = getConfigObject(fname); return _innerobj!=NULL; }
Config::Config(LPCWSTR fname):_innerobj(0){ _innerobj = getConfigObject(fname); if(_innerobj==NULL) Print(L"Config Error: _innerobj is NULL"); }