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

like list in python, better for small sequences More...

Classes

class  proton::vector_< T, A >
 a vector extension implementing python's list-like interfaces. More...

Functions

template<typename T , typename A , typename V >
std::vector< T, A > & proton::operator<< (std::vector< T, A > &x, V &&val)
 add an item in streaming style.
template<typename T , typename A , typename V >
std::vector< T, A > & proton::operator>> (std::vector< T, A > &x, V &val)
 pop an item in streaming style.
template<typename T , typename A >
std::ostream & proton::operator<< (std::ostream &s, const std::vector< T, A > &x)
 general output for vector.
template<typename T , typename A , typename X >
vector_< T, A > proton::operator+ (const std::vector< T, A > &s, X &&t)
 vector + vector
template<typename T , typename A >
vector_< T, A > proton::operator* (const std::vector< T, A > &s, size_t n)
 vector_ * n
template<typename T , typename A >
vector_< T, A > proton::operator* (size_t n, const std::vector< T, A > &s)
 n * vector_
template<typename T , typename A >
vector_< T, A > & proton::cast_ (std::vector< T, A > &x)
 cast to proton::vector_<>& from std::vector<>&.

Detailed Description

like list in python, better for small sequences


Function Documentation

template<typename T , typename A , typename V >
std::vector<T,A>& proton::operator<< ( std::vector< T, A > &  x,
V &&  val 
)

add an item in streaming style.

Parameters:
xthe vector to be added
valthe new item
Returns:
the new x

Definition at line 33 of file vector.hpp.

template<typename T , typename A >
std::ostream& proton::operator<< ( std::ostream &  s,
const std::vector< T, A > &  x 
)

general output for vector.

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

Definition at line 59 of file vector.hpp.

template<typename T , typename A , typename V >
std::vector<T,A>& proton::operator>> ( std::vector< T, A > &  x,
V &  val 
)

pop an item in streaming style.

Parameters:
xthe vector to be popped from
valthe popped item
Returns:
the new x

Definition at line 45 of file vector.hpp.

References PROTON_THROW_IF.