mcrl2/atermpp/aterm_io.h

Include file:

#include "mcrl2/atermpp/aterm_io.h"

Typedefs

type atermpp::aterm_transformer

typedef for aterm_appl(const aterm_appl &)

A function that is applied to all terms. The resulting term should only use a subset of the original arguments (i.e. not introduce new terms).

Typical usage is removing the index traits from function symbols that represent operators.

Functions

aterm_appl atermpp::identity(const aterm_appl &x)

The default transformer that maps each term to itself.

aterm_ostream &atermpp::operator<<(aterm_ostream &stream, aterm_transformer transformer)

Sets the given transformer to be applied to following reads.

aterm_ostream &atermpp::operator<<(aterm_ostream &stream, const aterm &term)

Write the given term to the stream.

aterm_ostream &atermpp::operator<<(aterm_ostream &&stream, const T &t)
std::ostream &operator<<(std::ostream &out, const aterm &t)

Send the term in textual form to the ostream.

std::ostream &atermpp::operator<<(std::ostream &out, const function_symbol &f)

Sends the name of a function symbol to an ostream.

Parameters:

  • out The out stream.

  • f The function symbol to be output.

Returns: The stream.

aterm_istream &atermpp::operator>>(aterm_istream &stream, aterm_transformer transformer)

Sets the given transformer to be applied to following reads.

aterm_istream &atermpp::operator>>(aterm_istream &stream, aterm &term)

Reads a single term from this stream.

aterm_istream &atermpp::operator>>(aterm_istream &&stream, T &t)
std::string atermpp::pp(const aterm &t)

Parameters:

  • t The input aterm.

Returns: A string representation of the given term derived from an aterm.

const std::string &atermpp::pp(const function_symbol &f)

Prints the name of a function symbol as a string.

Parameters:

  • f The function symbol.

Returns: The string representation of r.

aterm_appl atermpp::read_appl_from_string(const std::string &s)

Reads an aterm_appl from a string. The string can be in either binary or text format.

If the input is not an aterm_appl, an aterm is returned of the wrong type.

Returns: The term corresponding to the string.

aterm_int atermpp::read_int_from_string(const std::string &s)

Reads an aterm_int from a string. The string can be in either binary or text format.

If the input is not an int, an aterm is returned of the wrong type.

Returns: The aterm_int corresponding to the string.

aterm_list atermpp::read_list_from_string(const std::string &s)

Reads an aterm_list from a string. The string can be in either binary or text format.

If the input is not a string, an aterm is returned of the wrong type.

Returns: The term corresponding to the string.

aterm read_term_from_binary_stream(std::istream &is)

Reads a term from a stream in binary aterm format.

aterm read_term_from_string(const std::string &s)

Reads an aterm from a string. The string can be in either binary or text format.

aterm read_term_from_text_stream(std::istream &is)

Reads a term from a stream which contains the term in textual format.

void write_term_to_binary_stream(const aterm &t, std::ostream &os)

Writes term t to a stream in binary aterm format.

void write_term_to_text_stream(const aterm &t, std::ostream &os)

Writes term t to a stream in textual format.