certi-cvs
[Top][All Lists]
Advanced

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

[certi-cvs] certi libCERTI/InteractionSet.hh libCERTI/Objec...


From: certi-cvs
Subject: [certi-cvs] certi libCERTI/InteractionSet.hh libCERTI/Objec...
Date: Sat, 01 Nov 2008 19:19:37 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/11/01 19:19:37

Modified files:
        libCERTI       : InteractionSet.hh ObjectClass.hh 
                         ObjectClassSet.hh Interaction.cc Interaction.hh 
                         InteractionSet.cc ObjectClassSet.cc 
                         RootObject.cc ObjectClass.cc 
        RTIA           : ObjectManagement.hh ObjectManagement.cc 
                         RTIA_federate.cc 

Log message:
        Fixes
        bug #23730: support get Handle using 
'getClassHandle("parentclass.subclass") format
        Now interaction and object classes handle may be retrieved
        with fully qualified names.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.hh?cvsroot=certi&r1=3.19&r2=3.20
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.hh?cvsroot=certi&r1=3.39&r2=3.40
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.hh?cvsroot=certi&r1=3.31&r2=3.32
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.cc?cvsroot=certi&r1=3.46&r2=3.47
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.hh?cvsroot=certi&r1=3.32&r2=3.33
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.cc?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.cc?cvsroot=certi&r1=3.40&r2=3.41
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RootObject.cc?cvsroot=certi&r1=3.36&r2=3.37
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.55&r2=3.56
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.hh?cvsroot=certi&r1=3.28&r2=3.29
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.55&r2=3.56
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.92&r2=3.93

Patches:
Index: libCERTI/InteractionSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.hh,v
retrieving revision 3.19
retrieving revision 3.20
diff -u -b -r3.19 -r3.20
--- libCERTI/InteractionSet.hh  30 Oct 2008 10:11:41 -0000      3.19
+++ libCERTI/InteractionSet.hh  1 Nov 2008 19:19:34 -0000       3.20
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionSet.hh,v 3.19 2008/10/30 10:11:41 erk Exp $
+// $Id: InteractionSet.hh,v 3.20 2008/11/01 19:19:34 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_INTERACTION_SET_HH
@@ -34,31 +34,57 @@
 #include "certi.hh"
 #include "SecurityServer.hh"
 
-#include <list>
+#include <string>
+#include <map>
 
 namespace certi {
 
-class CERTI_EXPORT InteractionSet : private std::list<Interaction *>
+class CERTI_EXPORT InteractionSet
 {
 
 public:
-    InteractionSet(SecurityServer *the_server);
+       InteractionSet(SecurityServer *the_server, bool isRootClassSet=false);
     ~InteractionSet();
 
-    void addClass(Interaction *the_class);
+       /**
+        * Add an interaction class to the set.
+        * @pre theClass should be non NULL
+        * @param[in] theClass the object class to be added
+        */
+       void addClass(Interaction *theClass);
+
+       /**
+        * Build inheritance relation between two objects class.
+        * Build a Parent-Child relation between two classe, by setting the
+     * Child's Parent handle, and registering the Child in the Parent's SonSet.
+     * Also copy all Parent's Attributes/Parameter in the Child Class.
+        * @param[in,out] child the future child object class
+        * @param[in,out] parent the parent object class
+        * @post the child and parent object classes are linked
+        *       with inheritance relationship.
+        */
     void buildParentRelation(Interaction *child, Interaction *parent);
+
+       /**
+        *  Print the Interactions tree to the standard output.
+        */
     void display() const ;
 
     // --------------------------
     // -- RTI Support Services --
     // --------------------------
+
+       /**
+        * Return the interaction handle associated to name.
+        * @param[in] class_name the name of the interaction for whose handle 
is requested
+        */
     InteractionClassHandle
-    getInteractionClassHandle(const char *the_name)
-        throw (NameNotFound, RTIinternalError);
+       getInteractionClassHandle(const std::string& class_name) const
+       throw (NameNotFound);
 
-    const char *
-    getInteractionClassName(InteractionClassHandle the_handle)
-        throw (InteractionClassNotDefined, RTIinternalError);
+       std::string
+       getInteractionClassName(InteractionClassHandle the_handle) const
+       throw (InteractionClassNotDefined);
 
     ParameterHandle
     getParameterHandle(const char *the_name,
@@ -77,7 +103,15 @@
     void killFederate(FederateHandle the_federate)
         throw ();
 
-    Interaction *getByHandle(InteractionClassHandle the_handle)
+       /**
+        *  Return interaction associated to handle.
+        *  @param[in] the_handle
+        *  @return the interaction associated to handle
+        *  @throw InteractionClassNotDefined if the handle does not correspond 
to
+        *         any interactrion class
+        *  @throw RTIinternalError
+        */
+       Interaction* getByHandle(InteractionClassHandle the_handle) const
         throw (InteractionClassNotDefined, RTIinternalError);
 
     // ----------------------------------
@@ -137,7 +171,26 @@
                InteractionParameterNotDefined,
                RTIinternalError);
 
+       typedef 
std::map<InteractionClassHandle,Interaction*,std::less<InteractionClassHandle> 
> Handle2InteractionClassMap_t;
+       typedef std::map<std::string,Interaction*,std::less<std::string> > 
Name2InteractionClassMap_t;
+       typedef Handle2InteractionClassMap_t::const_iterator 
handledIC_const_iterator;
+       typedef Name2InteractionClassMap_t::const_iterator 
namedIC_const_iterator;
+
+       namedIC_const_iterator NamedBegin() const {
+               return ICFromName.begin();
+       }
+
+       namedIC_const_iterator NamedEnd() const {
+               return ICFromName.end();
+       }
+
+       const size_t size() {return ICFromName.size();}
+
 private:
+
+       Handle2InteractionClassMap_t ICFromHandle;
+       Name2InteractionClassMap_t   ICFromName;
+       bool                         isRootClassSet;
     SecurityServer *server ;
 };
 
@@ -145,4 +198,4 @@
 
 #endif // _CERTI_INTERACTION_SET_HH
 
-// $Id: InteractionSet.hh,v 3.19 2008/10/30 10:11:41 erk Exp $
+// $Id: InteractionSet.hh,v 3.20 2008/11/01 19:19:34 erk Exp $

Index: libCERTI/ObjectClass.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.hh,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -b -r3.39 -r3.40
--- libCERTI/ObjectClass.hh     31 Oct 2008 13:50:24 -0000      3.39
+++ libCERTI/ObjectClass.hh     1 Nov 2008 19:19:34 -0000       3.40
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClass.hh,v 3.39 2008/10/31 13:50:24 erk Exp $
+// $Id: ObjectClass.hh,v 3.40 2008/11/01 19:19:34 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_OBJECT_CLASS_HH
@@ -27,12 +27,12 @@
 
 // forward declarations
 namespace certi {
-    class    Object;
-       class    ObjectAttribute;
-       class    ObjectClass;
-       class    ObjectClassSet;
-       class    ObjectClassAttribute;
-       class    ObjectClassBroadcastList;
+class    Object;
+class    ObjectAttribute;
+class    ObjectClass;
+class    ObjectClassSet;
+class    ObjectClassAttribute;
+class    ObjectClassBroadcastList;
 }
 
 // CERTI headers
@@ -64,7 +64,7 @@
 
 /*! OMT object class. It also contains the instance list from this
   class.
-*/
+ */
 class CERTI_EXPORT ObjectClass : public Named {
 
 public:
@@ -82,12 +82,35 @@
 
     void display() const ;
 
+       /**
+        * Get the handle for this object class.
+        * @return the associated object class handle.
+        */
     ObjectClassHandle getHandle() const ;
 
+       /**
+        * Set the super class (parent class) of this object class;
+        * @param[in] h the handle of the super class.
+        */
     void setSuperclass(ObjectClassHandle h) { superClass = h ; };
+       /**
+        * Get the super class handle.
+        * @return the super class handle
+        */
     ObjectClassHandle getSuperclass() const { return superClass ; };
+       /**
+        * Add a subclass to this object class.
+        */
     void addSubclass(ObjectClass *);
+       /**
+        * Retrieve a sub class by its name.
+        * @param[in] subClassName the name of the subclass
+        * @return the sub class object class.
+        */
     ObjectClass* getSubClassByName(const std::string subClassName);
+       /**
+        * Get the whole set of subclasses.
+        */
     ObjectClassSet* getSubClasses() {return subClasses;};
 
     // Security Methods
@@ -268,8 +291,14 @@
     SecurityLevelID securityLevelId ;
     std::list<ObjectClassAttribute *> attributeSet ;
     std::list<Object *> objectSet ;
+       /**
+        * The super class handle.
+        * 0 if they aren't any.
+        */
     ObjectClassHandle superClass;
-    // The set of sub classes of this object class
+       /**
+        * The set of object classes sub classes of this object class
+        */
     ObjectClassSet*   subClasses;
     /* The message buffer used to send Network messages */
     MessageBuffer NM_msgBufSend;
@@ -279,4 +308,4 @@
 
 #endif // _CERTI_OBJECT_CLASS_HH
 
-// $Id: ObjectClass.hh,v 3.39 2008/10/31 13:50:24 erk Exp $
+// $Id: ObjectClass.hh,v 3.40 2008/11/01 19:19:34 erk Exp $

Index: libCERTI/ObjectClassSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.hh,v
retrieving revision 3.31
retrieving revision 3.32
diff -u -b -r3.31 -r3.32
--- libCERTI/ObjectClassSet.hh  18 Sep 2008 14:41:30 -0000      3.31
+++ libCERTI/ObjectClassSet.hh  1 Nov 2008 19:19:34 -0000       3.32
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClassSet.hh,v 3.31 2008/09/18 14:41:30 gotthardp Exp $
+// $Id: ObjectClassSet.hh,v 3.32 2008/11/01 19:19:34 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_OBJECT_CLASS_SET_HH
@@ -27,9 +27,9 @@
 
 // forward declaration 
 namespace certi {
-       class Object;
-       class ObjectClass;
-       class SecurityServer;
+class Object;
+class ObjectClass;
+class SecurityServer;
 }  // namespace certi
 
 // CERTI headers
@@ -47,11 +47,24 @@
 {
 
 public:
-    ObjectClassSet(SecurityServer *theSecurityServer, bool 
newIsRootClassSet=false);
+       ObjectClassSet(SecurityServer *theSecurityServer, bool 
isRootClassSet=false);
     ~ObjectClassSet();
 
+       /**
+        * Add an object class to the set.
+        * @param[in] theClass the object class to be added
+        */
     void addClass(ObjectClass *theClass) throw (RTIinternalError);
-    void buildParentRelation(ObjectClass *Child, ObjectClass *Parent);
+
+       /**
+        * Build inheritance relation between two objects class.
+        * @param[in,out] child the future child object class
+        * @param[in,out] parent the parent object class
+        * @post the child and parent object classes are linked
+        *       with inheritance relationship.
+        */
+       void buildParentRelation(ObjectClass *child, ObjectClass *parent);
+
     void display() const ;
 
     // RTI Support Services
@@ -67,7 +80,7 @@
         throw (NameNotFound);
 
     std::string getObjectClassName(ObjectClassHandle the_handle) const
-        throw (ObjectClassNotDefined, RTIinternalError);
+       throw (ObjectClassNotDefined);
 
     ObjectClass *getWithHandle(ObjectClassHandle theHandle) const
         throw (ObjectClassNotDefined);
@@ -210,4 +223,4 @@
 
 #endif // _CERTI_OBJECT_CLASS_SET_HH
 
-// $Id: ObjectClassSet.hh,v 3.31 2008/09/18 14:41:30 gotthardp Exp $
+// $Id: ObjectClassSet.hh,v 3.32 2008/11/01 19:19:34 erk Exp $

Index: libCERTI/Interaction.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.cc,v
retrieving revision 3.46
retrieving revision 3.47
diff -u -b -r3.46 -r3.47
--- libCERTI/Interaction.cc     31 Oct 2008 13:50:24 -0000      3.46
+++ libCERTI/Interaction.cc     1 Nov 2008 19:19:34 -0000       3.47
@@ -19,12 +19,13 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.cc,v 3.46 2008/10/31 13:50:24 erk Exp $
+// $Id: Interaction.cc,v 3.47 2008/11/01 19:19:34 erk Exp $
 // ----------------------------------------------------------------------------
 
 
 
 #include "Interaction.hh"
+#include "InteractionSet.hh"
 #include "InteractionBroadcastList.hh"
 #include "PrettyDebug.hh"
 #include "NM_Classes.hh"
@@ -42,6 +43,37 @@
 static pdCDebug D("INTERACTION", "(Interact) - ");
 static PrettyDebug G("GENDOC",__FILE__) ;
 
+Interaction::Interaction(const std::string& name, InteractionClassHandle 
handle, TransportType transport, OrderType order)
+: parent(0), depth(0), transport(transport), order(order), handle(handle),
+id(PublicLevelID)
+{
+       setName(name);
+       /*
+        * The set of interaction subclass has no security server
+        */
+       subClasses = new InteractionSet(NULL);
+} /* end of Interaction constructor */
+
+Interaction::~Interaction()
+{
+       while (!parameterSet.empty()) {
+               delete parameterSet.front();
+               parameterSet.pop_front();
+       }
+
+       if (!publishers.empty())
+               D.Out(pdError, "Interaction %d: publishers list not empty at 
termination.", handle);
+
+       // Deleting subclasses
+       if (NULL!=subClasses) {
+               delete subClasses;
+       }
+} /* end of ~Interaction */
+
+void Interaction::addSubclass(Interaction *sc) {
+       subClasses->addClass(sc);
+}
+
 // ----------------------------------------------------------------------------
 //! Used only by CRead, return the new parameter's handle.
 ParameterHandle
@@ -65,7 +97,7 @@
                  << std::flush;
 
     return the_parameter->getHandle();
-}
+} /* end of addParameter */
 
 // ----------------------------------------------------------------------------
 //! Add the class' attributes to the 'Child' Class.
@@ -95,14 +127,14 @@
                ;
         }
     }
-}
+} /* end of addParameterToChild */
 
 // ----------------------------------------------------------------------------
 /*! Called by the InteractionSet on Parent Classes whose Childrens
   initiated a SendInteraction, to allow them to broadcast the
   Interaction Message of their child to their own subscribers.
   See InteractionSet::SendInteraction.
-*/
+ */
 void
 Interaction::broadcastInteractionMessage(InteractionBroadcastList *ibList,
                                         const RTIRegion *region)
@@ -141,10 +173,10 @@
 void
 Interaction::changeTransportationType(TransportType new_type,
                                       FederateHandle the_handle)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InvalidTransportationHandle,
            RTIinternalError)
-{
+               {
     if (!isPublishing(the_handle))
         throw FederateNotPublishing("Change Interaction Transport Type.");
 
@@ -155,16 +187,16 @@
 
     D.Out(pdInit,
           "Interaction %d: New Transport type is %d.", handle, transport);
-}
+               } /* end of changeTransportationType */
 
 // ----------------------------------------------------------------------------
 //! changeOrderType.
 void
 Interaction::changeOrderType(OrderType new_order, FederateHandle the_handle)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InvalidOrderingHandle,
            RTIinternalError)
-{
+               {
     if (!isPublishing(the_handle))
         throw FederateNotPublishing("Change Interaction Order Type.");
 
@@ -172,17 +204,17 @@
         throw InvalidOrderingHandle("");
 
     D.Out(pdInit, "Interaction %d: New Order type is %d.", handle, order);
-}
+               }
 
 // ----------------------------------------------------------------------------
 /*! Throw SecurityError is the Federate is not allowed to access the
   Interaction Class, and print an Audit message containing Reason.
-*/
+ */
 void
 Interaction::checkFederateAccess(FederateHandle the_federate,
                                  const char *reason) const
     throw (SecurityError)
-{
+               {
     // BUG: Should at least but a line in Audit
     if (server == NULL)
         return ;
@@ -195,34 +227,7 @@
              << the_federate << '(' << reason << ")." << endl ;
         throw SecurityError("Federate should not access Interaction.");
     }
-}
-
-// ----------------------------------------------------------------------------
-//! Interaction.
-Interaction::Interaction(const std::string& name, InteractionClassHandle 
handle, TransportType transport, OrderType order)
-    : parent(0), depth(0), transport(transport), order(order), handle(handle),
-      id(PublicLevelID)
-{
-       setName(name);
-}
-
-// ----------------------------------------------------------------------------
-//! Destructor.
-Interaction::~Interaction()
-{
-    while (!parameterSet.empty()) {
-        delete parameterSet.front();
-        parameterSet.pop_front();
-    }
-
-    if (!publishers.empty())
-        D.Out(pdError, "Interaction %d: publishers list not empty at 
termination.", handle);
-
-    // Deleting Sons
-    while (!children.empty()) {
-        children.pop_front();
     }
-}
 
 // ----------------------------------------------------------------------------
 //! Delete a publisher with rank
@@ -244,12 +249,12 @@
     // Display inheritance
     cout << " Parent Class Handle: " << parent << endl ;
     cout << " Security Level: " << id << endl ;
-    cout << " " << children.size() << " Child(s):" << endl ;
+       cout << " " << subClasses->size() << " Child(s):" << endl ;
 
-    list<InteractionClassHandle>::const_iterator c = children.begin();
-    for (int i = 1 ; c != children.end(); i++, c++) {
-        cout << " child " << i << " Handle: " << (*c) << endl ;
-    }
+       //    list<InteractionClassHandle>::const_iterator c = children.begin();
+       //    for (int i = 1 ; c != children.end(); i++, c++) {
+       //        cout << " child " << i << " Handle: " << (*c) << endl ;
+       //    }
 
     // Display parameters
 
@@ -265,7 +270,7 @@
 //! Returns the parameter by its handle
 Parameter*
 Interaction::getParameterByHandle(ParameterHandle the_handle) const
-    throw (InteractionParameterNotDefined, RTIinternalError)
+throw (InteractionParameterNotDefined, RTIinternalError)
 {
     list<Parameter *>::const_iterator p ;
     for (p = parameterSet.begin(); p != parameterSet.end(); p++) {
@@ -280,7 +285,7 @@
 //! Returns the parameter handle obtained by its name.
 ParameterHandle
 Interaction::getParameterHandle(const char *the_name) const
-    throw (NameNotFound, RTIinternalError)
+throw (NameNotFound, RTIinternalError)
 {
     list<Parameter *>::const_iterator p ;
     for (p = parameterSet.begin(); p != parameterSet.end(); p++) {
@@ -295,11 +300,11 @@
 
 const std::string&
 Interaction::getParameterName(ParameterHandle the_handle) const
-    throw (InteractionParameterNotDefined,
+throw (InteractionParameterNotDefined,
            RTIinternalError)
-{
+               {
     return getParameterByHandle(the_handle)->getName();
-}
+               }
 
 // ----------------------------------------------------------------------------
 //! Return true if federate is publishing the attribute.
@@ -312,15 +317,15 @@
 // ----------------------------------------------------------------------------
 /*! Check a SendInteractionOrder to see if it's OK for sending, but
   without sending it(to be called on the RTIA only).
-*/
+ */
 void
 Interaction::isReady(FederateHandle federate_handle,
                      std::vector <ParameterHandle> &parameter_list,
                      UShort list_size)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionParameterNotDefined,
            RTIinternalError)
-{
+               {
     // Is Federate Publishing Interaction?
     if (!isPublishing(federate_handle))
         throw FederateNotPublishing("");
@@ -328,13 +333,13 @@
     // Are Parameters Defined?
     for (UShort i = 0 ; i < list_size ; i++)
         getParameterByHandle(parameter_list[i]);
-}
+               }
 
 // ----------------------------------------------------------------------------
 //! killFederate.
 void
 Interaction::killFederate(FederateHandle the_federate)
-    throw ()
+throw ()
 {
     try {
         // Is federate publishing something ? (not important)
@@ -352,7 +357,7 @@
 //! publish
 void
 Interaction::publish(FederateHandle the_handle)
-    throw (FederateNotPublishing, RTIinternalError, SecurityError)
+throw (FederateNotPublishing, RTIinternalError, SecurityError)
 {
     checkFederateAccess(the_handle, (char *) "Publish");
 
@@ -368,7 +373,7 @@
 //! publish
 void
 Interaction::unpublish(FederateHandle the_handle)
-    throw (FederateNotPublishing, RTIinternalError, SecurityError)
+throw (FederateNotPublishing, RTIinternalError, SecurityError)
 {
     if (isPublishing(the_handle)) {
        D.Out(pdTerm,
@@ -385,7 +390,7 @@
 /*! Called by RTIG in order to start the broadcasting of an Interaction
   Message(to all federates who subscribed to this Interaction Class).
   with time
-*/
+ */
 InteractionBroadcastList *
 Interaction::sendInteraction(FederateHandle federate_handle,
                              std::vector <ParameterHandle> &parameter_list,
@@ -394,11 +399,11 @@
                              FederationTime time,
                             const RTIRegion *region,
                              const char *the_tag)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            InteractionParameterNotDefined,
            RTIinternalError)
-{
+               {
 
     G.Out(pdGendoc,"enter Interaction::sendInteraction with time");
 
@@ -440,13 +445,13 @@
     // Return the BroadcastList in case it had to be passed to the
     // parent class.
     return ibList ;
-}
+               }
 
 // ----------------------------------------------------------------------------
 /*! Called by RTIG in order to start the broadcasting of an Interaction
   Message(to all federates who subscribed to this Interaction Class).
   without time
-*/
+ */
 InteractionBroadcastList *
 Interaction::sendInteraction(FederateHandle federate_handle,
                              std::vector <ParameterHandle> &parameter_list,
@@ -454,11 +459,11 @@
                              UShort list_size,
                             const RTIRegion *region,
                              const char *the_tag)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            InteractionParameterNotDefined,
            RTIinternalError)
-{
+               {
 
     G.Out(pdGendoc,"enter Interaction::sendInteraction without time");
 
@@ -499,7 +504,7 @@
     // Return the BroadcastList in case it had to be passed to the
     // parent class.
     return ibList ;
-}
+               }
 
 
 // ----------------------------------------------------------------------------
@@ -533,4 +538,4 @@
 
 } // namespace certi
 
-// $Id: Interaction.cc,v 3.46 2008/10/31 13:50:24 erk Exp $
+// $Id: Interaction.cc,v 3.47 2008/11/01 19:19:34 erk Exp $

Index: libCERTI/Interaction.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.hh,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- libCERTI/Interaction.hh     31 Oct 2008 13:50:25 -0000      3.32
+++ libCERTI/Interaction.hh     1 Nov 2008 19:19:35 -0000       3.33
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: Interaction.hh,v 3.32 2008/10/31 13:50:25 erk Exp $
+// $Id: Interaction.hh,v 3.33 2008/11/01 19:19:35 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_INTERACTION_HH
@@ -28,6 +28,7 @@
 // forward declaration
 namespace certi {
        class InteractionBroadcastList;
+       class InteractionSet;
 }  // namespace certi
 
 // CERTI headers
@@ -36,7 +37,6 @@
 #include "Parameter.hh"
 #include "Subscribable.hh"
 
-
 #include <list>
 #include <set>
 #include <string>
@@ -63,7 +63,33 @@
     SpaceHandle getSpace();
 
     void setHandle(InteractionClassHandle h) { handle = h ; }
-    InteractionClassHandle getHandle() const { return handle ; }
+    InteractionClassHandle getHandle() const { return handle ;}
+
+       /**
+        * Set the super class (parent class) of this object class;
+        * @param[in] h the handle of the super class.
+        */
+       void setSuperclass(InteractionClassHandle h) { superClass = h ; };
+       /**
+        * Get the super class handle.
+        * @return the super class handle
+        */
+       InteractionClassHandle getSuperclass() const { return superClass ; };
+       /**
+        * Add a subclass to this object class.
+        * @param[in] sc the interaction to add as a sub class
+        */
+       void addSubclass(Interaction *sc);
+       /**
+        * Retrieve a sub class by its name.
+        * @param[in] subClassName the name of the subclass
+        * @return the sub class object class.
+        */
+       Interaction* getSubClassByName(const std::string subClassName);
+       /**
+        * Get the whole set of subclasses.
+        */
+       InteractionSet* getSubClasses() {return subClasses;};
 
     ParameterHandle addParameter(Parameter *the_parameter,
                                  bool is_inherited = false);
@@ -146,8 +172,14 @@
 
     //! 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 ;
+
+    //std::list<InteractionClassHandle> children ;
+
     UShort depth ;
 
     /*! Interaction messages' Transport Type(Reliable, Best Effort),
@@ -167,6 +199,16 @@
 
     InteractionClassHandle handle ; //!< Interaction class handle.
 
+       /**
+        * The super class handle.
+        * 0 if they aren't any.
+        */
+       InteractionClassHandle superClass;
+    /**
+     * The set of interaction classes sub classes.
+     */
+    InteractionSet* subClasses;
+
     Parameter *getParameterByHandle(ParameterHandle the_handle) const
         throw (InteractionParameterNotDefined, RTIinternalError);
 
@@ -188,4 +230,4 @@
 
 #endif // _CERTI_INTERACTION.HH
 
-// $Id: Interaction.hh,v 3.32 2008/10/31 13:50:25 erk Exp $
+// $Id: Interaction.hh,v 3.33 2008/11/01 19:19:35 erk Exp $

Index: libCERTI/InteractionSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.cc,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- libCERTI/InteractionSet.cc  30 Oct 2008 10:11:41 -0000      3.24
+++ libCERTI/InteractionSet.cc  1 Nov 2008 19:19:35 -0000       3.25
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: InteractionSet.cc,v 3.24 2008/10/30 10:11:41 erk Exp $
+// $Id: InteractionSet.cc,v 3.25 2008/11/01 19:19:35 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Interaction.hh"
@@ -38,21 +38,70 @@
 static pdCDebug D("INTERACTIONSET", "(InterSet) - ");
 static PrettyDebug G("GENDOC",__FILE__) ;
 
-// ----------------------------------------------------------------------------
-//! addClass.
-/*! No memory is allocated, please don't free the pointed object.
+
+InteractionSet::InteractionSet(SecurityServer *security_server, bool 
isRootClassSet)
+: isRootClassSet(isRootClassSet), server(security_server) {
+}
+
+InteractionSet::~InteractionSet() {
+       /* clear name map */
+       ICFromName.clear();
+       /*
+        * If we are Root ClassSet (the class set owned by RootObject)
+        *    we delete the content
+        * If not we only clear the map in order to avoid double deletion.
+        *
+        * FIXME EN: this is a trick in order because we do not
+        *           really maintain a tree of ObjectClass in order
+        *           to support flat interaction class name
+        *           ("Boule" instead of "Bille.Boule")
+        *           We may get rid of this as soon as we want to support
+        *           same name for interaction class in different branch of the 
tree.
  */
+       if (isRootClassSet) {
+               while (!ICFromHandle.empty()) {
+                       delete (ICFromHandle.begin()->second);
+                       ICFromHandle.erase(ICFromHandle.begin());
+               }
+       }
+       else {
+               ICFromHandle.clear();
+       }
+} /* end of ~InteractionSet */
+
 void
-InteractionSet::addClass(Interaction *the_class)
-{
-    D.Out(pdInit, "Adding new interaction class %d, ", the_class->getHandle());
+InteractionSet::addClass(Interaction *newClass) {
 
-    the_class->server = server ;
+       Name2InteractionClassMap_t::iterator findit;
+       std::stringstream                       msg;
 
-    // BUG: We must verify that no other class with the same name does already
-    // exists. Make a call to getClassHandle.
-    push_front(the_class);
-}
+       D.Out(pdInit, "Adding new interaction class %d, ", 
newClass->getHandle());
+
+       /* link to server */
+       newClass->server = server ;
+
+       /*
+        * Check whether addition of this interaction class
+        * will generate a name collision or not.
+        * i.e. we may not add an object class of the SAME
+        * name to the interaction class set
+        */
+       findit = ICFromName.find(newClass->getName());
+       if (findit != ICFromName.end()) {
+               msg << "Name collision another interaction class named <"
+               << newClass->getName()
+               << "> with handle <"
+               << findit->second->getHandle()
+               << "> was found when trying to add identically named object 
class with handle <"
+               << newClass->getHandle();
+               throw RTIinternalError(msg.str().c_str());
+       }
+       /* store ref to new class in ObjectClass from Handle Map */
+       ICFromHandle[newClass->getHandle()] = newClass;
+       /* store ref to new class in ObjectClass from Name Map */
+       ICFromName[newClass->getName()] = newClass;
+
+} /* end of addClass */
 
 // ----------------------------------------------------------------------------
 //! broadcastInteraction with time.
@@ -65,11 +114,10 @@
                                      FederationTime the_time,
                                     const RTIRegion *region,
                                      const char *the_tag)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            InteractionParameterNotDefined,
-           RTIinternalError)
-{
+               RTIinternalError) {
 
     G.Out(pdGendoc,"enter InteractionSet::broadcastInteraction with time") ;
 
@@ -102,7 +150,7 @@
 
     G.Out(pdGendoc,"exit InteractionSet::broadcastInteraction with time") ;
 
-}
+} /* end of broadcastInteraction (with time) */
 
 // ----------------------------------------------------------------------------
 //! broadcastInteraction without time
@@ -114,11 +162,10 @@
                                      UShort list_size,
                                     const RTIRegion *region,
                                      const char *the_tag)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            InteractionParameterNotDefined,
-           RTIinternalError)
-{
+               RTIinternalError) {
 
     G.Out(pdGendoc,"enter InteractionSet::broadcastInteraction without time") ;
 
@@ -149,172 +196,184 @@
         throw RTIinternalError("BroadcastInteraction called by RTIA.");
 
     G.Out(pdGendoc,"exit InteractionSet::broadcastInteraction without time") ;
+} /* end of broadcastInteraction (WITHOUT time) */
 
-}
-
-// ----------------------------------------------------------------------------
-/*! Build a Parent-Child relation between two object class, by setting the
-  Child's Parent handle, and registering the Child in the Parent's SonSet.
-  Also copy all Parent's Attributes in the Child Class.
-*/
 void
 InteractionSet::buildParentRelation(Interaction *child, Interaction *parent)
 {
     // Register parent to son.
-    child->parent = parent->getHandle();
+       child->setSuperclass(parent->getHandle());
 
     // Transfert security level.
     child->setLevelId(parent->getLevelId());
 
     // Register son to parent.
-    parent->children.push_front(child->getHandle());
+       parent->addSubclass(child);
 
     // Copy parent Attribute into child class.
     parent->addParametersToChild(child);
-}
-
-// ----------------------------------------------------------------------------
-//! interactionSet.
-/*! 'security_server' can be NULL on the RTIA.
- */
-InteractionSet::InteractionSet(SecurityServer *security_server)
-    : list<Interaction *>(), server(security_server)
-{
-}
+} /* end of buildParentRelation */
 
-// ----------------------------------------------------------------------------
-//! Destructor (frees list).
-InteractionSet::~InteractionSet()
-{
-    while (!empty()) {
-        delete front();
-        pop_front();
-    }
-}
-
-// ----------------------------------------------------------------------------
-//! Print the Interactions tree to the standard output.
 void
 InteractionSet::display() const
 {
     cout << " Interactions :" << endl ;
-
-    list<Interaction *>::const_iterator i = begin();
-    for (; i != end(); i++) {
-        (*i)->display();
+       handledIC_const_iterator i;
+       for (i = ICFromHandle.begin(); i != ICFromHandle.end(); ++i) {
+               i->second->display();
     }
-}
+} /* end of display */
 
-// ----------------------------------------------------------------------------
-//! Return interaction associated to handle.
-Interaction *
-InteractionSet::getByHandle(InteractionClassHandle the_handle)
-    throw (InteractionClassNotDefined,
-           RTIinternalError)
+Interaction*
+InteractionSet::getByHandle(InteractionClassHandle the_handle) const
+throw (InteractionClassNotDefined, RTIinternalError)
 {
-    list<Interaction *>::const_iterator i ;
-    for (i = begin(); i != end(); i++) {
-        if ((*i)->getHandle() == the_handle)
-            return (*i);
-    }
+       std::stringstream msg;
 
-    throw InteractionClassNotDefined("");
-}
+       handledIC_const_iterator iter;
+
+       iter = ICFromHandle.find(the_handle);
+
+       if (iter != ICFromHandle.end()) {
+               return iter->second;
+       } else {
+               msg << "Unknown Object Class Handle <" << the_handle << ">";
+               D.Out(pdExcept, "Unknown Object Class Handle %d .", the_handle);
+               throw InteractionClassNotDefined(msg.str().c_str());
+       }
+} /* end of getByHandle */
 
 // ----------------------------------------------------------------------------
 //! Return the interaction handle associated to name.
 InteractionClassHandle
-InteractionSet::getInteractionClassHandle(const char *the_name)
-    throw (NameNotFound, RTIinternalError)
-{
-    if (the_name == NULL)
-        throw RTIinternalError("");
+InteractionSet::getInteractionClassHandle(const std::string& class_name) const
+throw (NameNotFound)  {
+
+       std::string                 currentName;
+       std::string                 remainingName;
+       InteractionClassHandle      currentHandle;
+       Interaction*                currentClass;
+       InteractionSet const*       currentClassSet;
+       namedIC_const_iterator      iter;
+
+       currentClassSet = this;
+       remainingName = class_name;
+       D.Out(pdDebug,"Looking for interaction class <%s>",class_name.c_str());
+       /*
+        * If the name is qualified (a.k.a. hierarchical name)
+        * like "Bille.Boule"
+        * then iterate through subClass in order to reach the leaf
+        * "unqualified name"
+        */
+       while (Named::isQualifiedClassName(remainingName)) {
+               /*
+                * The first current should be the name of
+                * of a subclass of the current ClassSet
+                */
+               currentName = Named::getNextClassName(remainingName);
+               D.Out(pdDebug,"Now Looking for interaction class 
<%s>",currentName.c_str());
+               /*
+                * Get the handle of the subclass
+                * NOTE that we won't recurse more than once here
+                * since the provided 'currentName' is not qualified
+                * 'by design'
+                * The recursive deepness is at most 2.
+                */
+               currentHandle = 
currentClassSet->getInteractionClassHandle(currentName);
+               /* Get the corresponding class object */
+               currentClass = currentClassSet->getByHandle(currentHandle);
+               /* now update currentClassSet */
+               currentClassSet = currentClass->getSubClasses();
+       }
+
+       /*
+        * Now the current classClassSet should be a leaf
+        * so that we can search in the
+        */
+       iter = currentClassSet->ICFromName.find(remainingName);
 
-    list<Interaction *>::const_iterator i ;
-    for (i = begin(); i != end(); i++) {
-        if (strcmp((*i)->getCName(), the_name) == 0)
-            return (*i)->getHandle();
+       if (iter != currentClassSet->ICFromName.end()) {
+               G.Out(pdGendoc,"exit ObjectClassSet::getObjectClassHandle");
+               return iter->second->getHandle();
+       } else {
+               G.Out(pdGendoc,"exit ObjectClassSet::getObjectClassHandle on 
NameNotFound");
+               throw NameNotFound(class_name.c_str());
     }
 
-    throw NameNotFound("");
-}
+} /* end of getInteractionClassHandle */
 
 // ----------------------------------------------------------------------------
 //! Return the interaction name associated to handle.
-const char *
-InteractionSet::getInteractionClassName(InteractionClassHandle the_handle)
-    throw (InteractionClassNotDefined, RTIinternalError)
+std::string
+InteractionSet::getInteractionClassName(InteractionClassHandle the_handle) 
const
+throw (InteractionClassNotDefined)
 {
-    list<Interaction *>::const_iterator i ;
-    for (i = begin(); i != end(); i++) {
-        if ((*i)->getHandle() == the_handle)
-            return (*i)->getCName();
-    }
-
-    throw InteractionClassNotDefined("");
-}
+       return getByHandle(the_handle)->getName();
+} /* end of getInteractionClassName */
 
 // ----------------------------------------------------------------------------
 //! Return the parameter handle associated to name and class handle.
 ParameterHandle
 InteractionSet::getParameterHandle(const char *the_name,
                                    InteractionClassHandle the_class)
-    throw (NameNotFound,
+throw (NameNotFound,
            InteractionClassNotDefined,
            RTIinternalError)
-{
+               {
     if (the_name == NULL)
         throw RTIinternalError("");
 
     // It may throw InteractionClassNotDefined
     Interaction *interaction = getByHandle(the_class);
     return interaction->getParameterHandle(the_name);
-}
+               }
 
 // ----------------------------------------------------------------------------
 //! Return the parameter name associated to handle and class handle.
 const std::string&
 InteractionSet::getParameterName(ParameterHandle the_handle,
                                  InteractionClassHandle the_class)
-    throw (InteractionParameterNotDefined,
+throw (InteractionParameterNotDefined,
            InteractionClassNotDefined,
            RTIinternalError)
-{
+               {
     // It may throw InteractionClassNotDefined
     Interaction *interaction = getByHandle(the_class);
     return interaction->getParameterName(the_handle);
-}
+               }
 
 // ----------------------------------------------------------------------------
 /*! Return no exception if the Interaction is valid for a SendInteraction, but
   do not broadcast it.(to be used on the RTIA for pre-checking).
-*/
+ */
 void
 InteractionSet::isReady(FederateHandle federate_handle,
                         InteractionClassHandle the_interaction,
                         std::vector <ParameterHandle> &param_array,
                         UShort param_array_size)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            InteractionParameterNotDefined,
            RTIinternalError)
-{
+               {
     // It may throw InteractionClassNotDefined
     Interaction *interaction = getByHandle(the_interaction);
     interaction->isReady(federate_handle, param_array, param_array_size);
-}
+               }
 
 // ----------------------------------------------------------------------------
 //! killFederate.
 void
 InteractionSet::killFederate(FederateHandle the_federate)
-    throw ()
-{
-    list<Interaction *>::iterator i ;
-    for (i = begin(); i != end(); i++) {
-        (*i)->killFederate(the_federate);
+throw () {
+    Handle2InteractionClassMap_t::iterator i;
+
+    for (i = ICFromHandle.begin(); i != ICFromHandle.end(); ++i) {
+        // Call KillFederate on that class until it returns NULL.
+        i->second->killFederate(the_federate);
     }
-}
+
+} /* end of killFederate */
 
 // ----------------------------------------------------------------------------
 //! publish.
@@ -322,18 +381,18 @@
 InteractionSet::publish(FederateHandle federate_handle,
                         InteractionClassHandle interaction_handle,
                         bool publish)
-    throw (FederateNotPublishing,
+throw (FederateNotPublishing,
            InteractionClassNotDefined,
            RTIinternalError,
            SecurityError)
-{
+               {
     // It may throw InteractionClassNotDefined
     Interaction *interaction = getByHandle(interaction_handle);
     if (publish)
        interaction->publish(federate_handle);
     else
        interaction->unpublish(federate_handle);
-}
+               }
 
 // ----------------------------------------------------------------------------
 //! subscribe.
@@ -342,19 +401,19 @@
                           InteractionClassHandle interaction_handle,
                          const RTIRegion *region,
                           bool subscribe)
-    throw (FederateNotSubscribing,
+throw (FederateNotSubscribing,
            InteractionClassNotDefined,
            RTIinternalError,
            SecurityError)
-{
+               {
     // It may throw InteractionClassNotDefined
     Interaction *interaction = getByHandle(interaction_handle);
     if (subscribe)
        interaction->subscribe(federate_handle, region);
     else
        interaction->unsubscribe(federate_handle, region);
-}
+               }
 
 } // namespace certi
 
-// $Id: InteractionSet.cc,v 3.24 2008/10/30 10:11:41 erk Exp $
+// $Id: InteractionSet.cc,v 3.25 2008/11/01 19:19:35 erk Exp $

Index: libCERTI/ObjectClassSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.cc,v
retrieving revision 3.40
retrieving revision 3.41
diff -u -b -r3.40 -r3.41
--- libCERTI/ObjectClassSet.cc  31 Oct 2008 13:50:25 -0000      3.40
+++ libCERTI/ObjectClassSet.cc  1 Nov 2008 19:19:35 -0000       3.41
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClassSet.cc,v 3.40 2008/10/31 13:50:25 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.41 2008/11/01 19:19:35 erk Exp $
 // ----------------------------------------------------------------------------
 
 // Project
@@ -45,6 +45,44 @@
 
 static PrettyDebug D("OBJECTCLASSSET", __FILE__);
 static PrettyDebug G("GENDOC",__FILE__) ;
+
+ObjectClassSet::ObjectClassSet(SecurityServer *theSecurityServer, bool 
isRootClassSet)
+
+{
+    // It can be NULL on the RTIA.
+    server = theSecurityServer ;
+    this->isRootClassSet = isRootClassSet;
+}
+
+// ----------------------------------------------------------------------------
+//! Destructor.
+ObjectClassSet::~ObjectClassSet()
+{
+       /* clear name map */
+       OCFromName.clear();
+       /*
+        * If we are Root ClassSet (the class set owned by RootObject)
+        *    we delete the content
+        * If not we only clear the map in order to avoid double deletion.
+        *
+        * FIXME EN: this is a trick in order because we do not
+        *           really maintain a tree of ObjectClass in order
+        *           to support flat object class name
+        *           ("Boule" instead of "Bille.Boule")
+        *           We may get rid of this as soon as we want to support
+        *           same name for object class in different branch of the tree.
+        */
+       if (isRootClassSet) {
+               while (!OCFromHandle.empty()) {
+                       delete (OCFromHandle.begin()->second);
+                       OCFromHandle.erase(OCFromHandle.begin());
+               }
+       }
+       else {
+               OCFromHandle.clear();
+       }
+} /* end of ~ObjectClassSet */
+
 // ----------------------------------------------------------------------------
 //! The class is not allocated, only the pointer is memorized.
 void
@@ -58,7 +96,7 @@
     /* link to server */
     newClass->server = server ;
     /*
-     * Check whether addition of this object clas
+     * Check whether addition of this object class
      * will generate a name collision or not.
      * i.e. we may not add an object class of the SAME
      * name to the object class set
@@ -77,11 +115,8 @@
     OCFromHandle[newClass->getHandle()] = newClass;
     /* store ref to new class in ObjectClass from Name Map */
     OCFromName[newClass->getName()] = newClass;
-}
+} /* end of addClass */
 
-// ----------------------------------------------------------------------------
-/** Build an inheritance relation between two object classes.
- */
 void
 ObjectClassSet::buildParentRelation(ObjectClass *subclass,
                                    ObjectClass *superclass)
@@ -93,45 +128,6 @@
 }
 
 // ----------------------------------------------------------------------------
-//! Constructor.
-ObjectClassSet::ObjectClassSet(SecurityServer *theSecurityServer, bool 
newIsRootClassSet)
-
-{
-    // It can be NULL on the RTIA.
-    server = theSecurityServer ;
-    isRootClassSet = newIsRootClassSet;
-}
-
-// ----------------------------------------------------------------------------
-//! Destructor.
-ObjectClassSet::~ObjectClassSet()
-{
-       /* clear name map */
-       OCFromName.clear();
-       /*
-        * If we are Root ClassSet (the class set owned by RootObject)
-        *    we delete the content
-        * If not we only clear the map in order to avoid double deletion.
-        *
-        * FIXME EN: this is a trick in order because we do not
-        *           really maintain a tree of ObjectClass in order
-        *           to support flat object class name
-        *           ("Boule" instead of "Bille.Boule")
-        *           We may get rid of this as soon as we want to support
-        *           same name for object class in different branch of the tree.
-        */
-       if (isRootClassSet) {
-               while (!OCFromHandle.empty()) {
-                       delete (OCFromHandle.begin()->second);
-                       OCFromHandle.erase(OCFromHandle.begin());
-               }
-       }
-       else {
-               OCFromHandle.clear();
-       }
-}
-
-// ----------------------------------------------------------------------------
 //! deleteObject with time.
 void
 ObjectClassSet::deleteObject(FederateHandle federate,
@@ -229,7 +225,7 @@
     for (i = OCFromHandle.begin(); i != OCFromHandle.end(); ++i) {
         i->second->display();
     }
-}
+} /* end of display */
 
 // ----------------------------------------------------------------------------
 //! getAttributeHandle.
@@ -382,14 +378,13 @@
                 G.Out(pdGendoc,"exit ObjectClassSet::getObjectClassHandle on 
NameNotFound");
                throw NameNotFound(class_name.c_str());
        }
-}
+} /* end of getObjectClassHandle */
 
 // ----------------------------------------------------------------------------
 //! getObjectClassName.
 string
 ObjectClassSet::getObjectClassName(ObjectClassHandle the_handle) const
-    throw (ObjectClassNotDefined,
-           RTIinternalError)
+    throw (ObjectClassNotDefined)
 {
     D.Out(pdRequest, "Looking for class %u...", the_handle);
 
@@ -415,7 +410,7 @@
                D.Out(pdExcept, "Unknown Object Class Handle %d .", theHandle);
                throw ObjectClassNotDefined(msg.str().c_str());
        }
-}
+} /* end of getWithHandle */
 
 // ----------------------------------------------------------------------------
 //! killFederate.
@@ -457,7 +452,7 @@
         } while (ocbList != NULL);
     }
     D.Out(pdExcept, "End of the KillFederate Procedure.");
-}
+} /* end of killFederate */
 
 // ----------------------------------------------------------------------------
 //! publish
@@ -843,4 +838,4 @@
 
 } // namespace certi
 
-// $Id: ObjectClassSet.cc,v 3.40 2008/10/31 13:50:25 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.41 2008/11/01 19:19:35 erk Exp $

Index: libCERTI/RootObject.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/RootObject.cc,v
retrieving revision 3.36
retrieving revision 3.37
diff -u -b -r3.36 -r3.37
--- libCERTI/RootObject.cc      31 Oct 2008 13:50:25 -0000      3.36
+++ libCERTI/RootObject.cc      1 Nov 2008 19:19:35 -0000       3.37
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: RootObject.cc,v 3.36 2008/10/31 13:50:25 erk Exp $
+// $Id: RootObject.cc,v 3.37 2008/11/01 19:19:35 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include "Object.hh"
@@ -58,8 +58,10 @@
 RootObject::RootObject(SecurityServer *security_server)
     : server(security_server), regionHandles(1)
 {
+       /* this object class set is the root one */
     ObjectClasses = new ObjectClassSet(server,true);
-    Interactions  = new InteractionSet(server);
+    /* this interaction class set is the root one */
+    Interactions  = new InteractionSet(server,true);
     objects       = new ObjectSet(server);
 }
 
@@ -362,4 +364,4 @@
 
 } // namespace certi
 
-// $Id: RootObject.cc,v 3.36 2008/10/31 13:50:25 erk Exp $
+// $Id: RootObject.cc,v 3.37 2008/11/01 19:19:35 erk Exp $

Index: libCERTI/ObjectClass.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.55
retrieving revision 3.56
diff -u -b -r3.55 -r3.56
--- libCERTI/ObjectClass.cc     31 Oct 2008 13:50:25 -0000      3.55
+++ libCERTI/ObjectClass.cc     1 Nov 2008 19:19:36 -0000       3.56
@@ -19,7 +19,7 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 // USA
 //
-// $Id: ObjectClass.cc,v 3.55 2008/10/31 13:50:25 erk Exp $
+// $Id: ObjectClass.cc,v 3.56 2008/11/01 19:19:36 erk Exp $
 // ----------------------------------------------------------------------------
 
 #include  "Object.hh"
@@ -311,7 +311,7 @@
     if (NULL!=subClasses) {
        delete subClasses;
     }
-}
+} /* end of ObjectClass destructor */
 
 // ----------------------------------------------------------------------------
 /* Delete Instance with time.
@@ -1818,4 +1818,4 @@
 
 } // namespace certi
 
-// $Id: ObjectClass.cc,v 3.55 2008/10/31 13:50:25 erk Exp $
+// $Id: ObjectClass.cc,v 3.56 2008/11/01 19:19:36 erk Exp $

Index: RTIA/ObjectManagement.hh
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.hh,v
retrieving revision 3.28
retrieving revision 3.29
diff -u -b -r3.28 -r3.29
--- RTIA/ObjectManagement.hh    30 Oct 2008 10:11:41 -0000      3.28
+++ RTIA/ObjectManagement.hh    1 Nov 2008 19:19:36 -0000       3.29
@@ -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.28 2008/10/30 10:11:41 erk Exp $
+// $Id: ObjectManagement.hh,v 3.29 2008/11/01 19:19:36 erk Exp $
 // ----------------------------------------------------------------------------
 
 #ifndef _CERTI_RTIA_OM
@@ -239,7 +239,7 @@
 
     InteractionClassHandle getInteractionClassHandle(const char *theName);
 
-    const char *getInteractionClassName(InteractionClassHandle theClassHandle);
+    const std::string getInteractionClassName(InteractionClassHandle 
theClassHandle);
 
     ParameterHandle getParameterHandle(const char *theParameterName,
                                        InteractionClassHandle theClassHandle);
@@ -281,4 +281,4 @@
 
 #endif // _CERTI_RTIA_OM
 
-// $Id: ObjectManagement.hh,v 3.28 2008/10/30 10:11:41 erk Exp $
+// $Id: ObjectManagement.hh,v 3.29 2008/11/01 19:19:36 erk Exp $

Index: RTIA/ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.55
retrieving revision 3.56
diff -u -b -r3.55 -r3.56
--- RTIA/ObjectManagement.cc    30 Oct 2008 10:11:42 -0000      3.55
+++ RTIA/ObjectManagement.cc    1 Nov 2008 19:19:36 -0000       3.56
@@ -809,7 +809,7 @@
 
 // ----------------------------------------------------------------------------
 //! getInteractionClassName.
-const char *
+const std::string
 ObjectManagement::
 getInteractionClassName(InteractionClassHandle theClassHandle)
 {

Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.92
retrieving revision 3.93
diff -u -b -r3.92 -r3.93
--- RTIA/RTIA_federate.cc       30 Oct 2008 10:18:57 -0000      3.92
+++ RTIA/RTIA_federate.cc       1 Nov 2008 19:19:36 -0000       3.93
@@ -835,7 +835,7 @@
         D.Out(pdTrace,
               "Receiving Message from Federate, type GetInteractionName.");
 
-        rep.setName(om->getInteractionClassName(req->getInteractionClass()));
+        
rep.setName(om->getInteractionClassName(req->getInteractionClass()).c_str());
         break ;
 
       case Message::GET_PARAMETER_HANDLE:




reply via email to

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