fpmas 1.6
Public Member Functions | List of all members
fpmas::io::FormattedOutput< T > Class Template Reference

#include <formatted_output.h>

Inheritance diagram for fpmas::io::FormattedOutput< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::io::FormattedOutput< T >:
Collaboration graph
[legend]

Public Member Functions

 FormattedOutput (api::io::OutputStream &output_stream, Watcher< T > watcher, bool insert_new_line=false)
 
void dump () override
 
- Public Member Functions inherited from fpmas::io::OutputBase
 OutputBase (api::io::OutputStream &output_stream)
 
const api::scheduler::Jobjob () override
 
virtual void dump ()=0
 
virtual const scheduler::Jobjob ()=0
 

Additional Inherited Members

- Protected Attributes inherited from fpmas::io::OutputBase
api::io::OutputStreamoutput_stream
 

Detailed Description

template<typename T>
class fpmas::io::FormattedOutput< T >

A FormattedOutputFunction based output.

Data is serialized and sent directly through the

std::ostream& operator<<(std::ostream&, const T&)
std::ostream & operator<<(std::ostream &os, const LocationState &loc)
Definition: location_state.h:38

specialization.

Constructor & Destructor Documentation

◆ FormattedOutput()

template<typename T >
fpmas::io::FormattedOutput< T >::FormattedOutput ( api::io::OutputStream output_stream,
Watcher< T >  watcher,
bool  insert_new_line = false 
)
inline

FormattedOutput constructor.

Parameters
output_streamOutputStream to which data will be dumped.
watcherWatcher instance used to gather data to dump().
insert_new_lineIf true, an std::endl is inserted at the end of each dump()

Member Function Documentation

◆ dump()

template<typename T >
void fpmas::io::FormattedOutput< T >::dump ( )
inlineoverridevirtual

Calls the watcher and send the result to the output_stream using the << operator on output_stream.get().

If insert_new_line is true, and std::endl is also inserted.

Implements fpmas::api::io::Output.


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