| helics 3.6.1

cpp98/CombinationFederate.hpp
1 /*
2 Copyright (c) 2017-2025,
3 Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable
4 Energy, LLC. See the top-level NOTICE for additional details. All rights reserved.
5 SPDX-License-Identifier: BSD-3-Clause
6 */
7 #ifndef HELICS_CPP98_COMBINATION_FEDERATE_HPP_
8 #define HELICS_CPP98_COMBINATION_FEDERATE_HPP_
9 #pragma once
10
11 #include "MessageFederate.hpp"
12 #include "ValueFederate.hpp"
13
14 #include <string>
15
16 namespace helicscpp {
19 class CombinationFederate: public ValueFederate, public MessageFederate {
20 public:
24 explicit CombinationFederate(const std::string& name, FederateInfo& fedInfo)
25 {
26 fed = helicsCreateCombinationFederate(name.c_str(), fedInfo.getInfo(), hThrowOnError());
27 }
30 explicit CombinationFederate(const std::string& configString)
31 {
32 fed = helicsCreateCombinationFederateFromConfig(configString.c_str(), hThrowOnError());
33 }
34 };
35 } // namespace helicscpp
36 #endif
helicscpp::CombinationFederate
Definition: cpp98/CombinationFederate.hpp:19
helicscpp::CombinationFederate::CombinationFederate
CombinationFederate(const std::string &name, FederateInfo &fedInfo)
Definition: cpp98/CombinationFederate.hpp:24
helicscpp::CombinationFederate::CombinationFederate
CombinationFederate(const std::string &configString)
Definition: cpp98/CombinationFederate.hpp:30
helicscpp::FederateInfo
Definition: cpp98/Federate.hpp:28
helicscpp::FederateInfo::getInfo
HelicsFederateInfo getInfo()
Definition: cpp98/Federate.hpp:163
helicscpp::Federate::fed
HelicsFederate fed
underlying HelicsFederate object
Definition: cpp98/Federate.hpp:904
helicscpp::MessageFederate
Definition: cpp98/MessageFederate.hpp:22
helicscpp::ValueFederate
Definition: cpp98/ValueFederate.hpp:36
helicscpp::hThrowOnError
Definition: helicsExceptions.hpp:38
helicsCreateCombinationFederateFromConfig
HelicsFederate helicsCreateCombinationFederateFromConfig(const char *configFile, HelicsError *err)
Definition: FederateExport.cpp:576
helicsCreateCombinationFederate
HelicsFederate helicsCreateCombinationFederate(const char *fedName, HelicsFederateInfo fedInfo, HelicsError *err)
Definition: FederateExport.cpp:554
helicscpp
Definition: cpp98/Broker.hpp:18