本文整理汇总了C++中TDesC::Match方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC::Match方法的具体用法?C++ TDesC::Match怎么用?C++ TDesC::Match使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDesC
的用法示例。
在下文中一共展示了TDesC::Match方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvertSEIDs
TBool CT_DataRGavdp::ConvertSEIDs(TDesC &aSEIDsStr, RArray<TUint>& aSEIDs)
{
TBool ret = ETrue;
TLex lex(aSEIDsStr);
TInt tempSEID;
if (lex.Val(tempSEID) == KErrNone)
{
aSEIDs.Append(tempSEID);
}
else
{
TInt location = aSEIDsStr.Match(_L("*,*"));
if( location != KErrNotFound )
{
//Converting Left part of the data
TPtrC tempStr = aSEIDsStr.Left(location);
ret = ConvertSEIDs(tempStr, aSEIDs);
if(ret)
{
//Converting right data can be with another ","
tempStr.Set(aSEIDsStr.Mid(location + 1));
ret = ConvertSEIDs(tempStr, aSEIDs);
}
}
else
{
ret = EFalse;
}
}
return ret;
}
示例2: ConvertEvents
TBool CT_DataRGavdp::ConvertEvents(TDesC &aEventStr, RArray<TUint>& aEvent)
{
TBool ret = ETrue;
if (aEventStr == KEGAVDP_NoneEvent)
{
aEvent.Append(EGAVDP_NoneEvent);
}
else if (aEventStr == KEGAVDP_ConnectConfirm)
{
aEvent.Append(EGAVDP_ConnectConfirm);
}
else if (aEventStr == KEGAVDP_SEPDiscovered)
{
aEvent.Append(EGAVDP_SEPDiscovered);
}
else if (aEventStr == KEGAVDP_SEPDiscoveryComplete)
{
aEvent.Append(EGAVDP_SEPDiscoveryComplete);
}
else if (aEventStr == KEGAVDP_SEPCapability)
{
aEvent.Append(EGAVDP_SEPCapability);
}
else if (aEventStr == KEGAVDP_SEPCapabilityComplete)
{
aEvent.Append(EGAVDP_SEPCapabilityComplete);
}
else if (aEventStr == KEGAVDP_AbortStreamConfirm)
{
aEvent.Append(EGAVDP_AbortStreamConfirm);
}
else if (aEventStr == KEGAVDP_StartStreamsConfirm)
{
aEvent.Append(EGAVDP_StartStreamsConfirm);
}
else if (aEventStr == KEGAVDP_SuspendStreamsConfirm)
{
aEvent.Append(EGAVDP_SuspendStreamsConfirm);
}
else if (aEventStr == KEGAVDP_SecurityControlConfirm)
{
aEvent.Append(EGAVDP_SecurityControlConfirm);
}
else if (aEventStr == KEGAVDP_ConfigurationConfirm)
{
aEvent.Append(EGAVDP_ConfigurationConfirm);
}
else if (aEventStr == KEGAVDP_ConfigurationStartIndication)
{
aEvent.Append(EGAVDP_ConfigurationStartIndication);
}
else if (aEventStr == KEGAVDP_ConfigurationIndication)
{
aEvent.Append(EGAVDP_ConfigurationIndication);
}
else if (aEventStr == KEGAVDP_ConfigurationEndIndication)
{
aEvent.Append(EGAVDP_ConfigurationEndIndication);
}
else if (aEventStr == KEGAVDP_StartIndication)
{
aEvent.Append(EGAVDP_StartIndication);
}
else if (aEventStr == KEGAVDP_SuspendIndication)
{
aEvent.Append(EGAVDP_SuspendIndication);
}
else if (aEventStr == KEGAVDP_SecurityControlIndication)
{
aEvent.Append(EGAVDP_SecurityControlIndication);
}
else if (aEventStr == KEGAVDP_AbortIndication)
{
aEvent.Append(EGAVDP_AbortIndication);
}
else if (aEventStr == KEGAVDP_ReleaseIndication)
{
aEvent.Append(EGAVDP_ReleaseIndication);
}
else if (aEventStr == KEGAVDP_BearerReady)
{
aEvent.Append(EGAVDP_BearerReady);
}
else if (aEventStr == KEGAVDP_Error)
{
aEvent.Append(EGAVDP_Error);
}
else
{
TInt location = aEventStr.Match(_L("*|*"));
if( location != KErrNotFound )
{
//Converting Left part of the data
TPtrC tempStr = aEventStr.Left(location);
ret = ConvertEvents(tempStr, aEvent);
if(ret)
{
//Converting right data can be with another "|"
//.........这里部分代码省略.........