ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/paramspec_bool.cpp
Go to the documentation of this file.
00001 //===----- ct_common/common/paramspec_bool.cpp ------------------*- 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 file contains the function definitions of class ParamSpec_Bool
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #include <cstdlib>
00014 #include <ct_common/common/paramspec_bool.h>
00015 
00016 using namespace ct::common;
00017 
00018 ParamSpec_Bool::ParamSpec_Bool(void)
00019   : ParamSpec(), bool_values_() {
00020 }
00021 
00022 ParamSpec_Bool::ParamSpec_Bool(const ParamSpec_Bool& from)
00023   : ParamSpec(from), bool_values_(from.bool_values_) {
00024 }
00025 
00026 ParamSpec_Bool &ParamSpec_Bool::operator = (
00027     const ParamSpec_Bool &right) {
00028   ParamSpec::operator=(right);
00029   this->bool_values_ = right.bool_values_;
00030   return *this;
00031 }
00032 
00033 ParamSpec_Bool::~ParamSpec_Bool(void) {
00034 }
00035 
00036 std::string ParamSpec_Bool::get_class_name(void) const {
00037   return ParamSpec_Bool::class_name();
00038 }
00039 
00040 std::string ParamSpec_Bool::class_name(void) {
00041   return "ParamSpec_Bool";
00042 }
00043 
00044 void ParamSpec_Bool::set_values(const std::vector<std::string> &string_values) {
00045   std::vector<std::string> str_values;
00046   str_values.push_back("false");
00047   str_values.push_back("true");
00048   ParamSpec::set_values(str_values);
00049   this->bool_values_.push_back(false);
00050   this->bool_values_.push_back(true);
00051   this->bool_values_.push_back(false);
00052 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines