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
6namespace librepr {
7struct Options {
9
10 bool print_type = true;
11 bool explicit_types = false;
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
Definition ctvi/ctvi.h:9
std::string code_for()
Definition repr:39
std::size_t get_terminal_width()
Definition terminal.h:14
Definition options.h:7
std::size_t indent
Definition options.h:13
bool explicit_types
Definition options.h:11
std::size_t max_width
Definition options.h:14
bool should_print_type(std::size_t level) const
Definition options.h:16
bool print_type
Definition options.h:10
Source
Definition options.h:8
@ RTTI
Definition options.h:8
@ CTTI
Definition options.h:8
@ SOURCE_LOCATION
Definition options.h:8
Source name_source
Definition options.h:12