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


C++ LLSD::isUndefined方法代码示例

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


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

示例1: updateValue

bool LLFlatListView::updateValue(const LLSD& old_value, const LLSD& new_value)
{
	if (old_value.isUndefined() || new_value.isUndefined()) return false;
	if (llsds_are_equal(old_value, new_value)) return false;

	item_pair_t* item_pair = getItemPair(old_value);
	if (!item_pair) return false;

	item_pair->second = new_value;
	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:11,代码来源:llflatlistview.cpp

示例2: requestSetLinksets

void LLPathfindingManager::requestSetLinksets(request_id_t pRequestId, const LLPathfindingObjectListPtr &pLinksetListPtr, LLPathfindingLinkset::ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD, object_request_callback_t pLinksetsCallback) const
{
	LLPathfindingObjectListPtr emptyLinksetListPtr;

	std::string objectLinksetsURL = getObjectLinksetsURLForCurrentRegion();
	std::string terrainLinksetsURL = getTerrainLinksetsURLForCurrentRegion();
	if (objectLinksetsURL.empty() || terrainLinksetsURL.empty())
	{
		pLinksetsCallback(pRequestId, kRequestNotEnabled, emptyLinksetListPtr);
	}
	else if ((pLinksetListPtr == NULL) || pLinksetListPtr->isEmpty())
	{
		pLinksetsCallback(pRequestId, kRequestCompleted, emptyLinksetListPtr);
	}
	else 
	{
		const LLPathfindingLinksetList *linksetList = dynamic_cast<const LLPathfindingLinksetList *>(pLinksetListPtr.get());

		LLSD objectPostData = linksetList->encodeObjectFields(pLinksetUse, pA, pB, pC, pD);
		LLSD terrainPostData;
		if (isAllowViewTerrainProperties())
		{
			terrainPostData = linksetList->encodeTerrainFields(pLinksetUse, pA, pB, pC, pD);
		}

		if (objectPostData.isUndefined() && terrainPostData.isUndefined())
		{
			pLinksetsCallback(pRequestId, kRequestCompleted, emptyLinksetListPtr);
		}
		else
		{
			pLinksetsCallback(pRequestId, kRequestStarted, emptyLinksetListPtr);

			LinksetsResponderPtr linksetsResponderPtr(new LinksetsResponder(pRequestId, pLinksetsCallback, !objectPostData.isUndefined(), !terrainPostData.isUndefined()));

			if (!objectPostData.isUndefined())
			{
				LLHTTPClient::ResponderPtr objectLinksetsResponder = new ObjectLinksetsResponder(objectLinksetsURL, linksetsResponderPtr);
				LLHTTPClient::put(objectLinksetsURL, objectPostData, objectLinksetsResponder);
			}

			if (!terrainPostData.isUndefined())
			{
				LLHTTPClient::ResponderPtr terrainLinksetsResponder = new TerrainLinksetsResponder(terrainLinksetsURL, linksetsResponderPtr);
				LLHTTPClient::put(terrainLinksetsURL, terrainPostData, terrainLinksetsResponder);
			}
		}
	}
}
开发者ID:Krazy-Bish-Margie,项目名称:SingularityViewer,代码行数:49,代码来源:llpathfindingmanager.cpp

示例3: loadFile

// virtual
bool LLMessageConfigFile::loadFile()
{
	LLSD data;
    {
        llifstream file(filename());
        
        if (file.is_open())
        {
			LL_DEBUGS("AppInit") << "Loading message.xml file at " << filename() << LL_ENDL;
            LLSDSerialize::fromXML(data, file);
        }

        if (data.isUndefined())
        {
            LL_INFOS("AppInit") << "LLMessageConfigFile::loadFile: file missing,"
				" ill-formed, or simply undefined; not changing the"
				" file" << LL_ENDL;
            return false;
        }
    }
	loadServerDefaults(data);
	loadMaxQueuedEvents(data);
	loadMessages(data);
	loadCapBans(data);
	loadMessageBans(data);
	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:28,代码来源:llmessageconfig.cpp

示例4: onFlyoutCommit

void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
{
	if (value.isUndefined() || value.asInteger() == 0)
	{
		LLAvatarActions::showProfile(mOtherParticipantUUID);
		return;
	}

	int option = value.asInteger();
	if (option == 1) onClickHistory();
	else if (option == 2) LLAvatarActions::offerTeleport(mOtherParticipantUUID);
	else if (option == 3) LLAvatarActions::teleportRequest(mOtherParticipantUUID);
	else if (option == 4) LLAvatarActions::pay(mOtherParticipantUUID);
	else if (option == 5) LLAvatarActions::inviteToGroup(mOtherParticipantUUID);
	else if (option == -1) copy_profile_uri(mOtherParticipantUUID);
	else if (option >= 6) // Options that use dynamic items
	{
		// First remove them all
		removeDynamics(flyout);

		// Toggle as requested, adjust the strings
		if (option == 6) mDing = !mDing;
		else if (option == 7) mRPMode = !mRPMode;
		else if (option == 8) LLAvatarActions::isFriend(mOtherParticipantUUID) ? LLAvatarActions::removeFriendDialog(mOtherParticipantUUID) : LLAvatarActions::requestFriendshipDialog(mOtherParticipantUUID);
		//else if (option == 9) LLAvatarActions::toggleBlock(mOtherParticipantUUID);

		// Last add them back
		addDynamics(flyout);
	}
}
开发者ID:mightymarc,项目名称:SWAMPWATER,代码行数:30,代码来源:llimpanel.cpp

示例5: onOpen

void LLPanelClassifiedEdit::onOpen(const LLSD& key)
{
	mIsNew = key.isUndefined();
	
	scrollToTop();

	// classified is not created yet
	bool is_new = isNew() || isNewWithErrors();

	if(is_new)
	{
		resetData();
		resetControls();

		fillIn(key);

		if(isNew())
		{
			LLAvatarPropertiesProcessor::getInstance()->addObserver(getAvatarId(), this);
		}
	}
	else
	{
		LLPanelClassifiedInfo::onOpen(key);
	}

	std::string save_btn_label = is_new ? getString("publish_label") : getString("save_label");
	getChild<LLUICtrl>("save_changes_btn")->setLabelArg("[LABEL]", save_btn_label);

	enableVerbs(is_new);
	enableEditing(is_new);
	showEditing(!is_new);
	resetDirty();
	setInfoLoaded(false);
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:35,代码来源:llpanelclassified.cpp

示例6: getLLSD

LLSD getLLSD(const LLSD& input, const char* block, const char* var, S32 blocknum)
{
	// babbage: log error to llerrs if variable not found to mimic
	// LLTemplateMessageReader::getData behaviour
	if(NULL == block)
	{
		llerrs << "NULL block name" << llendl;
		return LLSD();
	}
	if(NULL == var)
	{
		llerrs << "NULL var name" << llendl;
		return LLSD();
	}
	if(! input[block].isArray())
	{
		// NOTE: babbage: need to return default for missing blocks to allow
		// backwards/forwards compatibility - handlers must cope with default
		// values.
		llwarns << "block " << block << " not found" << llendl;
		return LLSD();
	}

	LLSD result = input[block][blocknum][var]; 
	if(result.isUndefined())
	{
		// NOTE: babbage: need to return default for missing vars to allow
		// backwards/forwards compatibility - handlers must cope with default
		// values.
		llwarns << "var " << var << " not found" << llendl;
	}
	return result;
}
开发者ID:wish-ds,项目名称:firestorm-ds,代码行数:33,代码来源:llsdmessagereader.cpp

示例7: process_impl

// virtual
LLIOPipe::EStatus LLContextURLExtractor::process_impl(
	const LLChannelDescriptors& channels,
	buffer_ptr_t& buffer,
	bool& eos,
	LLSD& context,
	LLPumpIO* pump)
{
	PUMP_DEBUG;
	LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
	// The destination host is in the context.
	if(context.isUndefined() || !mRequest)
	{
		return STATUS_PRECONDITION_NOT_MET;
	}

	// copy in to out, since this just extract the URL and does not
	// actually change the data.
	LLChangeChannel change(channels.in(), channels.out());
	std::for_each(buffer->beginSegment(), buffer->endSegment(), change);

	// find the context url
	if(context.has(CONTEXT_DEST_URI_SD_LABEL))
	{
		mRequest->setURL(context[CONTEXT_DEST_URI_SD_LABEL].asString());
		return STATUS_DONE;
	}
	return STATUS_ERROR;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:29,代码来源:llurlrequest.cpp

示例8: errorRetryTimestamp

		/*virtual*/ void httpFailure()
		{
 			LL_WARNS("ExperienceCache") << "Request failed "<<getStatus()<<" "<<getReason()<< LL_ENDL;
 			// We're going to construct a dummy record and cache it for a while,
 			// either briefly for a 503 Service Unavailable, or longer for other
 			// errors.
 			F64 retry_timestamp = errorRetryTimestamp(getStatus());
 
 
 			// Add dummy records for all agent IDs in this request
 			ask_queue_t::const_iterator it = mKeys.begin();
 			for ( ; it != mKeys.end(); ++it)
			{

				LLSD exp = get(it->first);
                //leave the properties alone if we already have a cache entry for this xp
                if(exp.isUndefined())
                {
                    exp[PROPERTIES]=PROPERTY_INVALID;
                }
				exp[EXPIRES]=retry_timestamp;
				exp[EXPERIENCE_ID] = it->first;
				exp["key_type"] = it->second;
				exp["uuid"] = it->first;
				exp["error"] = (LLSD::Integer)getStatus();
                exp[QUOTA] = DEFAULT_QUOTA;

 				LLExperienceCache::processExperience(it->first, exp);
 			}

		}
开发者ID:Belxjander,项目名称:Kirito,代码行数:31,代码来源:llexperiencecache.cpp

示例9: loadFile

LLSavedLogins LLSavedLogins::loadFile(const std::string& filepath)
{
	LLSavedLogins hist;
	LLSD data;

	llifstream file(filepath);

	if (file.is_open())
	{
		llinfos << "Loading login history file at " << filepath << llendl;
		LLSDSerialize::fromXML(data, file);
	}

	if (data.isUndefined())
	{
		llinfos << "Login History File \"" << filepath << "\" is missing, "
		    "ill-formed, or simply undefined; not loading the file." << llendl;
	}
	else
	{
		try
		{
			hist = LLSavedLogins(data);
		}
		catch(std::invalid_argument& error)
		{
			llwarns << "Login History File \"" << filepath << "\" is ill-formed (" <<
			        error.what() << "); not loading the file." << llendl;
		}
	}

	return hist;
}
开发者ID:AGoodPerson,项目名称:Ascent,代码行数:33,代码来源:llsavedlogins.cpp

示例10: loadFile

// static
bool LLURLHistory::loadFile(const std::string& filename)
{
	LLSD data;
	{
		std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter();

		llifstream file((temp_str + filename));

		if (file.is_open())
		{
			llinfos << "Loading history.xml file at " << temp_str + filename << llendl;
			LLSDSerialize::fromXML(data, file);
		}

		if (data.isUndefined())
		{
			llinfos << "file missing, ill-formed, "
				"or simply undefined; not changing the"
				" file" << llendl;
			sHistorySD = LLSD();
			return false;
		}
	}
	sHistorySD = data;
	return true;
}
开发者ID:Barosonix,项目名称:AstraViewer,代码行数:27,代码来源:llurlhistory.cpp

示例11: return

bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std::string& type) const
{
    // Decide whether this notification matches filter:
    // undefined: forward all notifications
    if (filter.isUndefined())
    {
        return true;
    }
    // array of string: forward any notification matching any named type
    if (filter.isArray())
    {
        for (LLSD::array_const_iterator ti(filter.beginArray()), tend(filter.endArray());
             ti != tend; ++ti)
        {
            if (ti->asString() == type)
            {
                return true;
            }
        }
        // Didn't match any entry in the array
        return false;
    }
    // string: forward only the specific named type
    return (filter.asString() == type);
}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:25,代码来源:llnotificationslistener.cpp

示例12:

	void SDTestObject::test<1>()
		// construction and test of undefined
	{
		SDCleanupCheck check;
		
		LLSD u;
		ensure("is undefined", u.isUndefined());
	}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:8,代码来源:llsd_new_tut.cpp

示例13: onClickDefault

void LLFloaterJoystick::onClickDefault(const LLSD& val)
{
	S32 type(val.asInteger());
	if (val.isUndefined()) // If button portion, set to default for device.
		if ((type = get_joystick_type()) == -1) // Invalid/No device
			return;
	LLViewerJoystick::getInstance()->setSNDefaults(type);
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:8,代码来源:llfloaterjoystick.cpp

示例14: updateSims

void LLFloaterWorldMap::updateSims(bool found_null_sim)
{
	if (mCompletingRegionName == "")
	{
		return;
	}

	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("search_results");
	list->operateOnAll(LLCtrlListInterface::OP_DELETE);

	S32 name_length = mCompletingRegionName.length();

	LLSD match;
	
	S32 num_results = 0;
	std::map<U64, LLSimInfo*>::const_iterator it;
	for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it)
	{
		LLSimInfo* info = it->second;
		std::string sim_name_lower = info->getName();
		LLStringUtil::toLower(sim_name_lower);

		if (sim_name_lower.substr(0, name_length) == mCompletingRegionName)
		{
			if (sim_name_lower == mCompletingRegionName)
			{
				match = info->getName();
			}
			
			LLSD value;
			value["id"] = info->getName();
			value["columns"][0]["column"] = "sim_name";
			value["columns"][0]["value"] = info->getName();
			list->addElement(value);
			num_results++;
		}
	}

	if (found_null_sim)
	{
		mCompletingRegionName = "";
	}

	// if match found, highlight it and go
	if (!match.isUndefined())
	{
		list->selectByValue(match);
		childSetFocus("search_results");
		onCommitSearchResult();
	}

	// if we found nothing, say "none"
	if (num_results == 0)
	{
		list->setCommentText(LLTrans::getString("worldmap_results_none_found"));
		list->operateOnAll(LLCtrlListInterface::OP_DESELECT);
	}
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:58,代码来源:llfloaterworldmap.cpp

示例15: onDoubleClickClassifiedItem

void LLPanelPicks::onDoubleClickClassifiedItem(LLUICtrl* item)
{
	LLSD value = mClassifiedsList->getSelectedValue();
	if (value.isUndefined()) return;

	LLSD args; 
	args["CLASSIFIED"] = value[CLASSIFIED_NAME]; 
	LLNotificationsUtil::add("TeleportToClassified", args, LLSD(), boost::bind(&LLPanelPicks::callbackTeleport, this, _1, _2)); 
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:9,代码来源:llpanelpicks.cpp


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