12#ifndef MCRL2_CORE_DETAIL_PRINT_UTILITY_H
13#define MCRL2_CORE_DETAIL_PRINT_UTILITY_H
30template <
typename Container>
31std::string
print_container(
const Container& v,
const std::string& begin_marker =
"(",
const std::string& end_marker =
")",
const std::string& message =
"",
bool print_index =
false,
bool boundary_spaces =
true)
33 std::ostringstream out;
36 out <<
"--- " << message <<
"---" << std::endl;
44 for (
auto i = v.begin(); i != v.end(); ++i)
48 out << index++ <<
" ";
73template <
typename Container>
74std::string
print_list(
const Container& v,
const std::string& message =
"",
bool print_index =
false,
bool boundary_spaces =
true)
76 return print_container(v,
"[",
"]", message, print_index, boundary_spaces);
83template <
typename Container>
84std::string
print_set(
const Container& v,
const std::string& message =
"",
bool print_index =
false,
bool boundary_spaces =
true)
86 return print_container(v,
"{",
"}", message, print_index, boundary_spaces);
93template <
typename MapContainer>
94std::string
print_map(
const MapContainer& v,
const std::string& message =
"")
96 std::ostringstream out;
99 out <<
"--- " << message <<
"---" << std::endl;
102 for (
auto i = v.begin(); i != v.end(); ++i)
108 out << i->first <<
" -> " << i->second;
116template <
typename Container>
Functions for pretty printing ATerms.
std::string print_map(const MapContainer &v, const std::string &message="")
Creates a string representation of a map.
std::string print_container(const Container &v, const std::string &begin_marker="(", const std::string &end_marker=")", const std::string &message="", bool print_index=false, bool boundary_spaces=true)
Creates a string representation of a container using the pp pretty print function.
std::string print_list(const Container &v, const std::string &message="", bool print_index=false, bool boundary_spaces=true)
Creates a string representation of a container.
std::string print_set(const Container &v, const std::string &message="", bool print_index=false, bool boundary_spaces=true)
Creates a string representation of a container.
std::string print_arguments(const Container &v)
Prints a comma separated list of the elements of v. If v is empty, the empty string is returned.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...