Py2Cpp 1.6.3; VERSION ${PROJECT_VERSION}
Loading...
Searching...
No Matches
Public Member Functions | List of all members
py::set< Key > Class Template Reference

Python-like set implementation. More...

#include <set.hpp>

Inheritance diagram for py::set< Key >:
Inheritance graph
[legend]
Collaboration diagram for py::set< Key >:
Collaboration graph
[legend]

Public Member Functions

 set ()
 Construct a new set object.
 
template<typename FwdIter >
 set (const FwdIter &start, const FwdIter &stop)
 Construct a new set object.
 
 set (std::initializer_list< Key > init)
 Construct a new set object from an initializer list.
 
auto contains (const Key &key) const -> bool
 Check if the set contains a specific element.
 
auto copy () const -> set
 Create a copy of the set.
 
auto operator= (const set &) -> set &=delete
 Copy assignment operator (deleted)
 
auto operator= (set &&) noexcept -> set &=default
 Move assignment operator.
 
 set (set< Key > &&) noexcept=default
 Move Constructor (default)
 
 ~set () noexcept=default
 Destructor (default)
 
 set (const set< Key > &)=default
 Copy Constructor (default)
 

Detailed Description

template<typename Key>
class py::set< Key >

Python-like set implementation.

A set class that extends std::unordered_set with Python-like convenience methods and functionality.

Template Parameters
KeyThe element type stored in the set

Constructor & Destructor Documentation

◆ set() [1/5]

template<typename Key >
py::set< Key >::set ( )
inline

Construct a new set object.

◆ set() [2/5]

template<typename Key >
template<typename FwdIter >
py::set< Key >::set ( const FwdIter &  start,
const FwdIter &  stop 
)
inline

Construct a new set object.

◆ set() [3/5]

template<typename Key >
py::set< Key >::set ( std::initializer_list< Key >  init)
inline

Construct a new set object from an initializer list.

Parameters
[in]initInitializer list of elements

◆ set() [4/5]

template<typename Key >
py::set< Key >::set ( set< Key > &&  )
defaultnoexcept

Move Constructor (default)

◆ ~set()

template<typename Key >
py::set< Key >::~set ( )
defaultnoexcept

Destructor (default)

◆ set() [5/5]

template<typename Key >
py::set< Key >::set ( const set< Key > &  )
default

Copy Constructor (default)

Copy through explicitly the public copy() function!!!

Member Function Documentation

◆ contains()

template<typename Key >
auto py::set< Key >::contains ( const Key &  key) const -> bool
inline

Check if the set contains a specific element.

Parameters
[in]keyThe element to check
Returns
true if the set contains the element, false otherwise

◆ copy()

template<typename Key >
auto py::set< Key >::copy ( ) const -> set
inline

Create a copy of the set.

Returns
Self A copy of this set

◆ operator=() [1/2]

template<typename Key >
auto py::set< Key >::operator= ( const set< Key > &  ) -> set &=delete
delete

Copy assignment operator (deleted)

Use copy() method instead for explicit copying.

◆ operator=() [2/2]

template<typename Key >
auto py::set< Key >::operator= ( set< Key > &&  ) -> set &=default
defaultnoexcept

Move assignment operator.

Returns
Self& Reference to this set

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