ns-allinone-2.35/olsr/OLSR_printer.cc
void
OLSR_printer::print_mprselset(Trace* out, mprselset_t& mprselset) {
	sprintf(out->pt_->buffer(), "P\tnb\ttime");
	printf("P\tnb\ttime\n");
	out->pt_->dump();
	for (mprselset_t::iterator it = mprselset.begin(); it != mprselset.end(); it++) {
		OLSR_mprsel_tuple* mprsel_tuple = *it;
		sprintf(out->pt_->buffer(), "P\t%d\t%f",
			OLSR::node_id(mprsel_tuple->main_addr()),
			mprsel_tuple->time());
		printf("P\t%d\t%f\n",
			OLSR::node_id(mprsel_tuple->main_addr()),
			mprsel_tuple->time());
		out->pt_->dump();
	}
}
///
/// \brief Prints a given MPR Selector Set into a given trace file.
///
/// \param out		Trace where the MPR Selector Set is going to be written.
/// \param mprselset	MPR Selector Set to be written.
///
\brief Prints a given MPR Selector Set into a given trace file.
\param out             Trace where the MPR Selector Set is going to be written.
\param mprselset       MPR Selector Set to be written.
\ brief Prints a given MPR Selector Set into a given trace file . \ param out Trace where the MPR Selector Set is going to be written . \ param mprselset MPR Selector Set to be written .
void
OLSR_printer::print_mprselset(Trace* out, mprselset_t& mprselset) {
	sprintf(out->pt_->buffer(), "P\tnb\ttime");
	printf("P\tnb\ttime\n");
	out->pt_->dump();
	for (mprselset_t::iterator it = mprselset.begin(); it != mprselset.end(); it++) {
		OLSR_mprsel_tuple* mprsel_tuple = *it;
		sprintf(out->pt_->buffer(), "P\t%d\t%f",
			OLSR::node_id(mprsel_tuple->main_addr()),
			mprsel_tuple->time());
		printf("P\t%d\t%f\n",
			OLSR::node_id(mprsel_tuple->main_addr()),
			mprsel_tuple->time());
		out->pt_->dump();
	}
}
void OLSR_printer :: print_mprselset ( Trace * out , mprselset_t & mprselset ) { sprintf ( out -> pt_ -> buffer ( ) , " \t \t " ) ; printf ( " \t \t \n " ) ; out -> pt_ -> dump ( ) ; for ( mprselset_t :: iterator it = mprselset . begin ( ) ; it != mprselset . end ( ) ; it ++ ) { OLSR_mprsel_tuple * mprsel_tuple = * it ; sprintf ( out -> pt_ -> buffer ( ) , " \t \t " , OLSR :: node_id ( mprsel_tuple -> main_addr ( ) ) , mprsel_tuple -> time ( ) ) ; printf ( " \t \t \n " , OLSR :: node_id ( mprsel_tuple -> main_addr ( ) ) , mprsel_tuple -> time ( ) ) ; out -> pt_ -> dump ( ) ; } }
\brief Prints a given MPR Selector Set into a given trace file.
\ brief Prints a given MPR Selector Set into a given trace file .