ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/exp_a_param.h
Go to the documentation of this file.
00001 //===----- ct_common/common/exp_a_param.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 arithmetic expressions w.r.t. a
00010 // parameter
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef CT_COMMON_EXP_A_PARAM_H
00015 #define CT_COMMON_EXP_A_PARAM_H
00016 
00017 #include <ct_common/common/utils.h>
00018 #include <ct_common/common/exp_a_atom.h>
00019 
00020 namespace ct {
00021 namespace common {
00025 class DLL_EXPORT Exp_A_Param : public Exp_A_Atom {
00026 public:
00027   Exp_A_Param(void);
00028   Exp_A_Param(const Exp_A_Param &from);
00029   Exp_A_Param &operator = (const Exp_A_Param &right);
00030   virtual ~Exp_A_Param(void);
00031 
00032 public:
00033   virtual std::string get_class_name(void) const;
00034   static std::string class_name(void);
00035   virtual void dump(std::ostream &os, const std::vector<boost::shared_ptr<ParamSpec> > &param_specs) const;
00036 
00037   virtual void inner_touch_leaf_pids( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00038                                       std::set<std::size_t> &pids_to_touch) const;
00039 
00040 public:
00041   void set_pid(std::size_t pid) { this->pid_ = pid; }
00042   std::size_t get_pid(void) const { return this->pid_; }
00043 
00044 private:
00045   virtual EvalType_Double EvaluateDouble_Impl( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00046                                       const Assignment &assignment) const;
00047 
00048   virtual EvalType_Int EvaluateInt_Impl( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00049                                 const Assignment &assignment) const;
00050 
00051 private:
00052   std::size_t pid_;  
00053 };
00054 }  // namespace common
00055 }  // namespace ct
00056 
00057 #endif  // CT_COMMON_EXP_A_PARAM_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines