gem5  v20.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OutputStream Class Reference

#include <output.hh>

Inheritance diagram for OutputStream:
OutputFile< StreamType >

Public Member Functions

virtual ~OutputStream ()
 
std::ostream * stream () const
 Get the output underlying output stream. More...
 
virtual bool recreateable () const
 Can the file be recreated if the output directory is moved? More...
 
const std::string & name () const
 Get the file name in the output directory. More...
 

Protected Member Functions

 OutputStream (const std::string &name, std::ostream *stream)
 Wrap an existing stream. More...
 
 OutputStream (const OutputStream &f)
 
virtual void relocate (const OutputDirectory &dir)
 Re-create the in a new location if recreateable. More...
 

Protected Attributes

const std::string _name
 Name in output directory. More...
 
std::ostream *const _stream
 Underlying output stream. More...
 

Friends

class OutputDirectory
 

Detailed Description

Definition at line 53 of file output.hh.

Constructor & Destructor Documentation

◆ ~OutputStream()

OutputStream::~OutputStream ( )
virtual

Definition at line 69 of file output.cc.

◆ OutputStream() [1/2]

OutputStream::OutputStream ( const std::string &  name,
std::ostream *  stream 
)
protected

Wrap an existing stream.

Definition at line 64 of file output.cc.

◆ OutputStream() [2/2]

OutputStream::OutputStream ( const OutputStream f)
protected

Member Function Documentation

◆ name()

const std::string& OutputStream::name ( ) const
inline

Get the file name in the output directory.

Definition at line 70 of file output.hh.

References _name.

Referenced by OutputDirectory::close(), and sc_gem5::TraceFile::set_time_unit().

◆ recreateable()

virtual bool OutputStream::recreateable ( ) const
inlinevirtual

Can the file be recreated if the output directory is moved?

Returns
true if the file will be created in the new location, false otherwise.

Reimplemented in OutputFile< StreamType >.

Definition at line 67 of file output.hh.

◆ relocate()

void OutputStream::relocate ( const OutputDirectory dir)
protectedvirtual

Re-create the in a new location if recreateable.

Reimplemented in OutputFile< StreamType >.

Definition at line 74 of file output.cc.

◆ stream()

std::ostream* OutputStream::stream ( ) const
inline

Friends And Related Function Documentation

◆ OutputDirectory

friend class OutputDirectory
friend

Definition at line 73 of file output.hh.

Member Data Documentation

◆ _name

const std::string OutputStream::_name
protected

Name in output directory.

Definition at line 86 of file output.hh.

Referenced by name(), and OutputFile< StreamType >::OutputFile().

◆ _stream

std::ostream* const OutputStream::_stream
protected

Underlying output stream.

Definition at line 89 of file output.hh.

Referenced by stream().


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

Generated on Wed Sep 30 2020 14:02:28 for gem5 by doxygen 1.8.17