fsc_MedVolWriter Class Reference
[File System Catalog]

#include <fsc_MedVolume.h>

Inheritance diagram for fsc_MedVolWriter:

Inheritance graph
[legend]
Collaboration diagram for fsc_MedVolWriter:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 72 of file fsc_MedVolume.h.


Public Member Functions

 fsc_MedVolWriter (const cmn_Path &a_fscDirectory, ivd_MediaKey_t a_mediaKey, ivd_MedVolNum_t a_medVolNum, UInt32_t a_blockOfs)
 ~fsc_MedVolWriter ()
void Write (fsc_medVolData_t *a_medVolData_p)

Static Public Member Functions

static UInt64_t KeyGen (ivd_MediaKey_t a_mediaKey, ivd_MedVolNum_t a_medVolNum, UInt32_t a_blockOfs)

Public Attributes

 log_CLASSID_m

Protected Member Functions

void Flush ()

Constructor & Destructor Documentation

fsc_MedVolWriter::fsc_MedVolWriter ( const cmn_Path a_fscDirectory,
ivd_MediaKey_t  a_mediaKey,
ivd_MedVolNum_t  a_medVolNum,
UInt32_t  a_blockOfs 
)

Definition at line 166 of file fsc_MedVolume.cpp.

References cmn_CreatePath(), fsc_MedVolume::GetMedVolFileName(), log_FUNC_m, fsc_MedVolume::m_mediaKey, fsc_MedVolume::m_medVolNum, path, cmn_File::SetFullPath(), and cmn_Path::UpPath().

00171     :
00172     stx_CacheEl(KeyGen(a_mediaKey, a_medVolNum, a_blockOfs)),
00173     fsc_MedVolume(a_fscDirectory, a_mediaKey, a_medVolNum, a_blockOfs)
00174 {
00175     log_FUNC_m(fsc_MedVolWriter);
00176     cmn_Path path = GetMedVolFileName(a_fscDirectory, m_mediaKey, m_medVolNum, a_blockOfs);
00177     SetFullPath(path);
00178     cmn_CreatePath(path.UpPath());
00179 }
//============================================================================//

Here is the call graph for this function:

fsc_MedVolWriter::~fsc_MedVolWriter (  ) 

Definition at line 183 of file fsc_MedVolume.cpp.

References Flush(), and log_FUNC_m.

00183                                     {
00184     log_FUNC_m(~fsc_MedVolWriter);
00185     Flush();
00186 }

Here is the call graph for this function:


Member Function Documentation

UInt64_t fsc_MedVolWriter::KeyGen ( ivd_MediaKey_t  a_mediaKey,
ivd_MedVolNum_t  a_medVolNum,
UInt32_t  a_blockOfs 
) [static]

Definition at line 190 of file fsc_MedVolume.cpp.

References fsc_MedVolume::m_ofsBitMask.

Referenced by fsc_SplitInfoCollector::ProcObjMedPosMgr(), and fsc_RawMedVolCollector::ProcRecMedPosMgr().

00192                                                                  {
00193     //log_FUNC_m(KeyGen);
00194     //log_DBG_m(dbg_DETAIL, "BlockOfs "   << a_blockOfs
00195     //                   << " mediaKey "  << a_mediaKey
00196     //                   << " medVolNum " << a_medVolNum);
00197     UInt64_t key = (UInt64_t(a_blockOfs & m_ofsBitMask) << 32) + (a_mediaKey << 8) + a_medVolNum;
00198 //    log_DBG_m(dbg_DETAIL, "MedVolWriter Key = " << key << ", 0x" << hex << key);
00199     return key;
00200 }

Here is the caller graph for this function:

void fsc_MedVolWriter::Write ( fsc_medVolData_t a_medVolData_p  ) 

Definition at line 204 of file fsc_MedVolume.cpp.

References Flush(), fsc_MedVolume::m_buffEnd, and fsc_MedVolume::m_buffPos.

Referenced by fsc_SplitInfoCollector::ProcObjMedPosMgr(), and fsc_RawMedVolCollector::ProcRecMedPosMgr().

00204                                                              {
00205     //log_FUNC_m(Write);
00206     //log_DBG_m(dbg_DETAIL, GetFullPathRef() << " bufCap = " << m_buffCapacity
00207     //                      <<  " buff_p =" << hex << m_buffPos
00208     //                      <<  " buffEnd_p =" << hex << m_buffEnd << dec);
00209 
00210     *m_buffPos++ = *a_medVolData_p;
00211     if (m_buffPos >= m_buffEnd) {
00212         Flush();
00213     }
00214 }

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_MedVolWriter::Flush (  )  [protected]

Definition at line 218 of file fsc_MedVolume.cpp.

References cmn_File::CloseF(), dbg_DETAIL, fom_OPEN_ALWAYS, fom_WRITE, cmn_File::GetFullPathRef(), log_DBG_m, log_FUNC_m, fsc_MedVolume::m_buffPos, fsc_MedVolume::m_medVolDataBuf, cmn_File::OpenF(), cmn_File::SeekEndF(), size, and cmn_File::WriteF().

Referenced by Write(), and ~fsc_MedVolWriter().

00218                              {
00219     log_FUNC_m(Flush);
00220 
00221     OpenF(fom_WRITE | fom_OPEN_ALWAYS); // binary | create | rdwr
00222     ivd_FilePosition_t pos = SeekEndF();
00223     UInt32_t size = (char*)m_buffPos - (char*)m_medVolDataBuf;
00224     log_DBG_m(dbg_DETAIL, GetFullPathRef() << " File pos " << pos
00225                           <<  " buff size " << size);
00226     WriteF(m_medVolDataBuf, size);
00227     CloseF();
00228     m_buffPos  = m_medVolDataBuf;
00229 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from stx_CacheEl.

Definition at line 89 of file fsc_MedVolume.h.


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

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