| helics 3.6.1

cpp98/helics.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
8 #ifndef HELICS_CPP98_HPP_
9 #define HELICS_CPP98_HPP_
10 #pragma once
11
12 #include "CombinationFederate.hpp"
13
14 #include <string>
15
19 namespace helicscpp {
21 inline std::string getHelicsVersionString()
22 {
23 return std::string(helicsGetVersion());
24 }
26 inline std::string version()
27 {
28 return std::string(helicsGetVersion());
29 }
30
32 inline std::string systemInfo()
33 {
34 return std::string(helicsGetSystemInfo());
35 }
36
38 inline std::string buildFlags()
39 {
40 return std::string(helicsGetBuildFlags());
41 }
42
44 inline std::string compilerVersion()
45 {
46 return std::string(helicsGetCompilerVersion());
47 }
48
50 inline void cleanupHelicsLibrary()
51 {
52 helicsCleanupLibrary();
53 }
54
56 inline void closeLibrary()
57 {
58 helicsCloseLibrary();
59 }
60
61 inline void loadSignalHandler()
62 {
63 helicsLoadSignalHandler();
64 }
65
66 inline void loadThreadedSignalHandler()
67 {
68 helicsLoadThreadedSignalHandler();
69 }
70
71 inline void loadSignalHandler(HelicsBool (*handler)(int))
72 {
73 helicsLoadSignalHandlerCallback(handler, HELICS_FALSE);
74 }
75
76 inline void loadSignalHandler(HelicsBool (*handler)(int), bool val)
77 {
78 helicsLoadSignalHandlerCallback(handler, val ? HELICS_TRUE : HELICS_FALSE);
79 }
80
81 inline void clearSignalHandler()
82 {
83 helicsClearSignalHandler();
84 }
85
86 } // namespace helicscpp
87 #endif
HelicsBool
int HelicsBool
Definition: api-data.h:118
HELICS_FALSE
const HelicsBool HELICS_FALSE
Definition: api-data.h:121
HELICS_TRUE
const HelicsBool HELICS_TRUE
Definition: api-data.h:120
helicsGetVersion
const char * helicsGetVersion(void)
Definition: helicsExport.cpp:34
helicsCloseLibrary
void helicsCloseLibrary(void)
Definition: helicsExport.cpp:1088
helicsGetSystemInfo
const char * helicsGetSystemInfo(void)
Definition: helicsExport.cpp:49
helicsLoadSignalHandler
void helicsLoadSignalHandler()
Definition: helicsExport.cpp:108
helicsClearSignalHandler
void helicsClearSignalHandler()
Definition: helicsExport.cpp:118
helicsGetBuildFlags
const char * helicsGetBuildFlags(void)
Definition: helicsExport.cpp:39
helicsLoadSignalHandlerCallback
void helicsLoadSignalHandlerCallback(HelicsBool(*handler)(int), HelicsBool useSeparateThread)
Definition: helicsExport.cpp:171
helicsCleanupLibrary
void helicsCleanupLibrary(void)
Definition: helicsExport.cpp:1325
helicsLoadThreadedSignalHandler
void helicsLoadThreadedSignalHandler()
Definition: helicsExport.cpp:113
helicsGetCompilerVersion
const char * helicsGetCompilerVersion(void)
Definition: helicsExport.cpp:44
helicscpp
Definition: cpp98/Broker.hpp:18
helicscpp::closeLibrary
void closeLibrary()
Definition: cpp98/helics.hpp:56
helicscpp::getHelicsVersionString
std::string getHelicsVersionString()
Definition: cpp98/helics.hpp:21
helicscpp::systemInfo
std::string systemInfo()
Definition: cpp98/helics.hpp:32
helicscpp::buildFlags
std::string buildFlags()
Definition: cpp98/helics.hpp:38
helicscpp::cleanupHelicsLibrary
void cleanupHelicsLibrary()
Definition: cpp98/helics.hpp:50
helicscpp::compilerVersion
std::string compilerVersion()
Definition: cpp98/helics.hpp:44
helicscpp::version
std::string version()
Definition: cpp98/helics.hpp:26