MAiNGO
outputVariable.h
Go to the documentation of this file.
1 /**********************************************************************************
2  * Copyright (c) 2019 Process Systems Engineering (AVT.SVT), RWTH Aachen University
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0.
7  *
8  * SPDX-License-Identifier: EPL-2.0
9  *
10  **********************************************************************************/
11 
12 #pragma once
13 
14 #include "ffunc.hpp"
15 
16 #include <string>
17 
18 
19 namespace maingo {
20 
21 
30 
31  public:
38  OutputVariable(const std::string descIn, const mc::FFVar valueIn):
39  description(descIn), value(valueIn) {}
40 
47  OutputVariable(const mc::FFVar valueIn, const std::string descIn):
48  value(valueIn), description(descIn) {}
49 
55  OutputVariable(const std::tuple<mc::FFVar, std::string> inTuple):
56  value(std::get<0>(inTuple)), description(std::get<1>(inTuple)) {}
57 
63  OutputVariable(const std::tuple<std::string, mc::FFVar> inTuple):
64  value(std::get<1>(inTuple)), description(std::get<0>(inTuple)) {}
65 
69  ~OutputVariable() = default;
70 
76  OutputVariable(const OutputVariable& variableIn) = default;
77 
83  OutputVariable(OutputVariable&& variableIn) = default;
84 
90  OutputVariable& operator=(const OutputVariable& variableIn) = default;
91 
97  OutputVariable& operator=(OutputVariable&& variableIn) = default;
98 
102  inline bool operator==(const OutputVariable& other) const
103  {
104  return ((description == other.description) && (value == other.value));
105  }
106 
107  mc::FFVar value = {};
108  std::string description = {};
109 };
110 
111 
112 } // end namespace maingo
~OutputVariable()=default
Destructor.
OutputVariable(const std::tuple< mc::FFVar, std::string > inTuple)
Constructor for use in the evaluate function.
Definition: outputVariable.h:55
OutputVariable(const std::string descIn, const mc::FFVar valueIn)
Constructor for use in the evaluate function.
Definition: outputVariable.h:38
Struct for storing additional output variables.
Definition: outputVariable.h:29
bool operator==(const OutputVariable &other) const
Equality comparison operator.
Definition: outputVariable.h:102
OutputVariable(const mc::FFVar valueIn, const std::string descIn)
Constructor for use in the evaluate function.
Definition: outputVariable.h:47
mc::FFVar value
Definition: outputVariable.h:107
OutputVariable(const std::tuple< std::string, mc::FFVar > inTuple)
Constructor for use in the evaluate function.
Definition: outputVariable.h:63
std::string description
Definition: outputVariable.h:108
namespace holding all essentials of MAiNGO
Definition: aleModel.h:25
OutputVariable & operator=(const OutputVariable &variableIn)=default
Copy assignment operator.