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


C++ LLPointer::notNull方法代码示例

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


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

示例1: LLSpeaker

LLPointer<LLSpeaker> LLSpeakerMgr::setSpeaker(const LLUUID& id, const std::string& name, LLSpeaker::ESpeakerStatus status, LLSpeaker::ESpeakerType type)
{
	if (id.isNull()) return NULL;

	LLPointer<LLSpeaker> speakerp;
	if (mSpeakers.find(id) == mSpeakers.end())
	{
		speakerp = new LLSpeaker(id, name, type);
		speakerp->mStatus = status;
		mSpeakers.insert(std::make_pair(speakerp->mID, speakerp));
		mSpeakersSorted.push_back(speakerp);
		fireEvent(new LLSpeakerListChangeEvent(this, speakerp->mID), "add");
	}
	else
	{
		speakerp = findSpeaker(id);
		if (speakerp.notNull())
		{
			// keep highest priority status (lowest value) instead of overriding current value
			speakerp->mStatus = llmin(speakerp->mStatus, status);
			speakerp->mActivityTimer.resetWithExpiry(SPEAKER_TIMEOUT);
			// RN: due to a weird behavior where IMs from attached objects come from the wearer's agent_id
			// we need to override speakers that we think are objects when we find out they are really
			// residents
			if (type == LLSpeaker::SPEAKER_AGENT)
			{
				speakerp->mType = LLSpeaker::SPEAKER_AGENT;
				speakerp->lookupName();
			}
		}
	}

	return speakerp;
}
开发者ID:AGoodPerson,项目名称:Ascent,代码行数:34,代码来源:llfloateractivespeakers.cpp

示例2: finishWork

//virtual (WORKER THREAD)
void LLTextureCacheWorker::finishWork(S32 param, bool completed)
{
	if (mResponder.notNull())
	{
		bool success = (completed && mDataSize > 0);
		if (param == 0)
		{
			// read
			if (success)
			{
				mResponder->setData(mReadData, mDataSize, mImageSize, mImageFormat, mImageLocal);
				mReadData = NULL; // responder owns data
				mDataSize = 0;
			}
			else
			{
				delete[] mReadData;
				mReadData = NULL;
			}
		}
		else
		{
			// write
			mWriteData = NULL; // we never owned data
			mDataSize = 0;
		}
		mCache->addCompleted(mResponder, success);
	}
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v1,代码行数:30,代码来源:lltexturecache.cpp

示例3: serialize

// static
void LLSDSerialize::serialize(const LLSD& sd, std::ostream& str, ELLSD_Serialize type, U32 options)
{
	LLPointer<LLSDFormatter> f = NULL;

	switch (type)
	{
	case LLSD_BINARY:
		str << "<? " << LLSD_BINARY_HEADER << " ?>\n";
		f = new LLSDBinaryFormatter;
		break;

	case LLSD_XML:
		str << "<? " << LLSD_XML_HEADER << " ?>\n";
		f = new LLSDXMLFormatter;
		break;

	default:
		llwarns << "serialize request for unkown ELLSD_Serialize" << llendl;
	}

	if (f.notNull())
	{
		f->format(sd, str, options);
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:26,代码来源:llsdserialize.cpp

示例4: setMediaFace

void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal)
{
	if (media_impl.notNull() && objectp.notNull())
	{
		LLUUID prev_id = mTargetImplID;
		mTargetImplID = media_impl->getMediaTextureID();
		mTargetObjectID = objectp->getID();
		mTargetObjectFace = face;
		mTargetObjectNormal = pick_normal;
		mClearFaceOnFade = false;
		
		if (prev_id != mTargetImplID)
			mVolumeSliderCtrl->setValue(media_impl->getVolume());
	}
	else
	{
		// This happens on a timer now.
//		mTargetImplID = LLUUID::null;
//		mTargetObjectID = LLUUID::null;
//		mTargetObjectFace = 0;
		mClearFaceOnFade = true;
	}

	updateShape();
}
开发者ID:CmdrCupcake,项目名称:SingularityViewer,代码行数:25,代码来源:llpanelprimmediacontrols.cpp

示例5: setSpeakerTyping

void LLSpeakerMgr::setSpeakerTyping(const LLUUID& speaker_id, BOOL typing)
{
	LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
	if (speakerp.notNull())
	{
		speakerp->mTyping = typing;
	}
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:8,代码来源:llspeakers.cpp

示例6: addJointState

//-----------------------------------------------------------------------------
// addJointState()
//-----------------------------------------------------------------------------
BOOL LLPose::addJointState(const LLPointer<LLJointState>& jointState)
{
	llassert_always(jointState.notNull());
	if (mJointMap.find(jointState->getJoint()->getName()) == mJointMap.end())
	{
		mJointMap[jointState->getJoint()->getName()] = jointState;
	}
	return TRUE;
}
开发者ID:Apelsin,项目名称:EffervescenceViewer,代码行数:12,代码来源:llpose.cpp

示例7: speakerChatted

// speaker has chatted via either text or voice
void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id)
{
	LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
	if (speakerp.notNull())
	{
		speakerp->mLastSpokeTime = mSpeechTimer.getElapsedTimeF32();
		speakerp->mHasSpoken = TRUE;
	}
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:10,代码来源:llspeakers.cpp

示例8: cloneViewerItem

void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& newitem) const
{
	newitem = new LLViewerInventoryItem(this);
	if(newitem.notNull())
	{
		LLUUID item_id;
		item_id.generate();
		newitem->setUUID(item_id);
	}
}
开发者ID:Kiera,项目名称:Sausages,代码行数:10,代码来源:llviewerinventory.cpp

示例9: onDoubleClickSpeaker

//static
void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data)
{
	LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
	LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();

	LLPointer<LLSpeaker> speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id);

	if (speaker_id != gAgent.getID() && speakerp.notNull())
	{
		gIMMgr->addSession(speakerp->mDisplayName, IM_NOTHING_SPECIAL, speaker_id);
	}
}
开发者ID:Boy,项目名称:netbook,代码行数:13,代码来源:llfloateractivespeakers.cpp

示例10: setDispatcher

// virtual
bool LLObservable::setDispatcher(LLPointer<LLEventDispatcher> dispatcher)
{
	if (mDispatcher.notNull())
	{
		mDispatcher->disengage(this);
		mDispatcher = NULL;
	}
	if (dispatcher.notNull() || dispatcher->engage(this))
	{
		mDispatcher = dispatcher;
		return true;
	}
	return false;
}
开发者ID:HizWylder,项目名称:GIS,代码行数:15,代码来源:llevent.cpp

示例11: updateImageStats

void LLFloaterTexturePicker::updateImageStats()
{
	if (mTexturep.notNull())
	{
		//RN: have we received header data for this image?
		if (mTexturep->getWidth(0) > 0 && mTexturep->getHeight(0) > 0)
		{
			std::string formatted_dims = llformat("%d x %d", mTexturep->getWidth(0),mTexturep->getHeight(0));
			mResolutionLabel->setTextArg("[DIMENSIONS]", formatted_dims);
		}
		else
		{
			mResolutionLabel->setTextArg("[DIMENSIONS]", std::string("[? x ?]"));
		}
	}
}
开发者ID:fractured-crystal,项目名称:SingularityViewer,代码行数:16,代码来源:lltexturectrl.cpp

示例12: initParticipantsVoiceState

void LLCallFloater::initParticipantsVoiceState()
{
	// Set initial status for each participant in the list.
	std::vector<LLPanel*> items;
	mAvatarList->getItems(items);
	std::vector<LLPanel*>::const_iterator
		it = items.begin(),
		it_end = items.end();


	uuid_vec_t speakers_uuids;
	get_voice_participants_uuids(speakers_uuids);

	for(; it != it_end; ++it)
	{
		LLAvatarListItem *item = dynamic_cast<LLAvatarListItem*>(*it);
		
		if (!item)	continue;
		
		LLUUID speaker_id = item->getAvatarId();

		uuid_vec_t::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id);

		// If an avatarID assigned to a panel is found in a speakers list
		// obtained from VoiceClient we assign the JOINED status to the owner
		// of this avatarID.
		if (speaker_iter != speakers_uuids.end())
		{
			setState(item, STATE_JOINED);
		}
		else
		{
			LLPointer<LLSpeaker> speakerp = mSpeakerManager->findSpeaker(speaker_id);
			// If someone has already left the call before, we create his
			// avatar row panel with HAS_LEFT status and remove it after
			// the timeout, otherwise we create a panel with INVITED status
			if (speakerp.notNull() && speakerp.get()->mHasLeftCurrentCall)
			{
				setState(item, STATE_LEFT);
			}
			else
			{
				setState(item, STATE_INVITED);
			}
		}
	}
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:47,代码来源:llcallfloater.cpp

示例13: initVoiceModerateMode

/*
 Initializes "moderate_mode" of voice session on first join.
 
 This is WORKAROUND because a way to request the current voice channel moderation mode exists
 but is not implemented in viewer yet. See EXT-6937.
*/
void LLSpeakerMgr::initVoiceModerateMode()
{
	if (!mModerateModeHandledFirstTime && (mVoiceChannel && mVoiceChannel->isActive()))
	{
		LLPointer<LLSpeaker> speakerp;

		if (mSpeakers.find(gAgentID) != mSpeakers.end())
		{
			speakerp = mSpeakers[gAgentID];
		}

		if (speakerp.notNull())
		{
			mVoiceModerated = speakerp->mModeratorMutedVoice;
			mModerateModeHandledFirstTime = true;
		}
	}
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:24,代码来源:llspeakers.cpp

示例14: onDoubleClickSpeaker

//static
void LLPanelActiveSpeakers::onDoubleClickSpeaker(void* user_data)
{
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Added: RLVa-1.0.0g
	if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
	{
		return;
	}
// [/RLVa:KB]

	LLPanelActiveSpeakers* panelp = (LLPanelActiveSpeakers*)user_data;
	LLUUID speaker_id = panelp->mSpeakerList->getValue().asUUID();

	LLPointer<LLSpeaker> speakerp = panelp->mSpeakerMgr->findSpeaker(speaker_id);

	if (speaker_id != gAgent.getID() && speakerp.notNull())
	{
		gIMMgr->addSession(speakerp->mDisplayName, IM_NOTHING_SPECIAL, speaker_id);
	}
}
开发者ID:EmeraldViewer,项目名称:EmeraldViewer,代码行数:20,代码来源:llfloateractivespeakers.cpp

示例15: updateNotInVoiceParticipantState

void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item)
{
	LLUUID participant_id = item->getAvatarId();
	ESpeakerState current_state = getState(participant_id);

	switch (current_state)
	{
	case STATE_JOINED:
		// If an avatarID is not found in a speakers list from VoiceClient and
		// a panel with this ID has a JOINED status this means that this person
		// HAS LEFT the call.
		setState(item, STATE_LEFT);

		{
			LLPointer<LLSpeaker> speaker = mSpeakerManager->findSpeaker(participant_id);
			if (speaker.notNull())
			{
				speaker->mHasLeftCurrentCall = TRUE;
			}
		}
		break;
	case STATE_LEFT:
		// nothing to do. These states should not be changed.
		break;
	case STATE_INVITED:
		// If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap
		// If it goes online it will be rendered as JOINED via LAvatarListItem.
		// Lets update its visual representation. See EXT-6660
	case STATE_UNKNOWN:
		// If an avatarID is not found in a speakers list from VoiceClient and
		// a panel with this ID has an UNKNOWN status this means that this person
		// HAS ENTERED session but it is not in voice chat yet. So, set INVITED status
		setState(item, STATE_INVITED);
		break;
	default:
		// for possible new future states.
		llwarns << "Unsupported (" << getState(participant_id) << ") state for: " << item->getAvatarName()  << llendl;
		break;
	}
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:40,代码来源:llcallfloater.cpp


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