本文整理汇总了C++中CBaseEntityTA::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseEntityTA::GetData方法的具体用法?C++ CBaseEntityTA::GetData怎么用?C++ CBaseEntityTA::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseEntityTA
的用法示例。
在下文中一共展示了CBaseEntityTA::GetData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetData
/******************************************************************************
Function Name : GetData
Input(s) : MSXML2::IXMLDOMNodePtr& pIDomNode
Output : HRESULT
Functionality : Fills the datastructure from the XML node
Member of : CTestCaseEntity
Friend of : -
Author(s) : Venkatanarayana Makam
Date Created : 06/04/2011
Modifications :
******************************************************************************/
HRESULT CTestCaseEntity::GetData(MSXML2::IXMLDOMNodePtr& pIDomNode)
{
//Getting Attributes
_bstr_t bstrNodeName;
CComVariant NodeValue;
MSXML2::IXMLDOMNamedNodeMapPtr pDOMTCAtrributes;
pDOMTCAtrributes = pIDomNode->Getattributes();
MSXML2::IXMLDOMNodePtr pIDOMChildNode;
//bstrNodeName = L"identifier";
bstrNodeName.Assign(SysAllocString(CT2W("identifier")));
pIDOMChildNode = pDOMTCAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
m_ouData.m_omID = strCopyBSTRToCString(NodeValue);
pIDOMChildNode.Release();
//bstrNodeName = L"title";
bstrNodeName.Assign(SysAllocString(CT2W("title")));
pIDOMChildNode = pDOMTCAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
m_ouData.m_omTitle = strCopyBSTRToCString(NodeValue);
pIDOMChildNode.Release();
//bstrNodeName = L"exp_handler";
bstrNodeName.Assign(SysAllocString(CT2W("exp_handler")));
pIDOMChildNode = pDOMTCAtrributes->getNamedItem(bstrNodeName);
pIDOMChildNode->get_nodeTypedValue(&NodeValue);
CString strTemp;
strTemp = strCopyBSTRToCString(NodeValue);
pIDOMChildNode.Release();
if(strTemp == "CONTINUE")
{
m_ouData.m_eExcpAction = CONTINUE;
}
else
{
m_ouData.m_eExcpAction = EXIT;
}
//Getting Testcases
MSXML2::IXMLDOMNodeListPtr pDOMChildList = pIDomNode->GetchildNodes();
LONG lCount;
pDOMChildList->get_length(&lCount);
CComBSTR NodeName;
for(int i = 0;i < lCount; i++)
{
pIDOMChildNode = pDOMChildList->Getitem(i);
pIDOMChildNode->get_nodeName(&NodeName);
CBaseEntityTA *odpBaseEntity = NULL;
if(NodeName == def_STR_SEND_NODE)
{
odpBaseEntity = new CSendEntity();
}
else if(NodeName == def_STR_VERIFY_NODE)
{
odpBaseEntity = new CVerifyEntity();
}
else if(NodeName == def_STR_WAIT_NODE)
{
odpBaseEntity = new CWaitEntity();
}
else if(NodeName == def_STR_REPLAY_NODE)
{
odpBaseEntity = new CReplayEntity();
}
else if(NodeName == def_STR_VERIFYRES_NODE)
{
odpBaseEntity = new CVerifyResponse();
}
if(odpBaseEntity == NULL)
{
//TODO::return a correct value
return -1;
}
odpBaseEntity->GetData(pIDOMChildNode);
m_ouData.m_odTAEntityList.AddTail(odpBaseEntity);
//pIDOMChildNode->Release();
}
return S_OK;
}