tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
tm_set.hpp
Go to the documentation of this file.
1 /**
2  * Copyright (C) 2011
3  * University of Rochester Department of Computer Science
4  * and
5  * Lehigh University Department of Computer Science and Engineering
6  *
7  * License: Modified BSD
8  * Please see the file LICENSE.RSTM for licensing information
9  */
10 
11 /* tm_set.hpp
12  *
13  * Simple interface for sets.
14  */
15 
16 #ifndef TM_SET_HPP__
17 #define TM_SET_HPP__
18 
19 template<typename T>
20 class tm_set {
21  public:
22  virtual void insert(const T item) = 0;
23  virtual void remove(const T item) = 0;
24  virtual bool lookup(const T item) = 0;
25 
26  virtual void apply_to_all(void (*f)(T item)) = 0;
27 
28  virtual ~tm_set() { }
29 };
30 
31 #endif // TM_SET_HPP__
virtual void apply_to_all(void(*f)(T item))=0
Definition: tm_set.hpp:20
virtual ~tm_set()
Definition: tm_set.hpp:28
virtual bool lookup(const T item)=0
virtual void insert(const T item)=0