#include "csdcm.h" CSDCM::CSDCM() { m_pListTag = new map; m_pListChild = new map; m_DcmTagKey = DcmTagKey(0000, 0000); } CSDCM::CSDCM(DcmTagKey nKey) { m_pListTag = new map; m_pListChild = new map; m_DcmTagKey = nKey; } CSDCM::~CSDCM() { m_pListTag->clear(); delete m_pListTag; m_pListTag = NULL; if(m_pListChild!=NULL) { map::iterator it; for(it=m_pListChild->begin() ; it!=m_pListChild->end() ; ++it) { delete (it->second); } } } void CSDCM::InsertTagValue(DcmTagKey nKey, OFString& strData) { map::iterator it = m_pListTag->find(nKey); if(it->first!=nKey) { m_pListTag->insert({ nKey, strData }); } } map* CSDCM::GetSequenceList() { return m_pListChild; } CSDCM* CSDCM::InsertSequence(DcmTagKey nKey) { CSDCM* pChild = new CSDCM(nKey); m_pListChild->insert({nKey, pChild}); return pChild; }