コード例 #1
0
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();
	}
}
コード例 #2
0
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();
    }
}
コード例 #3
0
 virtual ReaderWriter::WriteResult doWrite(ReaderWriter& rw, std::ostream& output) const { return rw.writeShader(_object, output, _options); }
コード例 #4
0
 virtual ReaderWriter::WriteResult doWrite(ReaderWriter& rw, std::ostream& output) const { OSG_NOTICE<<"doWrite() rw.writeImage(), "<<std::endl; return rw.writeImage(_object, output, _options); }
コード例 #5
0
 virtual ReaderWriter::ReadResult doRead(ReaderWriter& rw, std::istream& input) const { return rw.readShader(input, _options); }
コード例 #6
0
ファイル: citizens.cpp プロジェクト: veryfreebird/codebase
void Citizens::remove(ReaderWriter& readerWriter, const Name& name) const
{
    readerWriter.remove(keyParser.getCitizenKey(name));
}
コード例 #7
0
ファイル: citizens.cpp プロジェクト: veryfreebird/codebase
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);
}