Proton  1.1.1
Make porting easy from Python to C++11
proton::set_< T, C, A > Class Template Reference

a set extension implementing python's set-like interfaces. More...

#include <proton/set.hpp>

Inherits std::set< K >.

List of all members.

Public Member Functions

template<typename... argT>
 set_ (argT &&...a)
 forwarding ctor.
 set_ (std::initializer_list< T > a)
 initializer_list forwarding ctor.
 set_ (const set_ &x)
 copy ctor.
 set_ (set_ &&x) noexcept
 move ctor.
set_operator= (const set_ &x)
 assign.
 operator baseT & ()
 cast to std::set<>&.
void add (const T &x)
 add an item.
pop ()
 pop an item from the sequence.
void remove (const T &val)
 remove a value.
void discard (const T &val)
 remove a value if it is present.

Additional Inherited Members

- Public Attributes inherited from std::set< K >
keys
 STL member.

Detailed Description

template<typename T, typename C = std::less<T>, typename A = smart_allocator<T>>
class proton::set_< T, C, A >

a set extension implementing python's set-like interfaces.

Definition at line 89 of file set.hpp.


Member Function Documentation

template<typename T, typename C = std::less<T>, typename A = smart_allocator<T>>
void proton::set_< T, C, A >::discard ( const T &  val)
inline

remove a value if it is present.

Parameters:
valthe value.

Definition at line 208 of file set.hpp.

template<typename T, typename C = std::less<T>, typename A = smart_allocator<T>>
T proton::set_< T, C, A >::pop ( )
inline

pop an item from the sequence.

Returns:
the value.
Exceptions:
proton::errif there is no any item.

Definition at line 183 of file set.hpp.

References PROTON_THROW_IF.

template<typename T, typename C = std::less<T>, typename A = smart_allocator<T>>
void proton::set_< T, C, A >::remove ( const T &  val)
inline

remove a value.

Parameters:
valthe value.
Exceptions:
std::invalid_argumentif there is no such a value.

Definition at line 196 of file set.hpp.


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