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


C++ TPtr8::Num方法代码示例

本文整理汇总了C++中TPtr8::Num方法的典型用法代码示例。如果您正苦于以下问题:C++ TPtr8::Num方法的具体用法?C++ TPtr8::Num怎么用?C++ TPtr8::Num使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TPtr8的用法示例。


在下文中一共展示了TPtr8::Num方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

DMAD_EXPORT_C HBufC8* TDmAdUtil::IntToDes8LC(const TInt aInt)
    {
    HBufC8* buf = HBufC8::NewLC(10); //10 = max length of 32bit integer
    TPtr8 ptrBuf = buf->Des();
    ptrBuf.Num(aInt);
    return buf;
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:7,代码来源:dmadutil.cpp

示例2:

// --------------------------------------------------------------------------
// CNSmlDmAOAdapter::IntToDes8L
// Converts integer to 8bit descriptor
// --------------------------------------------------------------------------
HBufC8* CNSmlDmAOAdapter::IntToDes8L( TInt aLuid ) const
    {
    HBufC8* buf = HBufC8::NewL( 10 ); //10 = max length of 32bit integer
    TPtr8 ptrBuf = buf->Des();
    ptrBuf.Num( aLuid );
    return buf;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:11,代码来源:nsmldmalwaysonadapter.cpp

示例3: ConvertTRealToDesLC

// -----------------------------------------------------------------------------
// CMceSdpCodec::ConvertTRealToDesLC
// -----------------------------------------------------------------------------
//
HBufC8* CMceSdpCodec::ConvertTRealToDesLC( const TReal& aConv )
    {
    const TInt KMceMaxTRealLen = 20;
    HBufC8* buf  = HBufC8::NewLC( KMceMaxTRealLen );
    TPtr8 ptr = buf->Des();
    TRealFormat format;
    format.iType = KRealFormatGeneral;
    format.iWidth = KMceMaxTRealLen;
    format.iPoint = KMceRealPoint;
    ptr.Num( aConv, format );
    return buf;
    }
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:16,代码来源:mcesdpcodec.cpp

示例4: ResetAndActivateL

TInt CPwrPlugin::ResetAndActivateL(CProfilerSampleStream& aStream) 
    {
    LOGTEXT(_L("CPwrPlugin::ResetAndActivate() - entry"));
    // check if sampler enabled
    if(iSamplerAttributes->At(0).iEnabled)
        {
        // create a new listener instance for every trace, destroy it on stop
        iPowerListener = CProfilerPowerListener::NewL(this);

        iStream = &aStream;
        TInt length = this->CreateFirstSample();
        iVersion[0] = (TUint8)length;
        LOGSTRING2("CPwrPlugin::ResetAndActivate() - AddSample, length %d", length);
        TInt ret = this->AddSample(iVersion, length+1, 0);

        LOGSTRING2("CPwrPlugin::ConstructL() - sampling period %d", this->iPeriod);

        HBufC8* iBufRes = HBufC8::NewMaxLC(10);
        TPtr8 iPtrRes = iBufRes->Des();

        // check if sampling rate set to something reasonable, relevant only in SYNC case
        if(iSamplerAttributes->At(0).iSampleRate != -1)
            {
            iPtrRes.Num(iSamplerAttributes->At(0).iSampleRate);
            }
        else
            {
            iPtrRes.Append(KNullDesC8);
            }

        // set disabled
        SetEnabled(ETrue); 

        // activate power listener
        ret = iPowerListener->StartL(iPtrRes);
        LOGTEXT(_L("CPwrPlugin::ResetAndActivate() - exit"));

        CleanupStack::PopAndDestroy();
        
        if(ret != KErrNone)
            return ret;
        }
    return KErrNone;
    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:44,代码来源:PwrPlugin.cpp

示例5: SaveL


//.........这里部分代码省略.........
        TUint apId = 0;
        TInt ERROR = KErrNone;
        TInt err1 = KErrNone;

        if (iToNapIDInternetIndicator)
            {
            //Get Access Point from DB or SNAP
            TRAP(err1, apId = WPAdapterUtil::GetAPIDL());
            }

        else
            {
            uid.Copy(iProfiles[aItem]->iVisitParameter->Data() );

            RCmManagerExt  cmmanagerExt;
		    cmmanagerExt.OpenL();
		    CleanupClosePushL(cmmanagerExt);
		    RCmConnectionMethodExt cm;
		    cm = cmmanagerExt.ConnectionMethodL( uid());
		    CleanupClosePushL( cm );

            TRAP( ERROR, apId = cm.GetIntAttributeL(CMManager::ECmIapId) );
            CleanupStack::PopAndDestroy(2); //cmmanager,cm
            }

        //Get default access point in failure of getting AP
        if (ERROR != KErrNone || err1 != KErrNone)
			{
			apId = GetDefaultIAPL();
			}
		
		HBufC8* iapBuf = HBufC8::NewLC( 8 );
		TPtr8 ptrBuf = iapBuf->Des();
		ptrBuf.Num( apId );
		
		connection.SetPropertyL( KNSmlIAPId, *iapBuf );
			
        CleanupStack::PopAndDestroy(); //iapBuf	
		}
		
	if( iProfiles[aItem]->iHostAddress )
		{
		// see if address contains also port
		TBool portFound = EFalse;
		TInt startPos(0);
		if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTP)==0)
		    {
		    startPos=KNSmlDsProvisioningHTTP().Length();		    		    
		    }
		else if(iProfiles[aItem]->iHostAddress->Find(KNSmlDsProvisioningHTTPS)==0)
		    {
		    startPos=KNSmlDsProvisioningHTTPS().Length();		    		    
		    }
		TPtrC uriPtr = iProfiles[aItem]->iHostAddress->Mid(startPos);
		
		if(uriPtr.Locate(KNSmlDMColon)!=KErrNotFound)
		    {
			portFound = ETrue;
		    }
	
		if( portFound == EFalse )
			{
			HBufC *uri = 0;
			// port not found from URI -> see if it is given separately				
			if( iProfiles[aItem]->iPort )
				{
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:67,代码来源:NSmlDsProvisioningAdapter.cpp


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