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


C++ LLSDMessageReader类代码示例

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


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

示例1: ensureMessageSize

		static void ensureMessageSize(const LLSD& msg_data,
									S32 expected_size)
		{
			LLSDMessageReader msg;
			msg.setMessage("fakename", msg_data);
			ensure_equals(	"Ensure size",	msg.getMessageSize(), expected_size);
		}
开发者ID:Boy,项目名称:netbook,代码行数:7,代码来源:llsdmessagereader_tut.cpp

示例2: testType

	void LLSDMessageReaderTestObject::test<7>()
		// U16
	{
		U16 outValue, inValue = 3;
		LLSDMessageReader msg = testType(inValue);
		msg.getU16("block", "var", outValue);
		ensure_equals("Ensure S16", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:8,代码来源:llsdmessagereader_tut.cpp

示例3: ensureNumberOfBlocks

		static void ensureNumberOfBlocks(const LLSD& msg_data,
									const std::string& block,
									S32 expected_number)
		{
			LLSDMessageReader msg;
			msg.setMessage("fakename", msg_data);
			ensure_equals("Ensure number of blocks", msg.getNumberOfBlocks(block.c_str()), 
						  expected_number);
		}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例4: ll_sd_from_U32

	void LLSDMessageReaderTestObject::test<10>()
		// U32
	{
		U32 outValue, inValue = 88;
		LLSD sdValue = ll_sd_from_U32(inValue);
		LLSDMessageReader msg = testType(sdValue);
		msg.getU32("block", "var", outValue);
		ensure_equals("Ensure U32", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例5: ll_sd_from_ipaddr

	void LLSDMessageReaderTestObject::test<19>()
		// IPAddr
	{
		U32 outValue, inValue = 12344556;
		LLSD sdValue = ll_sd_from_ipaddr(inValue);
		LLSDMessageReader msg = testType(sdValue);
		msg.getIPAddr("block", "var", outValue);
		ensure_equals("Ensure IPAddr", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例6: LLQuaternion

	void LLSDMessageReaderTestObject::test<17>()
		// Quaternion
	{
		 LLQuaternion outValue, inValue = LLQuaternion(1,2,3,4);
		LLSD sdValue = ll_sd_from_quaternion(inValue);
		LLSDMessageReader msg = testType(sdValue);
		msg.getQuat("block", "var", outValue);
		ensure_equals("Ensure Quaternion", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例7: ensureMessageName

		static void ensureMessageName(const std::string& msg_name,
									const LLSD& msg_data,
									const std::string& expected_name)
		{
			LLSDMessageReader msg;
			msg.setMessage(gMessageStringTable.getString(msg_name.c_str()), msg_data);
			ensure_equals("Ensure name", std::string(msg.getMessageName()), 
						  expected_name);
		}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例8: LLVector3d

	void LLSDMessageReaderTestObject::test<16>()
		// Vector3d
	{
		 LLVector3d outValue, inValue = LLVector3d(1,2,3);
		 LLSD sdValue = ll_sd_from_vector3d(inValue);
		LLSDMessageReader msg = testType(sdValue);
		msg.getVector3d("block", "var", outValue);
		ensure_equals("Ensure Vector3d", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例9: ll_sd_from_U64

	void LLSDMessageReaderTestObject::test<11>()
		// U64
	{
		U64 outValue, inValue = 121;
		LLSD sdValue = ll_sd_from_U64(inValue);
		LLSDMessageReader msg = testType(sdValue);
		msg.getU64("block", "var", outValue);
		ensure_equals("Ensure U64", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:9,代码来源:llsdmessagereader_tut.cpp

示例10: defaultBuilder

	void LLSDMessageBuilderTestObject::test<17>()
		 // IPPort
	{
		 U16 outValue, inValue = 80;
	  LLSDMessageBuilder builder = defaultBuilder();
	  builder.addIPPort("var", inValue);
	  LLSDMessageReader reader = setReader(builder);
	  reader.getIPPort("block", "var", outValue);
	  ensure_equals("Ensure IPPort", inValue, outValue);
	}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:10,代码来源:llsdmessagebuilder_tut.cpp

示例11: LLVector3d

	void LLSDMessageBuilderTestObject::test<13>()
		 // Vector3d
	{
	  LLVector3d outValue, inValue = LLVector3d(1,2,3);
	  LLSDMessageBuilder builder = defaultBuilder();
	  builder.addVector3d("var", inValue);
	  LLSDMessageReader reader = setReader(builder);
	  reader.getVector3d("block", "var", outValue);
	  ensure_equals("Ensure Vector3d", inValue, outValue);
	}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:10,代码来源:llsdmessagebuilder_tut.cpp

示例12: LLQuaternion

	void LLSDMessageBuilderTestObject::test<14>()
		 // Quaternion
	{
	  LLQuaternion outValue, inValue = LLQuaternion(1,2,3,4);
	  LLSDMessageBuilder builder = defaultBuilder();
	  builder.addQuat("var", inValue);
	  LLSDMessageReader reader = setReader(builder);
	  reader.getQuat("block", "var", outValue);
	  ensure_equals("Ensure Quaternion", inValue, outValue);
	}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:10,代码来源:llsdmessagebuilder_tut.cpp

示例13: outValue

	void LLSDMessageReaderTestObject::test<21>()
		// Binary 
	{
		std::vector<U8> outValue(2), inValue(2);
		inValue[0] = 0;
		inValue[1] = 1;
	  
		LLSDMessageReader msg = testType(inValue);
		msg.getBinaryData("block", "var", &(outValue[0]), inValue.size());
		ensure_equals("Ensure Binary", outValue, inValue);
	}
开发者ID:Boy,项目名称:netbook,代码行数:11,代码来源:llsdmessagereader_tut.cpp


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