gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OutputFile< StreamType > Class Template Reference

#include <output.hh>

Inheritance diagram for OutputFile< StreamType >:
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? More...
 
- Public Member Functions inherited from OutputStream
virtual ~OutputStream ()
 
std::ostream * stream () const
 Get the output underlying output stream. More...
 
const std::string & name () const
 Get the file name in the output directory. More...
 

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. More...
 
- Protected Member Functions inherited from OutputStream
 OutputStream (const std::string &name, std::ostream *stream)
 Wrap an existing stream. More...
 
 OutputStream (const OutputStream &f)
 

Protected Attributes

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

Friends

class OutputDirectory
 

Detailed Description

template<class StreamType>
class OutputFile< StreamType >

Definition at line 98 of file output.hh.

Member Typedef Documentation

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

Definition at line 102 of file output.hh.

Constructor & Destructor Documentation

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

Definition at line 97 of file output.cc.

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

Member Function Documentation

template<class StreamType>
bool 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 OutputStream.

Definition at line 112 of file output.hh.

References OutputFile< StreamType >::_recreateable.

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

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

Reimplemented from OutputStream.

Definition at line 105 of file output.cc.

References OutputDirectory::resolve().

Friends And Related Function Documentation

template<class StreamType>
friend class OutputDirectory
friend

Definition at line 115 of file output.hh.

Member Data Documentation

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

Pointer to the file stream.

Definition at line 135 of file output.hh.

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

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

File mode when opened.

Definition at line 129 of file output.hh.

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

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

Can the file be recreated in a new location?

Definition at line 132 of file output.hh.

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


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

Generated on Fri Jun 9 2017 13:04:16 for gem5 by doxygen 1.8.6