fsc_nsOwnerMgr Class Reference
[G_new_group]

#include <fsc_nsOwnerMgr.h>

Collaboration diagram for fsc_nsOwnerMgr:

Collaboration graph
[legend]

List of all members.


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 41 of file fsc_nsOwnerMgr.h.


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

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 38 of file fsc_nsOwnerMgr.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_currentOwner_p.

00039   ://m_ownerIsChanged(false),    
00040     m_currentOwner_p(fsc_nsCreateDirectoryObj(a_ownerFileID)) {    
00041     
00042     log_FUNC_m(fsc_nsOwnerMgr(ivd_RecordIDX_t));
00043     log_DBG_m(dbg_DETAIL, " currentOwner_p " << m_currentOwner_p);
00044 } 

fsc_nsOwnerMgr::~fsc_nsOwnerMgr ( void   ) 

Definition at line 47 of file fsc_nsOwnerMgr.cpp.

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

00047                                     {    
00048     log_FUNC_m(~fsc_nsOwnerMgr);    
00049     
00050     if (m_currentOwner_p != NULL) {        
00051         log_DBG_m(dbg_DETAIL, " remove currentOwner_p " << m_currentOwner_p);
00052         fsc_nsRemoveElementObj(m_currentOwner_p);    
00053     }    
00054 
00055     fsc_nsElement_p_v_i iter = m_oldOwnerMgrPtrVec.begin();
00056     for (; iter != m_oldOwnerMgrPtrVec.end(); ++iter) {        
00057         fsc_nsRemoveElementObj(*iter);    
00058     }
00059 }

Here is the call graph for this function:


Member Function Documentation

void fsc_nsOwnerMgr::SetMember ( ivd_RecordIDX_t  a_fileID  ) 

Definition at line 62 of file fsc_nsOwnerMgr.cpp.

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

Referenced by fsc_nsElement::SetMemOfOwner().

00062                                                        {    
00063     log_FUNC_m(SetMember);    
00064     m_currentOwner_p->AddEntry(a_fileID);
00065     //    m_ownerIsChanged = true;
00066 }

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 69 of file fsc_nsOwnerMgr.cpp.

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

Referenced by fsc_nsElement::Remove().

00069                                                           {
00070     log_FUNC_m(RemoveMember);
00071     m_currentOwner_p->RemoveEntry(a_fileID);    
00072 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

00076                                                           {    
00077     log_FUNC_m(ChgOwner);    
00078 
00079     log_DBG_m(dbg_DETAIL, " change owner currentOwner_p " << m_currentOwner_p);
00080     m_currentOwner_p->RemoveEntry(a_fileID);    
00081     // current ownerMgr is replaced by new one, so push it to old list    
00082     m_oldOwnerMgrPtrVec.push_back(m_currentOwner_p);    
00083     // crete new ownerMgr    
00084     m_currentOwner_p = fsc_nsCreateDirectoryObj(a_ownFileID);     
00085     m_currentOwner_p->AddEntry(a_fileID);
00086     //    m_ownerIsChanged = true;
00087 }

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

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

Definition at line 63 of file fsc_nsOwnerMgr.h.

References fsc_nsElement::GetFullPath(), and m_currentOwner_p.

Referenced by fsc_nsElement::GetFullPath().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ut_fsc_nsOwnerMgr [friend]

Definition at line 42 of file fsc_nsOwnerMgr.h.


Member Data Documentation

Definition at line 65 of file fsc_nsOwnerMgr.h.

current ownerMgr of element

Definition at line 73 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 81 of file fsc_nsOwnerMgr.h.

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


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

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