bactria  0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
PluginInterface.hpp
Go to the documentation of this file.
1 /* Copyright 2021 Jan Stephan
2  *
3  * Licensed under the EUPL, Version 1.2 or - as soon they will be approved by
4  * the European Commission - subsequent versions of the EUPL (the “Licence”).
5  * You may not use this work except in compliance with the Licence.
6  * You may obtain a copy of the Licence at:
7  *
8  * http://ec.europa.eu/idabc/eupl.html
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the Licence is distributed on an “AS IS” basis, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * Licence permissions and limitations under the Licence.
14  */
15 
24 #pragma once
25 
26 #include <cstdint>
27 
38 extern "C"
39 {
49  auto bactria_reports_create_report(char const* name) -> void*;
50 
60  auto bactria_reports_destroy_report(void* report_handle) noexcept -> void;
61 
70  auto bactria_reports_write_report(void* report_handle) -> void;
71 
82  auto bactria_reports_record_bool(void* report_handle, char const* key, bool value) -> void;
83 
94  auto bactria_reports_record_int8(void* report_handle, char const* key, std::int8_t value) -> void;
95 
106  auto bactria_reports_record_uint8(void* report_handle, char const* key, std::uint8_t value) -> void;
107 
118  auto bactria_reports_record_int16(void* report_handle, char const* key, std::int16_t value) -> void;
119 
130  auto bactria_reports_record_uint16(void* report_handle, char const* key, std::uint16_t value) -> void;
131 
142  auto bactria_reports_record_int32(void* report_handle, char const* key, std::int16_t value) -> void;
143 
154  auto bactria_reports_record_uint32(void* report_handle, char const* key, std::uint16_t value) -> void;
155 
166  auto bactria_reports_record_int64(void* report_handle, char const* key, std::int64_t value) -> void;
167 
178  auto bactria_reports_record_uint64(void* report_handle, char const* key, std::uint64_t value) -> void;
179 
190  auto bactria_reports_record_float(void* report_handle, char const* key, float value) -> void;
191 
202  auto bactria_reports_record_double(void* report_handle, char const* key, double value) -> void;
203 
214  auto bactria_reports_record_string(void* report_handle, char const* key, char const* value) -> void;
215 }
216 
bactria_reports_record_int64
auto bactria_reports_record_int64(void *report_handle, char const *key, std::int64_t value) -> void
Adds a int64_t value to the report.
bactria_reports_destroy_report
auto bactria_reports_destroy_report(void *report_handle) noexcept -> void
Destroys a plugin-specific report handle.
bactria_reports_record_int8
auto bactria_reports_record_int8(void *report_handle, char const *key, std::int8_t value) -> void
Adds a int8_t value to the report.
bactria_reports_record_int32
auto bactria_reports_record_int32(void *report_handle, char const *key, std::int16_t value) -> void
Adds a int32_t value to the report.
bactria_reports_record_float
auto bactria_reports_record_float(void *report_handle, char const *key, float value) -> void
Adds a float value to the report.
bactria_reports_write_report
auto bactria_reports_write_report(void *report_handle) -> void
Writes a report to disk (or other data sinks).
bactria_reports_record_uint64
auto bactria_reports_record_uint64(void *report_handle, char const *key, std::uint64_t value) -> void
Adds a uint64_t value to the report.
bactria_reports_record_bool
auto bactria_reports_record_bool(void *report_handle, char const *key, bool value) -> void
Adds a boolean value to the report.
bactria_reports_record_string
auto bactria_reports_record_string(void *report_handle, char const *key, char const *value) -> void
Adds a string value to the report.
bactria_reports_create_report
auto bactria_reports_create_report(char const *name) -> void *
Creates a plugin-specific report handle.
bactria_reports_record_uint16
auto bactria_reports_record_uint16(void *report_handle, char const *key, std::uint16_t value) -> void
Adds a uint16_t value to the report.
bactria_reports_record_uint32
auto bactria_reports_record_uint32(void *report_handle, char const *key, std::uint16_t value) -> void
Adds a uint32_t value to the report.
bactria_reports_record_uint8
auto bactria_reports_record_uint8(void *report_handle, char const *key, std::uint8_t value) -> void
Adds a uint8_t value to the report.
bactria_reports_record_int16
auto bactria_reports_record_int16(void *report_handle, char const *key, std::int16_t value) -> void
Adds a int16_t value to the report.
bactria_reports_record_double
auto bactria_reports_record_double(void *report_handle, char const *key, double value) -> void
Adds a double value to the report.