浏览代码

#序列化模块设置获取参数数量

zxs 1 天之前
父节点
当前提交
1d2eea8ca5
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      robot/robotics/serialization.hpp

+ 7 - 0
robot/robotics/serialization.hpp

@@ -598,6 +598,13 @@ namespace robotics {
                 stream& operator >>(std::tuple<_Args...>& value) {
                     return deserialize(value);
                 }
+                /**
+                 * @brief 返回参数数量。
+                 * @return 数量。
+                 */
+                int count() {
+					return count_param(data_);
+                }
             private:
                 /**
                  * @brief 数据