void CLanguageX::Copy( CM_LANGUAGE *pLang ) { DeleteMembers(); m_cmLang = *pLang; StringDupe( m_cmLang.pszKeywords, pLang->pszKeywords ); StringDupe( m_cmLang.pszOperators, pLang->pszOperators ); StringDupe( m_cmLang.pszSingleLineComments, pLang->pszSingleLineComments ); StringDupe( m_cmLang.pszMultiLineComments1, pLang->pszMultiLineComments1 ); StringDupe( m_cmLang.pszMultiLineComments2, pLang->pszMultiLineComments2 ); StringDupe( m_cmLang.pszScopeKeywords1, pLang->pszScopeKeywords1 ); StringDupe( m_cmLang.pszScopeKeywords2, pLang->pszScopeKeywords2 ); StringDupe( m_cmLang.pszStringDelims, pLang->pszStringDelims ); StringDupe( m_cmLang.pszTagElementNames, pLang->pszTagElementNames ); StringDupe( m_cmLang.pszTagAttributeNames, pLang->pszTagAttributeNames ); StringDupe( m_cmLang.pszTagEntities, pLang->pszTagEntities ); }
bool PersistentDistributionList::DeleteObject(std::shared_ptr<DistributionList> pDistList) { if (pDistList->GetID() == 0) { assert(0); return false; } DeleteMembers(pDistList); SQLCommand deleteCommand("delete from hm_distributionlists where distributionlistid = @LISTID"); deleteCommand.AddParameter("@LISTID", pDistList->GetID()); bool bResult = Application::Instance()->GetDBManager()->Execute(deleteCommand); Cache<DistributionList>::Instance()->RemoveObject(pDistList); return bResult; }
CLanguageX::~CLanguageX() { DeleteMembers(); }