Public Member Functions | Public Attributes | Private Attributes

stx_Stream Class Reference
[Common, basic classes, functions and types]

Base class to for IVD specific streams. More...

#include <stx_stream.h>

Collaboration diagram for stx_Stream:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 stx_Stream (const char *a_fileName)
 stx_Stream (const string a_fileName)
void Open ()
void Close ()
void SetFileName (const string a_fileName)
string GetFileName () const

Public Attributes

cmn_Time m_time

Private Attributes

string m_fileName

Detailed Description

Base class to for IVD specific streams.

Author:
Matej Kenda

Definition at line 44 of file stx_stream.h.


Constructor & Destructor Documentation

stx_Stream::stx_Stream ( const char *  a_fileName  ) 

Definition at line 53 of file stx_stream.cpp.

    : m_fileName(a_fileName) {
    // Empty
}

stx_Stream::stx_Stream ( const string  a_fileName  ) 

Definition at line 58 of file stx_stream.cpp.

    : m_fileName(a_fileName) {
    // Empty
}


Member Function Documentation

void stx_Stream::Close ( void   ) 

Definition at line 63 of file stx_stream.cpp.

Referenced by WriteRefToFile(), and ut_Group::~ut_Group().

                       {
    ofstream::flush();
    ofstream::close();
}

Here is the caller graph for this function:

string stx_Stream::GetFileName (  )  const [inline]

Definition at line 56 of file stx_stream.h.

        {return m_fileName;};

void stx_Stream::Open (  ) 

Definition at line 71 of file stx_stream.cpp.

References ie_FILE_ERROR, ivd_Error, and m_fileName.

Referenced by ut_Group::Init(), and WriteRefToFile().

                      {

    int oldMask = umask(0x0);
    ofstream::open(m_fileName.c_str(), std::ios::app);
    umask(oldMask);

    if (!is_open()) {
        throw ivd_Error(
            ie_FILE_ERROR,
            "File is not open after calling open.");
    };
}

Here is the caller graph for this function:

void stx_Stream::SetFileName ( const string  a_fileName  )  [inline]

Definition at line 53 of file stx_stream.h.

        {m_fileName = a_fileName;};


Member Data Documentation

string stx_Stream::m_fileName [private]

Definition at line 62 of file stx_stream.h.

Referenced by Open().

Definition at line 57 of file stx_stream.h.


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