]> git.proxmox.com Git - ceph.git/blob - ceph/src/common/bit_str.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / common / bit_str.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2016 SUSE LINUX GmbH
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14 #ifndef CEPH_COMMON_BIT_STR_H
15 #define CEPH_COMMON_BIT_STR_H
16
17 #include <ostream>
18 #include <functional>
19 #include <stdint.h>
20
21 namespace ceph {
22 class Formatter;
23 }
24
25 extern void print_bit_str(
26 uint64_t bits,
27 std::ostream &out,
28 std::function<const char*(uint64_t)> func,
29 bool dump_bit_val = false);
30
31 extern void dump_bit_str(
32 uint64_t bits,
33 ceph::Formatter *f,
34 std::function<const char*(uint64_t)> func,
35 bool dump_bit_val = false);
36
37 #endif /* CEPH_COMMON_BIT_STR_H */