[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi libCERTI/ObjectClassSet.hh libCERTI/Objec...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi libCERTI/ObjectClassSet.hh libCERTI/Objec... |
Date: |
Sat, 08 Nov 2008 11:36:05 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 08/11/08 11:36:05
Modified files:
libCERTI : ObjectClassSet.hh ObjectClassSet.cc
Subscribable.hh RootObject.cc ObjectClass.cc
RTIA : RTIA_network.cc DataDistribution.cc
Log message:
More clean-up:
- delete redundant ObjectClass::getWithHandle
- add some source code documentation (comment)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.hh?cvsroot=certi&r1=3.35&r2=3.36
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClassSet.cc?cvsroot=certi&r1=3.44&r2=3.45
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Subscribable.hh?cvsroot=certi&r1=3.6&r2=3.7
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/RootObject.cc?cvsroot=certi&r1=3.39&r2=3.40
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.61&r2=3.62
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_network.cc?cvsroot=certi&r1=3.28&r2=3.29
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/DataDistribution.cc?cvsroot=certi&r1=3.26&r2=3.27
Patches:
Index: libCERTI/ObjectClassSet.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.hh,v
retrieving revision 3.35
retrieving revision 3.36
diff -u -b -r3.35 -r3.36
--- libCERTI/ObjectClassSet.hh 8 Nov 2008 01:11:23 -0000 3.35
+++ libCERTI/ObjectClassSet.hh 8 Nov 2008 11:36:04 -0000 3.36
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassSet.hh,v 3.35 2008/11/08 01:11:23 erk Exp $
+// $Id: ObjectClassSet.hh,v 3.36 2008/11/08 11:36:04 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_CLASS_SET_HH
@@ -75,9 +75,6 @@
std::string getObjectClassName(ObjectClassHandle the_handle) const
throw (ObjectClassNotDefined);
- ObjectClass *getWithHandle(ObjectClassHandle theHandle) const
- throw (ObjectClassNotDefined);
-
void killFederate(FederateHandle theFederate)
throw ();
@@ -197,4 +194,4 @@
#endif // _CERTI_OBJECT_CLASS_SET_HH
-// $Id: ObjectClassSet.hh,v 3.35 2008/11/08 01:11:23 erk Exp $
+// $Id: ObjectClassSet.hh,v 3.36 2008/11/08 11:36:04 erk Exp $
Index: libCERTI/ObjectClassSet.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClassSet.cc,v
retrieving revision 3.44
retrieving revision 3.45
diff -u -b -r3.44 -r3.45
--- libCERTI/ObjectClassSet.cc 8 Nov 2008 01:11:23 -0000 3.44
+++ libCERTI/ObjectClassSet.cc 8 Nov 2008 11:36:05 -0000 3.45
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClassSet.cc,v 3.44 2008/11/08 01:11:23 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.45 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
// Project
@@ -104,7 +104,7 @@
current_class, object);
// It may throw ObjectClassNotDefined
- oclass = getWithHandle(current_class);
+ oclass = getObjectFromHandle(current_class);
oclass->broadcastClassMessage(ocbList);
current_class = oclass->getSuperclass();
@@ -145,7 +145,7 @@
current_class, object);
// It may throw ObjectClassNotDefined
- oclass = getWithHandle(current_class);
+ oclass = getObjectFromHandle(current_class);
oclass->broadcastClassMessage(ocbList);
current_class = oclass->getSuperclass();
@@ -176,7 +176,7 @@
the_name, the_class);
// It may throw ObjectClassNotDefined.
- objectClass = getWithHandle(the_class);
+ objectClass = getObjectFromHandle(the_class);
try
@@ -207,7 +207,7 @@
the_handle, the_class);
// It may throw ObjectClassNotDefined.
- objectClass = getWithHandle(the_class);
+ objectClass = getObjectFromHandle(the_class);
return objectClass->getAttributeName(the_handle);
}
@@ -271,15 +271,6 @@
}
// ----------------------------------------------------------------------------
-//! getWithHandle (private method).
-ObjectClass *
-ObjectClassSet::getWithHandle(ObjectClassHandle theHandle) const
- throw (ObjectClassNotDefined)
-{
- return getObjectFromHandle(theHandle);
-} /* end of getWithHandle */
-
-// ----------------------------------------------------------------------------
//! killFederate.
void ObjectClassSet::killFederate(FederateHandle theFederate)
throw ()
@@ -307,7 +298,7 @@
currentClass);
// It may throw ObjectClassNotDefined
- i->second = getWithHandle(currentClass);
+ i->second = getObjectFromHandle(currentClass);
i->second->broadcastClassMessage(ocbList);
@@ -335,7 +326,7 @@
SecurityError)
{
// It may throw ObjectClassNotDefined
- ObjectClass *theClass = getWithHandle(theClassHandle);
+ ObjectClass *theClass = getObjectFromHandle(theClassHandle);
if (PubOrUnpub)
D.Out(pdInit, "Federate %d attempts to publish Object Class %d.",
@@ -366,7 +357,7 @@
ObjectClassHandle currentClass = the_class ;
// It may throw ObjectClassNotDefined
- ObjectClass *theClass = getWithHandle(the_class);
+ ObjectClass *theClass = getObjectFromHandle(the_class);
// It may throw a bunch of exceptions.
ObjectClassBroadcastList *ocbList = NULL ;
@@ -384,7 +375,7 @@
"%d for instance %d.",
currentClass, the_object);
// It may throw ObjectClassNotDefined
- theClass = getWithHandle(currentClass);
+ theClass = getObjectFromHandle(currentClass);
theClass->broadcastClassMessage(ocbList);
@@ -416,7 +407,7 @@
throw (ObjectClassNotDefined, AttributeNotDefined, RTIinternalError,
SecurityError)
{
- ObjectClass *object_class = getWithHandle(class_handle);
+ ObjectClass *object_class = getObjectFromHandle(class_handle);
bool need_discover = object_class->subscribe(federate, attributes, nb,
region);
@@ -441,7 +432,7 @@
InvalidObjectHandle)
{
Object *object = getObject(object_handle);
- ObjectClass *object_class = getWithHandle(object->getClass());
+ ObjectClass *object_class = getObjectFromHandle(object->getClass());
ObjectClassHandle current_class = object_class->getHandle();
D.Out(pdProtocol, "Federate %d Updating object %d from class %d.",
@@ -461,7 +452,7 @@
current_class, object_handle);
// It may throw ObjectClassNotDefined
- object_class = getWithHandle(current_class);
+ object_class = getObjectFromHandle(current_class);
object_class->broadcastClassMessage(ocbList, object);
current_class = object_class->getSuperclass();
@@ -486,7 +477,7 @@
InvalidObjectHandle)
{
Object *object = getObject(object_handle);
- ObjectClass *object_class = getWithHandle(object->getClass());
+ ObjectClass *object_class = getObjectFromHandle(object->getClass());
ObjectClassHandle current_class = object_class->getHandle();
D.Out(pdProtocol, "Federate %d Updating object %d from class %d.",
@@ -506,7 +497,7 @@
current_class, object_handle);
// It may throw ObjectClassNotDefined
- object_class = getWithHandle(current_class);
+ object_class = getObjectFromHandle(current_class);
object_class->broadcastClassMessage(ocbList, object);
current_class = object_class->getSuperclass();
@@ -552,7 +543,7 @@
currentClass, theObjectHandle);
// It may throw ObjectClassNotDefined
- objectClass = getWithHandle(currentClass);
+ objectClass = getObjectFromHandle(currentClass);
objectClass->broadcastClassMessage(ocbList);
currentClass = objectClass->getSuperclass();
@@ -621,7 +612,7 @@
currentClass, theObjectHandle);
// It may throw ObjectClassNotDefined
- objectClass = getWithHandle(currentClass);
+ objectClass = getObjectFromHandle(currentClass);
objectClass->broadcastClassMessage(ocbList);
currentClass = objectClass->getSuperclass();
@@ -705,4 +696,4 @@
} // namespace certi
-// $Id: ObjectClassSet.cc,v 3.44 2008/11/08 01:11:23 erk Exp $
+// $Id: ObjectClassSet.cc,v 3.45 2008/11/08 11:36:05 erk Exp $
Index: libCERTI/Subscribable.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/Subscribable.hh,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -b -r3.6 -r3.7
--- libCERTI/Subscribable.hh 31 Oct 2007 10:30:22 -0000 3.6
+++ libCERTI/Subscribable.hh 8 Nov 2008 11:36:05 -0000 3.7
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Subscribable.hh,v 3.6 2007/10/31 10:30:22 erk Exp $
+// $Id: Subscribable.hh,v 3.7 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_SUBSCRIBABLE_HH
@@ -54,6 +54,10 @@
const RTIRegion *region ; //!< the subscription region
};
+/**
+ * This class is a base class for "subscribable" classes.
+ * That is ObjectClassAttribute and Interaction.
+ */
class CERTI_EXPORT Subscribable : public Named
{
public:
@@ -81,4 +85,4 @@
#endif // CERTI_SUBSCRIBABLE_HH
-// $Id: Subscribable.hh,v 3.6 2007/10/31 10:30:22 erk Exp $
+// $Id: Subscribable.hh,v 3.7 2008/11/08 11:36:05 erk Exp $
Index: libCERTI/RootObject.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/RootObject.cc,v
retrieving revision 3.39
retrieving revision 3.40
diff -u -b -r3.39 -r3.40
--- libCERTI/RootObject.cc 8 Nov 2008 01:11:23 -0000 3.39
+++ libCERTI/RootObject.cc 8 Nov 2008 11:36:05 -0000 3.40
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RootObject.cc,v 3.39 2008/11/08 01:11:23 erk Exp $
+// $Id: RootObject.cc,v 3.40 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
#include "Object.hh"
@@ -317,7 +317,7 @@
ObjectClass *
RootObject::getObjectClass(ObjectClassHandle class_handle)
{
- return ObjectClasses->getWithHandle(class_handle);
+ return ObjectClasses->getObjectFromHandle(class_handle);
}
// ----------------------------------------------------------------------------
@@ -351,4 +351,4 @@
} // namespace certi
-// $Id: RootObject.cc,v 3.39 2008/11/08 01:11:23 erk Exp $
+// $Id: RootObject.cc,v 3.40 2008/11/08 11:36:05 erk Exp $
Index: libCERTI/ObjectClass.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.61
retrieving revision 3.62
diff -u -b -r3.61 -r3.62
--- libCERTI/ObjectClass.cc 8 Nov 2008 11:08:03 -0000 3.61
+++ libCERTI/ObjectClass.cc 8 Nov 2008 11:36:05 -0000 3.62
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.cc,v 3.61 2008/11/08 11:08:03 erk Exp $
+// $Id: ObjectClass.cc,v 3.62 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
#include "Object.hh"
@@ -852,7 +852,7 @@
std::vector <AttributeHandle> &attributes,
int nb_attributes,
const RTIRegion *region)
- throw (AttributeNotDefined, RTIinternalError, SecurityError)
+throw (AttributeNotDefined, RTIinternalError, SecurityError)
{
checkFederateAccess(fed, "Subscribe");
@@ -864,6 +864,7 @@
bool was_subscriber = isSubscribed(fed);
+ // FIXME what does this means?
unsubscribe(fed, region);
D[pdTrace] << "ObjectClass::subscribe" << " : fed " << fed << ", class "
<< handle
@@ -875,7 +876,7 @@
}
return (nb_attributes > 0) && !was_subscriber ;
-}
+} /* end of subscribe */
// ----------------------------------------------------------------------------
//! update Attribute Values with time.
@@ -1829,4 +1830,4 @@
} // namespace certi
-// $Id: ObjectClass.cc,v 3.61 2008/11/08 11:08:03 erk Exp $
+// $Id: ObjectClass.cc,v 3.62 2008/11/08 11:36:05 erk Exp $
Index: RTIA/RTIA_network.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/RTIA_network.cc,v
retrieving revision 3.28
retrieving revision 3.29
diff -u -b -r3.28 -r3.29
--- RTIA/RTIA_network.cc 2 Nov 2008 01:01:53 -0000 3.28
+++ RTIA/RTIA_network.cc 8 Nov 2008 11:36:05 -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: RTIA_network.cc,v 3.28 2008/11/02 01:01:53 erk Exp $
+// $Id: RTIA_network.cc,v 3.29 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -130,7 +130,7 @@
for (UShort i=0; i< msg->handleArraySize; ++i)
{
- if (rootObject->ObjectClasses->getWithHandle( msg->objectClass)
+ if (rootObject->ObjectClasses->getObjectFromHandle(
msg->objectClass)
->getAttribute(msg->handleArray[i])->order != TIMESTAMP)
{
updateOrder = RECEIVE;
@@ -352,4 +352,4 @@
}} // namespace certi/rtia
-// $Id: RTIA_network.cc,v 3.28 2008/11/02 01:01:53 erk Exp $
+// $Id: RTIA_network.cc,v 3.29 2008/11/08 11:36:05 erk Exp $
Index: RTIA/DataDistribution.cc
===================================================================
RCS file: /sources/certi/certi/RTIA/DataDistribution.cc,v
retrieving revision 3.26
retrieving revision 3.27
diff -u -b -r3.26 -r3.27
--- RTIA/DataDistribution.cc 2 Nov 2008 01:01:53 -0000 3.26
+++ RTIA/DataDistribution.cc 8 Nov 2008 11:36:05 -0000 3.27
@@ -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: DataDistribution.cc,v 3.26 2008/11/02 01:01:53 erk Exp $
+// $Id: DataDistribution.cc,v 3.27 2008/11/08 11:36:05 erk Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -100,7 +100,7 @@
throw (ObjectClassNotDefined, AttributeNotDefined)
{
std::cout<<"DataDistribution::getAttributeSpace"<<std::endl;
- return rootObject->ObjectClasses->getWithHandle(object_class)->
+ return rootObject->ObjectClasses->getObjectFromHandle(object_class)->
getAttribute(attribute)->getSpace();
}
@@ -413,4 +413,4 @@
}} // namespace certi::rtia
-// $Id: DataDistribution.cc,v 3.26 2008/11/02 01:01:53 erk Exp $
+// $Id: DataDistribution.cc,v 3.27 2008/11/08 11:36:05 erk Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi libCERTI/ObjectClassSet.hh libCERTI/Objec...,
certi-cvs <=