예제 #1
0
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());
    }
}
예제 #2
0
파일: json.cpp 프로젝트: Jesna/jucpp
	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);
	}
예제 #3
0
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());
    }
}
예제 #4
0
파일: json.cpp 프로젝트: Jesna/jucpp
	bool Config::Create(LPCWSTR fname){
		if(_innerobj) return 1;
		_innerobj = getConfigObject(fname);
		return _innerobj!=NULL;
	}
예제 #5
0
파일: json.cpp 프로젝트: Jesna/jucpp
	Config::Config(LPCWSTR fname):_innerobj(0){
		_innerobj = getConfigObject(fname);
		if(_innerobj==NULL) Print(L"Config Error: _innerobj is NULL");
	}