gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::OutputFile< StreamType > Class Template Reference

#include <output.hh>

Inheritance diagram for gem5::OutputFile< StreamType >:
gem5::OutputStream

Public Types

typedef StreamType stream_type_t
 

Public Member Functions

virtual ~OutputFile ()
 
bool recreateable () const override
 Can the file be recreated if the output directory is moved?
 
- Public Member Functions inherited from gem5::OutputStream
virtual ~OutputStream ()
 
std::ostream * stream () const
 Get the output underlying output stream.
 
const std::string & name () const
 Get the file name in the output directory.
 

Protected Member Functions

 OutputFile (const OutputDirectory &dir, const std::string &name, std::ios_base::openmode mode, bool recreateable)
 
 OutputFile (const OutputFile< StreamType > &f)
 
void relocate (const OutputDirectory &dir) override
 Re-create the file in a new location if it is relocatable.
 
- Protected Member Functions inherited from gem5::OutputStream
 OutputStream (const std::string &name, std::ostream *stream)
 Wrap an existing stream.
 
 OutputStream (const OutputStream &f)
 

Protected Attributes

const std::ios_base::openmode _mode
 File mode when opened.
 
const bool _recreateable
 Can the file be recreated in a new location?
 
stream_type_t *const _fstream
 Pointer to the file stream.
 
- Protected Attributes inherited from gem5::OutputStream
const std::string _name
 Name in output directory.
 
std::ostream *const _stream
 Underlying output stream.
 

Friends

class OutputDirectory
 

Detailed Description

template<class StreamType>
class gem5::OutputFile< StreamType >

Definition at line 96 of file output.hh.

Member Typedef Documentation

◆ stream_type_t

template<class StreamType >
typedef StreamType gem5::OutputFile< StreamType >::stream_type_t

Definition at line 100 of file output.hh.

Constructor & Destructor Documentation

◆ ~OutputFile()

template<class StreamType >
gem5::OutputFile< StreamType >::~OutputFile ( )
virtual

Definition at line 96 of file output.cc.

◆ OutputFile() [1/2]

template<class StreamType >
gem5::OutputFile< StreamType >::OutputFile ( const OutputDirectory & dir,
const std::string & name,
std::ios_base::openmode mode,
bool recreateable )
protected

◆ OutputFile() [2/2]

template<class StreamType >
gem5::OutputFile< StreamType >::OutputFile ( const OutputFile< StreamType > & f)
protected

Member Function Documentation

◆ recreateable()

template<class StreamType >
bool gem5::OutputFile< StreamType >::recreateable ( ) const
inlineoverridevirtual

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 from gem5::OutputStream.

Definition at line 110 of file output.hh.

References gem5::OutputFile< StreamType >::_recreateable.

◆ relocate()

template<class StreamType >
void gem5::OutputFile< StreamType >::relocate ( const OutputDirectory & dir)
overrideprotectedvirtual

Re-create the file in a new location if it is relocatable.

Reimplemented from gem5::OutputStream.

Definition at line 104 of file output.cc.

References gem5::OutputDirectory::resolve().

Friends And Related Symbol Documentation

◆ OutputDirectory

template<class StreamType >
friend class OutputDirectory
friend

Definition at line 113 of file output.hh.

Member Data Documentation

◆ _fstream

template<class StreamType >
stream_type_t* const gem5::OutputFile< StreamType >::_fstream
protected

Pointer to the file stream.

Definition at line 133 of file output.hh.

Referenced by gem5::OutputFile< StreamType >::OutputFile().

◆ _mode

template<class StreamType >
const std::ios_base::openmode gem5::OutputFile< StreamType >::_mode
protected

File mode when opened.

Definition at line 127 of file output.hh.

Referenced by gem5::OutputFile< StreamType >::OutputFile().

◆ _recreateable

template<class StreamType >
const bool gem5::OutputFile< StreamType >::_recreateable
protected

Can the file be recreated in a new location?

Definition at line 130 of file output.hh.

Referenced by gem5::OutputFile< StreamType >::recreateable().


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