示例#1
0
 void Aligner::serialize(boss::ObjectData &data, boss::IdContext &context) {
   boss::Identifiable::serialize(data, context);
   data.setInt("outerIterations", outerIterations());
   data.setInt("innerIterations", innerIterations());
   t2v(_referenceSensorOffset).toBOSS(data, "referenceSensorOffset");
   t2v(_currentSensorOffset).toBOSS(data, "currentSensorOffset");
   PointProjector *projector = dynamic_cast<PointProjector*>(_projector);
   if(!projector) {
     throw std::runtime_error("Impossible to convert pwn::PointProjector to pwn_boss::PointProjector");
   }
   data.setPointer("projector", projector);
   Linearizer *linearizer = dynamic_cast<Linearizer*>(_linearizer);
   if(!linearizer) {
     throw std::runtime_error("Impossible to convert pwn::Linearizer to pwn_boss::Linearizer");
   }
   data.setPointer("linearizer", linearizer);
   CorrespondenceFinder *correspondenceFinder = dynamic_cast<CorrespondenceFinder*>(_correspondenceFinder);
   if(!correspondenceFinder) {
     throw std::runtime_error("Impossible to convert pwn::CorrespondenceFinder to pwn_boss::CorrespondenceFinder");
   }
   data.setPointer("correspondenceFinder", correspondenceFinder);
 }
示例#2
0
	void MapMerger::serialize(boss::ObjectData& data, boss::IdContext& context){
		StreamProcessor::serialize(data, context);
		data.setPointer("manager", _manager);
		data.setInt("listSize", _listSize);
	}