本文整理汇总了C++中CComObject::GetAttlistByName方法的典型用法代码示例。如果您正苦于以下问题:C++ CComObject::GetAttlistByName方法的具体用法?C++ CComObject::GetAttlistByName怎么用?C++ CComObject::GetAttlistByName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComObject
的用法示例。
在下文中一共展示了CComObject::GetAttlistByName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parse
STDMETHODIMP ASDTDModel::parse(bool *pSuccess)
{
if (pSuccess == NULL) return E_POINTER;
if (m_textDoc == NULL)
{
TRACE("\nASDTDModel::parse - m_textDoc == NULL\n\n");
return E_FAIL;
}
*pSuccess = VARIANT_FALSE;
{
for (int i = 0; i < m_elementDeclarations->m_items.GetSize(); i++)
{
m_elementDeclarations->m_items[i]->Release();
}
m_elementDeclarations->m_items.RemoveAll();
}
ASSERT(0);
#if 0
CComObject<CDTDParser>* parser;
CComObject<CDTDParser>::CreateInstance(&parser);
if (parser)
{
parser->AddRef();
//parser->m_url = url;
m_textDoc->get_data(&parser->m_textData);
parser->m_errorHandler = m_errorHandler;
try
{
parser->Parse();
*pSuccess = VARIANT_TRUE;
}
catch(WCHAR* msg)
{
WCHAR emsg[1024];
swprintf(emsg, L"%s\noffset: %d\nline: %d", msg, parser->m_fpos, parser->m_line+1);
TRACE(L"DTD Error parsing: %s\n", emsg);
::MessageBox(NULL, _bstr_t(emsg), "DTD", MB_OK);
}
#if 0
int i;
for (i = 0; i < parser->m_elementList.GetSize(); i++)
{
CElement* pElement = parser->m_elementList[i];
CComObject<CDTDElement>* pDTDElement;
CComObject<CDTDElement>::CreateInstance(&pDTDElement);
pDTDElement->AddRef();
pDTDElement->m_name = pElement->m_name;
pDTDElement->m_ns = pElement->m_ns;
pDTDElement->m_contentType = pElement->m_contentType;
pDTDElement->m_isPCDataOnly = pElement->m_isPCDataOnly;
m_elementDeclarations->m_items.Add(pDTDElement);
CAttlist* pAttlist = parser->GetAttlistByName(pElement->m_ns, pElement->m_name);
if (pAttlist)
{
for (int i = 0; i < pAttlist->m_attributes.GetSize(); i++)
{
CAttribute* pAtt = pAttlist->m_attributes[i];
CComObject<CDTDAttribute>* pDTDAttribute;
CComObject<CDTDAttribute>::CreateInstance(&pDTDAttribute);
pDTDAttribute->AddRef();
pDTDAttribute->m_name = pAtt->m_name;
for (int en = 0; en < pAtt->m_enums.GetSize(); en++)
{
pDTDAttribute->m_enums.Add(pAtt->m_enums[en]);
}
pDTDElement->m_attributeDecls->m_items.Add(pDTDAttribute);
}
}
}
for (i = 0; i < parser->m_elementList.GetSize(); i++)
{
CElement* pElement = parser->m_elementList[i];
CComObject<CDTDElement>* pDTDElement = (CComObject<CDTDElement>*)m_elementDeclarations->m_items[i];
if (pElement->m_pCPChoiceSeq)
{
pDTDElement->m_asCM = BuildCM(pElement->m_pCPChoiceSeq);
ASSERT(pDTDElement->m_asCM != NULL);
}
}
#endif
//.........这里部分代码省略.........