FluentMapping.cpp
Go to the documentation of this file.
00001 /*
00002  * FluentMapping.cpp
00003  *
00004  *  Created on: Jul 13, 2011
00005  *      Author: Andreas Hertle
00006  */
00007 
00008 #include "tfd_modules/opl/FluentMapping.h"
00009 #include "tfd_modules/opl/stringutil.h"
00010 
00011 namespace opl
00012 {
00013 
00014 namespace interface
00015 {
00016 
00017 FluentMapping::FluentMapping(int index)
00018 {
00019     this->index = index;
00020     this->value = -1.0;
00021     this->constant = false;
00022 }
00023 
00024 FluentMapping::FluentMapping(int index, double value, bool constant)
00025 {
00026     this->index = index;
00027     this->value = value;
00028     this->constant = constant;
00029 }
00030 
00031 FluentMapping::~FluentMapping()
00032 {
00033 }
00034 
00035 std::string FluentMapping::dump() const
00036 {
00037     std::string text;
00038     if (constant)
00039     {
00040         text = "constant: " + StringUtil::createFromNumber(index) + "|" + StringUtil::createFromNumber(value);
00041     }
00042     else
00043     {
00044         text = "mapping to var: " + StringUtil::createFromNumber(index);
00045     }
00046     return text;
00047 }
00048 
00049 }
00050 
00051 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


tfd_modules
Author(s): Maintained by Christian Dornhege (see AUTHORS file).
autogenerated on Tue Jan 22 2013 12:25:03