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


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

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


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

示例1: getSenderTrustedness

//static
LLMessageConfig::SenderTrust LLMessageConfig::getSenderTrustedness(
	const std::string& msg_name)
{
	LLMessageConfigFile& file = LLMessageConfigFile::instance();
	LLSD config = file.mMessages[msg_name];
	if (config.has("trusted-sender"))
	{
		return config["trusted-sender"].asBoolean() ? TRUSTED : UNTRUSTED;
	}
	return NOT_SET;
}
开发者ID:Boy,项目名称:rainbow,代码行数:12,代码来源:llmessageconfig.cpp

示例2: loadMaxQueuedEvents

void LLMessageConfigFile::loadMaxQueuedEvents(const LLSD& data)
{
	 if (data.has("maxQueuedEvents"))
	 {
		  mMaxQueuedEvents = data["maxQueuedEvents"].asInteger();
	 }
	 else
	 {
		  mMaxQueuedEvents = DEFAULT_MAX_QUEUED_EVENTS;
	 }
}
开发者ID:Boy,项目名称:rainbow,代码行数:11,代码来源:llmessageconfig.cpp

示例3: insert

	void insert(const LLSD& experience_data )
	{
		if(experience_data.has(EXPERIENCE_ID))
		{
            processExperience(experience_data[EXPERIENCE_ID].asUUID(), experience_data);
		}
		else
		{
			LL_WARNS("ExperienceCache") << ": Ignoring cache insert of experience which is missing " << EXPERIENCE_ID << LL_ENDL;
		}
	}
开发者ID:Belxjander,项目名称:Kirito,代码行数:11,代码来源:llexperiencecache.cpp

示例4: addEntry

//static
void LLFloaterBlacklist::addEntry(LLUUID key, LLSD data)
{
	if(key.notNull())
	{
		if(!data.has("entry_type"))
		{
			LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry type, specify LLAssetType::Etype" << LL_ENDL;
		}
		else if(!data.has("entry_name"))
		{
			LL_WARNS("FloaterBlacklistAdd") << "addEntry called with no entry name, specify the name that should appear in the listing for this entry." << LL_ENDL;
		}
		else
		{
			if(!data.has("entry_date"))
			{
				LLDate* curdate = new LLDate(time_corrected());
				std::string input_date = curdate->asString();
				input_date.replace(input_date.find("T"),1," ");
				input_date.resize(input_date.size() - 1);
				data["entry_date"] = input_date;
			}
			if(data["entry_type"].asString() == "1")
			{
				//remove sounds
				LLUUID sound_id=LLUUID(key);
				gVFS->removeFile(sound_id,LLAssetType::AT_SOUND);
				std::string wav_path= gDirUtilp->getExpandedFilename(LL_PATH_CACHE,sound_id.asString()) + ".dsf";
				if(LLAPRFile::isExist(wav_path, LL_APR_RPB))
					LLAPRFile::remove(wav_path);
				gAudiop->removeAudioData(sound_id);
			}
			blacklist_entries.insert(std::pair<LLUUID,LLSD>(key,data));
			updateBlacklists();
		}
	}
	else
	{
		LL_WARNS("FloaterBlacklistAdd") << "addEntry called with a null entry key, please specify LLUUID of asset." << LL_ENDL;
	}
}
开发者ID:OS-Development,项目名称:VW.Singularity,代码行数:42,代码来源:llfloaterblacklist.cpp

示例5: addGrid

bool LLGridManager::addGrid(LLSD& grid_data)
{
	if (grid_data.isMap() && grid_data.has(GRID_VALUE))
	{
		std::string grid = utf8str_tolower(grid_data[GRID_VALUE]);

		// grid should be in the form of a dns address
		if (!grid.empty() &&
			grid.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890-_. ") != std::string::npos)
		{
			llinfos << "Invalid grid name " << grid << llendl;
			return false;
		}
		
		// populate the other values if they don't exist
		if (!grid_data.has(GRID_LABEL_VALUE)) 
		{
			grid_data[GRID_LABEL_VALUE] = grid;
		}
		if (!grid_data.has(GRID_ID_VALUE))
		{
			grid_data[GRID_ID_VALUE] = grid;
		}
		
		// if the grid data doesn't include any of the URIs, then 
		// generate them from the grid, which should be a dns address
		if (!grid_data.has(GRID_LOGIN_URI_VALUE)) 
		{
			grid_data[GRID_LOGIN_URI_VALUE] = LLSD::emptyArray();
			grid_data[GRID_LOGIN_URI_VALUE].append(std::string("https://") + 
													grid + "/cgi-bin/login.cgi");
		}
		// Populate to the default values
		if (!grid_data.has(GRID_LOGIN_PAGE_VALUE)) 
		{
			grid_data[GRID_LOGIN_PAGE_VALUE] = std::string("http://") + grid + "/app/login/";
		}		
		if (!grid_data.has(GRID_HELPER_URI_VALUE)) 
		{
			grid_data[GRID_HELPER_URI_VALUE] = std::string("https://") + grid + "/helpers/";
		}
		
		if (!grid_data.has(GRID_LOGIN_IDENTIFIER_TYPES))
		{
			// non system grids and grids that haven't already been configured with values
			// get both types of credentials.
			grid_data[GRID_LOGIN_IDENTIFIER_TYPES] = LLSD::emptyArray();
			grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_AGENT);
			grid_data[GRID_LOGIN_IDENTIFIER_TYPES].append(CRED_IDENTIFIER_TYPE_ACCOUNT);
		}
		
		LL_DEBUGS("GridManager") << "ADDING: " << grid << LL_ENDL;
		mGridList[grid] = grid_data;		
	}
	return true;
}
开发者ID:Krazy-Bish-Margie,项目名称:Thunderstorm,代码行数:56,代码来源:llviewernetwork.cpp

示例6: notifyParent

//virtual
S32 LLAvatarList::notifyParent(const LLSD& info)
{
	if (info.has("sort") && &NAME_COMPARATOR == mItemComparator)
	{
		sort();
		return 1;
	}
// [SL:KB] - Patch: UI-AvatarListDndShare | Checked: 2011-06-19 (Catznip-2.6.0c) | Added: Catznip-2.6.0c
	else if ( (info.has("select")) && (info["select"].isUUID()) )
	{
		const LLSD& sdValue = getSelectedValue();
		const LLUUID idItem = info["select"].asUUID();
		if ( (!sdValue.isDefined()) || ((sdValue.isUUID()) && (sdValue.asUUID() != idItem)) )
		{
			resetSelection();
			selectItemByUUID(info["select"].asUUID());
		}
	}
// [/SL:KB]
	return LLFlatListViewEx::notifyParent(info);
}
开发者ID:JohnMcCaffery,项目名称:Armadillo-Phoenix,代码行数:22,代码来源:llavatarlist.cpp

示例7: fromLLSD

lggBeamsColors lggBeamsColors::fromLLSD(const LLSD& inputData)
{
	lggBeamsColors toReturn;
	
	if (inputData.has("startHue"))
	{
		toReturn.mStartHue = (F32)inputData["startHue"].asReal();
	}

	if (inputData.has("endHue"))
	{
		toReturn.mEndHue = (F32)inputData["endHue"].asReal();
	}

	if (inputData.has("rotateSpeed"))
	{
		toReturn.mRotateSpeed = (F32)inputData["rotateSpeed"].asReal();
	}

	return toReturn;
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:21,代码来源:lggbeamscolors.cpp

示例8: notify

S32 LLTeleportHistoryFlatItem::notify(const LLSD& info)
{
	if(info.has("detach"))
	{
		delete mMouseDownSignal;
		mMouseDownSignal = NULL;
		delete mRightMouseDownSignal;
		mRightMouseDownSignal = NULL;
		return 1;
	}
	return 0;
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例9: callbackNewListName

bool LLFloaterAutoReplaceSettings::callbackNewListName(const LLSD& notification, const LLSD& response)
{
	LL_DEBUGS("AutoReplace")<<"called"<<LL_ENDL;
	
	LLSD newList = notification["payload"]["list"];

	if ( response.has("listname") && response["listname"].isString() )
	{
		std::string newName = response["listname"].asString();
		LLAutoReplaceSettings::setListName(newList, newName);

		switch ( mSettings.addList(newList) )
		{
		case LLAutoReplaceSettings::AddListOk:
			LL_INFOS("AutoReplace") << "added new list '"<<newName<<"'"<<LL_ENDL;
			mSelectedListName = newName;
			updateListNames();
			updateListNamesControls();
			updateReplacementsList();
			break;

		case LLAutoReplaceSettings::AddListDuplicateName:
			{
				LL_WARNS("AutoReplace")<<"name '"<<newName<<"' is in use; prompting for new name"<<LL_ENDL;
				LLSD newPayload;
				newPayload["list"] = notification["payload"]["list"];
				LLSD args;
				args["DUPNAME"] = newName;
	
				LLNotificationsUtil::add("RenameAutoReplaceList", args, newPayload,
										 boost::bind(&LLFloaterAutoReplaceSettings::callbackListNameConflict, this, _1, _2));
			}
			break;

		case LLAutoReplaceSettings::AddListInvalidList:
			LLNotificationsUtil::add("InvalidAutoReplaceList");

			mSelectedListName.clear();
			updateListNames();
			updateListNamesControls();
			updateReplacementsList();
			break;

		default:
			LL_ERRS("AutoReplace") << "invalid AddListResult" << LL_ENDL;
		}
	}
	else
	{
		LL_ERRS("AutoReplace") << "adding notification response" << LL_ENDL;
	}
	return false;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:53,代码来源:llfloaterautoreplacesettings.cpp

示例10: onOpen

void LLFloaterSearch::onOpen(const LLSD& key)
{
	Params p(key);
	p.trusted_content = true;
	p.allow_address_entry = false;

	LLFloaterWebContent::onOpen(p);
	if ( (key.has("category")) || ((mWebBrowser) && (mWebBrowser->getCurrentNavUrl().empty())) )
	{
		search(p.search);
	}
}
开发者ID:OS-Development,项目名称:VW.Dolphin_v3,代码行数:12,代码来源:llfloatersearch.cpp

示例11: parseUUIDArray

void AISUpdate::parseUUIDArray(const LLSD& content, const std::string& name, uuid_list_t& ids)
{
	if (content.has(name))
	{
		for(LLSD::array_const_iterator it = content[name].beginArray(),
				end = content[name].endArray();
				it != end; ++it)
		{
			ids.insert((*it).asUUID());
		}
	}
}
开发者ID:CaseyraeStarfinder,项目名称:Firestorm-Viewer,代码行数:12,代码来源:llaisapi.cpp

示例12: dispatch

void LLCommandDispatcherListener::dispatch(const LLSD& params) const
{
    // For most purposes, we expect callers to want to be trusted.
    bool trusted_browser = true;
    if (params.has("trusted"))
    {
        // But for testing, allow a caller to specify untrusted.
        trusted_browser = params["trusted"].asBoolean();
    }
    LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL,
                                  "clicked", trusted_browser);
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:12,代码来源:llcommanddispatcherlistener.cpp

示例13: resetAxes

void LLAgentListener::resetAxes(const LLSD& event) const
{
    if (event.has("lookat"))
    {
        mAgent.resetAxes(ll_vector3_from_sd(event["lookat"]));
    }
    else
    {
        // no "lookat", default call
        mAgent.resetAxes();
    }
}
开发者ID:gurucoyote,项目名称:viewer-development,代码行数:12,代码来源:llagentlistener.cpp

示例14: handle

// ex. secondlife:///app/objectim/9426adfc-9c17-8765-5f09-fdf19957d003?owner=a112d245-9095-4e9c-ace4-ffa31717f934&groupowned=true&slurl=ahern/123/123/123&name=Object
bool LLObjectIMInfoHandler::handle(const LLSD &tokens, const LLSD &query_map, LLMediaCtrl* web)
{
	LLUUID task_id = tokens[0].asUUID();
	std::string name = query_map["name"].asString();
	std::string slurl = query_map["slurl"].asString();
	LLUUID owner = query_map["owner"].asUUID();
	bool group_owned = query_map.has("groupowned");
	
	LLObjectIMInfo::show(task_id,name,slurl,owner,group_owned);

	return true;
}
开发者ID:9skunks,项目名称:imprudence,代码行数:13,代码来源:llfloaterobjectiminfo.cpp

示例15: fromLLSD

//#include "llvoavatar.h"
//LLVOAvatarSelf *gAgentAvatarp = NULL;
lggIrcData lggIrcData::fromLLSD(LLSD inputData)
{
	
	lggIrcData toReturn;
	if(inputData.has("ircserver")) toReturn.server = inputData["ircserver"].asString();
	if(inputData.has("ircname")) toReturn.name = inputData["ircname"].asString();
	if(inputData.has("ircport")) toReturn.port = inputData["ircport"].asString();
	if(inputData.has("ircnick")) toReturn.nick = inputData["ircnick"].asString();
	if(inputData.has("ircchannel")) toReturn.channel = inputData["ircchannel"].asString();
	if(inputData.has("ircnickpassword")) toReturn.nickPassword = inputData["ircnickpassword"].asString();
	if(inputData.has("ircchannelpassword")) toReturn.channelPassword = inputData["ircchannelpassword"].asString();
	if(inputData.has("ircserverpassword")) toReturn.serverPassword = inputData["ircserverpassword"].asString();
	if(inputData.has("ircautologin")) toReturn.autoLogin = inputData["ircautologin"].asBoolean();
	if(inputData.has("ircid")) toReturn.id = LLUUID(inputData["ircid"].asString());
	//support for legacy format
	if(inputData.has("ircpassword")) toReturn.nickPassword = inputData["ircpassword"].asString();

	return toReturn;


}
开发者ID:Lirusaito,项目名称:Voodoo-2,代码行数:23,代码来源:lggIrcData.cpp


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