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


C++ MamaMsgField::getDateTime方法代码示例

本文整理汇总了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;
    }
开发者ID:MattMulhern,项目名称:OpenMamaCassandra,代码行数:7,代码来源:MamdaQuoteToBookListener.cpp

示例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,
			&microseconds, &precision, &hints);

	memcpy(buffer, &seconds, 4);
	buffer += 4;
	memcpy(buffer, &microseconds, 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;
}
开发者ID:dmaguire,项目名称:financial,代码行数:33,代码来源:MamaRecordedMessageCodec.cpp

示例3: onUpdate

 void onUpdate (MamdaFundamentalListener::MamdaFundamentalListenerImpl&  impl,
                const MamaMsgField&                                      field)
 {
     field.getDateTime (impl.mLineTime);
     impl.mLineTimeFieldState = MODIFIED;
 }
开发者ID:OpenMAMA,项目名称:OpenMAMA,代码行数:6,代码来源:MamdaFundamentalListener.cpp


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