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


C++ OmmConsumerEvent::getClosure方法代码示例

本文整理汇总了C++中OmmConsumerEvent::getClosure方法的典型用法代码示例。如果您正苦于以下问题:C++ OmmConsumerEvent::getClosure方法的具体用法?C++ OmmConsumerEvent::getClosure怎么用?C++ OmmConsumerEvent::getClosure使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OmmConsumerEvent的用法示例。


在下文中一共展示了OmmConsumerEvent::getClosure方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onRefreshMsg

void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
	ResultValidation* closure = (ResultValidation*)(ommEvent.getClosure());

	closure->closureValidate(refreshMsg.getName());

	if ( refreshMsg.getSolicited() )
		++ResultValidation::_numRefreshReceived;
}
开发者ID:thomsonreuters,项目名称:Elektron-SDK,代码行数:9,代码来源:Consumer.cpp

示例2: onUpdateMsg

void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
	cout << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;

	cout << endl << "Item Name: " << ( updateMsg.hasName() ? updateMsg.getName() : EmaString( "<not set>" ) ) << endl
		<< "Service Name: " << (updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "<not set>" ) ) << endl;

	decode( updateMsg );
}
开发者ID:thomsonreuters,项目名称:Elektron-SDK,代码行数:9,代码来源:Consumer.cpp

示例3: onStatusMsg

void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ommEvent ) 
{
	cout << endl << "Item Name: " << ( statusMsg.hasName() ? statusMsg.getName() : EmaString( "<not set>" ) ) << endl
		<< "Service Name: " << (statusMsg.hasServiceName() ? statusMsg.getServiceName() : EmaString( "<not set>" ) );

	if ( statusMsg.hasState() )
		cout << endl << "Item State: " << statusMsg.getState().toString() << endl;

	cout << "Item Handle: " << ommEvent.getHandle() << endl << "Item Closure: " << ommEvent.getClosure() << endl;
}
开发者ID:thomsonreuters,项目名称:Elektron-SDK,代码行数:10,代码来源:Consumer.cpp

示例4: onUpdateMsg

void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
	cout << endl << "Handle: " << ommEvent.getHandle() << " Closure: " << (char *)ommEvent.getClosure() << endl;

	cout << endl << "Item Name: " << ( updateMsg.hasName() ? updateMsg.getName() : EmaString( "<not set>" ) ) << endl
		<< "Service Name: " << (updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "<not set>" ) ) << endl;

	if ( DataType::FieldListEnum == updateMsg.getPayload().getDataType() )
		decode( updateMsg.getPayload().getFieldList() );
}
开发者ID:MandalaLab,项目名称:Elektron-SDK,代码行数:10,代码来源:Consumer.cpp

示例5: onStatusMsg

void AppClient::onStatusMsg( const StatusMsg& statusMsg, const OmmConsumerEvent& ommEvent )
{
	cout << "Received Status. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;

	if ( statusMsg.hasMsgKey() )
		cout << endl << "Item Name: " << statusMsg.getName() << endl << "Service Name: " << statusMsg.getServiceName();
	
	if ( statusMsg.hasState() )
		cout << endl << "Item State: " << statusMsg.getState().toString() << endl;
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:10,代码来源:Consumer.cpp

示例6: onRefreshMsg

void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent ) 
{
	cout << endl << "Item Name: " << ( refreshMsg.hasName() ? refreshMsg.getName() : EmaString( "<not set>" ) ) << endl
		<< "Service Name: " << (refreshMsg.hasServiceName() ? refreshMsg.getServiceName() : EmaString( "<not set>" ) );

	cout << endl << "Item State: " << refreshMsg.getState().toString() << endl;

	cout << "Item Handle: " << ommEvent.getHandle() << endl << "Item Closure: " << ommEvent.getClosure() << endl;

	if ( DataType::FieldListEnum == refreshMsg.getPayload().getDataType() )
		decode( refreshMsg.getPayload().getFieldList() );
}
开发者ID:thomsonreuters,项目名称:Elektron-SDK,代码行数:12,代码来源:Consumer.cpp

示例7: onUpdateMsg

void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
	cout << endl << "Received Update. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;

	if ( updateMsg.hasMsgKey() )
		cout << endl << "Item Name: " << updateMsg.getName() << endl << "Service Name: " << updateMsg.getServiceName() << endl;

	if ( DataType::FieldListEnum == updateMsg.getPayload().getDataType() )
		decode( updateMsg.getPayload().getFieldList() );
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:10,代码来源:Consumer.cpp

示例8: onRefreshMsg

void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
	cout << "Received Refresh. Item Handle: " << ommEvent.getHandle() << " Closure: " << ommEvent.getClosure() << endl;

	if ( refreshMsg.hasMsgKey() )
		cout << endl << "Item Name: " << refreshMsg.getName() << endl << "Service Name: " << refreshMsg.getServiceName();

	cout << endl << "Item State: " << refreshMsg.getState().toString() << endl;

	if ( DataType::FieldListEnum == refreshMsg.getPayload().getDataType() )
		decode( refreshMsg.getPayload().getFieldList() );

	// Reissue item's priority after receiving the first refresh message
	if ( refreshMsg.getState().getStreamState() == OmmState::OpenEnum &&
		refreshMsg.getState().getDataState() == OmmState::OkEnum &&
		!hasFirstRefresh )
	{
		_pOmmConsumer->reissue( ReqMsg().priority( 2, 2 ), ommEvent.getHandle() );
		hasFirstRefresh = true;
	}
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:21,代码来源:Consumer.cpp

示例9: onAckMsg

void AppClient::onAckMsg( const AckMsg& ackMsg, const OmmConsumerEvent& event )
{
    cout << endl << "Received:    AckMsg" << endl << "Item Handle: " << event.getHandle() << endl << "Closure:     " << event.getClosure() << endl;

    decode( ackMsg );
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:6,代码来源:Consumer.cpp

示例10: onUpdateMsg

void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
    cout << endl << "Received:    " << "UpdateMsg" << endl << "Handle: " << ommEvent.getHandle() << " Closure:     " << ommEvent.getClosure() << endl;

    if ( updateMsg.hasMsgKey() )
        cout << "Item Name: " << updateMsg.getName() << endl << "Service Name: " << ( updateMsg.hasServiceName() ? updateMsg.getServiceName() : EmaString( "not set" ) ) << endl;

    decode( updateMsg );
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:9,代码来源:Consumer.cpp

示例11: onRefreshMsg

void AppClient::onRefreshMsg( const RefreshMsg& refreshMsg, const OmmConsumerEvent& ommEvent )
{
    cout << endl << "Received:    " << "RefreshMsg" << endl << "Handle: " << ommEvent.getHandle() << " Closure:     " << ommEvent.getClosure() << endl;

    if ( refreshMsg.hasMsgKey() )
        cout << "Item Name: " << refreshMsg.getName() << endl << "Service Name: " << ( refreshMsg.hasServiceName() ? refreshMsg.getServiceName() : EmaString( "not set" ) ) << endl;

    cout << "Item State: " << refreshMsg.getState().toString() << endl;

    if ( refreshMsg.getDomainType() == MMT_LOGIN &&
            refreshMsg.getState().getStreamState() == OmmState::OpenEnum &&
            refreshMsg.getState().getDataState() == OmmState::OkEnum )
    {
        _pOmmConsumer->submit( PostMsg().postId( 1 ).serviceId( 1501 ).name( "TRI.N" ).solicitAck( true ).complete().payload(
                                   RefreshMsg().payload( FieldList().addReal( 25, 35, OmmReal::ExponentPos1Enum ).complete() ).complete() ), ommEvent.getHandle() );
    }

    decode( refreshMsg );
}
开发者ID:HaroldWoods,项目名称:Elektron-SDK,代码行数:19,代码来源:Consumer.cpp


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