Osmium  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
Osmium::Geometry::LonLatListWriter< TLonLat > Class Template Reference

#include <geometry.hpp>

Collaboration diagram for Osmium::Geometry::LonLatListWriter< TLonLat >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LonLatListWriter (std::ostream &out, char delim_lonlat=' ', char delim_items=',')
void operator() (const TLonLat &lonlat)

Private Attributes

std::ostream & m_out
char m_delim_lonlat
char m_delim_items
bool m_first

Detailed Description

template<typename TLonLat>
class Osmium::Geometry::LonLatListWriter< TLonLat >

This helper class is used for writing out lists of coordinates to an output stream. It is intended to be used as a functor argument in a for_each() call iterating over something that holds a list of TLonLat objects.

Template Parameters:
TLonLatA class that has the methods 'double lon();' and 'double lat();'

Constructor & Destructor Documentation

template<typename TLonLat>
Osmium::Geometry::LonLatListWriter< TLonLat >::LonLatListWriter ( std::ostream &  out,
char  delim_lonlat = ' ',
char  delim_items = ',' 
) [inline]
Parameters:
outThe output stream
delim_lonlatThe delimiter between longitude and latitude
delim_itemsThe delimiter between consecutive coordinates

Member Function Documentation

template<typename TLonLat>
void Osmium::Geometry::LonLatListWriter< TLonLat >::operator() ( const TLonLat &  lonlat) [inline]

Member Data Documentation

template<typename TLonLat>
char Osmium::Geometry::LonLatListWriter< TLonLat >::m_delim_items [private]
template<typename TLonLat>
char Osmium::Geometry::LonLatListWriter< TLonLat >::m_delim_lonlat [private]
template<typename TLonLat>
bool Osmium::Geometry::LonLatListWriter< TLonLat >::m_first [private]
template<typename TLonLat>
std::ostream& Osmium::Geometry::LonLatListWriter< TLonLat >::m_out [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines