gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
virtual bool recreateable () const
 Can the file be recreated if the output directory is moved?
 
const std::string & name () const
 Get the file name in the output directory.
 

Protected Member Functions

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

Protected Attributes

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

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()

Friends And Related Symbol 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 Jun 18 2024 16:24:13 for gem5 by doxygen 1.11.0