ct_common  1.0.1
Common library for combinatorial testing
src/ct_common/common/constraint_l_unary.cpp
Go to the documentation of this file.
00001 //===----- ct_common/common/constraint_l_atom.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 Constraint_L_Atom
00010 //
00011 //===----------------------------------------------------------------------===//
00012 
00013 #include <ct_common/common/constraint_l_unary.h>
00014 
00015 using namespace ct::common;
00016 
00017 Constraint_L_Unary::Constraint_L_Unary(void)
00018     : Constraint_L() {
00019   this->oprds_.resize(1);
00020 }
00021 
00022 Constraint_L_Unary::Constraint_L_Unary(const Constraint_L_Unary &from)
00023   : Constraint_L(from) {
00024 }
00025 
00026 Constraint_L_Unary &Constraint_L_Unary::operator = (const Constraint_L_Unary &right) {
00027   Constraint_L::operator=(right);
00028   return *this;
00029 }
00030 
00031 Constraint_L_Unary::~Constraint_L_Unary(void) {
00032 }
00033 
00034 std::string Constraint_L_Unary::get_class_name(void) const {
00035   return Constraint_L_Unary::class_name();
00036 }
00037 
00038 std::string Constraint_L_Unary::class_name(void) {
00039   return "Constraint_L_Unary";
00040 }
00041 
00042 EvalType_Bool Constraint_L_Unary::Evaluate(const std::vector<boost::shared_ptr<ParamSpec> > &param_specs,
00043                                   const Assignment &assignment) const {
00044   EvalType_Bool tmp_return = this->get_oprd()->Evaluate(param_specs, assignment);
00045   tmp_return.value_ = this->evaluate_func(tmp_return.value_);
00046   return tmp_return;
00047 }
00048 
00049 void Constraint_L_Unary::dump(std::ostream &os, const std::vector<boost::shared_ptr<ParamSpec> > &param_specs) const {
00050   os << this->get_op_token();
00051   this->get_oprd()->dump(os, param_specs);
00052 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines