当前位置: 首页>>代码示例>>C++>>正文


C++ TDesC::Match方法代码示例

本文整理汇总了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;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:34,代码来源:t_data_rgavdp.cpp

示例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 "|"
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:101,代码来源:t_data_rgavdp.cpp


注:本文中的TDesC::Match方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。