Public Member Functions | Protected Member Functions | Private Attributes

RecAccess Class Reference

#include <RecAccess.h>

Inheritance diagram for RecAccess:
Inheritance graph
[legend]
Collaboration diagram for RecAccess:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Definition at line 33 of file RecAccess.h.


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 47 of file RecAccess.cpp.

    :   TreeWalk(a_path),
        m_read(a_read),
        m_write(a_write),
        m_open(a_open),
        m_rsize(a_rsize),
        m_wsize(a_wsize),
        m_charToWrite(a_charToWrite){

        //empty
}


Member Function Documentation

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

Definition at line 59 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().

                           {

    log_FUNC_m(ProcessEntry);
    log_DBG_m(dbg_DETAIL,"a_dir=" << a_dir << " a_name=" << a_name << " a_type " << a_type);
        
    try {
        cmn_FileTest f(a_dir + a_name);

        if(m_read && a_type != ift_DIR){
            f.ReadContents(m_rsize);
        }
        if(m_write && a_type != ift_DIR){
            f.WriteContents(m_wsize,m_charToWrite);
        }
        if(m_open) {
            f.OpenContents();
        }

        f.CloseF();
        
        if (a_type != ift_DIR) {
            AddFileSuccess();
        } 
        else {
            AddDirSuccess();
        }
            
    } catch (ivd_SysError &e) {
        log_DBG_m(dbg_DETAIL, "SysError: " << e);

        if(a_type != ift_DIR) {
            AddFileFailure();
        }
        else {
            AddDirFailure();
        }
    }
}

Here is the call graph for this function:


Member Data Documentation

Definition at line 42 of file RecAccess.h.

char RecAccess::m_charToWrite [private]

Definition at line 48 of file RecAccess.h.

Referenced by ProcessEntry().

bool RecAccess::m_open [private]

Definition at line 45 of file RecAccess.h.

Referenced by ProcessEntry().

bool RecAccess::m_read [private]

Definition at line 43 of file RecAccess.h.

Referenced by ProcessEntry().

Definition at line 46 of file RecAccess.h.

Referenced by ProcessEntry().

bool RecAccess::m_write [private]

Definition at line 44 of file RecAccess.h.

Referenced by ProcessEntry().

Definition at line 47 of file RecAccess.h.

Referenced by ProcessEntry().


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