ct_common
1.0.1
Common library for combinatorial testing
|
00001 //===----- ct_common/common/tuplepool.h -------------------------*- C++ -*-===// 00002 // 00003 // The ct_common Library 00004 // 00005 // This file is distributed under the MIT license. See LICENSE for details. 00006 // 00007 //===----------------------------------------------------------------------===// 00008 // 00009 // This header file contains the class for tuple pools 00010 // 00011 //===----------------------------------------------------------------------===// 00012 00013 #ifndef CT_COMMON_TUPLEPOOL_H_ 00014 #define CT_COMMON_TUPLEPOOL_H_ 00015 00016 #include <set> 00017 #include <vector> 00018 #include <ct_common/common/tuple.h> 00019 00020 namespace ct { 00021 namespace common { 00025 class TuplePool { 00026 public: 00027 TuplePool(void); 00028 TuplePool(const TuplePool& from); 00029 TuplePool& operator = (const TuplePool& right); 00030 ~TuplePool(void); 00031 00033 bool query(const Tuple &tuple); 00035 void add(const Tuple &tuple); 00037 void remove(const Tuple &tuple); 00038 std::size_t size(void) const; 00039 00040 const std::set<Tuple> &getTuples(void) const; 00041 00042 private: 00043 std::set<Tuple> tuple_set_; 00044 }; 00045 } // namespace common 00046 } // namespace ct 00047 00048 #endif // CT_COMMON_TUPLEPOOL_H_