HIBF
1.0.0-rc.1
Loading...
Searching...
No Matches
print.hpp
1
// SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#pragma once
6
7
#include <
cinttypes
>
// for int64_t, int16_t, int32_t, int8_t, uint16_t, uint32_t, uint64_t
8
#include <
iostream
>
// for cout, ostream
9
#include <
vector
>
// for vector
10
11
#include <
hibf/misc/bit_vector.hpp
>
// for bit_vector
12
#include <
hibf/misc/counting_vector.hpp
>
// for counting_vector
13
14
namespace
seqan::hibf
15
{
16
17
// Why a function object and not free `functions void print(...)` ?
18
// Disables ADL and requires fully qualified name outside the seqan::hibf namespace.
19
// With a free function, both seqan::hibf::print and print (found via ADL) would work.
20
// Print is a common name and a free function might cause clashes.
21
// A free function for `std::vector<int64_t>` might also cause problems.
22
struct
print_t
23
{
24
void
operator()(
seqan::hibf::bit_vector
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
25
void
operator()(
seqan::hibf::counting_vector<uint8_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
26
void
operator()(
seqan::hibf::counting_vector<uint16_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
27
void
operator()(
seqan::hibf::counting_vector<uint32_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
28
void
operator()(
seqan::hibf::counting_vector<uint64_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
29
void
operator()(
seqan::hibf::counting_vector<int8_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
30
void
operator()(
seqan::hibf::counting_vector<int16_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
31
void
operator()(
seqan::hibf::counting_vector<int32_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
32
void
operator()(
seqan::hibf::counting_vector<int64_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
33
void
operator()(
std::vector<int64_t>
const
& vector,
std::ostream
& stream =
std::cout
)
const
;
34
};
35
36
static
inline
constexpr
auto
print =
print_t
{};
37
38
}
// namespace seqan::hibf
std::ostream
bit_vector.hpp
Provides seqan::hibf::bit_vector.
cinttypes
seqan::hibf::bit_vector
An bit vector.
Definition
bit_vector.hpp:68
seqan::hibf::counting_vector
A data structure that behaves like a std::vector and can be used to consolidate the results of multip...
Definition
counting_vector.hpp:146
counting_vector.hpp
Provides seqan::hibf::counting_vector.
std::cout
iostream
seqan::hibf::print_t
Definition
print.hpp:23
vector
hibf
misc
print.hpp
Generated on Thu Aug 29 2024 00:01:59 for HIBF by
1.10.0