cosnotifycomm_i.h

来自「编译工具」· C头文件 代码 · 共 599 行 · 第 1/2 页

H
599
字号
inline CosN_StructuredEvent* StructuredPullSupplier_i::pull_structured_event( 				WRAPPED_IMPLARG_VOID ){  CosN_StructuredEvent* event = new CosN_StructuredEvent();  event->header.fixed_header.event_type.domain_name = event_type.domain_name;  event->header.fixed_header.event_type.type_name   = event_type.type_name;  event->header.variable_header.length(0);  event->filterable_data.length(0);  event->remainder_of_body <<= ++num_events;  cout << "StructuredPullSupplier_i: pull_structured_event() called" << endl;  return event;}inline CosN_StructuredEvent* StructuredPullSupplier_i::try_pull_structured_event(				CORBA::Boolean& has_event WRAPPED_IMPLARG ){  CosN_StructuredEvent* event = new CosN_StructuredEvent();  event->header.fixed_header.event_type.domain_name = event_type.domain_name;   event->header.fixed_header.event_type.type_name   = event_type.type_name;  event->header.variable_header.length(0);  event->filterable_data.length(0);  event->remainder_of_body <<= ++num_events;  has_event = 1;  cout << "StructuredPullSupplier_i: try_pull_structured_event() called"<< endl;  return event;}inline void StructuredPullSupplier_i::disconnect_structured_pull_supplier(				WRAPPED_IMPLARG_VOID ){ cout << " StructuredPullSupplier: disconnected" << endl; }inline void StructuredPullSupplier_i::subscription_change(				const CosN_EventTypeSeq& added,				const CosN_EventTypeSeq& deled WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType   type;  cout << "StructuredPullSupplier: subscription_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];         cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}// ----------- CosNotifyComm::StructuredPushSupplier ----------- //class StructuredPushSupplier_i : 	WRAPPED_SKELETON_SUPER(CosNotifyComm::, StructuredPushSupplier) {public:  StructuredPushSupplier_i()	{;}  inline void disconnect_structured_push_supplier(  WRAPPED_DECLARG_VOID );  inline void subscription_change(const CosN_EventTypeSeq& added,				  const CosN_EventTypeSeq& deled 				  WRAPPED_DECLARG );};inline void StructuredPushSupplier_i::disconnect_structured_push_supplier( 				WRAPPED_IMPLARG_VOID ){ cout << "StructuredPushSupplier: disconnected" << endl; }inline void StructuredPushSupplier_i::subscription_change(				const CosN_EventTypeSeq& added,				const CosN_EventTypeSeq& deled WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType   type;  cout << "StructuredPushSupplier: subscription_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];         cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}// ------------ CosNotifyComm::SequencePushConsumer ------------ //class SequencePushConsumer_i : 	WRAPPED_SKELETON_SUPER(CosNotifyComm::, SequencePushConsumer) {public:  SequencePushConsumer_i() : num_batches(0), num_events(0) {;}  inline void push_structured_events(const CosN_EventBatch& events 				     WRAPPED_DECLARG );  inline void disconnect_sequence_push_consumer( WRAPPED_DECLARG_VOID );  inline void offer_change(const CosN_EventTypeSeq& added,			   const CosN_EventTypeSeq& deled WRAPPED_DECLARG );protected:  CORBA::ULong num_batches;  CORBA::ULong num_events;};inline void SequencePushConsumer_i::push_structured_events(				const CosN_EventBatch& events WRAPPED_IMPLARG ){   num_batches += 1;  num_events  += events.length();  cout << "SequencePushConsumer: " << num_batches << " batches with " <<	  num_events << " events so far" << endl;}inline void SequencePushConsumer_i::disconnect_sequence_push_consumer(  				WRAPPED_IMPLARG_VOID ){ cout << "SequencePushConsumer: disconnected" << endl; }inline void SequencePushConsumer_i::offer_change(				const CosN_EventTypeSeq& added,			  	const CosN_EventTypeSeq& deled WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType   type;  cout << "SequencePushConsumer: offer_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];        cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;   }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}// ------------ CosNotifyComm::SequencePullConsumer ------------ //class SequencePullConsumer_i : 	WRAPPED_SKELETON_SUPER(CosNotifyComm::, SequencePullConsumer) {public:  SequencePullConsumer_i() {;}  inline void disconnect_sequence_pull_consumer(  WRAPPED_DECLARG_VOID );  inline void offer_change(const CosN_EventTypeSeq& added,			   const CosN_EventTypeSeq& deled WRAPPED_DECLARG );};inline void SequencePullConsumer_i::disconnect_sequence_pull_consumer( 				WRAPPED_IMPLARG_VOID ){ cout << "SequencePullConsumer: disconnected" << endl; }inline void SequencePullConsumer_i::offer_change(const CosN_EventTypeSeq& added,					  	 const CosN_EventTypeSeq& deled					         WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType   type;  cout << "SequencePullConsumer: offer_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];        cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}// ------------ CosNotifyComm::SequencePullSupplier ------------ //class SequencePullSupplier_i : 	WRAPPED_SKELETON_SUPER(CosNotifyComm::, SequencePullSupplier) {public:  inline SequencePullSupplier_i();  inline CosN_EventBatch* pull_structured_events(CORBA::Long max_number					         WRAPPED_DECLARG );  inline CosN_EventBatch* try_pull_structured_events(CORBA::Long max_number,						     CORBA::Boolean& has_event						     WRAPPED_DECLARG );  inline void disconnect_sequence_pull_supplier( WRAPPED_DECLARG_VOID );  inline void subscription_change(const CosN_EventTypeSeq& added,				  const CosN_EventTypeSeq& deled 				  WRAPPED_DECLARG );protected:  CORBA::ULong num_events;  CosN_EventType   event_type;};inline SequencePullSupplier_i::SequencePullSupplier_i() : num_events(0){ event_type.domain_name = CORBA::string_dup("DummyDomain");  event_type.type_name   = CORBA::string_dup("DummyType");}inline CosN_EventBatch* SequencePullSupplier_i::pull_structured_events(				CORBA::Long max_number WRAPPED_IMPLARG ){  CosN_EventBatch*     batch = new CosN_EventBatch;  CosN_StructuredEvent event;  event.header.fixed_header.event_type.domain_name = event_type.domain_name;   event.header.fixed_header.event_type.type_name   = event_type.type_name;  event.header.variable_header.length(0);  event.filterable_data.length(0);  event.remainder_of_body <<= ++num_events;  batch->length(1);  (*batch)[0] = event;  cout << "SequencePullSupplier_i: pull_structured_events() called" << endl;  return batch;}inline CosN_EventBatch* SequencePullSupplier_i::try_pull_structured_events(				CORBA::Long max_number,				CORBA::Boolean& has_event WRAPPED_IMPLARG ){  CosN_EventBatch*     batch = new CosN_EventBatch;  CosN_StructuredEvent event;  event.header.fixed_header.event_type.domain_name = event_type.domain_name;   event.header.fixed_header.event_type.type_name   = event_type.type_name;  event.header.variable_header.length(0);  event.filterable_data.length(0);  event.remainder_of_body <<= ++num_events;  batch->length(1);  (*batch)[0] = event;  has_event = 1;  cout << "SequencePullSupplier_i: try_pull_structured_events() called" << endl;  return batch;}inline void SequencePullSupplier_i::disconnect_sequence_pull_supplier( 				WRAPPED_IMPLARG_VOID ){ cout << "SequencePullSupplier: disconnected" << endl; }inline void SequencePullSupplier_i::subscription_change(				const CosN_EventTypeSeq& added,				const CosN_EventTypeSeq& deled WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType   type;  cout << "SequencePullSupplier: subscription_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];         cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}// ------------ CosNotifyComm::SequencePushSupplier ------------ //class SequencePushSupplier_i : 	WRAPPED_SKELETON_SUPER(CosNotifyComm::, SequencePushSupplier) {public:  SequencePushSupplier_i() {;}  inline void disconnect_sequence_push_supplier( WRAPPED_DECLARG_VOID );  inline void subscription_change(const CosN_EventTypeSeq& added,				  const CosN_EventTypeSeq& deled 				  WRAPPED_DECLARG );};inline void SequencePushSupplier_i::disconnect_sequence_push_supplier(  				WRAPPED_IMPLARG_VOID ){ cout << "SequencePushSupplier: disconnected" << endl; }inline void SequencePushSupplier_i::subscription_change(				const CosN_EventTypeSeq& added,				const CosN_EventTypeSeq& deled WRAPPED_IMPLARG ){  CORBA::ULong indx;  CosN_EventType type;  cout << "SequencePushSupplier: subscription_change contains: " << endl;  for (indx = 0; indx < added.length(); indx++) {        type = added[indx];         cout << "\t+ " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }  for (indx = 0; indx < deled.length(); indx++) {        type = deled[indx];        cout << "\t- " << (const char*)type.domain_name << 		"::"   << (const char*)type.type_name   << endl;  }}#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?