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


C++ TPosition::SetCurrentTime方法代码示例

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


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

示例1: GetConfigured_PosInfosL

EXPORT_C void T_LbsUtils::GetConfigured_PosInfosL(const TDesC& aConfigFileName, const TDesC& aConfigSection, RPointerArray<TAny>& aPosInfoArr)
/** Fills a position info array with values read from a configuration ini file.

@param aConfigFileName	The name of the ini file to read. If the file name is empty (0 length) then
						the array will contain a single pos info item with default values.
@param aConfigSection	The section within the ini file to read data from.
@param aPosInfoArr		The pos info array to which the items are added. The array will cleared of
						existing items.
*/
	{
	// Clear array.
	ResetAndDestroy_PosInfoArr(aPosInfoArr);

	// Check for config file, if not present create a single default TPositionInfo.
	if (aConfigFileName.Length() == 0)
		{
		TPositionSatelliteInfo* posInfo = new(ELeave) TPositionSatelliteInfo();
		TPosition position;

		position.SetCoordinate(DEFAULT_NOTIFY_POS_UPDATE_LATITUDE, DEFAULT_NOTIFY_POS_UPDATE_LONGITUDE, DEFAULT_NOTIFY_POS_UPDATE_ALTITUDE);
		position.SetAccuracy(DEFAULT_NOTIFY_POS_UPDATE_HORIZONTAL_ACCURACY, DEFAULT_NOTIFY_POS_UPDATE_VERTICAL_ACCURACY);
		position.SetCurrentTime();
	
		posInfo->SetPosition(position);

		User::LeaveIfError(aPosInfoArr.Append(posInfo));			
		}
	
	else
		{
		CPosInfoConfigReader* reader;
	
		reader = CPosInfoConfigReader::NewL(aConfigFileName, aConfigSection, aPosInfoArr);
		CleanupStack::PushL(reader);
		
		reader->ProcessL();
	
		CleanupStack::PopAndDestroy(reader);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:40,代码来源:tlbsutils.cpp

示例2:

void CLcfPsyDummy1::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
    {
    // The position info object is at least a TPositionInfo
    TPositionInfo* posInfo =
        static_cast<TPositionInfo*>(&aPosInfo);

    TPosition pos;
    // Calculate the position and fill in the position info
    // object
    // Latitude, Longtitude, altitude
    pos.SetCoordinate(57.1, 11.3, 32.5);
    
    // set horizontal and vertical accuracy
    pos.SetAccuracy(40.0, 40.0);
    
    // set time of fix
    pos.SetCurrentTime();

    // Set position in position info.
    posInfo->SetPosition(pos);

    // Set the implementation uid     
    posInfo->SetModuleId(ImplementationUid());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy1.cpp

示例3:

void CLcfPsyDummy3::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
    {
    // The position info object is at least a TPositionInfo
    TPositionInfo* posInfo =
        static_cast<TPositionInfo*>(&aPosInfo);

    TPosition pos;
    // Calculate the position and fill in the position info
    // object
    pos.SetCoordinate(67.567, -12.34, 45.32);

    // set horizontal and vertical accuracy
    pos.SetAccuracy(150.0, 500.0);

    // set time of fix
    pos.SetCurrentTime();

    // Set position in position info.
    posInfo->SetPosition(pos);

    // Set the implementation uid

    posInfo->SetModuleId(ImplementationUid());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy3.cpp


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