RecAccess Class Reference

#include <RecAccess.h>

Inheritance diagram for RecAccess:

Inheritance graph
[legend]
Collaboration diagram for RecAccess:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 19 of file RecAccess.h.


Public Member Functions

 RecAccess (const cmn_Path &a_path, bool a_read, bool a_write, bool a_open, UInt32_t a_rsize, UInt32_t a_wsize, char a_charToWrite)

Protected Member Functions

virtual void ProcessEntry (const cmn_Path &a_dir, const string &a_name, ivd_FileType_e a_type)

Private Attributes

 log_CLASSID_m
bool m_read
bool m_write
bool m_open
UInt32_t m_rsize
UInt32_t m_wsize
char m_charToWrite

Constructor & Destructor Documentation

RecAccess::RecAccess ( const cmn_Path a_path,
bool  a_read,
bool  a_write,
bool  a_open,
UInt32_t  a_rsize,
UInt32_t  a_wsize,
char  a_charToWrite 
)

Definition at line 33 of file RecAccess.cpp.

00034     :   TreeWalk(a_path),
00035         m_read(a_read),
00036         m_write(a_write),
00037         m_open(a_open),
00038         m_rsize(a_rsize),
00039         m_wsize(a_wsize),
00040         m_charToWrite(a_charToWrite){
00041 
00042         //empty
00043 }


Member Function Documentation

void RecAccess::ProcessEntry ( const cmn_Path a_dir,
const string &  a_name,
ivd_FileType_e  a_type 
) [protected, virtual]

Reimplemented from TreeWalk.

Definition at line 45 of file RecAccess.cpp.

References FailureCount::AddDirFailure(), FailureCount::AddDirSuccess(), FailureCount::AddFileFailure(), FailureCount::AddFileSuccess(), cmn_File::CloseF(), dbg_DETAIL, ift_DIR, log_DBG_m, log_FUNC_m, m_charToWrite, m_open, m_read, m_rsize, m_write, m_wsize, cmn_FileTest::OpenContents(), cmn_FileTest::ReadContents(), and cmn_FileTest::WriteContents().

00048                            {
00049 
00050     log_FUNC_m(ProcessEntry);
00051     log_DBG_m(dbg_DETAIL,"a_dir=" << a_dir << " a_name=" << a_name << " a_type " << a_type);
00052         
00053     try {
00054         cmn_FileTest f(a_dir + a_name);
00055 
00056         if(m_read && a_type != ift_DIR){
00057             f.ReadContents(m_rsize);
00058         }
00059         if(m_write && a_type != ift_DIR){
00060             f.WriteContents(m_wsize,m_charToWrite);
00061         }
00062         if(m_open) {
00063             f.OpenContents();
00064         }
00065 
00066         f.CloseF();
00067         
00068         if (a_type != ift_DIR) {
00069             AddFileSuccess();
00070         } 
00071         else {
00072             AddDirSuccess();
00073         }
00074             
00075     } catch (ivd_SysError &e) {
00076         log_DBG_m(dbg_DETAIL, "SysError: " << e);
00077 
00078         if(a_type != ift_DIR) {
00079             AddFileFailure();
00080         }
00081         else {
00082             AddDirFailure();
00083         }
00084     }
00085 }

Here is the call graph for this function:


Member Data Documentation

Reimplemented from TreeWalk.

Definition at line 28 of file RecAccess.h.

bool RecAccess::m_read [private]

Definition at line 29 of file RecAccess.h.

Referenced by ProcessEntry().

bool RecAccess::m_write [private]

Definition at line 30 of file RecAccess.h.

Referenced by ProcessEntry().

bool RecAccess::m_open [private]

Definition at line 31 of file RecAccess.h.

Referenced by ProcessEntry().

Definition at line 32 of file RecAccess.h.

Referenced by ProcessEntry().

Definition at line 33 of file RecAccess.h.

Referenced by ProcessEntry().

char RecAccess::m_charToWrite [private]

Definition at line 34 of file RecAccess.h.

Referenced by ProcessEntry().


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

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