本文整理汇总了C++中MamaMsgField::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ MamaMsgField::getString方法的具体用法?C++ MamaMsgField::getString怎么用?C++ MamaMsgField::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MamaMsgField
的用法示例。
在下文中一共展示了MamaMsgField::getString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onUpdate
void onUpdate (MamdaFundamentalListener::MamdaFundamentalListenerImpl& impl,
const MamaMsgField& field)
{
switch (field.getType())
{
case MAMA_FIELD_TYPE_I8:
case MAMA_FIELD_TYPE_U8:
case MAMA_FIELD_TYPE_I16:
case MAMA_FIELD_TYPE_U16:
case MAMA_FIELD_TYPE_I32:
case MAMA_FIELD_TYPE_U32:
impl.mDivFreq = impl.getDividendFrequency (field.getU32());
impl.mDivFreqFieldState = MODIFIED;
break;
case MAMA_FIELD_TYPE_STRING:
impl.mDivFreq = impl.getDividendFrequency (field.getString());
impl.mDivFreqFieldState = MODIFIED;
break;
default:
mama_log (MAMA_LOG_LEVEL_FINE,
"Unhandled type %d for wDivFreq. "
"Expected string or integer.",
field.getType());
break;
}
}
示例2: onUpdate
void onUpdate (MamdaQuoteToBookListenerImpl& impl,
const MamaMsgField& field)
{
if (field.getType () == MAMA_FIELD_TYPE_STRING)
{
impl.mQuoteCache.mQuoteQualNative = field.getString();
}
else if (field.getType () == MAMA_FIELD_TYPE_CHAR)
{
impl.mQuoteCache.mQuoteQualNative = field.getChar();
}
}
示例3: encodeString
uint32_t MamaRecordedMessageCodec::encodeString(char*& buffer, MamaMsgField& mmf)
{
const char* mfv = mmf.getString();
mama_u16_t s = (mama_u16_t)strlen(mfv);
// Add the size to the buffer as this is a non-fixed width field type
memcpy(buffer, &s, 2);
buffer += 2;
memcpy(buffer, mfv, s);
buffer += s;
//printf("Encoding String Field[%d] = %s...\n", s, mfv);
return (s+2);
}