コード例 #1
0
    void onUpdate (MamdaQuoteToBookListenerImpl&  impl,
                   const MamaMsgField&            field)
    {
;
        field.getDateTime(impl.mQuoteCache.mSrcTime);
        impl.mQuoteCache.mSrcTimeFieldState = MODIFIED;
    }
コード例 #2
0
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;
}
コード例 #3
0
 void onUpdate (MamdaQuoteToBookListenerImpl&  impl,
                const MamaMsgField&            field)
 {
     field.getDateTime(impl.mQuoteCache.mBidTime);
 }
コード例 #4
0
 void onUpdate (MamdaFundamentalListener::MamdaFundamentalListenerImpl&  impl,
                const MamaMsgField&                                      field)
 {
     field.getDateTime (impl.mLineTime);
     impl.mLineTimeFieldState = MODIFIED;
 }