certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi libCERTI/InteractionSet.cc libCERTI/Inter...


From: certi-cvs
Subject: [certi-cvs] certi libCERTI/InteractionSet.cc libCERTI/Inter...
Date: Thu, 30 Oct 2008 10:11:42 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/10/30 10:11:42

Modified files:
        libCERTI       : InteractionSet.cc Interaction.hh Interaction.cc 
                         Named.cc Named.hh InteractionSet.hh 
        RTIA           : ObjectManagement.hh ObjectManagement.cc 

Log message:
        Fix bug #24691 : Bug in getParameterName
        We should replace internal char* usage with appropriate
        std::string  
        or
        const std::string& 
        
        done for Named::getName() method.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.cc?cvsroot=certi&r1=3.23&r2=3.24
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.hh?cvsroot=certi&r1=3.30&r2=3.31
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.cc?cvsroot=certi&r1=3.44&r2=3.45
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Named.cc?cvsroot=certi&r1=3.6&r2=3.7
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Named.hh?cvsroot=certi&r1=3.5&r2=3.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.hh?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.hh?cvsroot=certi&r1=3.27&r2=3.28
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.54&r2=3.55

Patches:
Index: libCERTI/InteractionSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.cc,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -b -r3.23 -r3.24
--- libCERTI/InteractionSet.cc  18 Sep 2008 14:41:28 -0000      3.23
+++ libCERTI/InteractionSet.cc  30 Oct 2008 10:11:41 -0000      3.24
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionSet.cc,v 3.23 2008/09/18 14:41:28 gotthardp Exp $
+// $Id: InteractionSet.cc,v 3.24 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Interaction.hh"
@@ -273,7 +273,7 @@
 
 // ----------------------------------------------------------------------------
 //! Return the parameter name associated to handle and class handle.
-const char *
+const std::string&
 InteractionSet::getParameterName(ParameterHandle the_handle,
                                  InteractionClassHandle the_class)
     throw (InteractionParameterNotDefined,
@@ -357,4 +357,4 @@
 
 } // namespace certi
 
-// $Id: InteractionSet.cc,v 3.23 2008/09/18 14:41:28 gotthardp Exp $
+// $Id: InteractionSet.cc,v 3.24 2008/10/30 10:11:41 erk Exp $

Index: libCERTI/Interaction.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.hh,v
retrieving revision 3.30
retrieving revision 3.31
diff -u -b -r3.30 -r3.31
--- libCERTI/Interaction.hh     28 Oct 2008 12:07:26 -0000      3.30
+++ libCERTI/Interaction.hh     30 Oct 2008 10:11:41 -0000      3.31
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.hh,v 3.30 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Interaction.hh,v 3.31 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_INTERACTION_HH
@@ -80,7 +80,12 @@
     ParameterHandle getParameterHandle(const char *) const
         throw (NameNotFound, RTIinternalError);
 
-    const char *getParameterName(ParameterHandle) const
+    /**
+     * Get interaction parameter name from its handle
+     * @param[in] the_handle the parameter handle
+     * @return the name of the parameter
+     */
+    const std::string& getParameterName(ParameterHandle the_handle) const
         throw (InteractionParameterNotDefined, RTIinternalError);
 
     void killFederate(FederateHandle theFederate)
@@ -167,4 +172,4 @@
 
 #endif // _CERTI_INTERACTION.HH
 
-// $Id: Interaction.hh,v 3.30 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Interaction.hh,v 3.31 2008/10/30 10:11:41 erk Exp $

Index: libCERTI/Interaction.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.cc,v
retrieving revision 3.44
retrieving revision 3.45
diff -u -b -r3.44 -r3.45
--- libCERTI/Interaction.cc     28 Oct 2008 12:07:26 -0000      3.44
+++ libCERTI/Interaction.cc     30 Oct 2008 10:11:41 -0000      3.45
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.cc,v 3.44 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Interaction.cc,v 3.45 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -291,13 +291,13 @@
 }
 
 // ----------------------------------------------------------------------------
-//! Returns the parameter name obtained by its handle.
-const char *
+
+const std::string&
 Interaction::getParameterName(ParameterHandle the_handle) const
     throw (InteractionParameterNotDefined,
            RTIinternalError)
 {
-    return getParameterByHandle(the_handle)->getName().c_str();
+    return getParameterByHandle(the_handle)->getName();
 }
 
 // ----------------------------------------------------------------------------
@@ -532,4 +532,4 @@
 
 } // namespace certi
 
-// $Id: Interaction.cc,v 3.44 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Interaction.cc,v 3.45 2008/10/30 10:11:41 erk Exp $

Index: libCERTI/Named.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Named.cc,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -b -r3.6 -r3.7
--- libCERTI/Named.cc   23 Jun 2008 13:25:05 -0000      3.6
+++ libCERTI/Named.cc   30 Oct 2008 10:11:41 -0000      3.7
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Named.cc,v 3.6 2008/06/23 13:25:05 erk Exp $
+// $Id: Named.cc,v 3.7 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Named.hh"
@@ -44,7 +44,7 @@
     name = newName;
 }
 
-const std::string
+const std::string&
 Named::getName() const
 {
     return name ;
@@ -95,4 +95,4 @@
 
 } // certi
 
-// $Id: Named.cc,v 3.6 2008/06/23 13:25:05 erk Exp $
+// $Id: Named.cc,v 3.7 2008/10/30 10:11:41 erk Exp $

Index: libCERTI/Named.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Named.hh,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libCERTI/Named.hh   23 Jun 2008 13:25:05 -0000      3.5
+++ libCERTI/Named.hh   30 Oct 2008 10:11:41 -0000      3.6
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Named.hh,v 3.5 2008/06/23 13:25:05 erk Exp $
+// $Id: Named.hh,v 3.6 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef LIBCERTI_NAMED_HH
@@ -75,7 +75,7 @@
      * Get name.
      * @return name value
      */
-    virtual const std::string getName() const ;
+    virtual const std::string& getName() const ;
     
     /** 
      * Get C-style name.
@@ -135,4 +135,4 @@
 
 #endif // LIBCERTI_NAMED_HH
 
-// $Id: Named.hh,v 3.5 2008/06/23 13:25:05 erk Exp $
+// $Id: Named.hh,v 3.6 2008/10/30 10:11:41 erk Exp $

Index: libCERTI/InteractionSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.hh,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- libCERTI/InteractionSet.hh  18 Sep 2008 14:41:28 -0000      3.18
+++ libCERTI/InteractionSet.hh  30 Oct 2008 10:11:41 -0000      3.19
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionSet.hh,v 3.18 2008/09/18 14:41:28 gotthardp Exp $
+// $Id: InteractionSet.hh,v 3.19 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_INTERACTION_SET_HH
@@ -67,7 +67,7 @@
                InteractionClassNotDefined,
                RTIinternalError);
 
-    const char *
+    const std::string&
     getParameterName(ParameterHandle the_handle,
                      InteractionClassHandle the_class)
         throw (InteractionParameterNotDefined,
@@ -145,4 +145,4 @@
 
 #endif // _CERTI_INTERACTION_SET_HH
 
-// $Id: InteractionSet.hh,v 3.18 2008/09/18 14:41:28 gotthardp Exp $
+// $Id: InteractionSet.hh,v 3.19 2008/10/30 10:11:41 erk Exp $

Index: RTIA/ObjectManagement.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.hh,v
retrieving revision 3.27
retrieving revision 3.28
diff -u -b -r3.27 -r3.28
--- RTIA/ObjectManagement.hh    10 Oct 2008 15:41:11 -0000      3.27
+++ RTIA/ObjectManagement.hh    30 Oct 2008 10:11:41 -0000      3.28
@@ -18,7 +18,7 @@
 // along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 //
-// $Id: ObjectManagement.hh,v 3.27 2008/10/10 15:41:11 gotthardp Exp $
+// $Id: ObjectManagement.hh,v 3.28 2008/10/30 10:11:41 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIA_OM
@@ -244,7 +244,7 @@
     ParameterHandle getParameterHandle(const char *theParameterName,
                                        InteractionClassHandle theClassHandle);
 
-    const char *getParameterName(ParameterHandle theParameterHandle,
+    const std::string& getParameterName(ParameterHandle theParameterHandle,
                                  InteractionClassHandle theClassHandle);
 
     ObjectClassHandle getObjectClass(ObjectHandle);
@@ -281,4 +281,4 @@
 
 #endif // _CERTI_RTIA_OM
 
-// $Id: ObjectManagement.hh,v 3.27 2008/10/10 15:41:11 gotthardp Exp $
+// $Id: ObjectManagement.hh,v 3.28 2008/10/30 10:11:41 erk Exp $

Index: RTIA/ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.54
retrieving revision 3.55
diff -u -b -r3.54 -r3.55
--- RTIA/ObjectManagement.cc    10 Oct 2008 15:41:10 -0000      3.54
+++ RTIA/ObjectManagement.cc    30 Oct 2008 10:11:42 -0000      3.55
@@ -829,7 +829,7 @@
 
 // ----------------------------------------------------------------------------
 //! getParameterName.
-const char *
+const std::string&
 ObjectManagement::getParameterName(ParameterHandle theParameterHandle,
                                    InteractionClassHandle theClassHandle)
 {




reply via email to

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