From da3d9847469fec45a504afc22531f7a30abc04d8 Mon Sep 17 00:00:00 2001
From: Rainer Kartmann <rainer.kartmann@kit.edu>
Date: Fri, 11 Mar 2022 08:36:35 +0100
Subject: [PATCH] Add documentation and include

---
 .../ArmarXObjects/ObjectPoseClient.h          | 61 +++++++++++++++++--
 1 file changed, 57 insertions(+), 4 deletions(-)

diff --git a/source/RobotAPI/libraries/ArmarXObjects/ObjectPoseClient.h b/source/RobotAPI/libraries/ArmarXObjects/ObjectPoseClient.h
index 9bae3131e..b54f1076e 100644
--- a/source/RobotAPI/libraries/ArmarXObjects/ObjectPoseClient.h
+++ b/source/RobotAPI/libraries/ArmarXObjects/ObjectPoseClient.h
@@ -1,7 +1,9 @@
 #pragma once
 
-#include "RobotAPI/libraries/ArmarXObjects/ObjectID.h"
+#include <optional>
+
 #include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
+#include <RobotAPI/libraries/ArmarXObjects/ObjectID.h>
 #include <RobotAPI/libraries/ArmarXObjects/ObjectFinder.h>
 #include <RobotAPI/libraries/ArmarXObjects/ObjectPose.h>
 
@@ -17,30 +19,81 @@ namespace armarx::objpose
     {
     public:
 
+        /// Construct a disconnected client.
         ObjectPoseClient();
-        ObjectPoseClient(const ObjectPoseStorageInterfacePrx& objectPoseStorage,
-                         const ObjectFinder& finder = {});
-
+        /// Construct a client and connect it to the object pose storage.
+        ObjectPoseClient(
+                const ObjectPoseStorageInterfacePrx& objectPoseStorage,
+                const ObjectFinder& finder = {}
+                );
+
+        /**
+         * @brief Connect to the given object pose storage.
+         *
+         * This function can be used after default-constructing the client.
+         *
+         * @param objectPoseStorage The object pose storage.
+         */
         void connect(const ObjectPoseStorageInterfacePrx& objectPoseStorage);
 
+        /**
+         * @brief Indicate whether this client is connected to an object pose
+         * storage.
+         *
+         * That is, whether its proxy has been set via the constructor or
+         * `connect()`.
+         *
+         * If false, all `fetch*()` functions will return empty results.
+         *
+         * @return True if connected
+         */
         bool isConnected() const;
 
 
+        /**
+         * @brief Fetch all known object poses.
+         * @return The known object poses.
+         */
         ObjectPoseSeq
         fetchObjectPoses();
 
+        /**
+         * @brief Fetch all known object poses.
+         * @return The known object poses, with object ID as key.
+         */
         ObjectPoseMap
         fetchObjectPosesAsMap();
 
+        /**
+         * @brief Fetch the pose of a single object.
+         *
+         * This is a network call. If you need multiple object poses, use
+         * `fetchObjectPoses()` instead.
+         *
+         * @param objectID The object's ID.
+         * @return The object's pose, if known.
+         */
         std::optional<ObjectPose>
         fetchObjectPose(const ObjectID& objectID);
 
+        /**
+         * @brief Fetch object poses from a specific provider.
+         * @param providerName The provider's name.
+         * @return The object poses from that provider.
+         */
         ObjectPoseSeq
         fetchObjectPosesFromProvider(const std::string& providerName);
 
+
+        /**
+         * @brief Get the object pose storage's proxy.
+         */
         const ObjectPoseStorageInterfacePrx&
         getObjectPoseStorage() const;
 
+        /**
+         * @brief Get the internal object finder.
+         */
         const ObjectFinder&
         getObjectFinder() const;
 
-- 
GitLab