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

#include <stx_stream.h>

Collaboration diagram for stx_Stream:

Collaboration graph
[legend]

List of all members.


Detailed Description

Base class to for IVD specific streams.

Author:
Matej Kenda

Definition at line 30 of file stx_stream.h.


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

Constructor & Destructor Documentation

stx_Stream::stx_Stream ( const char *  a_fileName  ) 

Definition at line 39 of file stx_stream.cpp.

00040     : m_fileName(a_fileName) {
00041     // Empty
00042 }

stx_Stream::stx_Stream ( const string  a_fileName  ) 

Definition at line 44 of file stx_stream.cpp.

00045     : m_fileName(a_fileName) {
00046     // Empty
00047 }


Member Function Documentation

void stx_Stream::Open (  ) 

Definition at line 57 of file stx_stream.cpp.

References ie_FILE_ERROR, ivd_Error, and m_fileName.

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

00057                       {
00058 
00059     int oldMask = umask(0x0);
00060     ofstream::open(m_fileName.c_str(), std::ios::app);
00061     umask(oldMask);
00062 
00063     if (!is_open()) {
00064         throw ivd_Error(
00065             ie_FILE_ERROR,
00066             "File is not open after calling open.");
00067     };
00068 }

Here is the caller graph for this function:

void stx_Stream::Close ( void   ) 

Definition at line 49 of file stx_stream.cpp.

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

00049                        {
00050     ofstream::flush();
00051     ofstream::close();
00052 }

Here is the caller graph for this function:

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

Definition at line 39 of file stx_stream.h.

00040         {m_fileName = a_fileName;};

string stx_Stream::GetFileName (  )  const [inline]

Definition at line 42 of file stx_stream.h.

00043         {return m_fileName;};


Member Data Documentation

Definition at line 43 of file stx_stream.h.

string stx_Stream::m_fileName [private]

Definition at line 48 of file stx_stream.h.

Referenced by Open().


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

Generated on Mon Feb 27 19:50:50 2012 for OPENARCHIVE by  doxygen 1.5.6