ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/exp_s_cstring.h
Go to the documentation of this file.
00001 //===----- ct_common/common/exp_s_cstring.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 string expressions
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #ifndef CT_COMMON_EXP_S_CSTRING_H
00014 #define CT_COMMON_EXP_S_CSTRING_H
00015 
00016 #include <ct_common/common/utils.h>
00017 #include <ct_common/common/exp_s_atom.h>
00018 
00019 namespace ct {
00020 namespace common {
00024 class DLL_EXPORT Exp_S_CString : public Exp_S_Atom {
00025 public:
00026   Exp_S_CString(void);
00027   Exp_S_CString(const Exp_S_CString &from);
00028   Exp_S_CString &operator = (const Exp_S_CString &right);
00029   virtual ~Exp_S_CString(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   void set_value(const std::string &value) { this->value_ = value; }
00040   void set_value(const char *value) { this->value_ = value; }
00041 
00043   const std::string &get_value(void) const { return this->value_; }
00044   virtual const std::string &get_str_value(void) const;
00045 
00046   virtual EvalType_String Evaluate( const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00047                                 const Assignment &assignment) const;
00048 
00049 private:
00050   std::string value_;
00051 };
00052 }  // namespace common
00053 }  // namespace ct
00054 
00055 #endif  // CT_COMMON_EXP_S_CSTRING_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines