ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/seed.h
Go to the documentation of this file.
00001 //===----- ct_common/common/seed.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 base class for seeds
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef CT_COMMON_SEED_H_
00014 #define CT_COMMON_SEED_H_
00015 
00016 #include <ct_common/common/utils.h>
00017 #include <ct_common/common/paramspec.h>
00018 #include <ct_common/common/assignment.h>
00019 #include <ct_common/common/eval_type_bool.h>
00020 
00021 namespace ct {
00022 namespace common {
00023 const std::size_t SID_BOUND = std::size_t(-1);  
00028 class DLL_EXPORT Seed
00029 {
00030 public:
00031   Seed(std::size_t sid = SID_BOUND, bool is_starter = false);
00032   Seed(const Seed& from);
00033   Seed &operator = (const Seed &right);
00034   virtual ~Seed(void) = 0;
00035 
00036 public:
00038   virtual EvalType_Bool IsMatch(const Assignment &assignment, const std::vector<boost::shared_ptr<ParamSpec> > &paramspecs) = 0;
00040   std::size_t get_id(void) const { return this->id_; }
00042   void set_id(std::size_t id) { this->id_ = id; }
00044   bool get_is_starter(void) const { return this->is_starter_; }
00046   void set_is_starter(bool is_starter) { this->is_starter_ = is_starter; }
00047   
00048 private:
00049   std::size_t id_;  
00050   bool is_starter_;  
00052 };
00053 }  // namespace common
00054 }  // namespace ct
00055 
00056 #endif  // CT_COMMON_SEED_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines