void SocketThread::run() { ReaderWriter * readerwriter = Registry::instance()->getReaderWriterForExtension("ive"); while ( ! _mkill ) { // check server for info sh->processData(readSocket()); if (sh->processedAll) { //cerr<<"processed all...."<<endl; stringstream ss; _mutex.lock(); readerwriter->writeNode(*(sh->getGroup()), ss); sceneData=ss.str(); _mutex.unlock(); sh->processedAll=false; } // place mutex around adding ive string to vector e.g _mutex.lock() and _mutex.unlock(); } }
void SocketThread::run() { ReaderWriter * readerwriter = Registry::instance()->getReaderWriterForExtension("ive"); //serialize stringstream ss; //printf("%s\n", ss.str().c_str()); // send this via master slave while ( ! _mkill ) { // check server for info sh->processData(readSocket()); //if (sh->processedAll) //{ _mutex.lock(); // GOTTA TURN THIS TO BINARY geoWorker = sh->getGeode(); readerwriter->writeNode(*geoWorker, ss); _serializedScenes.push_back(ss.str()); //cerr //cerr << "pushing data\t" << endl; //cerr << ss.str() << endl; _mutex.unlock(); // sh->processedAll=false; //} // send result to parser // place mutex around adding ive string to vector e.g _mutex.lock() and _mutex.unlock(); } }
virtual ReaderWriter::WriteResult doWrite(ReaderWriter& rw, std::ostream& output) const { return rw.writeShader(_object, output, _options); }
virtual ReaderWriter::WriteResult doWrite(ReaderWriter& rw, std::ostream& output) const { OSG_NOTICE<<"doWrite() rw.writeImage(), "<<std::endl; return rw.writeImage(_object, output, _options); }
virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw, std::istream& input) const { return rw.readShader(input, _options); }
void Citizens::remove(ReaderWriter& readerWriter, const Name& name) const { readerWriter.remove(keyParser.getCitizenKey(name)); }
void Citizens::write(ReaderWriter& readerWriter, const Name& name, const Citizen& citizen) const { auto value = std::make_shared<Value>(); value->mutable_citizen()->CopyFrom(citizen); readerWriter.write(keyParser.getCitizenKey(name), value); }