本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}