ct_common
1.0.1
Common library for combinatorial testing
|
00001 //===----- ct_common/common/constraint_l_cbool.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 constant boolean values 00010 // 00011 //===----------------------------------------------------------------------===// 00012 00013 #ifndef CT_COMMON_CONSTRAINT_L_CBOOL_H_ 00014 #define CT_COMMON_CONSTRAINT_L_CBOOL_H_ 00015 00016 #include <ct_common/common/constraint_l_atom.h> 00017 00018 namespace ct { 00019 namespace common { 00023 class Constraint_L_CBool : public Constraint_L_Atom { 00024 public: 00025 Constraint_L_CBool(void); 00026 Constraint_L_CBool(const Constraint_L_CBool &from); 00027 virtual ~Constraint_L_CBool(void); 00028 Constraint_L_CBool &operator = (const Constraint_L_CBool &right); 00029 00030 public: 00031 virtual std::string get_class_name(void) const; 00032 static std::string class_name(void); 00033 00034 void set_value(bool val) { this->value_ = val; } 00035 bool get_value(void) const { return this->value_; } 00036 00038 virtual const std::string &get_str_value(void) const; 00039 virtual void dump(std::ostream &os, const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs) const; 00040 00041 public: 00042 virtual EvalType_Bool Evaluate(const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00043 const Assignment &assignment) const; 00044 00045 private: 00046 bool value_; 00047 }; 00048 } // namespace common 00049 } // namespace ct 00050 00051 #endif // CT_COMMON_CONSTRAINT_L_CBOOL_H_