本文整理汇总了C++中MamdaOrderBook::setQuality方法的典型用法代码示例。如果您正苦于以下问题:C++ MamdaOrderBook::setQuality方法的具体用法?C++ MamdaOrderBook::setQuality怎么用?C++ MamdaOrderBook::setQuality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MamdaOrderBook
的用法示例。
在下文中一共展示了MamdaOrderBook::setQuality方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setQuality
void MamdaQuoteToBookListenerImpl::setQuality (
MamdaSubscription* sub,
mamaQuality quality)
{
if (mFullBook->getQuality() == quality)
return; // no change
mFullBook->setQuality (quality);
switch (quality)
{
case MAMA_QUALITY_OK:
break;
case MAMA_QUALITY_STALE:
case MAMA_QUALITY_MAYBE_STALE:
case MAMA_QUALITY_PARTIAL_STALE:
case MAMA_QUALITY_FORCED_STALE:
case MAMA_QUALITY_UNKNOWN:
if (mClearStaleBook)
{
acquireLock();
clear();
invokeClearHandlers (sub, NULL);
releaseLock();
}
}
}
示例2: onQuality
void onQuality (MamdaSubscription* subscription, mamaQuality quality)
{
if (gExampleLogLevel == EXAMPLE_LOG_LEVEL_NORMAL)
{
cout << "atomicbookbuilder: QUALITY: " << quality << "\n";
}
mOrderBook.setQuality (quality);
}
示例3: AtomicBookBuilder
AtomicBookBuilder (
const char* symbol)
: mShowEntries (false)
, mShowMarketOrders (false)
, mEntryPtr (NULL)
, mLevelPtr (NULL)
, mSymbol (strdup(symbol))
{
mOrderBook.setSymbol (mSymbol);
mOrderBook.setQuality (MAMA_QUALITY_OK);
}