Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | Friends

fsc_nsOwnerMgr Class Reference
[G_new_group]

Class fsc_nsOwnerMgr take care about owner of element. More...

#include <fsc_nsOwnerMgr.h>

Collaboration diagram for fsc_nsOwnerMgr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 fsc_nsOwnerMgr (ivd_RecordIDX_t a_ownerFileID)
 When someone needs owner then owner's fileID IS passed as parameter.
 ~fsc_nsOwnerMgr (void)
void SetMember (ivd_RecordIDX_t a_fileID)
void RemoveMember (ivd_RecordIDX_t a_fileID)
 remove entry
void ChgOwner (ivd_RecordIDX_t a_fileID, ivd_RecordIDX_t a_ownFileID)
void Write2DB (fio_Transaction &a_trans)
 owner has nothing to say to its member
int GetfullPath (string &a_path, char a_pathSeparator= '/')

Public Attributes

 log_CLASSID_m

Protected Attributes

fsc_nsDirectorym_currentOwner_p
 current ownerMgr of element

Private Attributes

fsc_nsElement_p_v m_oldOwnerMgrPtrVec
 In case that element is moved between directories Only InsertSplit method could add to vector of old owners.

Friends

class ut_fsc_nsOwnerMgr

Detailed Description

Class fsc_nsOwnerMgr take care about owner of element.

It handles the move to other directory operation, and proper instantiation. Owner instantiation depend on construct parameters. It is constructed from splitInfo record or from relative file index.

Definition at line 55 of file fsc_nsOwnerMgr.h.


Constructor & Destructor Documentation

fsc_nsOwnerMgr::fsc_nsOwnerMgr ( ivd_RecordIDX_t  a_ownerFileID  ) 

When someone needs owner then owner's fileID IS passed as parameter.

When owner was not yet used then new owner is creatted.

Definition at line 52 of file fsc_nsOwnerMgr.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_currentOwner_p.

  ://m_ownerIsChanged(false),    
    m_currentOwner_p(fsc_nsCreateDirectoryObj(a_ownerFileID)) {    
    
    log_FUNC_m(fsc_nsOwnerMgr(ivd_RecordIDX_t));
    log_DBG_m(dbg_DETAIL, " currentOwner_p " << m_currentOwner_p);
} 

fsc_nsOwnerMgr::~fsc_nsOwnerMgr ( void   ) 

Definition at line 61 of file fsc_nsOwnerMgr.cpp.

References dbg_DETAIL, fsc_nsRemoveElementObj(), log_DBG_m, log_FUNC_m, m_currentOwner_p, m_oldOwnerMgrPtrVec, and NULL.

Here is the call graph for this function:


Member Function Documentation

void fsc_nsOwnerMgr::ChgOwner ( ivd_RecordIDX_t  a_fileID,
ivd_RecordIDX_t  a_ownFileID 
)

Definition at line 89 of file fsc_nsOwnerMgr.cpp.

References fsc_nsDirectory::AddEntry(), dbg_DETAIL, fsc_nsCreateDirectoryObj(), log_DBG_m, log_FUNC_m, m_currentOwner_p, m_oldOwnerMgrPtrVec, and fsc_nsDirectory::RemoveEntry().

Referenced by fsc_nsElement::ChgOwner().

                                                          {    
    log_FUNC_m(ChgOwner);    

    log_DBG_m(dbg_DETAIL, " change owner currentOwner_p " << m_currentOwner_p);
    m_currentOwner_p->RemoveEntry(a_fileID);    
    // current ownerMgr is replaced by new one, so push it to old list    
    m_oldOwnerMgrPtrVec.push_back(m_currentOwner_p);    
    // crete new ownerMgr    
    m_currentOwner_p = fsc_nsCreateDirectoryObj(a_ownFileID);     
    m_currentOwner_p->AddEntry(a_fileID);
    //    m_ownerIsChanged = true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int fsc_nsOwnerMgr::GetfullPath ( string &  a_path,
char  a_pathSeparator = '/' 
) [inline]

Definition at line 77 of file fsc_nsOwnerMgr.h.

References fsc_nsElement::GetFullPath(), and m_currentOwner_p.

Referenced by fsc_nsElement::GetFullPath().

                                                                {
        return m_currentOwner_p->GetFullPath(a_path, a_pathSeparator);
    };

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_nsOwnerMgr::RemoveMember ( ivd_RecordIDX_t  a_fileID  ) 

remove entry

Definition at line 83 of file fsc_nsOwnerMgr.cpp.

References log_FUNC_m, m_currentOwner_p, and fsc_nsDirectory::RemoveEntry().

Referenced by fsc_nsElement::Remove().

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_nsOwnerMgr::SetMember ( ivd_RecordIDX_t  a_fileID  ) 

Definition at line 76 of file fsc_nsOwnerMgr.cpp.

References fsc_nsDirectory::AddEntry(), log_FUNC_m, and m_currentOwner_p.

Referenced by fsc_nsElement::SetMemOfOwner().

                                                       {    
    log_FUNC_m(SetMember);    
    m_currentOwner_p->AddEntry(a_fileID);
    //    m_ownerIsChanged = true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_nsOwnerMgr::Write2DB ( fio_Transaction a_trans  ) 

owner has nothing to say to its member


Friends And Related Function Documentation

friend class ut_fsc_nsOwnerMgr [friend]

Definition at line 56 of file fsc_nsOwnerMgr.h.


Member Data Documentation

Definition at line 79 of file fsc_nsOwnerMgr.h.

current ownerMgr of element

Definition at line 87 of file fsc_nsOwnerMgr.h.

Referenced by ChgOwner(), fsc_nsOwnerMgr(), GetfullPath(), RemoveMember(), SetMember(), and ~fsc_nsOwnerMgr().

In case that element is moved between directories Only InsertSplit method could add to vector of old owners.

Write2DB method call each oldOwner's Write2DB method and clean the vector.

Definition at line 95 of file fsc_nsOwnerMgr.h.

Referenced by ChgOwner(), and ~fsc_nsOwnerMgr().


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