25 std::string::size_type n = s.find_first_not_of(
"0123456789.");
26 if (n != std::string::npos)
28 std::istringstream
iss;
29 iss.str(s.substr(0, n));
32 std::string
trailer = s.substr(n, std::string::npos);
204 is.setstate(std::ios_base::failbit);
Class for representing queue sizes.
bool operator>(const QueueSize &rhs) const
bool operator<(const QueueSize &rhs) const
bool operator<=(const QueueSize &rhs) const
QueueSizeUnit GetUnit() const
Get the underlying unit.
bool operator!=(const QueueSize &rhs) const
uint32_t m_value
queue size [bytes or packets]
bool operator>=(const QueueSize &rhs) const
bool operator==(const QueueSize &rhs) const
static bool DoParse(const std::string s, QueueSizeUnit *unit, uint32_t *value)
Parse a string representing a QueueSize.
uint32_t GetValue() const
Get the underlying value.
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
QueueSizeUnit
Enumeration of the operating modes of queues.
@ BYTES
Use number of bytes for queue size.
@ PACKETS
Use number of packets for queue size.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::ostream & operator<<(std::ostream &os, const Angles &a)
static unsigned int value(char c)
std::istream & operator>>(std::istream &is, Angles &a)