本文整理汇总了C++中LLUUID::notNull方法的典型用法代码示例。如果您正苦于以下问题:C++ LLUUID::notNull方法的具体用法?C++ LLUUID::notNull怎么用?C++ LLUUID::notNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLUUID
的用法示例。
在下文中一共展示了LLUUID::notNull方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: regionHandleCallback
/* static */
void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
{
std::string sim_string = stripProtocol(url);
std::string region_name;
S32 x = 128;
S32 y = 128;
S32 z = 0;
LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z);
// remap x and y to local coordinates
S32 local_x = x % REGION_WIDTH_UNITS;
S32 local_y = y % REGION_WIDTH_UNITS;
if (local_x < 0)
local_x += REGION_WIDTH_UNITS;
if (local_y < 0)
local_y += REGION_WIDTH_UNITS;
LLVector3 local_pos;
local_pos.mV[VX] = (F32)local_x;
local_pos.mV[VY] = (F32)local_y;
local_pos.mV[VZ] = (F32)z;
if (teleport)
{
LLVector3d global_pos = from_region_handle(region_handle);
global_pos += LLVector3d(local_pos);
gAgent.teleportViaLocation(global_pos);
if(gFloaterWorldMap)
{
gFloaterWorldMap->trackLocation(global_pos);
}
}
else
{
// display informational floater, allow user to click teleport btn
LLFloaterURLDisplay* url_displayp = LLFloaterURLDisplay::getInstance(LLSD());
url_displayp->displayParcelInfo(region_handle, local_pos);
if(snapshot_id.notNull())
{
url_displayp->setSnapshotDisplay(snapshot_id);
}
std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z);
url_displayp->setLocationString(locationString);
}
}
示例2: activateGestureWithAsset
// If inform_server is true, will send a message upstream to update
// the user_gesture_active table.
void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id,
const LLUUID& asset_id,
BOOL inform_server,
BOOL deactivate_similar)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
if( !gAssetStorage )
{
llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl;
return;
}
// If gesture is already active, nothing to do.
if (isGestureActive(base_item_id))
{
llwarns << "Tried to loadGesture twice " << base_item_id << llendl;
return;
}
// if (asset_id.isNull())
// {
// llwarns << "loadGesture() - gesture has no asset" << llendl;
// return;
// }
// For now, put NULL into the item map. We'll build a gesture
// class object when the asset data arrives.
mActive[base_item_id] = NULL;
// Copy the UUID
if (asset_id.notNull())
{
LLLoadInfo* info = new LLLoadInfo;
info->mItemID = base_item_id;
info->mInformServer = inform_server;
info->mDeactivateSimilar = deactivate_similar;
const BOOL high_priority = TRUE;
gAssetStorage->getAssetData(asset_id,
LLAssetType::AT_GESTURE,
onLoadComplete,
(void*)info,
high_priority);
}
else
{
notifyObservers();
}
}
示例3: watchAsset
void LLInventoryAddItemByAssetObserver::watchAsset(const LLUUID& asset_id)
{
if(asset_id.notNull())
{
if (mIsDirty)
{
LL_DEBUGS("Inventory_Move") << "Watched items are dirty. Clean them." << LL_ENDL;
mWatchedAssets.clear();
mIsDirty = false;
}
mWatchedAssets.push_back(asset_id);
onAssetAdded(asset_id);
}
}
示例4: processTerminateFriendship
void LLAvatarTracker::processTerminateFriendship(LLMessageSystem* msg, void**)
{
LLUUID id;
msg->getUUID("ExBlock", "OtherID", id);
if(id.notNull())
{
LLAvatarTracker& at = LLAvatarTracker::instance();
LLRelationship* buddy = get_ptr_in_map(at.mBuddyInfo, id);
if(!buddy) return;
at.mBuddyInfo.erase(id);
at.addChangedMask(LLFriendObserver::REMOVE, id);
delete buddy;
at.notifyObservers();
}
}
示例5: handle
bool handle(const LLSD& tokens, const LLSD& queryMap, LLMediaCtrl* web)
{
int tokencount = tokens.size();
if (tokencount < 1)
{
return false;
}
LLUUID key = tokens[0].asUUID();
if(key.notNull())
{
LLFloaterKeyTool::show(key);
}
return true;
}
示例6: unpackExperienceEntries
void LLParcel::unpackExperienceEntries( LLMessageSystem* msg, U32 type )
{
LLUUID id;
S32 i;
S32 count = msg->getNumberOfBlocksFast(_PREHASH_List);
for (i = 0; i < count; i++)
{
msg->getUUIDFast(_PREHASH_List, _PREHASH_ID, id, i);
if (id.notNull())
{
mExperienceKeys[id]=type;
}
}
}
示例7: logInventoryOffer
//static
void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im_session_id)
{
// compute id of possible IM session with agent that has "to_agent" id
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, to_agent);
// If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat.
LLSD args;
args["user_id"] = to_agent;
if (im_session_id.notNull())
{
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
}
// [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h
else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) &&
(!RlvUIEnabler::hasOpenProfile(to_agent)) )
{
// Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient
std::string strMsgName = "inventory_item_offered-im"; LLSD args; LLAvatarName avName;
if (LLAvatarNameCache::get(to_agent, &avName))
{
args["NAME"] = RlvStrings::getAnonym(avName);
strMsgName = "inventory_item_offered_rlv";
}
gIMMgr->addSystemMessage(LLUUID::null, strMsgName, args);
}
// [/RLVa:KB]
// If this item was given by drag-and-drop on avatar while IM panel was open, log this action in the IM panel chat.
else if (LLIMModel::getInstance()->findIMSession(session_id))
{
gIMMgr->addSystemMessage(session_id, "inventory_item_offered", args);
}
// If this item was given by drag-and-drop on avatar while IM panel wasn't open, log this action to IM history.
else
{
// std::string full_name;
// if (gCacheName->getFullName(to_agent, full_name))
// {
// LLIMModel::instance().logToFile(full_name, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im"));
// }
// [SL:KB] - Patch: Chat-Logs | Checked: 2010-11-18 (Catznip-2.4.0c) | Added: Catznip-2.4.0c
std::string strFilename;
if (LLIMModel::buildIMP2PLogFilename(to_agent, LLStringUtil::null, strFilename))
{
LLIMModel::instance().logToFile(strFilename, LLTrans::getString("SECOND_LIFE"), im_session_id, LLTrans::getString("inventory_item_offered-im"));
}
// [/SL:KB]
}
}
示例8: inventoryChanged
void ScriptCounter::inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
S32 serial_num,
void* user_data)
{
if(status == IDLE)
{
obj->removeInventoryListener(sInstance);
return;
}
if(objIDS.find(obj->getID().asString()) != objIDS.end())
{
if(inv)
{
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
for( ; it != end; ++it)
{
LLInventoryObject* asset = (*it);
if(asset)
{
if(asset->getType() == LLAssetType::AT_LSL_TEXT)
{
scriptcount+=1;
if(doDelete==true)
delUUIDS.push_back(asset->getUUID());
}
}
}
if(doDelete==true)
{
while (delUUIDS.count() > 0)
{
const LLUUID toDelete=delUUIDS[0];
delUUIDS.remove(0);
if(toDelete.notNull())
obj->removeInventory(toDelete);
}
}
}
invqueries -= 1;
objIDS.erase(obj->getID().asString());
obj->removeInventoryListener(sInstance);
completechk();
}
}
示例9: getIgnoreGroup
bool LLIMMgr::getIgnoreGroup(const LLUUID& group_id)
{
if (group_id.notNull())
{
std::list<LLUUID>::iterator found =
std::find( mIgnoreGroupList.begin(), mIgnoreGroupList.end(),
group_id);
if (found != mIgnoreGroupList.end())
{
// llinfos << "group " << group_id << " is ignored." << llendl;
return true;
}
}
// llinfos << "group " << group_id << " is not ignored." << llendl;
return false;
}
示例10: onAccordionTabRightClick
void LLOutfitsList::onAccordionTabRightClick(LLUICtrl* ctrl, S32 x, S32 y, const LLUUID& cat_id)
{
LLAccordionCtrlTab* tab = dynamic_cast<LLAccordionCtrlTab*>(ctrl);
if(mOutfitMenu && is_tab_header_clicked(tab, y) && cat_id.notNull())
{
// Focus tab header to trigger tab selection change.
LLUICtrl* header = tab->findChild<LLUICtrl>("dd_header");
if (header)
{
header->setFocus(TRUE);
}
uuid_vec_t selected_uuids;
selected_uuids.push_back(cat_id);
mOutfitMenu->show(ctrl, selected_uuids, x, y);
}
}
示例11: formFriendship
void LLAvatarTracker::formFriendship(const LLUUID& id)
{
if(id.notNull())
{
LLRelationship* buddy_info = get_ptr_in_map(instance().mBuddyInfo, id);
if(!buddy_info)
{
LLAvatarTracker& at = LLAvatarTracker::instance();
//The default for relationship establishment is to have both parties
//visible online to each other.
buddy_info = new LLRelationship(LLRelationship::GRANT_ONLINE_STATUS,LLRelationship::GRANT_ONLINE_STATUS, false);
at.mBuddyInfo[id] = buddy_info;
at.mModifyMask |= LLFriendObserver::ADD;
at.notifyObservers();
}
}
}
示例12: getIgnoreGroup
bool LLIMMgr::getIgnoreGroup(const LLUUID& group_id) const
{
if (group_id.notNull())
{
std::list<LLUUID>::const_iterator found =
std::find( mIgnoreGroupList.begin(), mIgnoreGroupList.end(),
group_id);
if (found != mIgnoreGroupList.end())
{
// LL_INFOS() << "group " << group_id << " is ignored." << LL_ENDL;
return true;
}
}
// LL_INFOS() << "group " << group_id << " is not ignored." << LL_ENDL;
return false;
}
示例13: startMotion
void AnimationExplorer::startMotion(const LLUUID& motionID)
{
if(!mAnimationPreview)
{
return;
}
LLVOAvatar* avatarp=mAnimationPreview->getDummyAvatar();
avatarp->deactivateAllMotions();
avatarp->startMotion(ANIM_AGENT_STAND,0.0f);
if(motionID.notNull())
{
avatarp->startMotion(motionID,0.0f);
}
}
示例14: copy_inventory_from_notecard
void copy_inventory_from_notecard(const LLUUID& object_id, const LLUUID& notecard_inv_id, const LLInventoryItem *src, U32 callback_id)
{
LLSD body;
LLViewerRegion* viewer_region = NULL;
if(object_id.notNull())
{
LLViewerObject* vo = gObjectList.findObject(object_id);
if(vo)
{
viewer_region = vo->getRegion();
}
}
// Fallback to the agents region if for some reason the
// object isn't found in the viewer.
if(!viewer_region)
{
viewer_region = gAgent.getRegion();
}
if (!viewer_region)
{
LL_WARNS("Inventory") << "Can't find region from object_id "
<< object_id << " or gAgent"
<< LL_ENDL;
return;
}
std::string url = viewer_region->getCapability("CopyInventoryFromNotecard");
if (url.empty())
{
LL_WARNS("Inventory") << "There is no 'CopyInventoryFromNotecard' capability"
<< " for region: " << viewer_region->getName()
<< LL_ENDL;
return;
}
body["notecard-id"] = notecard_inv_id;
body["object-id"] = object_id;
body["item-id"] = src->getUUID();
body["folder-id"] = gInventory.findCategoryUUIDForType(src->getType());
body["callback-id"] = (LLSD::Integer)callback_id;
LLHTTPClient::post(url, body, new LLCopyInventoryFromNotecardResponder());
}
示例15: addToClipboard
// Add the input uuid to the LL clipboard
// Convert the uuid to string and concatenate that string to the system clipboard if legit
bool LLClipboard::addToClipboard(const LLUUID& src, const LLAssetType::EType type)
{
bool res = false;
if (src.notNull())
{
res = true;
if (LLAssetType::lookupIsAssetIDKnowable(type))
{
LLWString source = utf8str_to_wstring(src.asString());
res = addToClipboard(source, 0, source.size());
}
if (res)
{
mObjects.push_back(src);
mGeneration++;
}
}
return res;
}