OnixS C++ CME MDP Conflated UDP Handler  1.1.2
API documentation
TinySet< Key > Class Template Reference

#include <OnixS/CME/ConflatedUDP/TinySet.h>

Public Types

typedef Key Item
 
typedef std::vector< ItemItems
 
typedef Items::const_iterator ConstIterator
 

Public Member Functions

 TinySet ()
 
 TinySet (size_t capacity)
 
 TinySet (const TinySet &other)
 
 ~TinySet ()
 
bool empty () const
 
size_t size () const
 
void reserve (size_t capacity)
 
ConstIterator begin () const
 
ConstIterator end () const
 
ConstIterator find (const Item &item) const
 
bool insert (const Item &item)
 
bool erase (const Item &item)
 
void clear ()
 
void swap (TinySet &other)
 
TinySetoperator= (const TinySet &other)
 

Detailed Description

template<class Key>
class OnixS::CME::ConflatedUDP::TinySet< Key >

Class implementing set optimized for storing small number of items.

Definition at line 37 of file TinySet.h.

Member Typedef Documentation

typedef Items::const_iterator ConstIterator

Aliases iterator over set items.

Definition at line 52 of file TinySet.h.

typedef Key Item

Aliases set item type.

Definition at line 41 of file TinySet.h.

typedef std::vector<Item> Items

Aliases internal representation.

Definition at line 46 of file TinySet.h.

Constructor & Destructor Documentation

TinySet ( )
inline

Initializes the empty set.

Definition at line 55 of file TinySet.h.

TinySet ( size_t  capacity)
inlineexplicit

Initializes the empty set and configures the internal storage to be enough capacious to store the given number of items.

Definition at line 63 of file TinySet.h.

TinySet ( const TinySet< Key > &  other)
inline

Initializes the set as a copy of the other one.

Definition at line 70 of file TinySet.h.

~TinySet ( )
inline

Cleans everything up.

Definition at line 77 of file TinySet.h.

Member Function Documentation

ConstIterator begin ( ) const
inline

Provides iterating facilities.

Definition at line 104 of file TinySet.h.

void clear ( )
inline

Brings the set to the blank state.

Definition at line 174 of file TinySet.h.

bool empty ( ) const
inline

Indicates whether the set is empty.

Definition at line 82 of file TinySet.h.

ConstIterator end ( ) const
inline

Provides iterating facilities.

Definition at line 111 of file TinySet.h.

bool erase ( const Item item)
inline

Removes the given item from the set.

Returned value indicates whether the item was actually removed.

Definition at line 152 of file TinySet.h.

ConstIterator find ( const Item item) const
inline

Tells whether the set contains given item.

Definition at line 118 of file TinySet.h.

bool insert ( const Item item)
inline

Inserts the given item into the set.

Returned value indicates whether the item was inserted (true) or the set already contained the given item (false).

Definition at line 134 of file TinySet.h.

TinySet& operator= ( const TinySet< Key > &  other)
inline

Re-initializes the instance as a copy of the other one.

Definition at line 192 of file TinySet.h.

void reserve ( size_t  capacity)
inline

Makes the internal storage capacious enough to store the given number of items.

Definition at line 96 of file TinySet.h.

size_t size ( ) const
inline

Returns the number of items in the set.

Definition at line 88 of file TinySet.h.

void swap ( TinySet< Key > &  other)
inline

Swaps content with the other instance.

Definition at line 181 of file TinySet.h.


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