forest-net
an overlay networks for large-scale virtual worlds
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
RateSpec.cpp
Go to the documentation of this file.
1
9
#include "
RateSpec.h
"
10
11
namespace
forest {
12
13
19
bool
RateSpec::read
(istream& in) {
20
return
Util::verify(in,
'('
) && Util::readNum(in,
bitRateUp
) &&
21
Util::verify(in,
','
) && Util::readNum(in,
bitRateDown
) &&
22
Util::verify(in,
','
) && Util::readNum(in,
pktRateUp
) &&
23
Util::verify(in,
','
) && Util::readNum(in,
pktRateDown
) &&
24
Util::verify(in,
')'
);
25
}
26
31
string
RateSpec::toString
()
const
{
32
stringstream ss;
33
ss <<
"("
<< this->
bitRateUp
<<
","
<< this->
bitRateDown
34
<<
","
<< this->
pktRateUp
<<
","
<< this->
pktRateDown
<<
")"
;
35
return
ss.str();
36
}
37
38
}
// ends namespace
39
forest-net
cpp
common
RateSpec.cpp
Generated on Mon Aug 4 2014 11:13:35 for forest-net by
1.8.4