helics  3.5.2
CoreFederateInfo.hpp
1 /*
2 Copyright (c) 2017-2024,
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 #pragma once
8 
9 #include "helicsTime.hpp"
10 
11 #include <utility>
12 #include <vector>
13 
14 namespace helics {
17  public:
18  std::vector<std::pair<int, Time>> timeProps;
19  std::vector<std::pair<int, int>> intProps;
20  std::vector<std::pair<int, bool>> flagProps;
21 
24  void setProperty(int propId, double propVal) { timeProps.emplace_back(propId, propVal); }
25  void setProperty(int propId, int propVal) { intProps.emplace_back(propId, propVal); }
26  void setProperty(int propId, Time propVal) { timeProps.emplace_back(propId, propVal); }
28  void setFlagOption(int flagId, bool propVal = true) { flagProps.emplace_back(flagId, propVal); }
29 };
30 
31 } // namespace helics
Definition: CoreFederateInfo.hpp:16
void setFlagOption(int flagId, bool propVal=true)
Definition: CoreFederateInfo.hpp:28
std::vector< std::pair< int, Time > > timeProps
container for the timeProperties
Definition: CoreFederateInfo.hpp:18
std::vector< std::pair< int, bool > > flagProps
container for the binary flag options
Definition: CoreFederateInfo.hpp:20
void setProperty(int propId, double propVal)
Definition: CoreFederateInfo.hpp:24
std::vector< std::pair< int, int > > intProps
container for the integer properties
Definition: CoreFederateInfo.hpp:19
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14
TimeRepresentation< count_time< 9 > > Time
Definition: helicsTime.hpp:27