本文整理汇总了C++中MamaMsgField::getDateTime方法的典型用法代码示例。如果您正苦于以下问题:C++ MamaMsgField::getDateTime方法的具体用法?C++ MamaMsgField::getDateTime怎么用?C++ MamaMsgField::getDateTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MamaMsgField
的用法示例。
在下文中一共展示了MamaMsgField::getDateTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onUpdate
void onUpdate (MamdaQuoteToBookListenerImpl& impl,
const MamaMsgField& field)
{
;
field.getDateTime(impl.mQuoteCache.mSrcTime);
impl.mQuoteCache.mSrcTimeFieldState = MODIFIED;
}
示例2: encodeTime
uint32_t MamaRecordedMessageCodec::encodeTime(char*& buffer, MamaMsgField& mmf)
{
mmf.getDateTime(*mTempMamaDateTime);
// Get the C version as well because some functionality is missing from C++ for some reason
*mTempCMamaDateTime = mTempMamaDateTime->getCValue();
mama_u32_t seconds = 0; // 4 bytes
mama_u32_t microseconds = 0; // 4 bytes
mamaDateTimePrecision precision = (mamaDateTimePrecision)0; // 4 bytes
mama_u8_t hints = 0; // 1 byte
if(mTempMamaDateTime->hasDate())
hints = hints | MAMA_DATE_TIME_HAS_DATE;
if(mTempMamaDateTime->hasTime())
hints = hints | MAMA_DATE_TIME_HAS_TIME;
mamaDateTime_getWithHints(*mTempCMamaDateTime, &seconds,
µseconds, &precision, &hints);
memcpy(buffer, &seconds, 4);
buffer += 4;
memcpy(buffer, µseconds, 4);
buffer += 4;
memcpy(buffer, &precision, 4);
buffer += 4;
memcpy(buffer, &hints, 1);
buffer += 1;
//printf("Encoding DateTime Field [%d] = %d.%d (%d:%d)...\n", 13, seconds, microseconds, hints, precision);
return 13;
}
示例3: onUpdate
void onUpdate (MamdaFundamentalListener::MamdaFundamentalListenerImpl& impl,
const MamaMsgField& field)
{
field.getDateTime (impl.mLineTime);
impl.mLineTimeFieldState = MODIFIED;
}