Public Member Functions
rviz::UniformStringStream Class Reference

std::stringstream subclass which defaults to the "C" locale, so serialization of numbers is uniform across locales. More...

#include <uniform_string_stream.h>

List of all members.

Public Member Functions

void parseFloat (float &f)
 Parse a float, supporting both period- and comma- style floats (1,2 and 1.2).
 UniformStringStream ()
 UniformStringStream (const std::string &str)

Detailed Description

std::stringstream subclass which defaults to the "C" locale, so serialization of numbers is uniform across locales.

For reading floats in, use parseFloat() instead of operator>>, because operator>> is the one from std::stringstream which only handles "C" style floats. parseFloat() handles "C" and also European-style floats which use the ",", like "1,2" parses to 1.2f

Definition at line 45 of file uniform_string_stream.h.


Constructor & Destructor Documentation

Definition at line 37 of file uniform_string_stream.cpp.

rviz::UniformStringStream::UniformStringStream ( const std::string &  str)

Definition at line 42 of file uniform_string_stream.cpp.


Member Function Documentation

Parse a float, supporting both period- and comma- style floats (1,2 and 1.2).

Uses operator>>(std::string&) internally, so consumes up to next whitespace from the stream.

Definition at line 48 of file uniform_string_stream.cpp.


The documentation for this class was generated from the following files:


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Mon Oct 6 2014 07:26:37