mCRL2
Loading...
Searching...
No Matches
aterm_io.h File Reference

Go to the source code of this file.

Classes

class  atermpp::aterm_stream
 The general aterm stream interface, which enables the use of a transformer to change the written/read terms. More...
 
class  atermpp::aterm_ostream
 The interface for a class that writes aterm to a stream. Every written term is retrieved by the corresponding aterm_istream::get() call. More...
 
class  atermpp::aterm_istream
 The interface for a class that reads aterm from a stream. The default constructed term aterm() indicates the end of the stream. More...
 
class  atermpp::aterm_stream_state
 A helper class to restore the state of the aterm_{i,o}stream objects upon destruction. Currently, onlt preserves the transformer object. More...
 

Namespaces

namespace  atermpp
 The main namespace for the aterm++ library.
 

Typedefs

using atermpp::aterm_transformer = aterm(const aterm &)
 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).
 

Functions

aterm atermpp::identity (const aterm &x)
 The default transformer that maps each term to itself.
 
aterm_istreamatermpp::operator>> (aterm_istream &stream, aterm_transformer transformer)
 Sets the given transformer to be applied to following reads.
 
aterm_ostreamatermpp::operator<< (aterm_ostream &stream, aterm_transformer transformer)
 
aterm_ostreamatermpp::operator<< (aterm_ostream &stream, const aterm &term)
 Write the given term to the stream.
 
aterm_istreamatermpp::operator>> (aterm_istream &stream, aterm &term)
 Read the given term from the stream, but for aterm_list we want to use a specific one that performs validation (defined below).
 
template<typename T , typename std::enable_if_t< mcrl2::utilities::is_iterable_v< T >, int > = 0, typename std::enable_if_t<!std::is_base_of< aterm, T >::value, int > = 0>
aterm_ostreamatermpp::operator<< (aterm_ostream &stream, const T &container)
 Write any container (that is not an aterm itself) to the stream.
 
template<typename T , typename std::enable_if_t< mcrl2::utilities::is_iterable_v< T >, int > = 0, typename std::enable_if_t<!std::is_base_of< aterm, T >::value, int > = 0>
aterm_istreamatermpp::operator>> (aterm_istream &stream, T &container)
 Read any container (that is not an aterm itself) from the stream.
 
template<typename T >
aterm_ostreamatermpp::operator<< (aterm_ostream &&stream, const T &t)
 
template<typename T >
aterm_istreamatermpp::operator>> (aterm_istream &&stream, T &t)
 
std::ostream & atermpp::operator<< (std::ostream &out, const function_symbol &f)
 Sends the name of a function symbol to an ostream.
 
const std::string & atermpp::pp (const function_symbol &f)
 Prints the name of a function symbol as a string.
 
void atermpp::write_term_to_binary_stream (const aterm &t, std::ostream &os)
 Writes term t to a stream in binary aterm format.
 
void atermpp::read_term_from_binary_stream (std::istream &is, aterm &t)
 Reads a term from a stream in binary aterm format.
 
void atermpp::write_term_to_text_stream (const aterm &t, std::ostream &os)
 Writes term t to a stream in textual format.
 
void atermpp::read_term_from_text_stream (std::istream &is, aterm &t)
 Reads a term from a stream which contains the term in textual format.
 
aterm atermpp::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_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.
 
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.
 
aterm atermpp::read_appl_from_string (const std::string &s)
 Reads an aterm from a string. The string can be in either binary or text format.