mCRL2
Loading...
Searching...
No Matches
atermpp::text_aterm_ostream Class Referencefinal

Writes terms in textual format to an output stream. More...

#include <aterm_io_text.h>

Inheritance diagram for atermpp::text_aterm_ostream:
atermpp::aterm_ostream atermpp::aterm_stream

Public Member Functions

 text_aterm_ostream (std::ostream &os, bool newline=false)
 
void put (const aterm &term) override
 Write the given term to the stream.
 
- Public Member Functions inherited from atermpp::aterm_ostream
virtual ~aterm_ostream ()
 
virtual void put (const aterm &term)=0
 Write the given term to the stream.
 
- Public Member Functions inherited from atermpp::aterm_stream
virtual ~aterm_stream ()
 
void set_transformer (aterm_transformer transformer)
 Sets the given transformer to be applied to following writes.
 
aterm_transformerget_transformer () const
 

Private Member Functions

void write_term_line (const aterm &term)
 Writes a term in textual format on the same line.
 

Private Attributes

std::ostream & m_stream
 
bool m_newline = false
 Indicates that terms are separated by a newline.
 

Additional Inherited Members

- Protected Attributes inherited from atermpp::aterm_stream
aterm_transformerm_transformer = identity
 

Detailed Description

Writes terms in textual format to an output stream.

Definition at line 19 of file aterm_io_text.h.

Constructor & Destructor Documentation

◆ text_aterm_ostream()

atermpp::text_aterm_ostream::text_aterm_ostream ( std::ostream &  os,
bool  newline = false 
)
Parameters
osThe output stream.
newlineWhen true each term is written on a new line.

Definition at line 74 of file aterm_io_text.cpp.

Member Function Documentation

◆ put()

void atermpp::text_aterm_ostream::put ( const aterm term)
overridevirtual

Write the given term to the stream.

Implements atermpp::aterm_ostream.

Definition at line 79 of file aterm_io_text.cpp.

◆ write_term_line()

void atermpp::text_aterm_ostream::write_term_line ( const aterm term)
private

Writes a term in textual format on the same line.

Definition at line 118 of file aterm_io_text.cpp.

Member Data Documentation

◆ m_newline

bool atermpp::text_aterm_ostream::m_newline = false
private

Indicates that terms are separated by a newline.

Definition at line 34 of file aterm_io_text.h.

◆ m_stream

std::ostream& atermpp::text_aterm_ostream::m_stream
private

Definition at line 32 of file aterm_io_text.h.


The documentation for this class was generated from the following files: