[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
certi libCERTI/ObjectClassAttribute.cc libCERTI...
From: |
certi-cvs |
Subject: |
certi libCERTI/ObjectClassAttribute.cc libCERTI... |
Date: |
Wed, 31 Oct 2007 10:30:25 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 07/10/31 10:30:25
Modified files:
libCERTI : ObjectClassAttribute.cc ObjectClassSet.cc
fed.cc Named.cc InteractionSet.hh RTIRegion.hh
Dimension.hh RootObject.cc XmlParser.cc
Object.cc Interaction.cc ObjectClass.cc
ObjectSet.hh PrettyDebug.cc ObjectSet.cc
ObjectClass.hh Subscribable.hh SocketUN.hh
ObjectClassAttribute.hh RoutingSpace.hh
Interaction.hh Object.hh InteractionSet.cc
ObjectClassSet.hh RootObject.hh Subscribable.cc
fed.hh
RTIA : RTIA_network.cc RTIA_federate.cc
DeclarationManagement.cc ObjectManagement.cc
DataDistribution.cc
libRTI : RTIambPrivateRefs.hh RTIambPrivateRefs.cc
RTIG : Federation.cc
Log message:
This set of patches should fix thse following bugs:
bug #20935 : Qualified name not handled
bug #21067 : ObjectClassSet::getObjectClassHandle doesn't handle class
hierarchies
This is not the ultimate solution since the patch does
not resolve name clash problem.
I will continue to improve the behaviour in order to reach
what is required by HLA 1.3 and 1516.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassAttribute.cc?cvsroot=certi&r1=3.26&r2=3.27
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.cc?cvsroot=certi&r1=3.27&r2=3.28
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/fed.cc?cvsroot=certi&r1=3.11&r2=3.12
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Named.cc?cvsroot=certi&r1=3.3&r2=3.4
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.hh?cvsroot=certi&r1=3.14&r2=3.15
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RTIRegion.hh?cvsroot=certi&r1=3.1&r2=3.2
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Dimension.hh?cvsroot=certi&r1=3.8&r2=3.9
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RootObject.cc?cvsroot=certi&r1=3.28&r2=3.29
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/XmlParser.cc?cvsroot=certi&r1=3.23&r2=3.24
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Object.cc?cvsroot=certi&r1=3.20&r2=3.21
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.cc?cvsroot=certi&r1=3.33&r2=3.34
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.38&r2=3.39
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectSet.hh?cvsroot=certi&r1=3.8&r2=3.9
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/PrettyDebug.cc?cvsroot=certi&r1=4.3&r2=4.4
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectSet.cc?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.hh?cvsroot=certi&r1=3.29&r2=3.30
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Subscribable.hh?cvsroot=certi&r1=3.5&r2=3.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUN.hh?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassAttribute.hh?cvsroot=certi&r1=3.22&r2=3.23
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RoutingSpace.hh?cvsroot=certi&r1=3.9&r2=3.10
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Interaction.hh?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Object.hh?cvsroot=certi&r1=3.16&r2=3.17
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/InteractionSet.cc?cvsroot=certi&r1=3.19&r2=3.20
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.hh?cvsroot=certi&r1=3.23&r2=3.24
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RootObject.hh?cvsroot=certi&r1=3.22&r2=3.23
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Subscribable.cc?cvsroot=certi&r1=3.5&r2=3.6
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/fed.hh?cvsroot=certi&r1=3.4&r2=3.5
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.46&r2=3.47
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/DeclarationManagement.cc?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/ObjectManagement.cc?cvsroot=certi&r1=3.26&r2=3.27
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/DataDistribution.cc?cvsroot=certi&r1=3.21&r2=3.22
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.hh?cvsroot=certi&r1=3.2&r2=3.3
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.cc?cvsroot=certi&r1=3.2&r2=3.3
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.cc?cvsroot=certi&r1=3.66&r2=3.67
Patches:
Index: libCERTI/ObjectClassAttribute.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassAttribute.cc,v
retrieving revision 3.26
retrieving revision 3.27
diff -u -b -r3.26 -r3.27
--- libCERTI/ObjectClassAttribute.cc 16 Oct 2007 09:28:21 -0000 3.26
+++ libCERTI/ObjectClassAttribute.cc 31 Oct 2007 10:30:19 -0000 3.27
@@ -19,12 +19,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassAttribute.cc,v 3.26 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassAttribute.cc,v 3.27 2007/10/31 10:30:19 erk Exp $
// ----------------------------------------------------------------------------
-
-
#include "ObjectClassAttribute.hh"
+#include "ObjectClassBroadcastList.hh"
+#include "SecurityServer.hh"
#include "PrettyDebug.hh"
#include "helper.hh"
@@ -209,4 +209,4 @@
} // namespace
-// $Id: ObjectClassAttribute.cc,v 3.26 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassAttribute.cc,v 3.27 2007/10/31 10:30:19 erk Exp $
Index: libCERTI/ObjectClassSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.cc,v
retrieving revision 3.27
retrieving revision 3.28
diff -u -b -r3.27 -r3.28
--- libCERTI/ObjectClassSet.cc 16 Oct 2007 09:28:21 -0000 3.27
+++ libCERTI/ObjectClassSet.cc 31 Oct 2007 10:30:20 -0000 3.28
@@ -19,14 +19,15 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassSet.cc,v 3.27 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.28 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
-
-
// Project
+#include "Object.hh"
+#include "ObjectClass.hh"
#include "ObjectClassSet.hh"
#include "ObjectClassBroadcastList.hh"
+#include "SecurityServer.hh"
#include "PrettyDebug.hh"
#include "Named.hh"
@@ -73,10 +74,12 @@
// ----------------------------------------------------------------------------
//! Constructor.
-ObjectClassSet::ObjectClassSet(SecurityServer *theSecurityServer)
+ObjectClassSet::ObjectClassSet(SecurityServer *theSecurityServer, bool
isRootClassSet)
+
{
// It can be NULL on the RTIA.
- server = theSecurityServer ;
+ this->server = theSecurityServer ;
+ this->isRootClassSet = isRootClassSet;
}
// ----------------------------------------------------------------------------
@@ -86,13 +89,26 @@
/* clear name map */
OCFromName.clear();
/*
- * FIXME EN.
- * Should we delete the content or only clear the map?
+ * 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();
+ }
}
// ----------------------------------------------------------------------------
@@ -236,21 +252,6 @@
// ----------------------------------------------------------------------------
//! getObjectClassHandle.
ObjectClassHandle
-ObjectClassSet::getFlatObjectClassHandle(std::string class_name) const
- throw (NameNotFound)
-{
- namedOC_const_iterator iter;
-
- iter = OCFromName.find(class_name);
-
- if (iter != OCFromName.end()) {
- return iter->second->getHandle();
- } else {
- throw NameNotFound(class_name.c_str());
- }
-}
-
-ObjectClassHandle
ObjectClassSet::getObjectClassHandle(std::string class_name) const
throw (NameNotFound)
{
@@ -258,20 +259,47 @@
std::string remainingName;
ObjectClassHandle currentHandle;
ObjectClass* currentClass;
+ ObjectClassSet const* currentClassSet;
+ namedOC_const_iterator iter;
- if (Named::isQualifiedClassName(class_name)) {
+ currentClassSet = this;
remainingName = class_name;
- /* the first current should be the Root Object Class */
- while (remainingName.length()>0) {
+ /*
+ * 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 ObjectClassSet
+ */
currentName = Named::getNextClassName(remainingName);
- currentHandle = getFlatObjectClassHandle(currentName);
- currentClass = getWithHandle(currentHandle);
-
- throw RTIinternalError("NotImplemented");
+ /*
+ * 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->getObjectClassHandle(currentName);
+ /* Get the corresponding class object */
+ currentClass = currentClassSet->getWithHandle(currentHandle);
+ /* now update currentClassSet */
+ currentClassSet = currentClass->getSubClasses();
}
+ /*
+ * Now the current classClassSet should be a leaf
+ * so that we can search in the
+ */
+ iter = currentClassSet->OCFromName.find(remainingName);
+
+ if (iter != currentClassSet->OCFromName.end()) {
+ return iter->second->getHandle();
} else {
- return getFlatObjectClassHandle(class_name);
+ throw NameNotFound(class_name.c_str());
}
}
@@ -732,4 +760,4 @@
} // namespace certi
-// $Id: ObjectClassSet.cc,v 3.27 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.28 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/fed.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/fed.cc,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -b -r3.11 -r3.12
--- libCERTI/fed.cc 16 Oct 2007 09:28:21 -0000 3.11
+++ libCERTI/fed.cc 31 Oct 2007 10:30:20 -0000 3.12
@@ -19,15 +19,23 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: fed.cc,v 3.11 2007/10/16 09:28:21 erk Exp $
+// $Id: fed.cc,v 3.12 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
-
-#include "fed.hh"
+// CERTI header
+#include "Object.hh"
+#include "ObjectClass.hh"
#include "ObjectClassAttribute.hh"
+#include "ObjectClassSet.hh"
+#include "Interaction.hh"
+#include "InteractionSet.hh"
#include "Dimension.hh"
+#include "RoutingSpace.hh"
#include "PrettyDebug.hh"
+#include "fed.hh"
+
+// Standard headers
#include <iostream>
#include <utility>
#include <string>
@@ -385,4 +393,4 @@
}} // namespaces
-// $Id: fed.cc,v 3.11 2007/10/16 09:28:21 erk Exp $
+// $Id: fed.cc,v 3.12 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/Named.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Named.cc,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -b -r3.3 -r3.4
--- libCERTI/Named.cc 16 Oct 2007 09:28:21 -0000 3.3
+++ libCERTI/Named.cc 31 Oct 2007 10:30:20 -0000 3.4
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Named.cc,v 3.3 2007/10/16 09:28:21 erk Exp $
+// $Id: Named.cc,v 3.4 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
#include "Named.hh"
@@ -82,9 +82,9 @@
/* take the substring from start up to '.' (excluded) */
idx = qualifiedClassName.find_first_of('.',0);
if (idx!=std::string::npos) {
- retval = qualifiedClassName.substr(0,idx-1);
+ retval = qualifiedClassName.substr(0,idx);
/* update the string with the remaining string */
- qualifiedClassName = qualifiedClassName.substr(idx);
+ qualifiedClassName = qualifiedClassName.substr(idx+1);
} else {
retval = qualifiedClassName;
}
@@ -93,4 +93,4 @@
} // certi
-// $Id: Named.cc,v 3.3 2007/10/16 09:28:21 erk Exp $
+// $Id: Named.cc,v 3.4 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/InteractionSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.hh,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15
--- libCERTI/InteractionSet.hh 23 Jul 2007 14:13:24 -0000 3.14
+++ libCERTI/InteractionSet.hh 31 Oct 2007 10:30:20 -0000 3.15
@@ -19,13 +19,19 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: InteractionSet.hh,v 3.14 2007/07/23 14:13:24 rousse Exp $
+// $Id: InteractionSet.hh,v 3.15 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_INTERACTION_SET_HH
#define _CERTI_INTERACTION_SET_HH
-#include "Interaction.hh"
+// forward declaration
+namespace certi {
+ class Interaction;
+} // namespace certi
+
+// CERTI headers
+#include "certi.hh"
#include "SecurityServer.hh"
#include <list>
@@ -139,4 +145,4 @@
#endif // _CERTI_INTERACTION_SET_HH
-// $Id: InteractionSet.hh,v 3.14 2007/07/23 14:13:24 rousse Exp $
+// $Id: InteractionSet.hh,v 3.15 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/RTIRegion.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/RTIRegion.hh,v
retrieving revision 3.1
retrieving revision 3.2
diff -u -b -r3.1 -r3.2
--- libCERTI/RTIRegion.hh 22 Jun 2007 08:51:39 -0000 3.1
+++ libCERTI/RTIRegion.hh 31 Oct 2007 10:30:20 -0000 3.2
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIRegion.hh,v 3.1 2007/06/22 08:51:39 erk Exp $
+// $Id: RTIRegion.hh,v 3.2 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_RTI_REGION_HH
@@ -29,7 +29,7 @@
namespace certi {
-class RoutingSpace ;
+class RoutingSpace;
class CERTI_EXPORT RTIRegion : public BaseRegion
{
@@ -48,4 +48,4 @@
#endif // CERTI_RTI_REGION_HH
-// $Id: RTIRegion.hh,v 3.1 2007/06/22 08:51:39 erk Exp $
+// $Id: RTIRegion.hh,v 3.2 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/Dimension.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Dimension.hh,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -b -r3.8 -r3.9
--- libCERTI/Dimension.hh 3 Sep 2007 13:59:48 -0000 3.8
+++ libCERTI/Dimension.hh 31 Oct 2007 10:30:20 -0000 3.9
@@ -19,12 +19,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Dimension.hh,v 3.8 2007/09/03 13:59:48 erk Exp $
+// $Id: Dimension.hh,v 3.9 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_DIMENSION_HH
#define _CERTI_DIMENSION_HH
+// CERTI headers
#include "certi.hh"
#include "Named.hh"
#include "Handled.hh"
@@ -82,4 +83,4 @@
#endif
-// $Id: Dimension.hh,v 3.8 2007/09/03 13:59:48 erk Exp $
+// $Id: Dimension.hh,v 3.9 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/RootObject.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/RootObject.cc,v
retrieving revision 3.28
retrieving revision 3.29
diff -u -b -r3.28 -r3.29
--- libCERTI/RootObject.cc 6 Jul 2007 09:25:17 -0000 3.28
+++ libCERTI/RootObject.cc 31 Oct 2007 10:30:20 -0000 3.29
@@ -19,10 +19,19 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RootObject.cc,v 3.28 2007/07/06 09:25:17 erk Exp $
+// $Id: RootObject.cc,v 3.29 2007/10/31 10:30:20 erk Exp $
// ----------------------------------------------------------------------------
-
+#include "Object.hh"
+#include "ObjectSet.hh"
+#include "ObjectAttribute.hh"
+#include "ObjectClass.hh"
+#include "ObjectClassSet.hh"
+#include "ObjectClassAttribute.hh"
+#include "Interaction.hh"
+#include "InteractionSet.hh"
+#include "RTIRegion.hh"
+#include "RoutingSpace.hh"
#include "RootObject.hh"
#include "PrettyDebug.hh"
#include "helper.hh"
@@ -311,4 +320,4 @@
} // namespace certi
-// $Id: RootObject.cc,v 3.28 2007/07/06 09:25:17 erk Exp $
+// $Id: RootObject.cc,v 3.29 2007/10/31 10:30:20 erk Exp $
Index: libCERTI/XmlParser.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/XmlParser.cc,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -b -r3.23 -r3.24
--- libCERTI/XmlParser.cc 31 Aug 2007 13:43:20 -0000 3.23
+++ libCERTI/XmlParser.cc 31 Oct 2007 10:30:21 -0000 3.24
@@ -22,6 +22,8 @@
#include "XmlParser.hh"
+#include "ObjectClassSet.hh"
+#include "InteractionSet.hh"
#include "ObjectClassAttribute.hh"
#include "RoutingSpace.hh"
#include "PrettyDebug.hh"
Index: libCERTI/Object.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Object.cc,v
retrieving revision 3.20
retrieving revision 3.21
diff -u -b -r3.20 -r3.21
--- libCERTI/Object.cc 6 Jul 2007 09:25:18 -0000 3.20
+++ libCERTI/Object.cc 31 Oct 2007 10:30:21 -0000 3.21
@@ -19,12 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Object.cc,v 3.20 2007/07/06 09:25:18 erk Exp $
+// $Id: Object.cc,v 3.21 2007/10/31 10:30:21 erk Exp $
// ----------------------------------------------------------------------------
#include "Object.hh"
+#include "ObjectAttribute.hh"
+#include "RTIRegion.hh"
#include <iostream>
#include <cstring>
@@ -153,4 +155,4 @@
} // namespace certi
-// $Id: Object.cc,v 3.20 2007/07/06 09:25:18 erk Exp $
+// $Id: Object.cc,v 3.21 2007/10/31 10:30:21 erk Exp $
Index: libCERTI/Interaction.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.cc,v
retrieving revision 3.33
retrieving revision 3.34
diff -u -b -r3.33 -r3.34
--- libCERTI/Interaction.cc 16 Oct 2007 09:28:22 -0000 3.33
+++ libCERTI/Interaction.cc 31 Oct 2007 10:30:21 -0000 3.34
@@ -19,12 +19,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Interaction.cc,v 3.33 2007/10/16 09:28:22 erk Exp $
+// $Id: Interaction.cc,v 3.34 2007/10/31 10:30:21 erk Exp $
// ----------------------------------------------------------------------------
#include "Interaction.hh"
+#include "InteractionBroadcastList.hh"
#include "PrettyDebug.hh"
#include <iostream>
@@ -552,4 +553,4 @@
} // namespace certi
-// $Id: Interaction.cc,v 3.33 2007/10/16 09:28:22 erk Exp $
+// $Id: Interaction.cc,v 3.34 2007/10/31 10:30:21 erk Exp $
Index: libCERTI/ObjectClass.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.38
retrieving revision 3.39
diff -u -b -r3.38 -r3.39
--- libCERTI/ObjectClass.cc 16 Oct 2007 09:28:22 -0000 3.38
+++ libCERTI/ObjectClass.cc 31 Oct 2007 10:30:21 -0000 3.39
@@ -19,13 +19,16 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.cc,v 3.38 2007/10/16 09:28:22 erk Exp $
+// $Id: ObjectClass.cc,v 3.39 2007/10/31 10:30:21 erk Exp $
// ----------------------------------------------------------------------------
-
-
+#include "Object.hh"
+#include "ObjectAttribute.hh"
#include "ObjectClass.hh"
#include "ObjectClassAttribute.hh"
+#include "ObjectClassSet.hh"
+#include "ObjectClassBroadcastList.hh"
+
#include "SocketTCP.hh"
#include "PrettyDebug.hh"
#include "helper.hh"
@@ -280,9 +283,10 @@
// ----------------------------------------------------------------------------
ObjectClass::ObjectClass()
- : server(0), handle(0), maxSubscriberHandle(0), levelId(PublicLevelID),
- superClass(0)
+ : server(NULL), handle(0), maxSubscriberHandle(0), levelId(PublicLevelID),
+ superClass(0), subClasses(NULL)
{
+ subClasses = new ObjectClassSet(NULL);
}
// ----------------------------------------------------------------------------
@@ -299,10 +303,9 @@
delete attributeSet.front();
attributeSet.pop_front();
}
-
// Deleting subclasses
- while (!subClasses.empty()) {
- subClasses.pop_front();
+ if (NULL!=subClasses) {
+ delete subClasses;
}
}
@@ -379,14 +382,14 @@
// Display inheritance
cout << " Parent Class Handle: " << superClass << endl ;
cout << " Security Level: " << levelId << endl ;
- cout << " " << subClasses.size() << " Child(s):" << endl ;
-
+ cout << " " << subClasses->size() << " Child(s):" << endl ;
cout << " Subclasses handles:" ;
- list<ObjectClass *>::const_iterator s = subClasses.begin();
- for (s = subClasses.begin(); s != subClasses.end(); s++) {
- cout << " " << (*s)->getHandle() << endl ;
+ ObjectClassSet::namedOC_const_iterator i ;
+ for (i = subClasses->NamedBegin(); i != subClasses->NamedEnd(); ++i) {
+ cout << " " << i->second->getHandle() << endl;
}
+
// Display Attributes
cout << " " << attributeSet.size() << " Attribute(s):" << endl ;
list<ObjectClassAttribute *>::const_iterator a ;
@@ -1699,7 +1702,7 @@
void
ObjectClass::addSubclass(ObjectClass *c)
{
- subClasses.push_back(c);
+ subClasses->addClass(c);
}
// ----------------------------------------------------------------------------
@@ -1718,9 +1721,9 @@
bool go_deeper = sendDiscoverMessages(federate, subscription);
if (go_deeper) {
- list<ObjectClass *>::const_iterator i ;
- for (i = subClasses.begin(); i != subClasses.end(); ++i) {
- (*i)->recursiveDiscovering(federate, subscription);
+ ObjectClassSet::namedOC_const_iterator i ;
+ for (i = subClasses->NamedBegin(); i != subClasses->NamedEnd(); ++i) {
+ i->second->recursiveDiscovering(federate, subscription);
}
}
}
@@ -1745,4 +1748,4 @@
} // namespace certi
-// $Id: ObjectClass.cc,v 3.38 2007/10/16 09:28:22 erk Exp $
+// $Id: ObjectClass.cc,v 3.39 2007/10/31 10:30:21 erk Exp $
Index: libCERTI/ObjectSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectSet.hh,v
retrieving revision 3.8
retrieving revision 3.9
diff -u -b -r3.8 -r3.9
--- libCERTI/ObjectSet.hh 22 Jun 2007 08:51:38 -0000 3.8
+++ libCERTI/ObjectSet.hh 31 Oct 2007 10:30:21 -0000 3.9
@@ -25,8 +25,7 @@
#define _CERTI_OBJECT_SET_HH
// Project
-#include "Object.hh"
-#include "ObjectSet.hh"
+class Object;
#include "SecurityServer.hh"
#include "certi.hh"
@@ -162,6 +161,13 @@
FederateHandle the_federate) const ;
SecurityServer *server ;
+
+ typedef std::map<ObjectHandle,Object*,std::less<ObjectHandle> >
Handle2ObjectMap_t;
+ typedef std::map<std::string,Object*,std::less<std::string> >
Name2ObjectMap_t;
+ typedef Handle2ObjectMap_t::const_iterator handledO_const_iterator;
+ typedef Name2ObjectMap_t::const_iterator namedO_const_iterator;
+ Handle2ObjectMap_t OFromHandle;
+ Name2ObjectMap_t OFromName;
};
} // namespace certi
Index: libCERTI/PrettyDebug.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/PrettyDebug.cc,v
retrieving revision 4.3
retrieving revision 4.4
diff -u -b -r4.3 -r4.4
--- libCERTI/PrettyDebug.cc 6 Jul 2007 09:25:17 -0000 4.3
+++ libCERTI/PrettyDebug.cc 31 Oct 2007 10:30:21 -0000 4.4
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: PrettyDebug.cc,v 4.3 2007/07/06 09:25:17 erk Exp $
+// $Id: PrettyDebug.cc,v 4.4 2007/10/31 10:30:21 erk Exp $
// ----------------------------------------------------------------------------
@@ -141,7 +141,7 @@
* whatever you need. */
PrettyDebug::PrettyDebug(const char *Name, const char *Header)
{
-if (Name == 0)
+if (NULL == Name)
{
PrettyDebug::Print(PrettyDebug::defaultOutputStream, "",
"Error in pgCDebug constructor, no Name specified.\n");
@@ -274,4 +274,4 @@
#endif // NDEBUG
-// $Id: PrettyDebug.cc,v 4.3 2007/07/06 09:25:17 erk Exp $
+// $Id: PrettyDebug.cc,v 4.4 2007/10/31 10:30:21 erk Exp $
Index: libCERTI/ObjectSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectSet.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/ObjectSet.cc 27 Sep 2007 13:59:33 -0000 3.15
+++ libCERTI/ObjectSet.cc 31 Oct 2007 10:30:21 -0000 3.16
@@ -24,6 +24,8 @@
// Project
+#include "Object.hh"
+#include "ObjectAttribute.hh"
#include "ObjectSet.hh"
#include "PrettyDebug.hh"
@@ -431,4 +433,4 @@
} // namespace certi
-// $Id: ObjectSet.cc,v 3.15 2007/09/27 13:59:33 erk Exp $
+// $Id: ObjectSet.cc,v 3.16 2007/10/31 10:30:21 erk Exp $
Index: libCERTI/ObjectClass.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.hh,v
retrieving revision 3.29
retrieving revision 3.30
diff -u -b -r3.29 -r3.30
--- libCERTI/ObjectClass.hh 16 Oct 2007 09:28:21 -0000 3.29
+++ libCERTI/ObjectClass.hh 31 Oct 2007 10:30:22 -0000 3.30
@@ -19,16 +19,23 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.hh,v 3.29 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClass.hh,v 3.30 2007/10/31 10:30:22 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_CLASS_HH
#define _CERTI_OBJECT_CLASS_HH
-// Project
-#include "Object.hh"
-#include "ObjectAttribute.hh"
-#include "ObjectClassBroadcastList.hh"
+// forward declarations
+namespace certi {
+ class Object;
+ class ObjectAttribute;
+ class ObjectClass;
+ class ObjectClassSet;
+ class ObjectClassAttribute;
+ class ObjectClassBroadcastList;
+}
+
+// CERTI headers
#include "certi.hh"
#include "SecurityServer.hh"
#include "Named.hh"
@@ -73,6 +80,7 @@
ObjectClassHandle getSuperclass() const { return superClass ; };
void addSubclass(ObjectClass *);
ObjectClass* getSubClassByName(const std::string subClassName);
+ ObjectClassSet* getSubClasses() {return subClasses;};
// Security Methods
void checkFederateAccess(FederateHandle, const char *)
@@ -235,12 +243,13 @@
SecurityLevelID levelId ; //! default level for non inherited attributes
std::list<ObjectClassAttribute *> attributeSet ;
std::list<Object *> objectSet ;
- ObjectClassHandle superClass ;
- std::list<ObjectClass *> subClasses ;
+ ObjectClassHandle superClass;
+ // The set of sub classes of this object class
+ ObjectClassSet* subClasses;
};
} // namespace certi
#endif // _CERTI_OBJECT_CLASS_HH
-// $Id: ObjectClass.hh,v 3.29 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClass.hh,v 3.30 2007/10/31 10:30:22 erk Exp $
Index: libCERTI/Subscribable.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Subscribable.hh,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libCERTI/Subscribable.hh 16 Oct 2007 09:28:21 -0000 3.5
+++ libCERTI/Subscribable.hh 31 Oct 2007 10:30:22 -0000 3.6
@@ -17,22 +17,25 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Subscribable.hh,v 3.5 2007/10/16 09:28:21 erk Exp $
+// $Id: Subscribable.hh,v 3.6 2007/10/31 10:30:22 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_SUBSCRIBABLE_HH
#define CERTI_SUBSCRIBABLE_HH
-#include "ObjectClassBroadcastList.hh"
-#include "InteractionBroadcastList.hh"
+namespace certi {
+ class ObjectClassBroadcastList;
+ class InteractionBroadcastList;
+ class RTIRegion ;
+}
+
+#include "certi.hh"
#include "Named.hh"
#include <list>
namespace certi {
-class RTIRegion ;
-
class Subscriber
{
public:
@@ -78,4 +81,4 @@
#endif // CERTI_SUBSCRIBABLE_HH
-// $Id: Subscribable.hh,v 3.5 2007/10/16 09:28:21 erk Exp $
+// $Id: Subscribable.hh,v 3.6 2007/10/31 10:30:22 erk Exp $
Index: libCERTI/SocketUN.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/SocketUN.hh,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- libCERTI/SocketUN.hh 22 Jun 2007 08:51:40 -0000 3.10
+++ libCERTI/SocketUN.hh 31 Oct 2007 10:30:22 -0000 3.11
@@ -45,16 +45,20 @@
// line is commented out, no buffer will be used at all.
#define SOCKUN_BUFFER_LENGTH 4096
-/*! IMPORTANT NOTE: This UNIX socket implementation uses a Read Buffer to
- improve global read performances(by reducing Read system calls). An
- important drawback of this improvement is that a socket can be marked as
- empty for the system, but in fact there is data waiting in the read
- buffer. This is especially a problem for processes using the 'select'
- system call: the socket won't be marked as ready for reading, because all
- data has already been read, and is waiting in the internal buffer.
- Therefore, before returning to a select loop, be sure to call the
- IsDataReady method to check whether any data is waiting for processing.
-*/
+/**
+ * Socket Unix handling class.
+ * On windows platform this socket class is implemented using
+ * a TCP socket since Unix socket are not available.
+ * IMPORTANT NOTE: This UNIX socket implementation uses a Read Buffer to
+ * improve global read performances(by reducing Read system calls). An
+ * important drawback of this improvement is that a socket can be marked as
+ * empty for the system, but in fact there is data waiting in the read
+ * buffer. This is especially a problem for processes using the 'select'
+ * system call: the socket won't be marked as ready for reading, because all
+ * data has already been read, and is waiting in the internal buffer.
+ * Therefore, before returning to a select loop, be sure to call the
+ * IsDataReady method to check whether any data is waiting for processing.
+ */
class CERTI_EXPORT SocketUN
{
public:
Index: libCERTI/ObjectClassAttribute.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassAttribute.hh,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -b -r3.22 -r3.23
--- libCERTI/ObjectClassAttribute.hh 16 Oct 2007 09:28:21 -0000 3.22
+++ libCERTI/ObjectClassAttribute.hh 31 Oct 2007 10:30:22 -0000 3.23
@@ -19,17 +19,23 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassAttribute.hh,v 3.22 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassAttribute.hh,v 3.23 2007/10/31 10:30:22 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_OBJECT_CLASS_ATTRIBUTE_HH
#define CERTI_OBJECT_CLASS_ATTRIBUTE_HH
+// forward declarations
+namespace certi {
+ class ObjectClassBroadcastList;
+ class RTIRegion;
+ class SecurityServer;
+} // namespace certi
+
+// CERTI headers
#include "certi.hh"
#include "SecurityLevel.hh"
-
#include "Subscribable.hh"
-#include "ObjectClassBroadcastList.hh"
#include <set>
@@ -87,4 +93,4 @@
#endif // CERTI_OBJECT_CLASS_ATTRIBUTE_HH
-// $Id: ObjectClassAttribute.hh,v 3.22 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassAttribute.hh,v 3.23 2007/10/31 10:30:22 erk Exp $
Index: libCERTI/RoutingSpace.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/RoutingSpace.hh,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -b -r3.9 -r3.10
--- libCERTI/RoutingSpace.hh 3 Sep 2007 13:59:47 -0000 3.9
+++ libCERTI/RoutingSpace.hh 31 Oct 2007 10:30:22 -0000 3.10
@@ -19,17 +19,20 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RoutingSpace.hh,v 3.9 2007/09/03 13:59:47 erk Exp $
+// $Id: RoutingSpace.hh,v 3.10 2007/10/31 10:30:22 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_ROUTING_SPACE
#define _CERTI_ROUTING_SPACE
+
+// CERTI headers
#include "Dimension.hh"
#include "Handled.hh"
#include "Extent.hh"
#include "Named.hh"
+// Standard headers
#include <vector>
#include <string>
@@ -91,5 +94,5 @@
#endif // _CERTI_ROUTING_SPACE
-// $Id: RoutingSpace.hh,v 3.9 2007/09/03 13:59:47 erk Exp $
+// $Id: RoutingSpace.hh,v 3.10 2007/10/31 10:30:22 erk Exp $
Index: libCERTI/Interaction.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Interaction.hh,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- libCERTI/Interaction.hh 16 Oct 2007 09:28:21 -0000 3.24
+++ libCERTI/Interaction.hh 31 Oct 2007 10:30:22 -0000 3.25
@@ -19,17 +19,23 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Interaction.hh,v 3.24 2007/10/16 09:28:21 erk Exp $
+// $Id: Interaction.hh,v 3.25 2007/10/31 10:30:22 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_INTERACTION_HH
#define _CERTI_INTERACTION_HH
+// forward declaration
+namespace certi {
+ class InteractionBroadcastList;
+} // namespace certi
+
+// CERTI headers
#include "certi.hh"
#include "SecurityServer.hh"
#include "Parameter.hh"
#include "Subscribable.hh"
-#include "InteractionBroadcastList.hh"
+
#include <list>
#include <set>
@@ -164,4 +170,4 @@
#endif // _CERTI_INTERACTION.HH
-// $Id: Interaction.hh,v 3.24 2007/10/16 09:28:21 erk Exp $
+// $Id: Interaction.hh,v 3.25 2007/10/31 10:30:22 erk Exp $
Index: libCERTI/Object.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Object.hh,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- libCERTI/Object.hh 22 Jun 2007 08:51:37 -0000 3.16
+++ libCERTI/Object.hh 31 Oct 2007 10:30:23 -0000 3.17
@@ -19,15 +19,19 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Object.hh,v 3.16 2007/06/22 08:51:37 erk Exp $
+// $Id: Object.hh,v 3.17 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_HH
#define _CERTI_OBJECT_HH
+// forward declaration
+namespace certi {
+ class ObjectAttribute;
+ class RTIRegion;
+}
+
#include "certi.hh"
-#include "ObjectAttribute.hh"
-#include "RTIRegion.hh"
#include "Named.hh"
#include "Handled.hh"
@@ -88,4 +92,4 @@
#endif // _CERTI_OBJECT_HH
-// $Id: Object.hh,v 3.16 2007/06/22 08:51:37 erk Exp $
+// $Id: Object.hh,v 3.17 2007/10/31 10:30:23 erk Exp $
Index: libCERTI/InteractionSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/InteractionSet.cc,v
retrieving revision 3.19
retrieving revision 3.20
diff -u -b -r3.19 -r3.20
--- libCERTI/InteractionSet.cc 16 Oct 2007 09:28:21 -0000 3.19
+++ libCERTI/InteractionSet.cc 31 Oct 2007 10:30:23 -0000 3.20
@@ -19,14 +19,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: InteractionSet.cc,v 3.19 2007/10/16 09:28:21 erk Exp $
+// $Id: InteractionSet.cc,v 3.20 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
-
-
+#include "Interaction.hh"
#include "InteractionSet.hh"
+#include "InteractionBroadcastList.hh"
#include "PrettyDebug.hh"
-//#include "InteractionBroadcastList.hh"
#include <iostream>
@@ -358,4 +357,4 @@
} // namespace certi
-// $Id: InteractionSet.cc,v 3.19 2007/10/16 09:28:21 erk Exp $
+// $Id: InteractionSet.cc,v 3.20 2007/10/31 10:30:23 erk Exp $
Index: libCERTI/ObjectClassSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.hh,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -b -r3.23 -r3.24
--- libCERTI/ObjectClassSet.hh 16 Oct 2007 09:28:21 -0000 3.23
+++ libCERTI/ObjectClassSet.hh 31 Oct 2007 10:30:23 -0000 3.24
@@ -19,29 +19,35 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassSet.hh,v 3.23 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassSet.hh,v 3.24 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_CLASS_SET_HH
#define _CERTI_OBJECT_CLASS_SET_HH
-#include "ObjectClass.hh"
-#include "SecurityServer.hh"
+// forward declaration
+namespace certi {
+ class Object;
+ class ObjectClass;
+ class SecurityServer;
+} // namespace certi
+// CERTI headers
+#include "certi.hh"
#include <list>
#include <string>
#include <map>
namespace certi {
-/*! Class ObjectClassSet, qui est la racine de l'arborescence des
- classes d'objets.
-*/
+/**
+ * This class represents a set of object classes.
+ */
class CERTI_EXPORT ObjectClassSet
{
public:
- ObjectClassSet(SecurityServer *theSecurityServer);
+ ObjectClassSet(SecurityServer *theSecurityServer, bool
isRootClassSet=false);
~ObjectClassSet();
void addClass(ObjectClass *theClass);
@@ -163,18 +169,30 @@
Object *getObject(ObjectHandle) const throw (ObjectNotKnown);
-private:
+
typedef
std::map<ObjectClassHandle,ObjectClass*,std::less<ObjectClassHandle> >
Handle2ObjectClassMap_t;
typedef std::map<std::string,ObjectClass*,std::less<std::string> >
Name2ObjectClassMap_t;
typedef Handle2ObjectClassMap_t::const_iterator
handledOC_const_iterator;
typedef Name2ObjectClassMap_t::const_iterator namedOC_const_iterator;
+
+ namedOC_const_iterator NamedBegin() const {
+ return OCFromName.begin();
+ }
+
+ namedOC_const_iterator NamedEnd() const {
+ return OCFromName.end();
+ }
+
+ const size_t size() {return OCFromName.size();}
+
+private:
Handle2ObjectClassMap_t OCFromHandle;
Name2ObjectClassMap_t OCFromName;
+ bool isRootClassSet;
- ObjectClassHandle
- getFlatObjectClassHandle(std::string class_name) const throw
(NameNotFound);
- /*! This object will help to find the TCPLink associated with a Federate.
- This reference is passed to all new ObjectClass.
+ /**
+ * This object will help to find the TCPLink associated with a Federate.
+ * This reference is passed to all new ObjectClass.
*/
SecurityServer *server ;
@@ -186,4 +204,4 @@
#endif // _CERTI_OBJECT_CLASS_SET_HH
-// $Id: ObjectClassSet.hh,v 3.23 2007/10/16 09:28:21 erk Exp $
+// $Id: ObjectClassSet.hh,v 3.24 2007/10/31 10:30:23 erk Exp $
Index: libCERTI/RootObject.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/RootObject.hh,v
retrieving revision 3.22
retrieving revision 3.23
diff -u -b -r3.22 -r3.23
--- libCERTI/RootObject.hh 22 Jun 2007 08:51:39 -0000 3.22
+++ libCERTI/RootObject.hh 31 Oct 2007 10:30:23 -0000 3.23
@@ -19,17 +19,27 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RootObject.hh,v 3.22 2007/06/22 08:51:39 erk Exp $
+// $Id: RootObject.hh,v 3.23 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
#ifndef LIBCERTI_ROOT_OBJECT
#define LIBCERTI_ROOT_OBJECT
-#include "InteractionSet.hh"
-#include "ObjectClassSet.hh"
-#include "ObjectSet.hh"
-#include "RTIRegion.hh"
-#include "RoutingSpace.hh"
+// forward declaration
+namespace certi {
+ class Object;
+ class ObjectSet;
+ class ObjectAttribute;
+ class ObjectClass;
+ class ObjectClassSet;
+ class ObjectClassAttribute;
+ class Interaction;
+ class InteractionSet;
+ class RTIRegion;
+ class RoutingSpace;
+} // namespace certi
+
+#include "certi.hh"
#include "SecurityServer.hh"
#include "HandleManager.hh"
@@ -103,4 +113,4 @@
#endif // LIBCERTI_ROOT_OBJECT
-// $Id: RootObject.hh,v 3.22 2007/06/22 08:51:39 erk Exp $
+// $Id: RootObject.hh,v 3.23 2007/10/31 10:30:23 erk Exp $
Index: libCERTI/Subscribable.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Subscribable.cc,v
retrieving revision 3.5
retrieving revision 3.6
diff -u -b -r3.5 -r3.6
--- libCERTI/Subscribable.cc 6 Jul 2007 09:25:19 -0000 3.5
+++ libCERTI/Subscribable.cc 31 Oct 2007 10:30:23 -0000 3.6
@@ -17,11 +17,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Subscribable.cc,v 3.5 2007/07/06 09:25:19 erk Exp $
+// $Id: Subscribable.cc,v 3.6 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
-
+#include "ObjectClassBroadcastList.hh"
+#include "InteractionBroadcastList.hh"
+#include "RTIRegion.hh"
#include "Subscribable.hh"
#include "helper.hh"
#include "PrettyDebug.hh"
@@ -199,4 +201,4 @@
} // namespace certi
-// $Id: Subscribable.cc,v 3.5 2007/07/06 09:25:19 erk Exp $
+// $Id: Subscribable.cc,v 3.6 2007/10/31 10:30:23 erk Exp $
Index: libCERTI/fed.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/fed.hh,v
retrieving revision 3.4
retrieving revision 3.5
diff -u -b -r3.4 -r3.5
--- libCERTI/fed.hh 22 Jun 2007 08:51:40 -0000 3.4
+++ libCERTI/fed.hh 31 Oct 2007 10:30:23 -0000 3.5
@@ -19,9 +19,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: fed.hh,v 3.4 2007/06/22 08:51:40 erk Exp $
+// $Id: fed.hh,v 3.5 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
+#ifndef _FED_HH
+#define _FED_HH
+
#include "RootObject.hh"
#include <string>
@@ -62,6 +65,8 @@
void endObject();
void endSpace();
-}}
+}
+}
-// $Id: fed.hh,v 3.4 2007/06/22 08:51:40 erk Exp $
+#endif // _FED_HH
+// $Id: fed.hh,v 3.5 2007/10/31 10:30:23 erk Exp $
Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- RTIA/RTIA_network.cc 22 Jun 2007 08:51:34 -0000 3.12
+++ RTIA/RTIA_network.cc 31 Oct 2007 10:30:23 -0000 3.13
@@ -18,12 +18,16 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIA_network.cc,v 3.12 2007/06/22 08:51:34 erk Exp $
+// $Id: RTIA_network.cc,v 3.13 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
#include "RTIA.hh"
#include "ObjectClassAttribute.hh"
+#include "Interaction.hh"
+#include "InteractionSet.hh"
+#include "ObjectClass.hh"
+#include "ObjectClassSet.hh"
namespace certi {
namespace rtia {
@@ -316,4 +320,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_network.cc,v 3.12 2007/06/22 08:51:34 erk Exp $
+// $Id: RTIA_network.cc,v 3.13 2007/10/31 10:30:23 erk Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.46
retrieving revision 3.47
diff -u -b -r3.46 -r3.47
--- RTIA/RTIA_federate.cc 25 Oct 2007 08:07:16 -0000 3.46
+++ RTIA/RTIA_federate.cc 31 Oct 2007 10:30:23 -0000 3.47
@@ -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: RTIA_federate.cc,v 3.46 2007/10/25 08:07:16 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.47 2007/10/31 10:30:23 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -26,6 +26,7 @@
#include "fed.hh"
+#include "RoutingSpace.hh"
#include "XmlParser.hh"
using std::string ;
@@ -1209,4 +1210,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_federate.cc,v 3.46 2007/10/25 08:07:16 rousse Exp $
+// $Id: RTIA_federate.cc,v 3.47 2007/10/31 10:30:23 erk Exp $
Index: RTIA/DeclarationManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/DeclarationManagement.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- RTIA/DeclarationManagement.cc 6 Jul 2007 09:25:20 -0000 3.15
+++ RTIA/DeclarationManagement.cc 31 Oct 2007 10:30:24 -0000 3.16
@@ -18,10 +18,13 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: DeclarationManagement.cc,v 3.15 2007/07/06 09:25:20 erk Exp $
+// $Id: DeclarationManagement.cc,v 3.16 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
+
+#include "InteractionSet.hh"
+#include "ObjectClassSet.hh"
#include "DeclarationManagement.hh"
#ifdef _WIN32
@@ -455,4 +458,4 @@
}} // namespace certi/rtia
-// $Id: DeclarationManagement.cc,v 3.15 2007/07/06 09:25:20 erk Exp $
+// $Id: DeclarationManagement.cc,v 3.16 2007/10/31 10:30:24 erk Exp $
Index: RTIA/ObjectManagement.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/ObjectManagement.cc,v
retrieving revision 3.26
retrieving revision 3.27
diff -u -b -r3.26 -r3.27
--- RTIA/ObjectManagement.cc 9 Aug 2007 09:22:44 -0000 3.26
+++ RTIA/ObjectManagement.cc 31 Oct 2007 10:30:24 -0000 3.27
@@ -18,12 +18,15 @@
// 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.cc,v 3.26 2007/08/09 09:22:44 rousse Exp $
+// $Id: ObjectManagement.cc,v 3.27 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
-#include "ObjectManagement.hh"
+#include "InteractionSet.hh"
+#include "ObjectSet.hh"
+#include "ObjectClassSet.hh"
+#include "ObjectManagement.hh"
#include "FederationManagement.hh"
#include "PrettyDebug.hh"
@@ -684,4 +687,4 @@
}} // namespace certi/rtia
-// $Id: ObjectManagement.cc,v 3.26 2007/08/09 09:22:44 rousse Exp $
+// $Id: ObjectManagement.cc,v 3.27 2007/10/31 10:30:24 erk Exp $
Index: RTIA/DataDistribution.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/DataDistribution.cc,v
retrieving revision 3.21
retrieving revision 3.22
diff -u -b -r3.21 -r3.22
--- RTIA/DataDistribution.cc 3 May 2007 15:46:31 -0000 3.21
+++ RTIA/DataDistribution.cc 31 Oct 2007 10:30:24 -0000 3.22
@@ -18,13 +18,20 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: DataDistribution.cc,v 3.21 2007/05/03 15:46:31 rousse Exp $
+// $Id: DataDistribution.cc,v 3.22 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
#include "DataDistribution.hh"
+#include "Interaction.hh"
+#include "InteractionSet.hh"
+#include "Object.hh"
+#include "ObjectAttribute.hh"
+#include "ObjectClass.hh"
+#include "ObjectClassSet.hh"
#include "ObjectClassAttribute.hh"
+#include "RoutingSpace.hh"
#include "FedRegion.hh"
#include <cassert>
@@ -413,4 +420,4 @@
}} // namespace certi::rtia
-// $Id: DataDistribution.cc,v 3.21 2007/05/03 15:46:31 rousse Exp $
+// $Id: DataDistribution.cc,v 3.22 2007/10/31 10:30:24 erk Exp $
Index: libRTI/RTIambPrivateRefs.hh
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambPrivateRefs.hh,v
retrieving revision 3.2
retrieving revision 3.3
diff -u -b -r3.2 -r3.3
--- libRTI/RTIambPrivateRefs.hh 6 Jul 2007 09:25:20 -0000 3.2
+++ libRTI/RTIambPrivateRefs.hh 31 Oct 2007 10:30:24 -0000 3.3
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambPrivateRefs.hh,v 3.2 2007/07/06 09:25:20 erk Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.3 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include "RTI.hh"
@@ -28,8 +28,10 @@
using namespace certi ;
-struct RTIambPrivateRefs
+class RTIambPrivateRefs
{
+public:
+ RTIambPrivateRefs();
~RTIambPrivateRefs();
void processException(Message *);
@@ -53,4 +55,4 @@
SocketUN *socketUn ;
};
-// $Id: RTIambPrivateRefs.hh,v 3.2 2007/07/06 09:25:20 erk Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.3 2007/10/31 10:30:24 erk Exp $
Index: libRTI/RTIambPrivateRefs.cc
===================================================================
RCS file: /sources/certi/certi/libRTI/RTIambPrivateRefs.cc,v
retrieving revision 3.2
retrieving revision 3.3
diff -u -b -r3.2 -r3.3
--- libRTI/RTIambPrivateRefs.cc 22 Oct 2007 14:24:53 -0000 3.2
+++ libRTI/RTIambPrivateRefs.cc 31 Oct 2007 10:30:24 -0000 3.3
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambPrivateRefs.cc,v 3.2 2007/10/22 14:24:53 erk Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.3 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -30,6 +30,15 @@
PrettyDebug D("LIBRTI", __FILE__);
}
+RTIambPrivateRefs::RTIambPrivateRefs()
+{
+ fed_amb = NULL;
+ pid_RTIA = (pid_t)-1;
+ is_reentrant = false;
+ _theRootObj = NULL;
+ socketUn = NULL;
+}
+
RTIambPrivateRefs::~RTIambPrivateRefs()
{
delete socketUn ;
@@ -51,8 +60,9 @@
// FIXME EN: On SMP machine may we really
// guarantee that the following protection
// against re-entrance is an efficient one?
- if (is_reentrant)
- throw ConcurrentAccessAttempted("");
+ if (is_reentrant) {
+ throw ConcurrentAccessAttempted("is_reentrant was true in
RTIambPrivateRefs::executeService");
+ }
D.Out(pdDebug, "sending request to RTIA.");
@@ -98,7 +108,7 @@
void
RTIambPrivateRefs::processException(Message *msg)
{
- D.Out(pdExcept, "n� de l'exception : %d .", msg->getExceptionType());
+ D.Out(pdExcept, "num de l'exception : %d .", msg->getExceptionType());
switch(msg->getExceptionType()) {
case e_NO_EXCEPTION: {
} break ;
@@ -512,4 +522,4 @@
}
}
-// $Id: RTIambPrivateRefs.cc,v 3.2 2007/10/22 14:24:53 erk Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.3 2007/10/31 10:30:24 erk Exp $
Index: RTIG/Federation.cc
===================================================================
RCS file: /sources/certi/certi/RTIG/Federation.cc,v
retrieving revision 3.66
retrieving revision 3.67
diff -u -b -r3.66 -r3.67
--- RTIG/Federation.cc 16 Oct 2007 09:25:14 -0000 3.66
+++ RTIG/Federation.cc 31 Oct 2007 10:30:24 -0000 3.67
@@ -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.66 2007/10/16 09:25:14 erk Exp $
+// $Id: Federation.cc,v 3.67 2007/10/31 10:30:24 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -31,6 +31,12 @@
#include "fed.hh"
#include "XmlParser.hh"
+#include "Object.hh"
+#include "ObjectAttribute.hh"
+#include "ObjectSet.hh"
+#include "ObjectClassSet.hh"
+#include "InteractionSet.hh"
+
#include "ObjectClassAttribute.hh"
#include "PrettyDebug.hh"
#include "LBTS.hh"
@@ -2182,5 +2188,5 @@
}} // namespace certi/rtig
-// $Id: Federation.cc,v 3.66 2007/10/16 09:25:14 erk Exp $
+// $Id: Federation.cc,v 3.67 2007/10/31 10:30:24 erk Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- certi libCERTI/ObjectClassAttribute.cc libCERTI...,
certi-cvs <=