ct_common
1.0.1
Common library for combinatorial testing
|
00001 //===----- ct_common/common/constraint_l_ivld.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 parameter invalidation atom 00010 // constraints 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef CT_COMMON_CONSTRAINT_L_IVLD_H_ 00015 #define CT_COMMON_CONSTRAINT_L_IVLD_H_ 00016 00017 #include <ct_common/common/utils.h> 00018 #include <ct_common/common/constraint_l_atom.h> 00019 00020 namespace ct { 00021 namespace common { 00025 class DLL_EXPORT Constraint_L_IVLD : public Constraint_L_Atom { 00026 public: 00027 Constraint_L_IVLD(void); 00028 Constraint_L_IVLD(const Constraint_L_IVLD &from); 00029 Constraint_L_IVLD &operator = (const Constraint_L_IVLD &right); 00030 virtual ~Constraint_L_IVLD(void); 00031 00032 virtual std::string get_class_name(void) const; 00033 static std::string class_name(void); 00034 virtual void dump(std::ostream &os, const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs) const; 00035 00036 virtual void inner_touch_leaf_pids( 00037 const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00038 std::set<std::size_t> &pids_to_touch) const; 00039 00040 void set_pid(std::size_t pid) { this->pid_ = pid; } 00041 std::size_t get_pid(void) const { return this->pid_; } 00042 00043 virtual EvalType_Bool Evaluate(const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00044 const Assignment &assignment) const; 00045 00046 private: 00048 boost::shared_ptr<EvalType> EvaluateAutoCaseExp( 00049 const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00050 const Assignment &assignment, 00051 const boost::shared_ptr<TreeNode> &exp) const; 00052 00053 private: 00054 std::size_t pid_; 00055 }; 00056 } // namespace common 00057 } // namespace ct 00058 00059 #endif // CT_COMMON_CONSTRAINT_L_IVLD_H_