本文整理汇总了C++中TFileName::TrimAll方法的典型用法代码示例。如果您正苦于以下问题:C++ TFileName::TrimAll方法的具体用法?C++ TFileName::TrimAll怎么用?C++ TFileName::TrimAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TFileName
的用法示例。
在下文中一共展示了TFileName::TrimAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReFreshHandlersL
/*
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
*/
void CEcomHandler::ReFreshHandlersL()
{
iHandlers.ResetAndDestroy();
RImplInfoPtrArray infoArray;
REComSession::ListImplementationsL(KUidYTaskHandUID, infoArray);
TFileName CurrName;
for ( TInt i = 0; i < infoArray.Count(); i++ )
{
CurrName.Zero();
CurrName.Copy(infoArray[i]->DisplayName());
CurrName.TrimAll();
TInt YStart = infoArray[i]->OpaqueData().Find(KtxStrtYTools);
TInt YEnd = infoArray[i]->OpaqueData().Find(KtxEnddYTools);
if(YStart != KErrNotFound
&& YEnd != KErrNotFound)
{
YStart = YStart + KtxStrtYTools().Length();
YEnd = (YEnd - YStart);
if(YEnd > 0 )
{
if(CurrName.Length() && CheckVersionL(infoArray[i]->OpaqueData().Mid(YStart,YEnd)))
{
CHandlerItem* newItem = new(ELeave)CHandlerItem();
CleanupStack::PushL(newItem);
newItem->iUid = infoArray[i]->ImplementationUid();
newItem->iName = CurrName.AllocL();
newItem->iServerName = ParseInfoL(infoArray[i]->OpaqueData().Mid(YStart,YEnd),KtxStrtSERVER,KtxEnddSERVER);
newItem->iIconfile = ParseInfoL(infoArray[i]->OpaqueData().Mid(YStart,YEnd),KtxStrtICONFILE,KtxEnddICONFILE);
CleanupStack::Pop(newItem);
iHandlers.Append(newItem);
}
}
}
}
infoArray.ResetAndDestroy();
}
示例2: GetHandlerL
/*
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
*/
CYTasksContainer* CEcomHandler::GetHandlerL(CHandlerItem& aHandler,CEikButtonGroupContainer* aCba)
{
CYTasksContainer* Ret(NULL);
TAny *impl; // pointer to interface implementation
RImplInfoPtrArray infoArray;
REComSession::ListImplementationsL(KUidYTaskHandUID, infoArray);
TFileName CurrName;
for ( TInt i = 0; i < infoArray.Count(); i++ )
{
CurrName.Zero();
CurrName.Copy(infoArray[i]->DisplayName());
CurrName.TrimAll();
if(aHandler.iUid == infoArray[i]->ImplementationUid()
&& CurrName.Length()
&& aHandler.iName)
{
if(CurrName == aHandler.iName->Des())
{
impl = REComSession::CreateImplementationL(infoArray[i]->ImplementationUid(), _FOFF(CYTasksContainer,iDestructorIDKey));
if ( impl )
{
Ret = ((CYTasksContainer*)impl);
Ret->iTasksHandlerExit = iTasksHandlerExit;
CleanupStack::PushL(Ret);
Ret->ConstructL(aCba);
CleanupStack::Pop();//Ret
break;
}
impl = NULL;
}
}
}
infoArray.ResetAndDestroy();
return Ret;
}