certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi/libCERTI HandleManager.hh


From: certi-cvs
Subject: [certi-cvs] certi/libCERTI HandleManager.hh
Date: Fri, 31 Oct 2008 10:17:51 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/10/31 10:17:51

Modified files:
        libCERTI       : HandleManager.hh 

Log message:
        Source code pruning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/HandleManager.hh?cvsroot=certi&r1=3.4&r2=3.5

Patches:
Index: HandleManager.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/HandleManager.hh,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -b -r3.4 -r3.5
--- HandleManager.hh    4 Jun 2008 07:42:05 -0000       3.4
+++ HandleManager.hh    31 Oct 2008 10:17:51 -0000      3.5
@@ -17,7 +17,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: HandleManager.hh,v 3.4 2008/06/04 07:42:05 siron Exp $
+// $Id: HandleManager.hh,v 3.5 2008/10/31 10:17:51 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef LIBCERTI_HANDLE_MANAGER
@@ -35,17 +35,39 @@
 
 namespace certi {
 
-/** Manage a set of handles ('provide' and 'free' services). Freed
-    handles may be provided again in a future request.
-*/
+/**
+ * Manage a set of handles ('provide' and 'free' services). Freed
+ * handles may be provided again in a future request.
+ */
 template<typename T>
 class HandleManager
 {
 public:
+       /**
+        * Constructor with init value.
+        * The default maximal value will be based on the type max given
+        * by numeric_limits traits.
+        * @param[in] init Initial handle value (use for first requested handle)
+        */
     HandleManager(T);
-    HandleManager(T, size_t);
-    T provide();
-    void free(T);
+       /**
+        * Constructor with init value and max.
+        * @param[in] init Initial handle value (use for first requested handle)
+        * @param[in] hmax Maximal handle value
+        */
+       HandleManager(T init, size_t hmax);
+       /**
+        * Get a new handle.
+        * @return the new handle
+        * @throw RTIinternalError if all handles between first and maximal are 
used
+        */
+       T provide() throw (RTIinternalError);
+       /**
+        * Free a handle.
+        * @pre handle is a previously-provided handle
+        * @param handle Handle to free
+        */
+       void free(T handle);
 
 private:
     size_t maximum ;
@@ -53,29 +75,17 @@
     std::list<T> available ;
 };
 
-// ============================================================================
-/** Constructor
-    @param init Initial handle value (use for first requested handle)
-    @param hmax Maximal handle value
- */
-template<typename T>
-HandleManager<T>::HandleManager(T init, size_t hmax)
-    : highest(init), maximum(hmax) { }
 
-/** Constructor. The default maximal value will be based on the type max.
-    @param init Initial handle value (use for first requested handle)
- */
 template<typename T>
 HandleManager<T>::HandleManager(T init)
-    : maximum(std::numeric_limits<T>::max()), highest(init) { }
+: maximum(std::numeric_limits<T>::max()), highest(init) { }
+
+template<typename T>
+HandleManager<T>::HandleManager(T init, size_t hmax)
+: highest(init), maximum(hmax) { }
 
-// ----------------------------------------------------------------------------
-/** Get a new handle
-    @return handle
-    @throw RTIinternalError if all handles between first and maximal are used
- */
 template<typename T> T
-HandleManager<T>::provide()
+HandleManager<T>::provide() throw (RTIinternalError)
 {
     T handle = 0 ;
 
@@ -91,13 +101,8 @@
     }
 
     return handle ;
-}
+} /* end of provide */
 
-// ----------------------------------------------------------------------------
-/** Free a handle
-    @pre handle is a previously-provided handle
-    @param handle Handle to free
- */
 template<typename T> void
 HandleManager<T>::free(T handle)
 {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]