gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
gem5::OutputStream Class Reference

#include <output.hh>

Inheritance diagram for gem5::OutputStream:
gem5::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 56 of file output.hh.

Constructor & Destructor Documentation

◆ ~OutputStream()

gem5::OutputStream::~OutputStream ( )
virtual

Definition at line 70 of file output.cc.

◆ OutputStream() [1/2]

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

Wrap an existing stream.

Definition at line 65 of file output.cc.

◆ OutputStream() [2/2]

gem5::OutputStream::OutputStream ( const OutputStream f)
protected

Member Function Documentation

◆ name()

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

Get the file name in the output directory.

Definition at line 73 of file output.hh.

References _name.

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

◆ recreateable()

virtual bool gem5::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 gem5::OutputFile< StreamType >.

Definition at line 70 of file output.hh.

◆ relocate()

void gem5::OutputStream::relocate ( const OutputDirectory dir)
protectedvirtual

Re-create the in a new location if recreateable.

Reimplemented in gem5::OutputFile< StreamType >.

Definition at line 75 of file output.cc.

◆ stream()

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

Friends And Related Function Documentation

◆ OutputDirectory

friend class OutputDirectory
friend

Definition at line 76 of file output.hh.

Member Data Documentation

◆ _name

const std::string gem5::OutputStream::_name
protected

Name in output directory.

Definition at line 89 of file output.hh.

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

◆ _stream

std::ostream* const gem5::OutputStream::_stream
protected

Underlying output stream.

Definition at line 92 of file output.hh.

Referenced by stream().


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

Generated on Tue Sep 21 2021 12:27:52 for gem5 by doxygen 1.8.17