From: <ad...@us...> - 2003-02-18 08:01:00
|
Update of /cvsroot/bdadev/TuneReqStore In directory sc8-pr-cvs1:/tmp/cvs-serv22360 Modified Files: TuneReqStore.h TuneRequestStore.cpp TuneRequestStore.h Log Message: Bug fixes for saving TuneRequests Index: TuneReqStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneReqStore.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneReqStore.h 17 Feb 2003 17:08:07 -0000 1.2 --- TuneReqStore.h 18 Feb 2003 08:00:50 -0000 1.3 *************** *** 3,9 **** /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Feb 17 17:02:57 2003 */ ! /* Compiler settings for C:\Source\Bdadev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data --- 3,9 ---- /* File created by MIDL compiler version 5.01.0164 */ ! /* at Mon Feb 17 18:36:18 2003 */ ! /* Compiler settings for C:\Source\BDADev\TuneReqStore\TuneReqStore.idl: Oicf (OptLev=i2), W1, Zp8, env=Win32, ms_ext, c_ext error checks: allocation ref bounds_check enum stub_data Index: TuneRequestStore.cpp =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TuneRequestStore.cpp 17 Feb 2003 17:08:07 -0000 1.2 --- TuneRequestStore.cpp 18 Feb 2003 08:00:51 -0000 1.3 *************** *** 103,107 **** { // This function is NOT reentrant ! if(m_doc == NULL) { return E_UNEXPECTED; --- 103,107 ---- { // This function is NOT reentrant ! if(m_doc != NULL) { return E_UNEXPECTED; *************** *** 143,147 **** { // This function is NOT reentrant ! if(m_doc == NULL) { return E_UNEXPECTED; --- 143,147 ---- { // This function is NOT reentrant ! if(m_doc != NULL) { return E_UNEXPECTED; *************** *** 152,155 **** --- 152,157 ---- HRESULT hr; + CHECK(m_doc->createElement(CComBSTR("ChannelList"), &m_TopNode)); + for(int i(0); i < m_TuneRequests.size(); ++i) { *************** *** 164,167 **** --- 166,171 ---- } + m_doc->appendChild(m_TopNode,0); + hr = m_doc->save(CComVariant(FileName)); *************** *** 553,559 **** CHECK(PersistObject(spPersistObj)); ! CHECK(m_doc->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); return S_OK; --- 557,565 ---- CHECK(PersistObject(spPersistObj)); ! CHECK(m_TopNode->appendChild(m_stackElems.top(), 0)); m_stackElems.pop(); + + ATLASSERT(m_stackElems.size() == 0); return S_OK; Index: TuneRequestStore.h =================================================================== RCS file: /cvsroot/bdadev/TuneReqStore/TuneRequestStore.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** TuneRequestStore.h 17 Feb 2003 16:57:42 -0000 1.1.1.1 --- TuneRequestStore.h 18 Feb 2003 08:00:52 -0000 1.2 *************** *** 59,62 **** --- 59,63 ---- typedef CComEnumOnSTL<IEnumTuneRequests, &IID_IEnumTuneRequests, ITuneRequest*, _Copy<ITuneRequest*>, std::vector<ITuneRequest*> > ComSTLEnum; CComPtr<xml::IXMLDOMDocument> m_doc; + CComPtr<xml::IXMLDOMElement> m_TopNode; std::vector<ITuneRequest*> m_TuneRequests; |