Embedded Template Library 1.0
Loading...
Searching...
No Matches
etl::set< TKey, MAX_SIZE_, TCompare > Class Template Reference

A templated set implementation that uses a fixed size buffer. More...

#include <set.h>

Public Member Functions

 set ()
 Default constructor.
 
 set (const set &other)
 Copy constructor.
 
template<typename TIterator >
 set (TIterator first, TIterator last)
 
 ~set ()
 Destructor.
 
setoperator= (const set &rhs)
 Assignment operator.
 
- Public Member Functions inherited from etl::iset< TKey, TCompare >
isetoperator= (const iset &rhs)
 Assignment operator.
 
iterator begin ()
 Gets the beginning of the set.
 
const_iterator begin () const
 Gets the beginning of the set.
 
iterator end ()
 Gets the end of the set.
 
const_iterator end () const
 Gets the end of the set.
 
const_iterator cbegin () const
 Gets the beginning of the set.
 
const_iterator cend () const
 Gets the end of the set.
 
reverse_iterator rbegin ()
 Gets the reverse beginning of the list.
 
const_reverse_iterator rbegin () const
 Gets the reverse beginning of the list.
 
reverse_iterator rend ()
 Gets the reverse end of the list.
 
const_reverse_iterator rend () const
 Gets the reverse end of the list.
 
const_reverse_iterator crbegin () const
 Gets the reverse beginning of the list.
 
const_reverse_iterator crend () const
 Gets the reverse end of the list.
 
template<typename TIterator >
void assign (TIterator first, TIterator last)
 
void clear ()
 Clears the set.
 
size_type count (key_parameter_t key) const
 
ETL_OR_STD::pair< iterator, iteratorequal_range (key_parameter_t key)
 
ETL_OR_STD::pair< const_iterator, const_iteratorequal_range (key_parameter_t key) const
 
iterator erase (iterator position)
 Erases the value at the specified position.
 
iterator erase (const_iterator position)
 Erases the value at the specified position.
 
size_type erase (key_parameter_t key_value)
 
iterator erase (const_iterator first, const_iterator last)
 Erases a range of elements.
 
iterator find (key_parameter_t key_value)
 
const_iterator find (key_parameter_t key_value) const
 
ETL_OR_STD::pair< iterator, boolinsert (const_reference value)
 
iterator insert (const_iterator, const_reference value)
 
template<class TIterator >
void insert (TIterator first, TIterator last)
 
iterator lower_bound (key_parameter_t key)
 
const_iterator lower_bound (key_parameter_t key) const
 
iterator upper_bound (key_parameter_t key)
 
const_iterator upper_bound (key_parameter_t key) const
 
key_compare key_comp () const
 How to compare two key elements.
 
value_compare value_comp () const
 How to compare two value elements.
 
bool contains (const TKey &key) const
 Check if the set contains the key.
 
- Public Member Functions inherited from etl::set_base
size_type size () const
 Gets the size of the set.
 
size_type max_size () const
 Gets the maximum possible size of the set.
 
bool empty () const
 Checks to see if the set is empty.
 
bool full () const
 Checks to see if the set is full.
 
size_type capacity () const
 
size_t available () const
 

Static Public Attributes

static ETL_CONSTANT size_t MAX_SIZE = MAX_SIZE_
 

Additional Inherited Members

- Public Types inherited from etl::iset< TKey, TCompare >
typedef TKey key_type
 
typedef TKey value_type
 
typedef TCompare key_compare
 
typedef TCompare value_compare
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef size_t size_type
 
typedef etl::iterator_traits< iterator >::difference_type difference_type
 
typedef ETL_OR_STD::reverse_iterator< iteratorreverse_iterator
 
typedef ETL_OR_STD::reverse_iterator< const_iteratorconst_reverse_iterator
 
- Public Types inherited from etl::set_base
typedef size_t size_type
 The type used for determining the size of set.
 
- Protected Types inherited from etl::iset< TKey, TCompare >
typedef etl::parameter_type< TKey >::type key_parameter_t
 Defines the key value parameter type.
 
- Protected Types inherited from etl::set_base
enum  { kLeft = 0 , kRight = 1 , kNeither = 2 }
 
- Protected Member Functions inherited from etl::iset< TKey, TCompare >
bool node_comp (const Data_Node &node1, const Data_Node &node2) const
 How to compare node elements.
 
bool node_comp (const Data_Node &node, key_parameter_t key) const
 
bool node_comp (key_parameter_t key, const Data_Node &node) const
 
 iset (etl::ipool &node_pool, size_t max_size_)
 Constructor.
 
void initialise ()
 Initialise the set.
 
 ~iset ()
 Destructor.
 
- Protected Member Functions inherited from etl::set_base
 set_base (size_type max_size_)
 The constructor that is called from derived classes.
 
 ~set_base ()
 The constructor that is called from derived classes.
 
void attach_node (Node *&position, Node &node)
 Attach the provided node to the position provided.
 
void detach_node (Node *&position, Node *&replacement)
 Detach the node at the position provided.
 
void balance_node (Node *&critical_node)
 Balance the critical node at the position provided as needed.
 
Nodefind_limit_node (Node *position, const int8_t dir) const
 
const Nodefind_limit_node (const Node *position, const int8_t dir) const
 
void rotate_2node (Node *&position, uint_least8_t dir)
 Rotate two nodes at the position provided the to balance the tree.
 
void rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
 Rotate three nodes at the position provided the to balance the tree.
 
- Protected Attributes inherited from etl::set_base
size_type current_size
 The number of the used nodes.
 
const size_type CAPACITY
 The maximum size of the set.
 
Noderoot_node
 The node that acts as the set root.
 
 ETL_DECLARE_DEBUG_COUNT
 

Detailed Description

template<typename TKey, const size_t MAX_SIZE_, typename TCompare = etl::less<TKey>>
class etl::set< TKey, MAX_SIZE_, TCompare >

A templated set implementation that uses a fixed size buffer.

Constructor & Destructor Documentation

◆ set()

template<typename TKey , const size_t MAX_SIZE_, typename TCompare = etl::less<TKey>>
template<typename TIterator >
etl::set< TKey, MAX_SIZE_, TCompare >::set ( TIterator  first,
TIterator  last 
)
inline

Constructor, from an iterator range.

Template Parameters
TIteratorThe iterator type.
Parameters
firstThe iterator to the first element.
lastThe iterator to the last element + 1.

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