コード例 #1
0
ファイル: ReadEnds.hpp プロジェクト: srl147/libmaus
			void put(put_type & P) const
			{
				try
				{
					::libmaus::util::UTF8::encodeUTF8(this->libraryId,P);

					::libmaus::util::UTF8::encodeUTF8(this->read1Sequence,P);
					::libmaus::util::NumberSerialisation::serialiseSignedNumber(P,this->read1Coordinate);
					P.put(static_cast<uint8_t>(this->orientation));

					::libmaus::util::UTF8::encodeUTF8(this->read2Sequence,P);
					::libmaus::util::NumberSerialisation::serialiseSignedNumber(P,this->read2Coordinate);

					::libmaus::util::NumberSerialisation::serialiseNumber(P,this->read1IndexInFile);
					::libmaus::util::NumberSerialisation::serialiseNumber(P,this->read2IndexInFile);
					
					::libmaus::util::UTF8::encodeUTF8(this->score,P);
					::libmaus::util::UTF8::encodeUTF8(this->readGroup,P);
					
					::libmaus::util::UTF8::encodeUTF8(this->tile,P);

					::libmaus::util::NumberSerialisation::serialiseNumber(P,this->x,2);
					::libmaus::util::NumberSerialisation::serialiseNumber(P,this->y,2);
					
					unsigned int const havep = ((p.get() != 0) ? 1 : 0);
					unsigned int const haveq = ((q.get() != 0) ? 1 : 0);
					uint64_t const numal = havep+haveq;
					P.put(static_cast<uint8_t>(numal));
					
					if ( havep )
						p->serialise(P);
					if ( haveq )
						q->serialise(P);
				}
				catch(...)
				{
					// std::cerr << "Error while putting " << *this << std::endl;
					throw;
				}
			}
コード例 #2
0
ファイル: ReadEnds.hpp プロジェクト: dkj/libmaus2
			void put(put_type & P) const
			{
				ReadEndsBase::put(P);

				unsigned int const havep = ((p.get() != 0) ? 1 : 0);
				unsigned int const haveq = ((q.get() != 0) ? 1 : 0);
				uint64_t const numal = havep+haveq;
				P.put(static_cast<uint8_t>(numal));
					
				if ( havep )
					p->serialise(P);
				if ( haveq )
					q->serialise(P);
			}