• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetUniqueID函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetUniqueID函数的典型用法代码示例。如果您正苦于以下问题:C++ GetUniqueID函数的具体用法?C++ GetUniqueID怎么用?C++ GetUniqueID使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: QAction

	void Plugin::handleBatteryInfo (BatteryInfo info)
	{
		if (!Battery2Action_.contains (info.ID_))
		{
			QAction *act = new QAction (tr ("Battery status"), this);
			act->setProperty ("WatchActionIconChange", true);
			act->setProperty ("Liznoo/BatteryID", info.ID_);

			act->setProperty ("Action/Class", GetUniqueID () + "/BatteryAction");
			act->setProperty ("Action/ID", GetUniqueID () + "/" + info.ID_);

			emit gotActions (QList<QAction*> () << act, AEPLCTray);
			Battery2Action_ [info.ID_] = act;

			connect (act,
					SIGNAL (triggered ()),
					this,
					SLOT (handleHistoryTriggered ()));
		}

		UpdateAction (info);
		CheckNotifications (info);

		Battery2LastInfo_ [info.ID_] = info;
	}
开发者ID:Akon32,项目名称:leechcraft,代码行数:25,代码来源:liznoo.cpp


示例2: GetBattIconName

	void Plugin::handleBatteryInfo (BatteryInfo info)
	{
#if QT_VERSION < 0x050000
		const auto& iconName = GetBattIconName (info);
		if (!Battery2Action_.contains (info.ID_))
		{
			QAction *act = new QAction (tr ("Battery status"), this);
			act->setProperty ("WatchActionIconChange", true);
			act->setProperty ("Liznoo/BatteryID", info.ID_);

			act->setProperty ("Action/Class", GetUniqueID () + "/BatteryAction");
			act->setProperty ("Action/ID", GetUniqueID () + "/" + info.ID_);
			act->setProperty ("ActionIcon", iconName);

			emit gotActions ({ act }, ActionsEmbedPlace::LCTray);
			Battery2Action_ [info.ID_] = act;

			connect (act,
					SIGNAL (triggered ()),
					this,
					SLOT (handleHistoryTriggered ()));
		}
		else
			Battery2Action_ [info.ID_]->setProperty ("ActionIcon", iconName);
#endif

		CheckNotifications (info);

		Battery2LastInfo_ [info.ID_] = info;
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:30,代码来源:liznoo.cpp


示例3: SetContent

	void CStringID::SetContentWithExpectedCRC(const char* content, bool noCase, bool resolve, IDType crc)
	{
		SetContent(content, noCase, resolve);
		IDType computedCrc = GetUniqueID();

		if (crc != computedCrc)
		{
			BEHAVIAC_ASSERT(false, "C%sStringID(0x%08X, \"%s\") has wrong CRC (should be 0x%08X!)  RETAIL BUILDS WILL USE THE WRONG VALUE, THIS MUST BE FIXED P0!",
				noCase ? "NoCase" : "", crc, content, GetUniqueID());
		}
	}
开发者ID:1414648814,项目名称:behaviac,代码行数:11,代码来源:stringid.cpp


示例4: Input

/******************************************************************************
Function Name  :  CBaseEntityTA
Input(s)       :  CBaseEntityTA& RefObj
Output         :  -
Functionality  :  Copy Constructor
Member of      :  CBaseEntityTA
Friend of      :  -
Author(s)      :  Venkatanarayana Makam
Date Created   :  06/04/2011
Modifications  :
******************************************************************************/
CBaseEntityTA::CBaseEntityTA(const CBaseEntityTA& RefObj)
{
    m_dwNextID = RefObj.m_dwNextID;
    m_dwID = GetUniqueID();
    m_eType = RefObj.m_eType;
    m_lDefaultChannelUsed = RefObj.m_lDefaultChannelUsed;
}
开发者ID:GT-Derka,项目名称:busmaster,代码行数:18,代码来源:BaseEntityTA.cpp


示例5: dAssert

void dLineNodeInfo::DrawWireFrame(dSceneRender* const render, dScene* const scene, dScene::dTreeNode* const myNode) const
{
	dAssert (myNode == scene->Find(GetUniqueID()));
	dAssert (scene->GetInfoFromNode(myNode) == this);

	//	int displayList = render->GetCachedFlatShadedDisplayList(m_mesh);
	//	dAssert (displayList > 0);
	if (m_curve.GetControlPointArray()) {

		dVector savedColor (render->GetColor());

		render->PushMatrix(&m_matrix[0][0]);
		//render->DrawDisplayList(displayList);

		render->BeginLine();
		render->SetColor(dVector (1.0f, 1.0f, 1.0f));

		dFloat scale = 1.0f / m_renderSegments;
		dBigVector p0 (m_curve.CurvePoint(0.0f));
		for (int i = 1; i <= m_renderSegments; i ++) {
			dFloat u = i * scale;
			dBigVector p1 (m_curve.CurvePoint(u));
			render->DrawLine (dVector(dFloat(p0.m_x), dFloat(p0.m_y), dFloat(p0.m_z), dFloat(p0.m_w)), dVector(dFloat(p1.m_x), dFloat(p1.m_y), dFloat(p1.m_z), dFloat(p1.m_w)));
			p0 = p1;
		}
		render->End();
		render->PopMatrix();

		render->SetColor(savedColor);
	}
}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:31,代码来源:dLineNodeInfo.cpp


示例6: GenerateIDIfNeeded

OP_STATUS SpeedDialData::GenerateIDIfNeeded(BOOL force, BOOL use_hash, INT32 position)
{
	// generate a unique id
	if(force || GetUniqueID().IsEmpty())
	{
		if(use_hash && position > 0)
		{
			// Generate a hash based on the position and url, only call on upgrade from < 11.10
			// See https://ssl.opera.com:8008/developerwiki/Opera_Link/Speeddial_2.0#General_notes
			OpString8 str8, url, md5;

			RETURN_IF_ERROR(url.SetUTF8FromUTF16(GetURL()));
			RETURN_IF_ERROR(str8.AppendFormat("%d%s", position, url.CStr()));
			RETURN_IF_ERROR(OpMisc::CalculateMD5Checksum(str8.CStr(), str8.Length(), md5));

			md5.MakeUpper();

			RETURN_IF_ERROR(m_unique_id.Set(md5.CStr()));
		}
		else
		{
			// generate a default unique ID
			RETURN_IF_ERROR(StringUtils::GenerateClientID(m_unique_id));
		}
	}
	return OpStatus::OK;
}
开发者ID:prestocore,项目名称:browser,代码行数:27,代码来源:SpeedDialData.cpp


示例7: SetChunk

AAX_Result IPlugAAX::SetChunk(AAX_CTypeID chunkID, const AAX_SPlugInChunk * iChunk )
{
  TRACE;
  
  if (chunkID == GetUniqueID())
  {    
    ByteChunk IPlugChunk;
    IPlugChunk.PutBytes(iChunk->fData, iChunk->fSize);
    int pos = 0;
    //GetIPlugVerFromChunk(&IPlugChunk, &pos);
    pos = UnserializeState(&IPlugChunk, pos);
    
    for (int i = 0; i< NParams(); i++)
    {
      SetParameterNormalizedValue(mParamIDs.Get(i)->Get(), GetParam(i)->GetNormalized() );
    }
    
    RedrawParamControls(); //TODO: what about icontrols not linked to params how do they get redrawn - setdirty via UnserializeState()?
    mNumPlugInChanges++; // necessary in order to cause CompareActiveChunk() to get called again and turn off the compare light 
    
    return AAX_SUCCESS;
  }
  
  return AAX_ERROR_INVALID_CHUNK_ID;
}
开发者ID:AlexHarker,项目名称:wdl-ol,代码行数:25,代码来源:IPlugAAX.cpp


示例8: FPathFindingQuery

FAsyncPathFindingQuery::FAsyncPathFindingQuery(const UObject* InOwner, const ANavigationData& InNavData, const FVector& Start, const FVector& End, const FNavPathQueryDelegate& Delegate, TSharedPtr<const FNavigationQueryFilter> SourceQueryFilter)
: FPathFindingQuery(InOwner, InNavData, Start, End, SourceQueryFilter)
, QueryID(GetUniqueID())
, OnDoneDelegate(Delegate)
{

}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:7,代码来源:NavigationData.cpp


示例9: tr

	void Plugin::NotifyBirthday (ICLEntry *entry, int days)
	{
		const auto& hrId = entry->GetEntryName ();

		const QString& notify = days ?
				tr ("%1 has birthday in %n day(s)!", 0, days).arg (hrId) :
				tr ("%1 has birthday today!").arg (hrId);
		auto e = Util::MakeNotification (tr ("Birthday reminder"), notify, PInfo_);

		e.Additional_ ["org.LC.AdvNotifications.SenderID"] = GetUniqueID ();
		e.Additional_ ["org.LC.AdvNotifications.EventCategory"] = AN::CatOrganizer;
		e.Additional_ ["org.LC.AdvNotifications.EventID"] = "org.LC.Plugins.Azoth.BirthdayNotifier.Birthday/" + entry->GetEntryID ();
		e.Additional_ ["org.LC.AdvNotifications.VisualPath"] = QStringList (hrId);

		e.Additional_ ["org.LC.AdvNotifications.EventType"] = AN::TypeOrganizerEventDue;
		e.Additional_ ["org.LC.AdvNotifications.FullText"] = notify;
		e.Additional_ ["org.LC.AdvNotifications.ExtendedText"] = notify;
		e.Additional_ ["org.LC.AdvNotifications.Count"] = 1;

		const auto& px = QPixmap::fromImage (entry->GetAvatar ());
		if (!px.isNull ())
			e.Additional_ ["NotificationPixmap"] = px;

		emit gotEntity (e);
	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:25,代码来源:birthdaynotifier.cpp


示例10: OnHitEntity

void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_HitPos)
{
	if (!a_EntityHit.IsMob() && !a_EntityHit.IsMinecart() && !a_EntityHit.IsPlayer() && !a_EntityHit.IsBoat())
	{
		// Not an entity that interacts with an arrow
		return;
	}
	
	int Damage = (int)(GetSpeed().Length() / 20 * m_DamageCoeff + 0.5);
	if (m_IsCritical)
	{
		Damage += m_World->GetTickRandomNumber(Damage / 2 + 2);
	}
	a_EntityHit.TakeDamage(dtRangedAttack, this, Damage, 1);
	
	// Broadcast successful hit sound
	m_World->BroadcastSoundEffect(
		"random.successful_hit",
		(int)std::floor(GetPosX() * 8.0),
		(int)std::floor(GetPosY() * 8.0),
		(int)std::floor(GetPosZ() * 8.0),
		0.5f,
		0.75f + ((float)((GetUniqueID() * 23) % 32)) / 64.0f
	);
	
	Destroy();
}
开发者ID:RedEnraged96,项目名称:MCServer-1,代码行数:27,代码来源:ArrowEntity.cpp


示例11: Build

bool VUINodeRotator::Build(TiXmlElement *pNode, const char *szPath, bool bWrite) 
{
	if ( bWrite == false )
	{		
		return VPushButton::Build( pNode,szPath,bWrite);
	}

	if ( GetUniqueID() != 0 )
	{
		VString szID = VGUIManager::GetIDName( (int)GetUniqueID() );	
		XMLHelper::Exchange_String(pNode,"ID",szID,bWrite);
	}

	XMLHelper::Exchange_Floats(pNode,"pos",m_vPosition.data,2,bWrite);
	XMLHelper::Exchange_Floats(pNode,"size",m_vSize.data,2,bWrite);

	VUINodeExportHelperXML::GlobalManager().BuildImageState( &m_ButtonCfg , this , XMLHelper::SubNode(pNode,"image",bWrite) , szPath,bWrite );
	VUINodeExportHelperXML::GlobalManager().BuildTextState( &m_TextCfg , this , XMLHelper::SubNode(pNode,"text",bWrite) , szPath,bWrite );

//	m_ButtonCfg.SetStretchMode(VImageState::TEXTURE_SIZE);

	// get the size of the control
	if (m_vSize.x<=0.f)
	{
		m_vSize = m_ButtonCfg.m_States[VDlgControlBase::NORMAL].GetSize();
		float fBoxWidth = m_vSize.x;
		hkvVec2 vTextSize = m_TextCfg.m_States[VDlgControlBase::NORMAL].GetSize();
		m_vSize.x += vTextSize.x + fBoxWidth;
		m_vSize.y = hkvMath::Max(m_vSize.y,vTextSize.y);

		// offset the text by the size of the checkbox
		for (int i=0;i<VWindowBase::STATE_COUNT;i++)
		{
			hkvVec2 vNewOfs = m_TextCfg.m_States[i].GetTextOfs();
			vNewOfs.x += fBoxWidth;
			m_TextCfg.m_States[i].SetTextOfs(vNewOfs);
		}
	}

	// initial checked status (actually same as selected)
	bool bChecked = false;
	XMLHelper::Exchange_Bool(pNode,"checked",bChecked,bWrite);	
	return true;
}
开发者ID:hxzpily,项目名称:GUIEditor,代码行数:44,代码来源:VUINodeRotator.cpp


示例12: GetUniqueID

	QList<EffectInfo> Plugin::GetEffects () const
	{
		return
		{
			{
				GetUniqueID () + ".Filter",
				tr ("Visual effects"),
				{},
				false,
				[this] (const QByteArray&, IPath*) -> IFilterElement*
				{
					return new VisualFilter
						{
							GetUniqueID () + ".Filter",
							LmpProxy_
						};
				}
			}
		};
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:20,代码来源:potorchu.cpp


示例13: GetUniqueID

void CVideoInfoTag::SetUniqueIDs(std::map<std::string, std::string> uniqueIDs)
{
  for (const auto& uniqueid : uniqueIDs)
  {
    if (uniqueid.first.empty())
      uniqueIDs.erase(uniqueid.first);
  }
  if (uniqueIDs.find(m_strDefaultUniqueID) == uniqueIDs.end())
    uniqueIDs[m_strDefaultUniqueID] = GetUniqueID();
  m_uniqueIDs = std::move(uniqueIDs);
}
开发者ID:basrieter,项目名称:xbmc,代码行数:11,代码来源:VideoInfoTag.cpp


示例14: GetUniqueID

	QList<EffectInfo> Plugin::GetEffects () const
	{
		return
		{
			{
				GetUniqueID () + ".Filter",
				tr ("HTTP streaming"),
				{},
				false,
				[this] (const QByteArray& instance, IPath *path) -> IFilterElement*
				{
					return new HttpStreamFilter
						{
							GetUniqueID () + ".Filter",
							instance,
							path
						};
				}
			}
		};
	}
开发者ID:ForNeVeR,项目名称:leechcraft,代码行数:21,代码来源:httstream.cpp


示例15:

Actor::Actor ()
{
    //_drawable=new Drawable();
    //_physics= new BasicPhysics(PhysicsArgu::basicArgu);
 
    _drawable=NULL;
    _physics=NULL;
    _collider=NULL;
    _ID=GetUniqueID();
    _position = Vector2D::ZERO;
   // _isCollidable =  true;
}
开发者ID:song1shuai,项目名称:CS587GameEngineDesign,代码行数:12,代码来源:Actor.cpp


示例16: dAssert

void dMeshNodeInfo::DrawFlatShaded(dSceneRender* const render, dScene* const scene, dScene::dTreeNode* const myNode) const
{
	dAssert (myNode == scene->Find(GetUniqueID()));
	dAssert (scene->GetInfoFromNode(myNode) == this);

	int displayList = render->GetCachedFlatShadedDisplayList(m_mesh);
	dAssert (displayList > 0);

	render->PushMatrix(&m_matrix[0][0]);
//render->SetColor(dVector(0, 0, 0, 0));
	render->DrawDisplayList(displayList);
	render->PopMatrix();
}
开发者ID:Shaderd00d,项目名称:newton-dynamics,代码行数:13,代码来源:dMeshNodeInfo.cpp


示例17: Build

bool VUINodeImage::Build(TiXmlElement *pNode, const char *szPath, bool bWrite) 
{
	if ( bWrite == false )
	{		
		return VImageControl::Build( pNode,szPath,bWrite);
	}

	if ( GetUniqueID() != 0 )
	{
		VString szID = VGUIManager::GetIDName( (int)GetUniqueID() );	
		XMLHelper::Exchange_String(pNode,"ID",szID,bWrite);
	}		

	XMLHelper::Exchange_Floats(pNode,"pos",m_vPosition.data,2,bWrite);
	XMLHelper::Exchange_Floats(pNode,"size",m_vSize.data,2,bWrite);

// 	if (!VDlgControlBase::Build(pNode,szPath,bWrite))
// 		return false;

	VUINodeExportHelperXML::GlobalManager().BuildImageState( &m_Image , this , XMLHelper::SubNode(pNode,"image",bWrite) , szPath,bWrite );

	return true;
}
开发者ID:hxzpily,项目名称:GUIEditor,代码行数:23,代码来源:VUINodeImage.cpp


示例18: QAction

	void Plugin::Init (ICoreProxy_ptr proxy)
	{
		Proxy_ = proxy;

		Util::InstallTranslator ("tabslist");

		ShowList_ = new QAction (tr ("List of tabs"), this);
		ShowList_->setProperty ("ActionIcon", "view-list-details");
		ShowList_->setShortcut (QString ("Ctrl+Shift+L"));
		ShowList_->setProperty ("Action/ID", GetUniqueID () + "_showlist");
		connect (ShowList_,
				SIGNAL (triggered ()),
				this,
				SLOT (handleShowList ()));
	}
开发者ID:mirok0,项目名称:leechcraft,代码行数:15,代码来源:tabslist.cpp


示例19: LOGD

cPlayer::~cPlayer(void)
{
    LOGD("Deleting cPlayer \"%s\" at %p, ID %d", m_PlayerName.c_str(), this, GetUniqueID());

    // Notify the server that the player is being destroyed
    cRoot::Get()->GetServer()->PlayerDestroying(this);

    SaveToDisk();

    m_World->RemovePlayer( this );

    m_ClientHandle = NULL;

    delete m_InventoryWindow;

    LOGD("Player %p deleted", this);
}
开发者ID:Noraaron1,项目名称:MCServer,代码行数:17,代码来源:Player.cpp


示例20: GetCollisionObjectType

void UDestructibleComponent::SetCollisionResponseForActor(PxRigidDynamic* Actor, int32 ChunkIdx, const FCollisionResponseContainer* ResponseOverride /*= NULL*/)
{
#if WITH_APEX
	if (ApexDestructibleActor == NULL)
	{
		return;
	}

	// Get collision channel and response
	PxFilterData PQueryFilterData, PSimFilterData;
	uint8 MoveChannel = GetCollisionObjectType();
	if(IsCollisionEnabled())
	{
		UDestructibleMesh* TheDestructibleMesh = GetDestructibleMesh();
		AActor* Owner = GetOwner();
		bool bLargeChunk = IsChunkLarge(ChunkIdx);
		const FCollisionResponseContainer& UseResponse = ResponseOverride == NULL ? (bLargeChunk ? LargeChunkCollisionResponse.GetResponseContainer() : SmallChunkCollisionResponse.GetResponseContainer()) : *ResponseOverride;

		physx::PxU32 SupportDepth = TheDestructibleMesh->ApexDestructibleAsset->getChunkDepth(ChunkIdx);

		const bool bEnableImpactDamage = IsImpactDamageEnabled(TheDestructibleMesh, SupportDepth);
		CreateShapeFilterData(MoveChannel, GetUniqueID(), UseResponse, 0, ChunkIdxToBoneIdx(ChunkIdx), PQueryFilterData, PSimFilterData, BodyInstance.bUseCCD, bEnableImpactDamage, false);
		
		PQueryFilterData.word3 |= EPDF_SimpleCollision | EPDF_ComplexCollision;

		SCOPED_SCENE_WRITE_LOCK(Actor->getScene());

		TArray<PxShape*> Shapes;
		Shapes.AddUninitialized(Actor->getNbShapes());

		int ShapeCount = Actor->getShapes(Shapes.GetData(), Shapes.Num());

		for (int32 i=0; i < ShapeCount; ++i)
		{
			PxShape* Shape = Shapes[i];

			Shape->setQueryFilterData(PQueryFilterData);
			Shape->setSimulationFilterData(PSimFilterData);
			Shape->setFlag(PxShapeFlag::eSCENE_QUERY_SHAPE, true); 
			Shape->setFlag(PxShapeFlag::eSIMULATION_SHAPE, true); 
			Shape->setFlag(PxShapeFlag::eVISUALIZATION, true);
		}
	}
#endif
}
开发者ID:johndpope,项目名称:UE4,代码行数:45,代码来源:DestructibleComponent.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetUniqueItem函数代码示例发布时间:2022-05-30
下一篇:
C++ GetURL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap