您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ unsubscribe函数代码示例

51自学网 2021-06-03 09:12:10
  C++
这篇教程C++ unsubscribe函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中unsubscribe函数的典型用法代码示例。如果您正苦于以下问题:C++ unsubscribe函数的具体用法?C++ unsubscribe怎么用?C++ unsubscribe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: main

/********************************************************************* * * Main Program.  Open and subscribe for events for two sessions. * Then run the above test. * * *******************************************************************/int main(){	int ret = SAF_TEST_UNRESOLVED;	SaHpiSessionIdT sessionId1;	SaHpiSessionIdT sessionId2;	if (openSession(&sessionId1) != SA_OK) {		ret = SAF_TEST_UNRESOLVED;	} else {		if (openSession(&sessionId2) != SA_OK) {			ret = SAF_TEST_UNRESOLVED;		} else {			if (subscribe(sessionId1) != SA_OK) {				ret = SAF_TEST_UNRESOLVED;			} else {				if (subscribe(sessionId2) != SA_OK) {					ret = SAF_TEST_UNRESOLVED;				} else {					ret = run_test(sessionId1, sessionId2);					unsubscribe(sessionId2);				}				unsubscribe(sessionId1);			}			closeSession(sessionId2);		}		closeSession(sessionId1);	}	return ret;}
开发者ID:basheerk,项目名称:autotest-client-tests,代码行数:36,


示例2: unsubscribe

//=================== DESTROYER =============================StatisticsCollector::~StatisticsCollector() {    if(isSubscribed("arrival",listener)){        unsubscribe("arrival", listener);    }    if(isSubscribed("arrivalTime",listener)){        unsubscribe("arrivalTime", listener);    }}
开发者ID:lorenzo-pagliari,项目名称:PhD,代码行数:11,


示例3: JSK_NODELET_INFO

 void ConnectionBasedNodelet::connectionCallback(const ros::SingleSubscriberPublisher& pub) {   if (verbose_connection_) {     JSK_NODELET_INFO("New connection or disconnection is detected");   }   if (!always_subscribe_) {     boost::mutex::scoped_lock lock(connection_mutex_);     for (size_t i = 0; i < publishers_.size(); i++) {       ros::Publisher pub = publishers_[i];       if (pub.getNumSubscribers() > 0) {         if (!ever_subscribed_) {           ever_subscribed_ = true;         }         if (connection_status_ != SUBSCRIBED) {           if (verbose_connection_) {             JSK_NODELET_INFO("Subscribe input topics");           }           subscribe();           connection_status_ = SUBSCRIBED;         }         return;       }     }     if (connection_status_ == SUBSCRIBED) {       if (verbose_connection_) {         JSK_NODELET_INFO("Unsubscribe input topics");       }       unsubscribe();       connection_status_ = NOT_SUBSCRIBED;     }   } }
开发者ID:ChoiTaemin,项目名称:jsk_common,代码行数:32,


示例4: getImMap

void InteractiveMarkerDisplay::updatePoses(    const std::string& server_id,    const std::vector<visualization_msgs::InteractiveMarkerPose>& marker_poses ){  M_StringToIMPtr& im_map = getImMap( server_id );  for ( size_t i=0; i<marker_poses.size(); i++ )  {    const visualization_msgs::InteractiveMarkerPose& marker_pose = marker_poses[i];    if ( !validateFloats( marker_pose.pose ) )    {      setStatusStd( StatusProperty::Error, marker_pose.name, "Pose message contains invalid floats!" );      return;    }    std::map< std::string, IMPtr >::iterator int_marker_entry = im_map.find( marker_pose.name );    if ( int_marker_entry != im_map.end() )    {      int_marker_entry->second->processMessage( marker_pose );    }    else    {      setStatusStd( StatusProperty::Error, marker_pose.name, "Pose received for non-existing marker '" + marker_pose.name );      unsubscribe();      return;    }  }}
开发者ID:F34140r,项目名称:visualization-userfriendly,代码行数:30,


示例5: unsubscribe

NXTColorDisplay::~NXTColorDisplay(){  unsubscribe();  clear();  delete cylinder_;  delete tf_filter_;}
开发者ID:spotrh,项目名称:nxt,代码行数:7,


示例6: unsub

bool PubSubClient::unsubscribe(String topic) {  if (!connected())    return false;  MQTT::Unsubscribe unsub(topic);  return unsubscribe(unsub);}
开发者ID:raydtang,项目名称:pubsubclient,代码行数:7,


示例7: unsubscribe

	void unsubscribe(InputIterator const& topics_begin, InputIterator const& topics_end)	{		for(InputIterator it = topics_begin; it != topics_end; ++it)		{			unsubscribe(*it);		}	}
开发者ID:SRombauts,项目名称:zmqpp,代码行数:7,


示例8: msg_disconnectCb

 void msg_disconnectCb(const ros::SingleSubscriberPublisher&) {   subscriber_count_--;   if (subscriber_count_ == 0) {     unsubscribe();   } }
开发者ID:srmanikandasriram,项目名称:vision_opencv,代码行数:7,


示例9: nfc_unregister_snep_client

NfcSender::~NfcSender(){    nfc_unregister_snep_client();    nfc_stop_events();    unsubscribe(nfc_get_domain());    bps_shutdown();}
开发者ID:BGmot,项目名称:Cascades-Samples,代码行数:7,


示例10: sub_endpoint_update_handler

static void sub_endpoint_update_handler(void *data,	struct stasis_subscription *sub,	struct stasis_message *message){	RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);	struct stasis_app *app = data;	struct stasis_cache_update *update;	struct ast_endpoint_snapshot *new_snapshot;	struct ast_endpoint_snapshot *old_snapshot;	const struct timeval *tv;	ast_assert(stasis_message_type(message) == stasis_cache_update_type());	update = stasis_message_data(message);	ast_assert(update->type == ast_endpoint_snapshot_type());	new_snapshot = stasis_message_data(update->new_snapshot);	old_snapshot = stasis_message_data(update->old_snapshot);	if (new_snapshot) {		tv = stasis_message_timestamp(update->new_snapshot);		json = simple_endpoint_event("EndpointStateChange", new_snapshot, tv);		if (!json) {			return;		}		app_send(app, json);	}	if (!new_snapshot && old_snapshot) {		unsubscribe(app, "endpoint", old_snapshot->id, 1);	}}
开发者ID:lyx2014,项目名称:Asterisk,代码行数:35,


示例11: unsubscribe

void PointCloud2Display::onDisable(){  unsubscribe();  tf_filter_.clear();  PointCloudBase::onDisable();}
开发者ID:jonfink,项目名称:rviz,代码行数:7,


示例12: random

		void stress_subscriber::next_action_impl()		{			if ( !remaining_actions_ )				return;			--remaining_actions_;			const boost::int32_t rand = random( 1, 100 );			if ( rand < 30 )			{				subscribe();			}			else if ( rand < 60 )			{			    unsubscribe();			}			else if ( rand < 90 )			{				change();			}			else			{				change_configuration();			}		}
开发者ID:TorstenRobitzki,项目名称:Sioux,代码行数:25,


示例13: mwi_contact_added

/*! /brief Function called when a contact is added */static void mwi_contact_added(const void *object){	const struct ast_sip_contact *contact = object;	struct ao2_iterator *mwi_subs;	struct mwi_subscription *mwi_sub;	const char *endpoint_id = ast_sorcery_object_get_id(contact->endpoint);	if (ast_strlen_zero(contact->endpoint->subscription.mwi.mailboxes)) {		return;	}	ao2_lock(unsolicited_mwi);	mwi_subs = ao2_find(unsolicited_mwi, endpoint_id, OBJ_SEARCH_KEY | OBJ_MULTIPLE | OBJ_NOLOCK | OBJ_UNLINK);	if (mwi_subs) {		for (; (mwi_sub = ao2_iterator_next(mwi_subs)); ao2_cleanup(mwi_sub)) {			unsubscribe(mwi_sub, NULL, 0);		}		ao2_iterator_destroy(mwi_subs);	}	create_mwi_subscriptions_for_endpoint(contact->endpoint, NULL, 0);	ao2_unlock(unsolicited_mwi);	mwi_contact_updated(object);}
开发者ID:juned,项目名称:asterisk,代码行数:28,


示例14: unsubscribe

void StereoImageDisplayBase::updateTopics(){  unsubscribe();  reset();  subscribe();  context_->queueRender();}
开发者ID:jhu-lcsr,项目名称:rviz_teleop_camera_plugin,代码行数:7,


示例15: unsubscribe

void DepthCloudDisplay::updateTopic(){  unsubscribe();  reset();  subscribe();  context_->queueRender();}
开发者ID:F34140r,项目名称:visualization-userfriendly,代码行数:7,


示例16: unsubscribe

void PointCloudDisplay::onDisable(){  unsubscribe();  cloud_->clear();  cloud_->setCloudVisible( false );}
开发者ID:janfrs,项目名称:kwc-ros-pkg,代码行数:7,


示例17: unsubscribe

 void OverlayMenuDisplay::onDisable() {   if (overlay_) {     overlay_->hide();   }   unsubscribe(); }
开发者ID:AtsushiSakai,项目名称:jsk_visualization,代码行数:7,


示例18: unsubscribe

void MarkerDisplay::onDisable(){  unsubscribe();  tf_filter_->clear();  clearMarkers();}
开发者ID:ManolisCh,项目名称:pioneer_p3dx,代码行数:7,


示例19: unsubscribe

	void LuaSystem::onDetach(Entity &entity)	{		// Iterate subscriptions		LuaComponent *comp = entity.getComponent<LuaComponent>();		for(auto eventItr = comp->subscribedEvents.begin(); eventItr != comp->subscribedEvents.end(); eventItr++)		{			auto itr = m_subscribedScripts.find(*eventItr);			if(itr == m_subscribedScripts.end())				continue;			// Iterate entities associated with subscriptions			for(std::size_t i = 0; i < itr->second.size(); i++)			{				// Unsubscribe entity if found				if(itr->second[i] == &entity)				{					itr->second.erase(itr->second.begin() + i);					// Unsubscribe from it entirely if none wants it, except the Reload event					if(itr->first != "ReloadLua" && itr->second.empty())					{						unsubscribe(itr->first);						m_subscribedScripts.erase(itr);					}					break;				}			}		}	}
开发者ID:TrentSterling,项目名称:jlEngine,代码行数:29,


示例20: nfc_unregister_handover_listener

MacAddressHandler::~MacAddressHandler(){    nfc_unregister_handover_listener();    nfc_stop_events();    unsubscribe(nfc_get_domain());    bps_shutdown();}
开发者ID:LesnicRomulus,项目名称:Cascades-Samples,代码行数:7,


示例21: unsubscribe

void TrackDisplay::setTopic(const std::string& topic) {	unsubscribe();	track_topic_ = topic;	subscribe();	propertyChanged(topic_property_);}
开发者ID:SiChiTong,项目名称:articulation,代码行数:7,


示例22: disconnectCb

 void disconnectCb(const image_transport::SingleSubscriberPublisher&) {     subscriber_count_--;     if (subscriber_count_ == 0) {         unsubscribe();     } }
开发者ID:HiroyukiMikita,项目名称:jsk_recognition,代码行数:7,


示例23: unsubscribe

RobotModelDisplay::~RobotModelDisplay(){  unsubscribe();  delete robot_;  delete urdf_;}
开发者ID:janfrs,项目名称:kwc-ros-pkg,代码行数:7,


示例24: unsubscribe

CameraDisplay::~CameraDisplay(){  unsubscribe();  caminfo_tf_filter_->clear();  if( render_panel_ )  {    if( panel_container_ )    {      delete panel_container_;    }    else    {      delete render_panel_;    }  }  delete bg_screen_rect_;  delete fg_screen_rect_;  bg_scene_node_->getParentSceneNode()->removeAndDestroyChild( bg_scene_node_->getName() );  fg_scene_node_->getParentSceneNode()->removeAndDestroyChild( fg_scene_node_->getName() );  delete caminfo_tf_filter_;}
开发者ID:F34140r,项目名称:visualization-userfriendly,代码行数:25,


示例25: sub_bridge_update_handler

static void sub_bridge_update_handler(void *data,	struct stasis_subscription *sub,	struct stasis_message *message){	struct ast_json *json = NULL;	struct stasis_app *app = data;	struct ast_bridge_snapshot_update *update;	const struct timeval *tv;	update = stasis_message_data(message);	tv = stasis_message_timestamp(message);	if (!update->new_snapshot) {		json = simple_bridge_event("BridgeDestroyed", update->old_snapshot, tv);	} else if (!update->old_snapshot) {		json = simple_bridge_event("BridgeCreated", update->new_snapshot, tv);	} else if (update->new_snapshot && update->old_snapshot		&& strcmp(update->new_snapshot->video_source_id, update->old_snapshot->video_source_id)) {		json = simple_bridge_event("BridgeVideoSourceChanged", update->new_snapshot, tv);		if (json && !ast_strlen_zero(update->old_snapshot->video_source_id)) {			ast_json_object_set(json, "old_video_source_id",				ast_json_string_create(update->old_snapshot->video_source_id));		}	}	if (json) {		app_send(app, json);		ast_json_unref(json);	}	if (!update->new_snapshot && update->old_snapshot) {		unsubscribe(app, "bridge", update->old_snapshot->uniqueid, 1);	}}
开发者ID:roramirez,项目名称:asterisk,代码行数:35,


示例26: on_link_close

    void on_link_close(proton::event &e) {        proton::link lnk = e.link();        if (!!lnk.sender()) {            unsubscribe(lnk.sender());        }    }
开发者ID:VMinute,项目名称:qpid-proton,代码行数:7,


示例27: unsubscribe

void CameraPub::updateTopic(){  unsubscribe();  reset();  subscribe();  context_->queueRender();}
开发者ID:lucasw,项目名称:rviz_camera_stream,代码行数:7,


示例28: unsubscribe

 ~PhaseSpaceLocalization() {     unsubscribe("phase_space_snapshot") ;     unadvertise("localizedpose") ;     if (m_tfServer)         delete m_tfServer; }
开发者ID:janfrs,项目名称:kwc-ros-pkg,代码行数:7,



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


C++ unsureAsgnRef函数代码示例
C++ unsigned_offsets函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。