#include "StdAfx.h" #include "MBAppInfo.h" IMPLEMENT_DYNAMIC(CMBAppInfo, CMBBaseAppObj) CMBAppInfo::CMBAppInfo() { m_pCabinetMgr = new CMBCabinetMgr(); } CMBAppInfo::~CMBAppInfo() { if( m_pCabinetMgr ) { delete m_pCabinetMgr; m_pCabinetMgr = NULL; } } CMBBaseCatalogObj *CMBAppInfo::GetCatalogObj( CString strCabinetID,CString strCatalogID ) { if(strCabinetID.IsEmpty() ) return NULL; if( strCatalogID.IsEmpty() ) return NULL; CMBCabinetInfo *pCabinetInfo = m_pCabinetMgr->GetCabinetInfo( strCabinetID ); if( NULL == pCabinetInfo ) return NULL; return pCabinetInfo->GetCatalogMgr()->DeepFindCatalogObj( strCatalogID ); } CMBBaseCabinetObj *CMBAppInfo::GetCabinetObj( CString strCabinetID ) { CMBCabinetInfo *pCabinetInfo = m_pCabinetMgr->GetCabinetInfo( strCabinetID ); if( NULL == pCabinetInfo ) return NULL; return pCabinetInfo; } CMBCabinetMgr *CMBAppInfo::GetCabinetMgr() { return m_pCabinetMgr; }