本文整理汇总了C++中SystemData::end方法的典型用法代码示例。如果您正苦于以下问题:C++ SystemData::end方法的具体用法?C++ SystemData::end怎么用?C++ SystemData::end使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SystemData
的用法示例。
在下文中一共展示了SystemData::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool
wxIDataObject::HasSystemData(wxDataFormat format) const
{
for ( SystemData::const_iterator it = m_systemData.begin();
it != m_systemData.end();
++it )
{
FORMATETC* formatEtc = (*it)->pformatetc;
if ( formatEtc->cfFormat == format )
return true;
}
return false;
}
示例2: wxCopyStgMedium
bool
wxIDataObject::GetSystemData(wxDataFormat format, STGMEDIUM *pmedium) const
{
for ( SystemData::const_iterator it = m_systemData.begin();
it != m_systemData.end();
++it )
{
FORMATETC* formatEtc = (*it)->pformatetc;
if ( formatEtc->cfFormat == format )
{
wxCopyStgMedium((*it)->pmedium, pmedium);
return true;
}
}
return false;
}
示例3: delete
// save system data
HRESULT
wxIDataObject::SaveSystemData(FORMATETC *pformatetc,
STGMEDIUM *pmedium,
BOOL fRelease)
{
if ( pformatetc == NULL || pmedium == NULL )
return E_INVALIDARG;
// remove entry if already available
for ( SystemData::iterator it = m_systemData.begin();
it != m_systemData.end();
++it )
{
if ( pformatetc->tymed & (*it)->pformatetc->tymed &&
pformatetc->dwAspect == (*it)->pformatetc->dwAspect &&
pformatetc->cfFormat == (*it)->pformatetc->cfFormat )
{
delete (*it);
m_systemData.erase(it);
break;
}
}
// create new format/medium
FORMATETC* pnewformatEtc = new FORMATETC;
STGMEDIUM* pnewmedium = new STGMEDIUM;
wxZeroMemory(*pnewformatEtc);
wxZeroMemory(*pnewmedium);
// copy format
*pnewformatEtc = *pformatetc;
// copy or take ownerschip of medium
if ( fRelease )
*pnewmedium = *pmedium;
else
wxCopyStgMedium(pmedium, pnewmedium);
// save entry
m_systemData.push_back(new SystemDataEntry(pnewformatEtc, pnewmedium));
return S_OK;
}