ROSE 0.11.145.147
List of all members
WorkListUnique< T, Compare > Class Template Reference

Description

template<typename T, class Compare = std::less<T>>
class WorkListUnique< T, Compare >

A version of WorkList that checks for uniqueness by default.

The insertion methods check for item uniqueness and do not insert the item if it currently exists in the list. The uniqueness checking can be disabled per insert operation by specifying a false value for the check_uniqueness argument. Insertions and existence are O(log N) regardless of whether uniqueness checks are performed. Such a worklist internally stores two copies of every element.

Definition at line 147 of file WorkLists.h.

#include <frontend/BinaryFormats/WorkLists.h>

Inheritance diagram for WorkListUnique< T, Compare >:
Inheritance graph
[legend]
Collaboration diagram for WorkListUnique< T, Compare >:
Collaboration graph
[legend]

Additional Inherited Members

- Public Types inherited from WorkList< T, Compare >
typedef T value_type
 
typedef Compare key_compare
 
- Public Member Functions inherited from WorkList< T, Compare >
 WorkList (bool check_uniqueness=false)
 
bool empty () const
 Returns true if this work list is empty.
 
size_t size () const
 Returns the number of items in the work list.
 
void clear ()
 Reset the list to an empty state.
 
bool exists (const T &item) const
 Return true if the specified item is already on the work list.
 
bool unshift (const T &, boost::tribool check_uniqueness=boost::indeterminate)
 Add an item to the front of the work list.
 
template<class Iterator >
size_t unshift (const Iterator &begin, const Iterator &end, boost::tribool check_uniqueness=boost::indeterminate)
 Adds multiple items to the front of the work list.
 
shift ()
 Remove and return the item from the front of the work list.
 
bool push (const T &, boost::tribool check_uniqueness=boost::logic::indeterminate)
 Add an item to the back of the work list.
 
template<class Iterator >
size_t push (const Iterator &begin, const Iterator &end, boost::tribool check_uniqueness=boost::indeterminate)
 Adds multiple items to the back of the work list.
 
pop ()
 Remove an item from the back of the work list.
 
take ()
 Remove and return an item from the front of the work list.
 
const T & front () const
 Returns the object at the front/back of the list without removing it.
 
const T & back () const
 Returns the object at the front/back of the list without removing it.
 
void add (const T &item)
 Adds an item(s) to the end of the queue.
 
void add (const std::vector< T > &items)
 Adds an item(s) to the end of the queue.
 
void add (const std::set< T > &items)
 Adds an item(s) to the end of the queue.
 

Constructor & Destructor Documentation

◆ WorkListUnique()

template<typename T , class Compare = std::less<T>>
WorkListUnique< T, Compare >::WorkListUnique ( )
inline

Definition at line 149 of file WorkLists.h.


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