Data Structures | Namespaces | Functions
/home/martin/workspace/OpenStreetNav/src/util.h File Reference
#include <istream>
#include <sstream>
#include <map>

Go to the source code of this file.

Data Structures

class  util::All
 Functor which determines if all values in range evaluate to true. More...

Namespaces

namespace  util

Functions

template<typename T >
util::parse (std::string const &str)
 Parse type from std::string using istringstream.
template<>
double util::parse< double > (std::string const &str)
template<>
int64_t util::parse< int64_t > (std::string const &str)
template<typename Sep , typename... Args>
std::string util::concatenate (Sep sep, Args...args)
 Concatenate args, inserting sep in between using std::ostringstream.
template<typename T >
std::string util::to_str (T val)
 Simple conversion to string using std::ostringstream.
template<typename Sep , typename Tail >
void util::concat_impl (std::ostringstream &ss, Sep, Tail t)
template<typename Sep , typename Head , typename... Tail>
void util::concat_impl (std::ostringstream &os, Sep sep, Head h, Tail...t)
template<typename Eq , typename K , typename V , typename Compare = std::less<K>, typename Allocator = std::allocator<std::pair<const K, V> >>
bool util::multimap_eq (std::multimap< K, V, Compare, Allocator > const &a, std::multimap< K, V, Compare, Allocator > const &b)
 Determines whether all elements of std::multimap a are in b and if they have equal sizes using Eq as element comparer.
template<typename K , typename V , typename Compare = std::less<K>, typename Allocator = std::allocator<std::pair<const K, V> >>
bool util::multimap_eq (std::multimap< K, V, Compare, Allocator > const &a, std::multimap< K, V, Compare, Allocator > const &b)
 Determines whether all elements of std::multimap a are in b and if they have equal sizes.
template<typename Eq , typename It , typename T >
It util::find (It first, It last, T const &value)
 Determines if value is in the range [first,last) using Eq as comparer.
template<typename It , typename T >
It util::find (It first, It last, T const &value)
 Determines if value is in the range [first,last) (same as std::find)
std::string util::replace (std::string const &input, std::map< char, std::string > const &repl)
 Replaces all occurences of keys from repl in input with their respective values.
template<typename Less , typename Eq , typename A , typename B >
bool util::greater_than_impl (A const &a, B const &b)
template<typename Eq , typename A , typename B >
bool util::not_eq_impl (A const &a, B const &b)
template<typename Less , typename A , typename B >
bool util::greater_eq_impl (A const &a, B const &b)
template<typename Less , typename Eq , typename A , typename B >
bool util::less_eq_impl (A const &a, B const &b)
template<typename A >
bool util::greater_than_impl (A const &a, A const &b)
template<typename A >
bool util::not_eq_impl (A const &a, A const &b)
template<typename A >
bool util::greater_eq_impl (A const &a, A const &b)
template<typename A >
bool util::less_eq_impl (A const &a, A const &b)
template<typename Eq , typename Col1 , typename Col2 >
bool util::equal_collection (Col1 c1, Col2 c2)
 Simplified version of std::equal which takes collections instead of ranges, uses Eq as comparer.
template<typename Col1 , typename Col2 >
bool util::equal_collection (Col1 c1, Col2 c2)
 Simplified version of std::equal which takes collections instead of ranges.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines