ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/exp_a_cint.h
Go to the documentation of this file.
00001 //===----- ct_common/common/exp_a_cint.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 int expressions
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef CT_COMMON_EXP_A_CINT_H
00014 #define CT_COMMON_EXP_A_CINT_H
00015 
00016 #include <ct_common/common/utils.h>
00017 #include <ct_common/common/exp_a_atom.h>
00018 
00019 namespace ct {
00020 namespace common {
00024 class DLL_EXPORT Exp_A_CInt : public Exp_A_Atom {
00025 public:
00026   Exp_A_CInt(void);
00027   Exp_A_CInt(const Exp_A_CInt &from);
00028   Exp_A_CInt &operator = (const Exp_A_CInt &right);
00029   virtual ~Exp_A_CInt(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> > &param_specs) const;
00035 
00036 public:
00038   virtual void set_value(int value);
00040   virtual void set_value(double value);
00042   void set_str_value(const std::string &str_value);
00043   
00045   int get_value(void) const { return this->value_; }
00046   virtual const std::string &get_str_value(void) const;
00047 
00048 private:
00049   virtual EvalType_Double EvaluateDouble_Impl( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00050                                       const Assignment &assignment) const;
00051 
00052   virtual EvalType_Int EvaluateInt_Impl( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00053                                 const Assignment &assignment) const;
00054 
00055 private:
00056   int value_;
00057   std::string str_value_;  
00058 };
00059 }  // namespace common
00060 }  // namespace ct
00061 
00062 #endif  // CT_COMMON_EXP_A_CINT_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines