zxs 1 săptămână în urmă
părinte
comite
fcb2740295

+ 8 - 8
message_bus/message_bus_impl.h

@@ -18,27 +18,27 @@ namespace robotics::v3 {
 	class MESSAGE_BUS_API message_bus_impl {
 	public:
 		/**
-		 * @brief 单例
+		 * @brief 鍗曚緥
 		 * @return
 		 */
 		static message_bus_impl* instance();
 		~message_bus_impl();
 		/**
-		 * @brief 函数绑定到指定主题。
-		 * @param str_topic 要绑定的主题名称。
-		 * @param observer 指示是否作为观察者绑定的布尔值。
-		 * @param fn 要绑定的函数对象。
-		 * @return 如果绑定成功则返回 true,否则返回 false。
+		 * @brief 鍑芥暟缁戝畾鍒版寚瀹氫富棰樸€�
+		 * @param str_topic 瑕佺粦瀹氱殑涓婚�鍚嶇О銆�
+		 * @param observer 鎸囩ず鏄�惁浣滀负瑙傚療鑰呯粦瀹氱殑甯冨皵鍊笺€�
+		 * @param fn 瑕佺粦瀹氱殑鍑芥暟瀵硅薄銆�
+		 * @return 濡傛灉缁戝畾鎴愬姛鍒欒繑鍥� true锛屽惁鍒欒繑鍥� false銆�
 		 */
 		bool bind(std::string const& str_topic, bool observer, std::any const& fn);
 		/**
-		 * @brief 查找
+		 * @brief 鏌ユ壘
 		 * @param str_topic 
 		 * @return 
 		 */
 		std::vector<std::pair<bool, std::any>> find(const std::string& str_topic);
 		/**
-		 * @brief 删除
+		 * @brief 鍒犻櫎
 		 * @param str_topic 
 		 */
 		void remove(const std::string& str_topic);

+ 1 - 1
robot/robotics/linq.hpp

@@ -1148,7 +1148,7 @@ namespace robotics {
                     alllist.push_back(std::pair(source_[i], source_ok_[i]));
                 }
                 std::sort(alllist.begin(), alllist.end(), [&fn](std::pair<std::shared_ptr<_Type>, bool> val1, std::pair<std::shared_ptr<_Type>, bool> val2) {
-                    return fn(&val1.first, &val2.first); });
+                    return fn(val1.first, val2.first); });
                 source_.clear();
                 source_ok_.clear();
                 for (std::int64_t i = 0; i < alllist.size(); ++i) {

+ 8 - 8
robot/robotics/message_bus_impl.h

@@ -18,27 +18,27 @@ namespace robotics::v3 {
 	class MESSAGE_BUS_API message_bus_impl {
 	public:
 		/**
-		 * @brief 单例
+		 * @brief 鍗曚緥
 		 * @return
 		 */
 		static message_bus_impl* instance();
 		~message_bus_impl();
 		/**
-		 * @brief 函数绑定到指定主题。
-		 * @param str_topic 要绑定的主题名称。
-		 * @param observer 指示是否作为观察者绑定的布尔值。
-		 * @param fn 要绑定的函数对象。
-		 * @return 如果绑定成功则返回 true,否则返回 false。
+		 * @brief 鍑芥暟缁戝畾鍒版寚瀹氫富棰樸€�
+		 * @param str_topic 瑕佺粦瀹氱殑涓婚�鍚嶇О銆�
+		 * @param observer 鎸囩ず鏄�惁浣滀负瑙傚療鑰呯粦瀹氱殑甯冨皵鍊笺€�
+		 * @param fn 瑕佺粦瀹氱殑鍑芥暟瀵硅薄銆�
+		 * @return 濡傛灉缁戝畾鎴愬姛鍒欒繑鍥� true锛屽惁鍒欒繑鍥� false銆�
 		 */
 		bool bind(std::string const& str_topic, bool observer, std::any const& fn);
 		/**
-		 * @brief 查找
+		 * @brief 鏌ユ壘
 		 * @param str_topic
 		 * @return
 		 */
 		std::vector<std::pair<bool, std::any>> find(const std::string& str_topic);
 		/**
-		 * @brief 删除
+		 * @brief 鍒犻櫎
 		 * @param str_topic
 		 */
 		void remove(const std::string& str_topic);

+ 2 - 2
robot/robotics/nexus_net_client.hpp

@@ -468,7 +468,7 @@ namespace robotics {
                     item.key = it.second.get<std::string>("<xmlattr>.key", "");
                     item.route = it.second.get<std::string>("<xmlattr>.route", "");
                     item.enable = it.second.get<bool>("<xmlattr>.enable", false);
-                    item.remarks = it.second.get<std::string>("<xmlattr>.remarks", "白名单");
+                    item.remarks = it.second.get<std::string>("<xmlattr>.remarks", "白名单");//白名单
                     result->subscribes[item.key] = item;
                 }
                 //发布
@@ -479,7 +479,7 @@ namespace robotics {
                     item.key = it.second.get<std::string>("<xmlattr>.key", "");
                     item.route = it.second.get<std::string>("<xmlattr>.route", "");
                     item.enable = it.second.get<bool>("<xmlattr>.enable", false);
-                    item.remarks = it.second.get<std::string>("<xmlattr>.remarks", "白名单");
+                    item.remarks = it.second.get<std::string>("<xmlattr>.remarks", "白名单");//白名单
                     result->publishers[item.key] = item;
                 }
                 return *result;