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 commits
Subject: [certi-cvs] certi libCERTI/InteractionSet.cc libCERTI/Inter...
Date: Sat, 31 Dec 2011 13:25:59 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      11/12/31 13:25:59

Modified files:
        libCERTI       : InteractionSet.cc Interaction.hh Interaction.cc 
                         RootObject.cc 
        RTIG           : FederationsList.hh Federation.hh 
                         RTIG_processing.cc FederationsList.cc 
                         Federation.cc 

Log message:
        Fix interaction class inheritance.
        Previously send interaction wasn't propagated to super class

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.cc?cvsroot=certi&r1=3.33&r2=3.34
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.hh?cvsroot=certi&r1=3.43&r2=3.44
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.cc?cvsroot=certi&r1=3.62&r2=3.63
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RootObject.cc?cvsroot=certi&r1=3.52&r2=3.53
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.hh?cvsroot=certi&r1=3.59&r2=3.60
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.hh?cvsroot=certi&r1=3.72&r2=3.73
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.113&r2=3.114
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.75&r2=3.76
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.147&r2=3.148

Patches:
Index: libCERTI/InteractionSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.cc,v
retrieving revision 3.33
retrieving revision 3.34
diff -u -b -r3.33 -r3.34
--- libCERTI/InteractionSet.cc  19 Mar 2010 13:54:03 -0000      3.33
+++ libCERTI/InteractionSet.cc  31 Dec 2011 13:25:58 -0000      3.34
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionSet.cc,v 3.33 2010/03/19 13:54:03 erk Exp $
+// $Id: InteractionSet.cc,v 3.34 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Interaction.hh"
@@ -77,10 +77,9 @@
        G.Out(pdGendoc,"enter InteractionSet::broadcastInteraction with time") ;
 
        // It may throw InteractionClassNotDefined.
-       //InteractionClassHandle currentClass = interaction_handle ;
        Interaction *theInteraction = getObjectFromHandle(interaction_handle);
 
-       InteractionBroadcastList *ibList ;
+    InteractionBroadcastList *ibList;
        ibList = theInteraction->sendInteraction(federate_handle,
                        parameter_list,
                        value_list,
@@ -91,18 +90,16 @@
 
        // Pass the Message(and its BroadcastList) to the Parent Classes.
        if (ibList != NULL) {
-               //currentClass = theInteraction->parent ;
-               //while (CurrentClass != 0) {
-               // theInteraction = getObjectFromHandle(CurrentClass);
-               // theInteraction->broadcastInteractionMessage(List);
-               // CurrentClass = theInteraction->Father ;
-               //}
+        while (theInteraction->getSuperclass() != 0) {
+            theInteraction = 
getObjectFromHandle(theInteraction->getSuperclass());
+            theInteraction->broadcastInteractionMessage(ibList,region);
+        }
                delete ibList ;
        }
-       else
+    else {
                // BroadcastInteraction should not be called on the RTIA(see 
IsReady)
                throw RTIinternalError("BroadcastInteraction called by RTIA.");
-
+    }
        G.Out(pdGendoc,"exit InteractionSet::broadcastInteraction with time") ;
 
 } /* end of broadcastInteraction (with time) */
@@ -138,18 +135,15 @@
 
        // Pass the Message(and its BroadcastList) to the Parent Classes.
        if (ibList != NULL) {
-               //currentClass = theInteraction->parent ;
-               //while (CurrentClass != 0) {
-               // theInteraction = getObjectFromHandle(CurrentClass);
-               // theInteraction->broadcastInteractionMessage(List);
-               // CurrentClass = theInteraction->Father ;
-               //}
-               delete ibList ;
+        while (theInteraction->getSuperclass() != 0) {
+            theInteraction = 
getObjectFromHandle(theInteraction->getSuperclass());
+            theInteraction->broadcastInteractionMessage(ibList,region);
        }
-       else
+        delete ibList ;
+    } else {
                // BroadcastInteraction should not be called on the RTIA(see 
IsReady)
                throw RTIinternalError("BroadcastInteraction called by RTIA.");
-
+    }
        G.Out(pdGendoc,"exit InteractionSet::broadcastInteraction without 
time") ;
 } /* end of broadcastInteraction (WITHOUT time) */
 
@@ -272,4 +266,4 @@
 
 } // namespace certi
 
-// $Id: InteractionSet.cc,v 3.33 2010/03/19 13:54:03 erk Exp $
+// $Id: InteractionSet.cc,v 3.34 2011/12/31 13:25:58 erk Exp $

Index: libCERTI/Interaction.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.hh,v
retrieving revision 3.43
retrieving revision 3.44
diff -u -b -r3.43 -r3.44
--- libCERTI/Interaction.hh     11 Jul 2011 11:17:26 -0000      3.43
+++ libCERTI/Interaction.hh     31 Dec 2011 13:25:58 -0000      3.44
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.hh,v 3.43 2011/07/11 11:17:26 erk Exp $
+// $Id: Interaction.hh,v 3.44 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_INTERACTION_HH
@@ -205,13 +205,6 @@
 
     //! This Object helps to find a TCPLink given a Federate Handle.
     SecurityServer *server ;
-    /**
-     * The super class handle.
-     * 0 if they aren't any.
-     */
-    InteractionClassHandle parent ;
-
-    //std::list<InteractionClassHandle> children ;
 
     uint16_t depth ;
 
@@ -265,4 +258,4 @@
 
 #endif // _CERTI_INTERACTION.HH
 
-// $Id: Interaction.hh,v 3.43 2011/07/11 11:17:26 erk Exp $
+// $Id: Interaction.hh,v 3.44 2011/12/31 13:25:58 erk Exp $

Index: libCERTI/Interaction.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.cc,v
retrieving revision 3.62
retrieving revision 3.63
diff -u -b -r3.62 -r3.63
--- libCERTI/Interaction.cc     23 Mar 2010 13:13:27 -0000      3.62
+++ libCERTI/Interaction.cc     31 Dec 2011 13:25:58 -0000      3.63
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.cc,v 3.62 2010/03/23 13:13:27 erk Exp $
+// $Id: Interaction.cc,v 3.63 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 
@@ -44,7 +44,7 @@
 static PrettyDebug G("GENDOC",__FILE__) ;
 
 Interaction::Interaction(const std::string& theName, InteractionClassHandle 
theHandle, TransportType theTransport, OrderType theOrder)
-  : Subscribable(theName), parent(0), depth(0), transport(theTransport), 
order(theOrder), handle(theHandle),
+  : Subscribable(theName), depth(0), transport(theTransport), order(theOrder), 
handle(theHandle),
   superClass(0), id(PublicLevelID), space(0)
 {
        /*
@@ -244,7 +244,7 @@
        cout << " Interaction " << handle << " \"" << name << "\" :" << endl ;
 
        // Display inheritance
-       cout << " Parent Class Handle: " << parent << endl ;
+       cout << " Parent Class Handle: " << getSuperclass() << endl ;
        cout << " Security Level: " << id << endl ;
        cout << " " << subClasses->size() << " Child(s):" << endl ;
 
@@ -507,7 +507,7 @@
        // Return the BroadcastList in case it had to be passed to the
        // parent class.
        return ibList ;
-               }
+}
 
 
 // ----------------------------------------------------------------------------
@@ -541,4 +541,4 @@
 
 } // namespace certi
 
-// $Id: Interaction.cc,v 3.62 2010/03/23 13:13:27 erk Exp $
+// $Id: Interaction.cc,v 3.63 2011/12/31 13:25:58 erk Exp $

Index: libCERTI/RootObject.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/RootObject.cc,v
retrieving revision 3.52
retrieving revision 3.53
diff -u -b -r3.52 -r3.53
--- libCERTI/RootObject.cc      15 Nov 2010 13:15:46 -0000      3.52
+++ libCERTI/RootObject.cc      31 Dec 2011 13:25:58 -0000      3.53
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RootObject.cc,v 3.52 2010/11/15 13:15:46 erk Exp $
+// $Id: RootObject.cc,v 3.53 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Object.hh"
@@ -628,4 +628,4 @@
 
 } // namespace certi
 
-// $Id: RootObject.cc,v 3.52 2010/11/15 13:15:46 erk Exp $
+// $Id: RootObject.cc,v 3.53 2011/12/31 13:25:58 erk Exp $

Index: RTIG/FederationsList.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.hh,v
retrieving revision 3.59
retrieving revision 3.60
diff -u -b -r3.59 -r3.60
--- RTIG/FederationsList.hh     2 Sep 2011 21:42:24 -0000       3.59
+++ RTIG/FederationsList.hh     31 Dec 2011 13:25:58 -0000      3.60
@@ -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: FederationsList.hh,v 3.59 2011/09/02 21:42:24 erk Exp $
+// $Id: FederationsList.hh,v 3.60 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIG_FEDERATIONS_LIST_HH
@@ -697,4 +697,4 @@
 
 #endif // _CERTI_RTIG_FEDERATIONS_LIST_HH
 
-// $Id: FederationsList.hh,v 3.59 2011/09/02 21:42:24 erk Exp $
+// $Id: FederationsList.hh,v 3.60 2011/12/31 13:25:58 erk Exp $

Index: RTIG/Federation.hh
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.hh,v
retrieving revision 3.72
retrieving revision 3.73
diff -u -b -r3.72 -r3.73
--- RTIG/Federation.hh  2 Sep 2011 21:42:24 -0000       3.72
+++ RTIG/Federation.hh  31 Dec 2011 13:25:58 -0000      3.73
@@ -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: Federation.hh,v 3.72 2011/09/02 21:42:24 erk Exp $
+// $Id: Federation.hh,v 3.73 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIG_FEDERATION_HH
@@ -369,7 +369,7 @@
                               const std::vector <ParameterValue_t> 
&theValueList,
                               uint16_t theListSize,
                               FederationTime theTime,
-                             RegionHandle,
+                              RegionHandle region,
                               const std::string& theTag)
         throw (FederateNotExecutionMember,
                FederateNotPublishing,
@@ -384,7 +384,7 @@
                               const std::vector <ParameterHandle> 
&theParameterList,
                               const std::vector <ParameterValue_t> 
&theValueList,
                               uint16_t theListSize,
-                             RegionHandle,
+                              RegionHandle region,
                               const std::string& theTag)
         throw (FederateNotExecutionMember,
                FederateNotPublishing,
@@ -720,4 +720,4 @@
 
 #endif // _CERTI_RTIG_FEDERATION_HH
 
-// $Id: Federation.hh,v 3.72 2011/09/02 21:42:24 erk Exp $
+// $Id: Federation.hh,v 3.73 2011/12/31 13:25:58 erk Exp $

Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.113
retrieving revision 3.114
diff -u -b -r3.113 -r3.114
--- RTIG/RTIG_processing.cc     2 Sep 2011 21:42:24 -0000       3.113
+++ RTIG/RTIG_processing.cc     31 Dec 2011 13:25:58 -0000      3.114
@@ -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: RTIG_processing.cc,v 3.113 2011/09/02 21:42:24 erk Exp $
+// $Id: RTIG_processing.cc,v 3.114 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -957,8 +957,7 @@
        // Building Value Array
        auditServer << "IntID = " << req->getInteractionClass()
                                                                        << ", 
date = " << req->getDate().getTime();
-       if ( req->isDated() )
-       {
+    if (req->isDated()) {
                federations.updateParameter(req->getFederation(),
                                req->getFederate(),
                                req->getInteractionClass(),
@@ -969,8 +968,7 @@
                                req->getRegion(),
                                req->getLabel());
        }
-       else
-       {
+    else {
                federations.updateParameter(req->getFederation(),
                                req->getFederate(),
                                req->getInteractionClass(),
@@ -1564,4 +1562,4 @@
 
 }} // namespace certi/rtig
 
-// $Id: RTIG_processing.cc,v 3.113 2011/09/02 21:42:24 erk Exp $
+// $Id: RTIG_processing.cc,v 3.114 2011/12/31 13:25:58 erk Exp $

Index: RTIG/FederationsList.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.75
retrieving revision 3.76
diff -u -b -r3.75 -r3.76
--- RTIG/FederationsList.cc     2 Sep 2011 21:42:24 -0000       3.75
+++ RTIG/FederationsList.cc     31 Dec 2011 13:25:58 -0000      3.76
@@ -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: FederationsList.cc,v 3.75 2011/09/02 21:42:24 erk Exp $
+// $Id: FederationsList.cc,v 3.76 2011/12/31 13:25:58 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -1446,5 +1446,5 @@
 
 }} // certi::rtig
 
-// EOF $Id: FederationsList.cc,v 3.75 2011/09/02 21:42:24 erk Exp $
+// EOF $Id: FederationsList.cc,v 3.76 2011/12/31 13:25:58 erk Exp $
 

Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.147
retrieving revision 3.148
diff -u -b -r3.147 -r3.148
--- RTIG/Federation.cc  29 Oct 2011 17:07:02 -0000      3.147
+++ RTIG/Federation.cc  31 Dec 2011 13:25:59 -0000      3.148
@@ -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: Federation.cc,v 3.147 2011/10/29 17:07:02 erk Exp $
+// $Id: Federation.cc,v 3.148 2011/12/31 13:25:59 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include <config.h>
@@ -2794,5 +2794,5 @@
 
 }} // namespace certi/rtig
 
-// $Id: Federation.cc,v 3.147 2011/10/29 17:07:02 erk Exp $
+// $Id: Federation.cc,v 3.148 2011/12/31 13:25:59 erk Exp $
 



reply via email to

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