ct_common
1.0.1
Common library for combinatorial testing
|
00001 //===----- ct_common/common/exp_a_constraintcast.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 expressions casted from constraints 00010 // 00011 //===----------------------------------------------------------------------===// 00012 00013 #ifndef CT_COMMON_EXP_A_CONSTRAINTCAST_H_ 00014 #define CT_COMMON_EXP_A_CONSTRAINTCAST_H_ 00015 00016 #include <ct_common/common/constraint.h> 00017 #include <ct_common/common/exp_a_atom.h> 00018 00019 namespace ct { 00020 namespace common { 00024 class DLL_EXPORT Exp_A_ConstraintCast : public Exp_A_Atom { 00025 public: 00026 Exp_A_ConstraintCast(void); 00027 Exp_A_ConstraintCast(const Exp_A_ConstraintCast &from); 00028 Exp_A_ConstraintCast &operator = (const Exp_A_ConstraintCast &right); 00029 virtual ~Exp_A_ConstraintCast(void); 00030 00031 public: 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 boost::shared_ptr<Constraint> get_oprd(void) const { return boost::dynamic_pointer_cast<Constraint>(this->oprds_[0]); } 00037 void set_oprd(const boost::shared_ptr<TreeNode> &oprd) { this->oprds_[0] = oprd; } 00038 00039 private: 00040 virtual EvalType_Double EvaluateDouble_Impl( const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00041 const Assignment &assignment) const; 00042 00043 virtual EvalType_Int EvaluateInt_Impl( const std::vector<boost::shared_ptr<ParamSpec> > ¶m_specs, 00044 const Assignment &assignment) const; 00045 }; 00046 } // namespace common 00047 } // namespace ct 00048 00049 #endif // EXP_A_CONSTRAINTCAST_H_