repr
0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
options.h
Go to the documentation of this file.
1
#pragma once
2
#include <
cstddef
>
3
4
#include <
librepr/terminal.h
>
5
6
namespace
librepr
{
7
struct
Options
{
8
enum
Source
{
RTTI
,
CTTI
,
SOURCE_LOCATION
};
9
10
bool
print_type
=
true
;
11
bool
explicit_types
=
false
;
12
Source
name_source
=
RTTI
;
13
std::size_t
indent
= 0;
14
std::size_t
max_width
=
librepr::get_terminal_width
();
15
16
[[
nodiscard
]]
bool
should_print_type
(
std::size_t
level)
const
{
17
if
(level == 0) {
18
return
print_type
;
19
}
20
return
explicit_types
;
21
}
22
};
23
}
// namespace librepr
cstddef
librepr
Definition
ctvi/ctvi.h:9
librepr::code_for
std::string code_for()
Definition
repr:39
librepr::get_terminal_width
std::size_t get_terminal_width()
Definition
terminal.h:14
std::size_t
librepr::Options
Definition
options.h:7
librepr::Options::indent
std::size_t indent
Definition
options.h:13
librepr::Options::explicit_types
bool explicit_types
Definition
options.h:11
librepr::Options::max_width
std::size_t max_width
Definition
options.h:14
librepr::Options::should_print_type
bool should_print_type(std::size_t level) const
Definition
options.h:16
librepr::Options::print_type
bool print_type
Definition
options.h:10
librepr::Options::Source
Source
Definition
options.h:8
librepr::Options::RTTI
@ RTTI
Definition
options.h:8
librepr::Options::CTTI
@ CTTI
Definition
options.h:8
librepr::Options::SOURCE_LOCATION
@ SOURCE_LOCATION
Definition
options.h:8
librepr::Options::name_source
Source name_source
Definition
options.h:12
terminal.h
include
librepr
options.h
Generated by
1.9.8, using the excellent
Doxygen Awesome
Theme