ct_common
1.0.1
Common library for combinatorial testing
|
00001 //===----- ct_common/common/constraint.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 constraints 00010 // 00011 //===----------------------------------------------------------------------===// 00012 00013 #ifndef CT_COMMON_CONSTRAINT_H_ 00014 #define CT_COMMON_CONSTRAINT_H_ 00015 00016 #include <ct_common/common/utils.h> 00017 #include <vector> 00018 #include <string> 00019 #include <ct_common/common/pvpair.h> 00020 #include <ct_common/common/assignment.h> 00021 #include <ct_common/common/paramspec.h> 00022 #include <boost/shared_ptr.hpp> 00023 #include <ct_common/common/tree_node.h> 00024 #include <ct_common/common/eval_type_bool.h> 00025 00026 namespace ct { 00027 namespace common { 00034 class DLL_EXPORT Constraint : public TreeNode { 00035 public: 00036 Constraint(void); 00037 // This class is not supposed to be copied and assigned 00038 // only the reference is copied 00039 Constraint(const Constraint &from); 00040 Constraint &operator = (const Constraint &right); 00041 virtual ~Constraint(void) = 0; 00042 00043 virtual std::string get_class_name(void) const; 00044 static std::string class_name(void); 00045 00046 public: 00048 virtual EvalType_Bool Evaluate( 00049 const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00050 const Assignment &assignment) const = 0; 00051 00052 }; 00053 } // namespace common 00054 } // namespace ct 00055 00056 #endif // CT_COMMON_CONSTRAINT_H_