cpp-common/bt2c: add `format_as()` functions for `Uuid` and `UuidView`
[babeltrace.git] / src / cpp-common / bt2c / fmt.hpp
CommitLineData
7cf8258b
SM
1/*
2 * Copyright (c) 2024 EfficiOS, inc.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#include "common/common.h"
8#include "cpp-common/bt2/message.hpp"
e05975eb 9#include "cpp-common/bt2c/uuid.hpp"
7cf8258b
SM
10#include "cpp-common/vendor/fmt/format.h" /* IWYU pragma: keep */
11
12namespace bt2 {
13
14inline const char *format_as(const MessageType type)
15{
16 return bt_common_message_type_string(static_cast<bt_message_type>(type));
17}
18
19} /* namespace bt2 */
e05975eb
SM
20
21namespace bt2c {
22
23inline std::string format_as(const UuidView uuid)
24{
25 return uuid.str();
26}
27
28} /* namespace bt2c */
This page took 0.024038 seconds and 4 git commands to generate.