winIDEA SDK
isys::CFileStream Class Reference

Description

This class should be used by client applications to create native file stream for emitter output.

Python example with coverage.

#include <IEmitter.h>

Inheritance diagram for isys::CFileStream:
isys::ICStream

Public Member Functions

 CFileStream (const std::string &fileName, bool isAppend=false)
 Output will be written to file. More...
 
void write (const std::string &str)
 Writes string to output. More...
 
void close ()
 Closes the underlying stream. More...
 

Constructor & Destructor Documentation

◆ CFileStream()

isys::CFileStream::CFileStream ( const std::string &  fileName,
bool  isAppend = false 
)

Output will be written to file.

Parameters
fileNamename of the output file
isAppendif true, output is appended to the existing contents of file. If false, the file contents is erased.

Member Function Documentation

◆ close()

void isys::CFileStream::close ( )
virtual

Closes the underlying stream.

If this method is not called, not all data may be written to the output.

Implements isys::ICStream.

◆ write()

void isys::CFileStream::write ( const std::string &  str)
virtual

Writes string to output.

Use this method to add custom data to output file. However, take care to keep the file format valid, for example if it is XML file, to use tags consistently.

Implements isys::ICStream.