Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
document xbt_peer_t and friends
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 20 Mar 2012 15:00:49 +0000 (16:00 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 20 Mar 2012 15:01:05 +0000 (16:01 +0100)
doc/module-xbt.doc
include/xbt/peer.h
src/xbt/xbt_peer.c

index a874b52..4c0b2b1 100644 (file)
@@ -19,6 +19,7 @@
       - \ref XBT_queue
       - \ref XBT_swag
       - \ref XBT_heap
       - \ref XBT_queue
       - \ref XBT_swag
       - \ref XBT_heap
+      - \ref XBT_peer
     - \ref XBT_misc
       - \ref XBT_graph
  
     - \ref XBT_misc
       - \ref XBT_graph
  
index a04d9c0..dbf8122 100644 (file)
 
 SG_BEGIN_DECL()
 
 
 SG_BEGIN_DECL()
 
-typedef struct {
+/** @addtogroup XBT_peer
+ *  \brief Helper functions to manipulate remote hosts
+ *
+ *  This module simply introduces some rather trivial functions to manipulate remote host denomination (in the form hostname:port)
+ *
+ *  @{
+ */
+/** @brief Object describing a remote host (as name:port) */
+typedef struct s_xbt_peer *xbt_peer_t;
+
+/** @brief Structure describing a remote host (as name:port) */
+typedef struct s_xbt_peer {
   char *name;
   int port;
   char *name;
   int port;
-} s_xbt_peer_t, *xbt_peer_t;
+} s_xbt_peer_t;
 
 XBT_PUBLIC(xbt_peer_t) xbt_peer_new(const char *name, int port);
 XBT_PUBLIC(xbt_peer_t) xbt_peer_from_string(const char *peerport);
 
 XBT_PUBLIC(xbt_peer_t) xbt_peer_new(const char *name, int port);
 XBT_PUBLIC(xbt_peer_t) xbt_peer_from_string(const char *peerport);
@@ -24,5 +35,6 @@ XBT_PUBLIC(xbt_peer_t) xbt_peer_copy(xbt_peer_t h);
 XBT_PUBLIC(void) xbt_peer_free(xbt_peer_t peer);
 XBT_PUBLIC(void) xbt_peer_free_voidp(void *d);
 
 XBT_PUBLIC(void) xbt_peer_free(xbt_peer_t peer);
 XBT_PUBLIC(void) xbt_peer_free_voidp(void *d);
 
+/** @} */
 SG_END_DECL()
 #endif                          /* XBT_PEER_H */
 SG_END_DECL()
 #endif                          /* XBT_PEER_H */
index 80dae08..919f51d 100644 (file)
@@ -21,6 +21,7 @@ xbt_peer_t xbt_peer_new(const char *name, int port)
   return res;
 }
 
   return res;
 }
 
+/** \brief copy constructor */
 xbt_peer_t xbt_peer_copy(xbt_peer_t h)
 {
   return xbt_peer_new(h->name, h->port);
 xbt_peer_t xbt_peer_copy(xbt_peer_t h)
 {
   return xbt_peer_new(h->name, h->port);