| helics 3.6.1

ProfilerBuffer.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 #pragma once
8
9 #include <string>
10 #include <utility>
11 #include <vector>
12
13 namespace helics {
14 class ProfilerBuffer {
15 public:
16 ~ProfilerBuffer();
17 void addMessage(const std::string& data);
18 void addMessage(std::string&& data);
19 void writeFile();
26 void setOutputFile(std::string fileName, bool append = false);
27
28 private:
29 std::vector<std::string> mBuffers;
30 std::string mFileName;
31 };
32 } // namespace helics
helics::ProfilerBuffer
Definition: ProfilerBuffer.hpp:14
helics::ProfilerBuffer::setOutputFile
void setOutputFile(std::string fileName, bool append=false)
Definition: ProfilerBuffer.cpp:60
helics
the main namespace for the helics co-simulation library User functions will be in the helics namespac...
Definition: AsyncFedCallInfo.hpp:14