#include <fsc_nsDirectory.h>


Definition at line 33 of file fsc_nsDirectory.h.
Public Member Functions | |
| fsc_nsDirectory (ivd_RecordIDX_t a_fileID) | |
| used if you know dir entry type (file or directory) Usualy when add split info. | |
| fsc_nsDirectory (ivd_RecordIDX_t a_fileID, fsc_nsElement_t &a_elRec, nse_Opentype_e a_openType) | |
| used in FSC dump, when record is read first and then checked if file or directory is read. | |
| ~fsc_nsDirectory (void) | |
| virtual void | Write2DB (fio_Transaction &a_trans) |
| Write element changes to DB and. | |
| virtual bool | IsDirectory () |
| virtual void | RemoveNotification () |
| call just before removed from cache | |
| void | AddEntry (ivd_FileID_t a_fileID) |
| AddEntry is used by OwnerMgr to add directory members. | |
| void | RemoveEntry (ivd_FileID_t a_fileID) |
| REmoveEntry is used by OwnerMgr to remove directory members. | |
| virtual void | Dump (ostream &os) |
Public Attributes | |
| log_CLASSID_m | |
Private Attributes | |
| fsc_nsDirEntryMgr | m_dirEntryMgr |
Friends | |
| class | ut_fsc_nsDirectory |
| fsc_nsDirectory::fsc_nsDirectory | ( | ivd_RecordIDX_t | a_fileID | ) |
used if you know dir entry type (file or directory) Usualy when add split info.
Definition at line 36 of file fsc_nsDirectory.cpp.
References log_FUNC_m.
00037 : fsc_nsElement(a_fileID), 00038 stx_CacheElRef(a_fileID), 00039 m_dirEntryMgr(m_elementRec.numOfMember, m_elementRec.memberIdx) { 00040 00041 log_FUNC_m(fsc_nsDirectory); 00042 }
| fsc_nsDirectory::fsc_nsDirectory | ( | ivd_RecordIDX_t | a_fileID, | |
| fsc_nsElement_t & | a_elRec, | |||
| nse_Opentype_e | a_openType | |||
| ) |
used in FSC dump, when record is read first and then checked if file or directory is read.
Definition at line 46 of file fsc_nsDirectory.cpp.
References log_FUNC_m.
00049 : fsc_nsElement(a_fileID, a_elRec, a_openType), 00050 stx_CacheElRef(a_fileID), 00051 m_dirEntryMgr(m_elementRec.numOfMember, m_elementRec.memberIdx) { 00052 00053 log_FUNC_m(fsc_nsDirectory); 00054 }
| fsc_nsDirectory::~fsc_nsDirectory | ( | void | ) |
Definition at line 58 of file fsc_nsDirectory.cpp.
References dbg_DETAIL, stx_CacheEl::GetCacheKey(), log_DBG_m, and log_FUNC_m.
00058 { 00059 log_FUNC_m(~fsc_nsDirectory); 00060 log_DBG_m(dbg_DETAIL, " remove EL p= " << this 00061 << " key = " << GetCacheKey()); 00062 }

| void fsc_nsDirectory::Write2DB | ( | fio_Transaction & | a_trans | ) | [virtual] |
Write element changes to DB and.
Reimplemented from fsc_nsElement.
Definition at line 66 of file fsc_nsDirectory.cpp.
References dbg_DETAIL, fsc_nsElement::GetFileID(), log_DBG_m, log_FUNC_m, fio_Vector::m_changed, m_dirEntryMgr, fsc_nsElement::m_elementRec, fsc_nsElement_t::memberIdx, fsc_nsElement_t::memberType, fsc_nsElement_t::numOfMember, fsc_nsElement::Write2DB(), and fsc_nsDirEntryMgr::Write2DB().
Referenced by RemoveNotification().
00066 { 00067 log_FUNC_m(Write2DB); 00068 00069 log_DBG_m(dbg_DETAIL, "Write member of dir fileID = " << GetFileID()); 00070 UInt8_t flags = m_elementRec.memberType; 00071 if ( m_dirEntryMgr.Write2DB(flags, 00072 m_elementRec.numOfMember, 00073 m_elementRec.memberIdx, 00074 a_trans)) { 00075 m_changed = true; 00076 } 00077 m_elementRec.memberType = flags; 00078 fsc_nsElement::Write2DB(a_trans); 00079 }


| virtual bool fsc_nsDirectory::IsDirectory | ( | ) | [inline, virtual] |
| void fsc_nsDirectory::RemoveNotification | ( | ) | [virtual] |
call just before removed from cache
Reimplemented from stx_CacheEl.
Definition at line 83 of file fsc_nsDirectory.cpp.
References g_fsc_trans_p, log_FUNC_m, and Write2DB().
00083 { 00084 log_FUNC_m(RemoveNotification); 00085 Write2DB(*g_fsc_trans_p); 00086 }

| void fsc_nsDirectory::AddEntry | ( | ivd_FileID_t | a_fileID | ) |
AddEntry is used by OwnerMgr to add directory members.
Definition at line 90 of file fsc_nsDirectory.cpp.
References fsc_nsDirEntryMgr::AddEntry(), dbg_DETAIL, fsc_nsElement::GetFileID(), log_DBG_m, log_FUNC_m, and m_dirEntryMgr.
Referenced by fsc_nsOwnerMgr::ChgOwner(), and fsc_nsOwnerMgr::SetMember().
00090 { 00091 log_FUNC_m(AddEntry); 00092 log_DBG_m(dbg_DETAIL, "Add entry fileID = " << a_fileID 00093 << " to dir fileID = " << GetFileID()); 00094 m_dirEntryMgr.AddEntry(a_fileID); 00095 }


| void fsc_nsDirectory::RemoveEntry | ( | ivd_FileID_t | a_fileID | ) |
REmoveEntry is used by OwnerMgr to remove directory members.
Definition at line 99 of file fsc_nsDirectory.cpp.
References dbg_DETAIL, fsc_nsElement::GetFileID(), log_DBG_m, log_FUNC_m, m_dirEntryMgr, and fsc_nsDirEntryMgr::RemoveEntry().
Referenced by fsc_nsOwnerMgr::ChgOwner(), and fsc_nsOwnerMgr::RemoveMember().
00099 { 00100 log_FUNC_m(RemoveEntry); 00101 log_DBG_m(dbg_DETAIL, "Remove entry fileID = " << a_fileID 00102 << " from dir fileID = " << GetFileID()); 00103 m_dirEntryMgr.RemoveEntry(a_fileID); 00104 }


| void fsc_nsDirectory::Dump | ( | ostream & | os | ) | [virtual] |
Reimplemented from fsc_nsElement.
Definition at line 108 of file fsc_nsDirectory.cpp.
References fsc_nsDirEntryMgr::Dump(), fsc_nsElement::Dump(), and m_dirEntryMgr.
00108 { 00109 fsc_nsElement::Dump(os); 00110 os << " Members : " << endl; 00111 m_dirEntryMgr.Dump(os); 00112 }

friend class ut_fsc_nsDirectory [friend] |
Definition at line 34 of file fsc_nsDirectory.h.
Definition at line 72 of file fsc_nsDirectory.h.
Referenced by AddEntry(), Dump(), RemoveEntry(), and Write2DB().
1.5.6