Proton  1.1.1
Make porting easy from Python to C++11
map_

like dict in python. More...

Classes

class  proton::map_< K, T, C, A >
 a map extension implementing python's dict-like interfaces. More...

Functions

template<typename _Key , typename _Tp , typename _Cmp , typename _Alloc >
std::map< _Key, _Tp, _Cmp,
_Alloc > & 
proton::operator<< (std::map< _Key, _Tp, _Cmp, _Alloc > &x, const std::pair< const _Key, _Tp > &item)
 add an item in streaming style.
template<typename _Key , typename _Tp , typename _Cmp , typename _Alloc >
std::ostream & proton::operator<< (std::ostream &s, const std::map< _Key, _Tp, _Cmp, _Alloc > &x)
 general output for map.
template<typename K , typename T , typename C , typename A >
map_< K, T, C, A > & proton::cast_ (std::map< K, T, C, A > &x)
 cast to proton::map_<>& from std::map<>&.

Detailed Description

like dict in python.


Function Documentation

template<typename _Key , typename _Tp , typename _Cmp , typename _Alloc >
std::map<_Key, _Tp, _Cmp, _Alloc>& proton::operator<< ( std::map< _Key, _Tp, _Cmp, _Alloc > &  x,
const std::pair< const _Key, _Tp > &  item 
)

add an item in streaming style.

Parameters:
xthe map to be added
itemthe new item
Returns:
the new x

Definition at line 25 of file map.hpp.

template<typename _Key , typename _Tp , typename _Cmp , typename _Alloc >
std::ostream& proton::operator<< ( std::ostream &  s,
const std::map< _Key, _Tp, _Cmp, _Alloc > &  x 
)

general output for map.

Parameters:
sthe output stream
xthe map to be outputed
Returns:
s

Definition at line 46 of file map.hpp.