STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
formatter Class Reference

#include <toml.hpp>

Collaboration diagram for formatter:
[legend]

Protected Member Functions

TOML_PURE_INLINE_GETTER const node & source () const noexcept
TOML_PURE_INLINE_GETTER std::ostream & stream () const noexcept
TOML_PURE_INLINE_GETTER int indent () const noexcept
void indent (int level) noexcept
void increase_indent () noexcept
void decrease_indent () noexcept
TOML_PURE_INLINE_GETTER size_t indent_columns () const noexcept
TOML_PURE_INLINE_GETTER bool indent_array_elements () const noexcept
TOML_PURE_INLINE_GETTER bool indent_sub_tables () const noexcept
TOML_PURE_INLINE_GETTER bool literal_strings_allowed () const noexcept
TOML_PURE_INLINE_GETTER bool multi_line_strings_allowed () const noexcept
TOML_PURE_INLINE_GETTER bool real_tabs_in_strings_allowed () const noexcept
TOML_PURE_INLINE_GETTER bool unicode_strings_allowed () const noexcept
TOML_PURE_INLINE_GETTER bool terse_kvps () const noexcept
TOML_EXPORTED_MEMBER_FUNCTION void attach (std::ostream &stream) noexcept
TOML_EXPORTED_MEMBER_FUNCTION void detach () noexcept
TOML_EXPORTED_MEMBER_FUNCTION void print_newline (bool force=false)
TOML_EXPORTED_MEMBER_FUNCTION void print_indent ()
TOML_EXPORTED_MEMBER_FUNCTION void print_unformatted (char)
TOML_EXPORTED_MEMBER_FUNCTION void print_unformatted (std::string_view)
TOML_EXPORTED_MEMBER_FUNCTION void print_string (std::string_view str, bool allow_multi_line=true, bool allow_bare=false, bool allow_literal_whitespace=true)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< std::string > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< int64_t > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< double > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< bool > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< date > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< time > &)
TOML_EXPORTED_MEMBER_FUNCTION void print (const value< date_time > &)
TOML_EXPORTED_MEMBER_FUNCTION void print_value (const node &, node_type)
TOML_NODISCARD TOML_EXPORTED_MEMBER_FUNCTION bool dump_failed_parse_result ()
TOML_NODISCARD_CTOR TOML_EXPORTED_MEMBER_FUNCTION formatter (const node *, const parse_result *, const formatter_constants &, const formatter_config &) noexcept

Private Attributes

const node * source_
const parse_result * result_
const formatter_constants * constants_
formatter_config config_
size_t indent_columns_
format_flags int_format_mask_
std::ostream * stream_
int indent_
bool naked_newline_

Detailed Description

Definition at line 9669 of file toml.hpp.

Constructor & Destructor Documentation

◆ formatter()

TOML_EXTERNAL_LINKAGE formatter::formatter ( const node * source_node,
const parse_result * source_pr,
const formatter_constants & constants,
const formatter_config & config )
protectednoexcept

Definition at line 16399 of file toml.hpp.

References config, and source_.

Member Function Documentation

◆ attach()

TOML_EXTERNAL_LINKAGE void formatter::attach ( std::ostream & stream)
protectednoexcept

Definition at line 16426 of file toml.hpp.

References indent_, naked_newline_, stream(), and stream_.

◆ decrease_indent()

void formatter::decrease_indent ( )
inlineprotectednoexcept

Definition at line 9713 of file toml.hpp.

References indent_.

◆ detach()

TOML_EXTERNAL_LINKAGE void formatter::detach ( )
protectednoexcept

Definition at line 16434 of file toml.hpp.

References stream_.

◆ dump_failed_parse_result()

TOML_EXTERNAL_LINKAGE bool formatter::dump_failed_parse_result ( )
protected

Definition at line 16857 of file toml.hpp.

References result_, and stream().

◆ increase_indent()

void formatter::increase_indent ( )
inlineprotectednoexcept

Definition at line 9708 of file toml.hpp.

References indent_.

◆ indent() [1/2]

TOML_PURE_INLINE_GETTER int formatter::indent ( ) const
inlineprotectednoexcept

Definition at line 9698 of file toml.hpp.

References indent_.

◆ indent() [2/2]

void formatter::indent ( int level)
inlineprotectednoexcept

Definition at line 9703 of file toml.hpp.

References indent_.

◆ indent_array_elements()

TOML_PURE_INLINE_GETTER bool formatter::indent_array_elements ( ) const
inlineprotectednoexcept

Definition at line 9725 of file toml.hpp.

References config_.

◆ indent_columns()

TOML_PURE_INLINE_GETTER size_t formatter::indent_columns ( ) const
inlineprotectednoexcept

Definition at line 9719 of file toml.hpp.

References indent_columns_.

◆ indent_sub_tables()

TOML_PURE_INLINE_GETTER bool formatter::indent_sub_tables ( ) const
inlineprotectednoexcept

Definition at line 9731 of file toml.hpp.

References config_.

◆ literal_strings_allowed()

TOML_PURE_INLINE_GETTER bool formatter::literal_strings_allowed ( ) const
inlineprotectednoexcept

Definition at line 9737 of file toml.hpp.

References config_.

Referenced by print(), print(), print(), and print_string().

◆ multi_line_strings_allowed()

TOML_PURE_INLINE_GETTER bool formatter::multi_line_strings_allowed ( ) const
inlineprotectednoexcept

Definition at line 9743 of file toml.hpp.

References config_.

Referenced by print_string().

◆ print() [1/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< bool > & val)
protected

Definition at line 16802 of file toml.hpp.

References constants_, print_unformatted(), and value().

◆ print() [2/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< date > & val)
protected

◆ print() [3/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< date_time > & val)
protected

◆ print() [4/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< double > & val)
protected

◆ print() [5/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< int64_t > & val)
protected

Definition at line 16725 of file toml.hpp.

References int_format_mask_, naked_newline_, print_to_stream(), stream_, and value().

◆ print() [6/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< std::string > & val)
protected

Definition at line 16719 of file toml.hpp.

References print_string(), and value().

Referenced by print_value().

◆ print() [7/7]

TOML_EXTERNAL_LINKAGE void formatter::print ( const value< time > & val)
protected

◆ print_indent()

TOML_EXTERNAL_LINKAGE void formatter::print_indent ( )
protected

Definition at line 16450 of file toml.hpp.

References config_, indent_, naked_newline_, print_to_stream(), and stream_.

◆ print_newline()

TOML_EXTERNAL_LINKAGE void formatter::print_newline ( bool force = false)
protected

Definition at line 16440 of file toml.hpp.

References naked_newline_, print_to_stream(), and stream_.

◆ print_string()

TOML_EXTERNAL_LINKAGE void formatter::print_string ( std::string_view str,
bool allow_multi_line = true,
bool allow_bare = false,
bool allow_literal_whitespace = true )
protected

◆ print_unformatted() [1/2]

TOML_EXTERNAL_LINKAGE void formatter::print_unformatted ( char c)
protected

Definition at line 16460 of file toml.hpp.

References naked_newline_, print_to_stream(), and stream_.

Referenced by print(), and print_string().

◆ print_unformatted() [2/2]

TOML_EXTERNAL_LINKAGE void formatter::print_unformatted ( std::string_view str)
protected

Definition at line 16467 of file toml.hpp.

References naked_newline_, print_to_stream(), and stream_.

◆ print_value()

TOML_EXTERNAL_LINKAGE void formatter::print_value ( const node & val_node,
node_type type )
protected

Definition at line 16838 of file toml.hpp.

References print(), TOML_ASSUME, TOML_UNREACHABLE, and value().

◆ real_tabs_in_strings_allowed()

TOML_PURE_INLINE_GETTER bool formatter::real_tabs_in_strings_allowed ( ) const
inlineprotectednoexcept

Definition at line 9749 of file toml.hpp.

References config_.

Referenced by print_string().

◆ source()

TOML_PURE_INLINE_GETTER const node & formatter::source ( ) const
inlineprotectednoexcept

Definition at line 9686 of file toml.hpp.

References source_.

◆ stream()

TOML_PURE_INLINE_GETTER std::ostream & formatter::stream ( ) const
inlineprotectednoexcept

Definition at line 9692 of file toml.hpp.

References stream_.

Referenced by attach(), and dump_failed_parse_result().

◆ terse_kvps()

TOML_PURE_INLINE_GETTER bool formatter::terse_kvps ( ) const
inlineprotectednoexcept

Definition at line 9761 of file toml.hpp.

References config_.

◆ unicode_strings_allowed()

TOML_PURE_INLINE_GETTER bool formatter::unicode_strings_allowed ( ) const
inlineprotectednoexcept

Definition at line 9755 of file toml.hpp.

References config_.

Referenced by print_string().

Member Data Documentation

◆ config_

◆ constants_

const formatter_constants* formatter::constants_
private

Definition at line 9676 of file toml.hpp.

Referenced by print(), and print().

◆ indent_

int formatter::indent_
private

Definition at line 9681 of file toml.hpp.

Referenced by attach(), decrease_indent(), increase_indent(), indent(), indent(), and print_indent().

◆ indent_columns_

size_t formatter::indent_columns_
private

Definition at line 9678 of file toml.hpp.

Referenced by indent_columns().

◆ int_format_mask_

format_flags formatter::int_format_mask_
private

Definition at line 9679 of file toml.hpp.

Referenced by print().

◆ naked_newline_

bool formatter::naked_newline_
private

◆ result_

const parse_result* formatter::result_
private

Definition at line 9674 of file toml.hpp.

Referenced by dump_failed_parse_result().

◆ source_

const node* formatter::source_
private

Definition at line 9672 of file toml.hpp.

Referenced by formatter(), and source().

◆ stream_

std::ostream* formatter::stream_
private

The documentation for this class was generated from the following file:
  • daq-server/diablo_server/lib/include/toml++/toml.hpp