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


C++ LLDataPacker类代码示例

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


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

示例1: deserialize

BOOL LLGestureStepSound::deserialize(LLDataPacker& dp)
{
	dp.unpackString(mSoundName, "sound_name");

	dp.unpackUUID(mSoundAssetID, "asset_id");
	dp.unpackU32(mFlags, "flags");
	return TRUE;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:8,代码来源:llmultigesture.cpp

示例2: packParams

void LLTransferSourceParamsEstate::packParams(LLDataPacker &dp) const
{
	dp.packUUID(mAgentID, "AgentID");
	// *NOTE: We do not want to pass the session id from the server to
	// the client, but I am not sure if anyone expects this value to
	// be set on the client.
	dp.packUUID(mSessionID, "SessionID");
	dp.packS32(mEstateAssetType, "EstateAssetType");
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:9,代码来源:lltransfermanager.cpp

示例3: unpackParams

BOOL LLTransferSourceParamsFile::unpackParams(LLDataPacker &dp)
{
	dp.unpackString(mFilename, "Filename");
	U8 delete_flag;
	dp.unpackU8(delete_flag, "Delete");
	mDeleteOnCompletion = delete_flag;

	llinfos << "Unpacked filename: " << mFilename << llendl;
	return TRUE;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:10,代码来源:lltransfersourcefile.cpp

示例4: unpackParams

BOOL LLTransferSourceParamsAsset::unpackParams(LLDataPacker &dp)
{
	S32 tmp_at;

	dp.unpackUUID(mAssetID, "AssetID");
	dp.unpackS32(tmp_at, "AssetType");

	mAssetType = (LLAssetType::EType)tmp_at;

	return TRUE;
}
开发者ID:AlchemyDev,项目名称:Carbon,代码行数:11,代码来源:lltransfersourceasset.cpp

示例5: unpackParams

BOOL LLTransferSourceParamsEstate::unpackParams(LLDataPacker &dp)
{
	S32 tmp_et;

	dp.unpackUUID(mAgentID, "AgentID");
	dp.unpackUUID(mSessionID, "SessionID");
	dp.unpackS32(tmp_et, "EstateAssetType");

	mEstateAssetType = (EstateAssetType)tmp_et;

	return TRUE;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:12,代码来源:lltransfermanager.cpp

示例6: deserialize

BOOL LLGestureStepAnimation::deserialize(LLDataPacker& dp)
{
	dp.unpackString(mAnimName, "anim_name");

	// Apparently an earlier version of the gesture code added \r to the end
	// of the animation names.  Get rid of it.  JC
	if (!mAnimName.empty() && mAnimName[mAnimName.length() - 1] == '\r')
	{
		// chop the last character
		mAnimName.resize(mAnimName.length() - 1);
	}

	dp.unpackUUID(mAnimAssetID, "asset_id");
	dp.unpackU32(mFlags, "flags");
	return TRUE;
}
开发者ID:HizWylder,项目名称:GIS,代码行数:16,代码来源:llmultigesture.cpp

示例7: unpackProfileParams

bool LLVolumeMessage::unpackProfileParams(
	LLProfileParams* params,
	LLDataPacker &dp)
{
	bool ok = true;
	U8 temp_u8;
	U16 temp_u16;
	F32 temp_f32;

	dp.unpackU8(temp_u8, "Curve");
	params->setCurveType(temp_u8);

	dp.unpackU16(temp_u16, "Begin");
	temp_f32 = temp_u16 * CUT_QUANTA;
	if (temp_f32 > 1.f)
	{
		LL_WARNS() << "Profile begin out of range: " << temp_f32 << LL_ENDL;
		LL_WARNS() << "Clamping to 0.0" << LL_ENDL;
		temp_f32 = 0.f;
		ok = false;
	}
	params->setBegin(temp_f32);

	dp.unpackU16(temp_u16, "End");
	temp_f32 = temp_u16 * CUT_QUANTA;
	if (temp_f32 > 1.f)
	{
		LL_WARNS() << "Profile end out of range: " << 1.f - temp_f32 << LL_ENDL;
		LL_WARNS() << "Clamping to 1.0" << LL_ENDL;
		temp_f32 = 1.f;
		ok = false;
	}
	params->setEnd(1.f - temp_f32);

	dp.unpackU16(temp_u16, "Hollow");
	temp_f32 = temp_u16 * HOLLOW_QUANTA;
	if (temp_f32 > 1.f)
	{
		LL_WARNS() << "Profile hollow out of range: " << temp_f32 << LL_ENDL;
		LL_WARNS() << "Clamping to 0.0" << LL_ENDL;
		temp_f32 = 0.f;
		ok = false;
	}
	params->setHollow(temp_f32);

	return ok;
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:47,代码来源:llvolumemessage.cpp

示例8: packThrottle

void LLThrottleGroup::packThrottle(LLDataPacker &dp) const
{
	S32 i;
	for (i = 0; i < TC_EOF; i++)
	{
		dp.packF32(mThrottleTotal[i], "Throttle");
	}
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:8,代码来源:llthrottle.cpp

示例9: packTAMessage

void LLTextureAnim::packTAMessage(LLDataPacker &dp) const
{
	U8 data[TA_BLOCK_SIZE];
	data[0] = mMode;
	data[1] = mFace;
	data[2] = mSizeX;
	data[3] = mSizeY;
	htonmemcpy(data + 4, &mStart, MVT_F32, sizeof(F32));
	htonmemcpy(data + 8, &mLength, MVT_F32, sizeof(F32));
	htonmemcpy(data + 12, &mRate, MVT_F32, sizeof(F32));

	dp.packBinaryData(data, TA_BLOCK_SIZE, "TextureAnimation");
}
开发者ID:AlchemyDev,项目名称:Carbon,代码行数:13,代码来源:lltextureanim.cpp

示例10: unpackThrottle

void LLThrottleGroup::unpackThrottle(LLDataPacker &dp)
{
	S32 i;
	for (i = 0; i < TC_EOF; i++)
	{
		F32 temp_throttle;
		dp.unpackF32(temp_throttle, "Throttle");
		temp_throttle = llclamp(temp_throttle, 0.f, 2250000.f);
		mThrottleTotal[i] = temp_throttle;
		if(mThrottleTotal[i] > gThrottleMaximumBPS[i])
		{
			mThrottleTotal[i] = gThrottleMaximumBPS[i];
		}
	}
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:15,代码来源:llthrottle.cpp

示例11: pack

BOOL LLPartData::pack(LLDataPacker &dp)
{
	LLColor4U coloru;
	dp.packU32(mFlags, "pdflags");
	dp.packFixed(mMaxAge, "pdmaxage", FALSE, 8, 8);
	coloru.setVec(mStartColor);
	dp.packColor4U(coloru, "pdstartcolor");
	coloru.setVec(mEndColor);
	dp.packColor4U(coloru, "pdendcolor");
	dp.packFixed(mStartScale.mV[0], "pdstartscalex", FALSE, 3, 5);
	dp.packFixed(mStartScale.mV[1], "pdstartscaley", FALSE, 3, 5);
	dp.packFixed(mEndScale.mV[0], "pdendscalex", FALSE, 3, 5);
	dp.packFixed(mEndScale.mV[1], "pdendscaley", FALSE, 3, 5);
	return TRUE;
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:15,代码来源:llpartdata.cpp

示例12: unpackTAMessage

void LLTextureAnim::unpackTAMessage(LLDataPacker &dp)
{
	S32 size;
	U8 data[TA_BLOCK_SIZE];
	dp.unpackBinaryData(data, size, "TextureAnimation");
	if (size != TA_BLOCK_SIZE)
	{
		if (size)
		{
			LL_WARNS() << "Bad size " << size << " for TA block, ignoring." << LL_ENDL;
		}
		mMode = 0;
		return;
	}

	mMode = data[0];
	mFace = data[1];
	mSizeX = data[2];
	mSizeY = data[3];
	htonmemcpy(&mStart, data + 4, MVT_F32, sizeof(F32));
	htonmemcpy(&mLength, data + 8, MVT_F32, sizeof(F32));
	htonmemcpy(&mRate, data + 12, MVT_F32, sizeof(F32));
}
开发者ID:AlchemyDev,项目名称:Carbon,代码行数:23,代码来源:lltextureanim.cpp

示例13: unpackParams

bool LLTransferTargetParamsVFile::unpackParams(LLDataPacker& dp)
{
	// if the source provided a new key, assign that to the asset id.
	if(dp.hasNext())
	{
		LLUUID dummy_id;
		dp.unpackUUID(dummy_id, "AgentID");
		dp.unpackUUID(dummy_id, "SessionID");
		dp.unpackUUID(dummy_id, "OwnerID");
		dp.unpackUUID(dummy_id, "TaskID");
		dp.unpackUUID(dummy_id, "ItemID");
		dp.unpackUUID(mAssetID, "AssetID");
		S32 dummy_type;
		dp.unpackS32(dummy_type, "AssetType");
	}

	// if we never got an asset id, this will always fail.
	if(mAssetID.isNull())
	{
		return false;
	}
	return true;
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:23,代码来源:lltransfertargetvfile.cpp

示例14: serialize

BOOL LLMultiGesture::serialize(LLDataPacker& dp) const
{
	dp.packS32(GESTURE_VERSION, "version");
	dp.packU8(mKey, "key");
	dp.packU32(mMask, "mask");
	dp.packString(mTrigger, "trigger");
	dp.packString(mReplaceText, "replace");

	S32 count = (S32)mSteps.size();
	dp.packS32(count, "step_count");
	S32 i;
	for (i = 0; i < count; ++i)
	{
		LLGestureStep* step = mSteps[i];

		dp.packS32(step->getType(), "step_type");
		BOOL ok = step->serialize(dp);
		if (!ok)
		{
			return FALSE;
		}
	}
	return TRUE;
}
开发者ID:HizWylder,项目名称:GIS,代码行数:24,代码来源:llmultigesture.cpp

示例15: packParams

void LLTransferSourceParamsAsset::packParams(LLDataPacker &dp) const
{
	dp.packUUID(mAssetID, "AssetID");
	dp.packS32(mAssetType, "AssetType");
}
开发者ID:AlchemyDev,项目名称:Carbon,代码行数:5,代码来源:lltransfersourceasset.cpp


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