diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/include/certi.hh certi/include/certi.hh
--- certi.orig/include/certi.hh	2008-12-10 18:23:34.000000000 +0100
+++ certi/include/certi.hh	2008-12-13 18:01:07.000000000 +0100
@@ -102,30 +102,29 @@
 
 namespace certi {
 
-// RTI Shortcuts
-typedef RTI::AttributeHandle AttributeHandle ;
-typedef RTI::DimensionHandle DimensionHandle ;
-typedef RTI::EventRetractionHandle EventRetractionHandle ;
-typedef RTI::ExtentIndex ExtentIndex ;
-typedef RTI::FederateHandle FederateHandle ;
-typedef RTI::Handle Handle ;
-typedef RTI::InteractionClassHandle InteractionClassHandle ;
-typedef RTI::ObjectClassHandle ObjectClassHandle ;
-typedef RTI::ObjectHandle ObjectHandle ;
-typedef RTI::OrderType OrderType ;
-typedef RTI::ParameterHandle ParameterHandle ;
-typedef RTI::SpaceHandle SpaceHandle ;
-typedef RTI::TransportType TransportType ;
-typedef RTI::ULong ULong ;
-typedef RTI::UShort UShort ;
+typedef unsigned short UShort;
+typedef unsigned long ULong;
+typedef long Long;
+typedef ULong Handle;
+typedef Handle ObjectClassHandle;
+typedef Handle InteractionClassHandle;
+typedef ULong ExtentIndex;
+typedef Handle AttributeHandle;
+typedef Handle ParameterHandle;
+typedef Handle ObjectHandle;
+typedef Handle DimensionHandle;
+typedef Handle FederateHandle;
+typedef Handle OrderType;
+typedef Long SpaceHandle;
+typedef Handle TransportType;
+
+typedef RTI::EventRetractionHandle EventRetractionHandle;
 
-typedef RTI::Double FederationTime ;
 typedef UShort ObjectHandlecount ;
 typedef std::string ObjectName_t ;
 typedef std::string AttributeValue_t;
 typedef std::string ParameterValue_t;
 
-typedef RTI::Double FederationTimeDelta ;
 enum ObjectRemovalReason {
     OUT_OF_REGION = 1,
     OBJECT_DELETED,
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/include/fedtime.hh certi/include/fedtime.hh
--- certi.orig/include/fedtime.hh	2008-12-10 18:43:10.000000000 +0100
+++ certi/include/fedtime.hh	2008-12-13 18:11:36.000000000 +0100
@@ -4,32 +4,13 @@
 #ifndef HLA_FEDTIME_HH
 #define HLA_FEDTIME_HH
 
-#ifdef _WIN32
-#include <windows.h>
-#else
+#include "RTI.hh"
 #include <sys/types.h>
 #include <string.h>
-#endif
-
-#if defined(_WIN32)
-    #if defined(FedTime_EXPORTS)
-        #define FEDTIME_EXPORT __declspec(dllexport)
-    #else
-        #define FEDTIME_EXPORT __declspec(dllimport)
-    #endif
-#else
-	#define FEDTIME_EXPORT
-#endif
-
-#include "RTI.hh"
 
 class FEDTIME_EXPORT RTIfedTime : public RTI::FedTime
 {
 public:
-
-	static const double epsilon;
-	static int fcmp(const double x1, const double x2);
-
     RTIfedTime();
     RTIfedTime(const RTI::Double &);
     RTIfedTime(const RTI::FedTime &);
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/include/RTI.hh certi/include/RTI.hh
--- certi.orig/include/RTI.hh	2008-12-10 18:43:10.000000000 +0100
+++ certi/include/RTI.hh	2008-12-13 18:08:11.000000000 +0100
@@ -16,14 +16,14 @@
 	#else
 		#define RTI_EXPORT __declspec(dllimport)
 	#endif
-    #if !defined(FEDTIME_EXPORT)
-       #define FEDTIME_EXPORT
+    #if defined(FedTime_EXPORTS)
+        #define FEDTIME_EXPORT __declspec(dllexport)
+    #else
+        #define FEDTIME_EXPORT __declspec(dllimport)
     #endif
 #else
 	#define RTI_EXPORT
-    #if !defined(FEDTIME_EXPORT)
-        #define FEDTIME_EXPORT
-    #endif
+    #define FEDTIME_EXPORT
 #endif
 
 #ifdef RTI_USES_STD_FSTREAM
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/CMakeLists.txt certi/libCERTI/CMakeLists.txt
--- certi.orig/libCERTI/CMakeLists.txt	2008-12-10 18:23:34.000000000 +0100
+++ certi/libCERTI/CMakeLists.txt	2008-12-13 06:17:42.000000000 +0100
@@ -64,6 +64,7 @@
 )
 
 SET(CERTI_TIME_SRCS
+FedTime.cc FedTime.hh
 LBTS.cc
 LBTS.hh
 )
@@ -206,44 +207,7 @@
 
 SET_TARGET_PROPERTIES(CERTI PROPERTIES VERSION 1.0.0 SOVERSION 1)
 
-##################################################################
-# Lib FedTime 
-# A replacement lib FedTime may be provided by the user
-# CERTI is provided one. The lib FedTime depends on libRTI
-# since it inherits from the RTI::FedTime abstract class.
-##################################################################
-IF(CMAKE_COMPILER_IS_GNUCC)
-    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long")
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-IF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-
-INCLUDE_DIRECTORIES(../libHLA)
-SET(FEDTIME_SRCS
-    FedTime.cc
-    ${CMAKE_SOURCE_DIR}/include/fedtime.hh
-)
-
-SOURCE_GROUP("Source Files\\FedTime" FILES ${FEDTIME_SRCS})
-
-ADD_LIBRARY(FedTime
-    ${FEDTIME_SRCS}
-)
-
-TARGET_LINK_LIBRARIES(FedTime RTI HLA)
-
-SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
-IF (MINGW)
-    SET_TARGET_PROPERTIES(FedTime PROPERTIES LINK_FLAGS "-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libFedTime.def")
-    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/libFedTime.def
-            DESTINATION lib)
-ENDIF (MINGW)
-
-SET_TARGET_PROPERTIES(FedTime PROPERTIES VERSION 1.0.0 SOVERSION 1)
-
-# Install rules for both libCERTI and libFedTime
-INSTALL(TARGETS CERTI FedTime
+INSTALL(TARGETS CERTI
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib
     ARCHIVE DESTINATION lib)
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/Exception.cc certi/libCERTI/Exception.cc
--- certi.orig/libCERTI/Exception.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/Exception.cc	2008-12-13 03:58:08.000000000 +0100
@@ -27,116 +27,118 @@
 #include "PrettyDebug.hh"
 #include <sstream>
 
+using namespace certi;
+
 // static members for HLA Exceptions
-long certi::ArrayIndexOutOfBounds::_type = certi::e_ArrayIndexOutOfBounds ;
-long certi::AsynchronousDeliveryAlreadyDisabled::_type = certi::e_AsynchronousDeliveryAlreadyDisabled ;
-long certi::AsynchronousDeliveryAlreadyEnabled::_type = certi::e_AsynchronousDeliveryAlreadyEnabled ;
-long certi::AttributeAcquisitionWasNotRequested::_type = certi::e_AttributeAcquisitionWasNotRequested ;
-long certi::AttributeAcquisitionWasNotCanceled::_type = certi::e_AttributeAcquisitionWasNotCanceled ;
-long certi::AttributeAlreadyBeingAcquired::_type = certi::e_AttributeAlreadyBeingAcquired ;
-long certi::AttributeAlreadyBeingDivested::_type = certi::e_AttributeAlreadyBeingDivested ;
-long certi::AttributeAlreadyOwned::_type = certi::e_AttributeAlreadyOwned ;
-long certi::AttributeDivestitureWasNotRequested::_type = certi::e_AttributeDivestitureWasNotRequested ;
-long certi::AttributeNotDefined::_type = certi::e_AttributeNotDefined ;
-long certi::AttributeNotKnown::_type = certi::e_AttributeNotKnown ;
-long certi::AttributeNotOwned::_type = certi::e_AttributeNotOwned ;
-long certi::AttributeNotPublished::_type = certi::e_AttributeNotPublished ;
-long certi::ConcurrentAccessAttempted::_type = certi::e_ConcurrentAccessAttempted ;
-long certi::CouldNotDiscover::_type = certi::e_CouldNotDiscover ;
-long certi::CouldNotOpenFED::_type = certi::e_CouldNotOpenFED ;
-long certi::CouldNotRestore::_type = certi::e_CouldNotRestore ;
-long certi::DeletePrivilegeNotHeld::_type = certi::e_DeletePrivilegeNotHeld ;
-long certi::DimensionNotDefined::_type = certi::e_DimensionNotDefined ;
-long certi::EnableTimeConstrainedPending::_type = certi::e_EnableTimeConstrainedPending ;
-long certi::EnableTimeConstrainedWasNotPending::_type = certi::e_EnableTimeConstrainedWasNotPending ;
-long certi::EnableTimeRegulationPending::_type = certi::e_EnableTimeRegulationPending ;
-long certi::EnableTimeRegulationWasNotPending::_type = certi::e_EnableTimeRegulationWasNotPending ;
-long certi::ErrorReadingFED::_type = certi::e_ErrorReadingFED ;
-long certi::EventNotKnown::_type = certi::e_EventNotKnown ;
-long certi::FederateAlreadyExecutionMember::_type = certi::e_FederateAlreadyExecutionMember ;
-long certi::FederateInternalError::_type = certi::e_FederateInternalError ;
-long certi::FederateLoggingServiceCalls::_type = certi::e_FederateLoggingServiceCalls ;
-long certi::FederateNotExecutionMember::_type = certi::e_FederateNotExecutionMember ;
-long certi::FederateOwnsAttributes::_type = certi::e_FederateOwnsAttributes ;
-long certi::FederateWasNotAskedToReleaseAttribute::_type = certi::e_FederateWasNotAskedToReleaseAttribute ;
-long certi::FederatesCurrentlyJoined::_type = certi::e_FederatesCurrentlyJoined ;
-long certi::FederationExecutionAlreadyExists::_type = certi::e_FederationExecutionAlreadyExists ;
-long certi::FederationExecutionDoesNotExist::_type = certi::e_FederationExecutionDoesNotExist ;
-long certi::FederationTimeAlreadyPassed::_type = certi::e_FederationTimeAlreadyPassed ;
-long certi::HandleValuePairMaximumExceeded::_type = certi::e_HandleValuePairMaximumExceeded ;
-long certi::InteractionClassNotDefined::_type = certi::e_InteractionClassNotDefined ;
-long certi::InteractionClassNotKnown::_type = certi::e_InteractionClassNotKnown ;
-long certi::InteractionClassNotPublished::_type = certi::e_InteractionClassNotPublished ;
-long certi::InteractionClassNotSubscribed::_type = certi::e_InteractionClassNotSubscribed ;
-long certi::InteractionParameterNotDefined::_type = certi::e_InteractionParameterNotDefined ;
-long certi::InteractionParameterNotKnown::_type = certi::e_InteractionParameterNotKnown ;
-long certi::InvalidExtents::_type = certi::e_InvalidExtents ;
-long certi::InvalidFederationTime::_type = certi::e_InvalidFederationTime ;
-long certi::InvalidHandleValuePairSetContext::_type = certi::e_InvalidHandleValuePairSetContext ;
-long certi::InvalidLookahead::_type = certi::e_InvalidLookahead ;
-long certi::InvalidOrderingHandle::_type = certi::e_InvalidOrderingHandle ;
-long certi::InvalidRegionContext::_type = certi::e_InvalidRegionContext ;
-long certi::InvalidResignAction::_type = certi::e_InvalidResignAction ;
-long certi::InvalidRetractionHandle::_type = certi::e_InvalidRetractionHandle ;
-long certi::InvalidTransportationHandle::_type = certi::e_InvalidTransportationHandle ;
-long certi::MemoryExhausted::_type = certi::e_MemoryExhausted ;
-long certi::NameNotFound::_type = certi::e_NameNotFound ;
-long certi::ObjectClassNotDefined::_type = certi::e_ObjectClassNotDefined ;
-long certi::ObjectClassNotKnown::_type = certi::e_ObjectClassNotKnown ;
-long certi::ObjectClassNotPublished::_type = certi::e_ObjectClassNotPublished ;
-long certi::ObjectClassNotSubscribed::_type = certi::e_ObjectClassNotSubscribed ;
-long certi::ObjectNotKnown::_type = certi::e_ObjectNotKnown ;
-long certi::ObjectAlreadyRegistered::_type = certi::e_ObjectAlreadyRegistered ;
-long certi::OwnershipAcquisitionPending::_type = certi::e_OwnershipAcquisitionPending ;
-long certi::RegionInUse::_type = certi::e_RegionInUse ;
-long certi::RegionNotKnown::_type = certi::e_RegionNotKnown ;
-long certi::RestoreInProgress::_type = certi::e_RestoreInProgress ;
-long certi::RestoreNotRequested::_type = certi::e_RestoreNotRequested ;
-long certi::RTIinternalError::_type = certi::e_RTIinternalError ;
-long certi::SpaceNotDefined::_type = certi::e_SpaceNotDefined ;
-long certi::SaveInProgress::_type = certi::e_SaveInProgress ;
-long certi::SaveNotInitiated::_type = certi::e_SaveNotInitiated ;
-long certi::SpecifiedSaveLabelDoesNotExist::_type = certi::e_SpecifiedSaveLabelDoesNotExist ;
-long certi::SynchronizationPointLabelWasNotAnnounced::_type = certi::e_SynchronizationPointLabelWasNotAnnounced ;
-long certi::TimeAdvanceAlreadyInProgress::_type = certi::e_TimeAdvanceAlreadyInProgress ;
-long certi::TimeAdvanceWasNotInProgress::_type = certi::e_TimeAdvanceWasNotInProgress ;
-long certi::TimeConstrainedAlreadyEnabled::_type = certi::e_TimeConstrainedAlreadyEnabled ;
-long certi::TimeConstrainedWasNotEnabled::_type = certi::e_TimeConstrainedWasNotEnabled ;
-long certi::TimeRegulationAlreadyEnabled::_type = certi::e_TimeRegulationAlreadyEnabled ;
-long certi::TimeRegulationWasNotEnabled::_type = certi::e_TimeRegulationWasNotEnabled ;
-long certi::UnableToPerformSave::_type = certi::e_UnableToPerformSave ;
-long certi::ValueCountExceeded::_type = certi::e_ValueCountExceeded ;
-long certi::ValueLengthExceeded::_type = certi::e_ValueLengthExceeded ;
+long ArrayIndexOutOfBounds::_type = e_ArrayIndexOutOfBounds ;
+long AsynchronousDeliveryAlreadyDisabled::_type = e_AsynchronousDeliveryAlreadyDisabled ;
+long AsynchronousDeliveryAlreadyEnabled::_type = e_AsynchronousDeliveryAlreadyEnabled ;
+long AttributeAcquisitionWasNotRequested::_type = e_AttributeAcquisitionWasNotRequested ;
+long AttributeAcquisitionWasNotCanceled::_type = e_AttributeAcquisitionWasNotCanceled ;
+long AttributeAlreadyBeingAcquired::_type = e_AttributeAlreadyBeingAcquired ;
+long AttributeAlreadyBeingDivested::_type = e_AttributeAlreadyBeingDivested ;
+long AttributeAlreadyOwned::_type = e_AttributeAlreadyOwned ;
+long AttributeDivestitureWasNotRequested::_type = e_AttributeDivestitureWasNotRequested ;
+long AttributeNotDefined::_type = e_AttributeNotDefined ;
+long AttributeNotKnown::_type = e_AttributeNotKnown ;
+long AttributeNotOwned::_type = e_AttributeNotOwned ;
+long AttributeNotPublished::_type = e_AttributeNotPublished ;
+long ConcurrentAccessAttempted::_type = e_ConcurrentAccessAttempted ;
+long CouldNotDiscover::_type = e_CouldNotDiscover ;
+long CouldNotOpenFED::_type = e_CouldNotOpenFED ;
+long CouldNotRestore::_type = e_CouldNotRestore ;
+long DeletePrivilegeNotHeld::_type = e_DeletePrivilegeNotHeld ;
+long DimensionNotDefined::_type = e_DimensionNotDefined ;
+long EnableTimeConstrainedPending::_type = e_EnableTimeConstrainedPending ;
+long EnableTimeConstrainedWasNotPending::_type = e_EnableTimeConstrainedWasNotPending ;
+long EnableTimeRegulationPending::_type = e_EnableTimeRegulationPending ;
+long EnableTimeRegulationWasNotPending::_type = e_EnableTimeRegulationWasNotPending ;
+long ErrorReadingFED::_type = e_ErrorReadingFED ;
+long EventNotKnown::_type = e_EventNotKnown ;
+long FederateAlreadyExecutionMember::_type = e_FederateAlreadyExecutionMember ;
+long FederateInternalError::_type = e_FederateInternalError ;
+long FederateLoggingServiceCalls::_type = e_FederateLoggingServiceCalls ;
+long FederateNotExecutionMember::_type = e_FederateNotExecutionMember ;
+long FederateOwnsAttributes::_type = e_FederateOwnsAttributes ;
+long FederateWasNotAskedToReleaseAttribute::_type = e_FederateWasNotAskedToReleaseAttribute ;
+long FederatesCurrentlyJoined::_type = e_FederatesCurrentlyJoined ;
+long FederationExecutionAlreadyExists::_type = e_FederationExecutionAlreadyExists ;
+long FederationExecutionDoesNotExist::_type = e_FederationExecutionDoesNotExist ;
+long FederationTimeAlreadyPassed::_type = e_FederationTimeAlreadyPassed ;
+long HandleValuePairMaximumExceeded::_type = e_HandleValuePairMaximumExceeded ;
+long InteractionClassNotDefined::_type = e_InteractionClassNotDefined ;
+long InteractionClassNotKnown::_type = e_InteractionClassNotKnown ;
+long InteractionClassNotPublished::_type = e_InteractionClassNotPublished ;
+long InteractionClassNotSubscribed::_type = e_InteractionClassNotSubscribed ;
+long InteractionParameterNotDefined::_type = e_InteractionParameterNotDefined ;
+long InteractionParameterNotKnown::_type = e_InteractionParameterNotKnown ;
+long InvalidExtents::_type = e_InvalidExtents ;
+long InvalidFederationTime::_type = e_InvalidFederationTime ;
+long InvalidHandleValuePairSetContext::_type = e_InvalidHandleValuePairSetContext ;
+long InvalidLookahead::_type = e_InvalidLookahead ;
+long InvalidOrderingHandle::_type = e_InvalidOrderingHandle ;
+long InvalidRegionContext::_type = e_InvalidRegionContext ;
+long InvalidResignAction::_type = e_InvalidResignAction ;
+long InvalidRetractionHandle::_type = e_InvalidRetractionHandle ;
+long InvalidTransportationHandle::_type = e_InvalidTransportationHandle ;
+long MemoryExhausted::_type = e_MemoryExhausted ;
+long NameNotFound::_type = e_NameNotFound ;
+long ObjectClassNotDefined::_type = e_ObjectClassNotDefined ;
+long ObjectClassNotKnown::_type = e_ObjectClassNotKnown ;
+long ObjectClassNotPublished::_type = e_ObjectClassNotPublished ;
+long ObjectClassNotSubscribed::_type = e_ObjectClassNotSubscribed ;
+long ObjectNotKnown::_type = e_ObjectNotKnown ;
+long ObjectAlreadyRegistered::_type = e_ObjectAlreadyRegistered ;
+long OwnershipAcquisitionPending::_type = e_OwnershipAcquisitionPending ;
+long RegionInUse::_type = e_RegionInUse ;
+long RegionNotKnown::_type = e_RegionNotKnown ;
+long RestoreInProgress::_type = e_RestoreInProgress ;
+long RestoreNotRequested::_type = e_RestoreNotRequested ;
+long RTIinternalError::_type = e_RTIinternalError ;
+long SpaceNotDefined::_type = e_SpaceNotDefined ;
+long SaveInProgress::_type = e_SaveInProgress ;
+long SaveNotInitiated::_type = e_SaveNotInitiated ;
+long SpecifiedSaveLabelDoesNotExist::_type = e_SpecifiedSaveLabelDoesNotExist ;
+long SynchronizationPointLabelWasNotAnnounced::_type = e_SynchronizationPointLabelWasNotAnnounced ;
+long TimeAdvanceAlreadyInProgress::_type = e_TimeAdvanceAlreadyInProgress ;
+long TimeAdvanceWasNotInProgress::_type = e_TimeAdvanceWasNotInProgress ;
+long TimeConstrainedAlreadyEnabled::_type = e_TimeConstrainedAlreadyEnabled ;
+long TimeConstrainedWasNotEnabled::_type = e_TimeConstrainedWasNotEnabled ;
+long TimeRegulationAlreadyEnabled::_type = e_TimeRegulationAlreadyEnabled ;
+long TimeRegulationWasNotEnabled::_type = e_TimeRegulationWasNotEnabled ;
+long UnableToPerformSave::_type = e_UnableToPerformSave ;
+long ValueCountExceeded::_type = e_ValueCountExceeded ;
+long ValueLengthExceeded::_type = e_ValueLengthExceeded ;
 
 //  TypeException managing (how to obtain TypeException from Exception name ?)
-long certi::FederateNotPublishing::_type = certi::e_FederateNotPublishing ;
-long certi::FederateNotSubscribing::_type = certi::e_FederateNotSubscribing ;
-long certi::InvalidObjectHandle::_type = certi::e_InvalidObjectHandle ;
-long certi::CouldNotOpenRID::_type = certi::e_CouldNotOpenRID ;
-long certi::ErrorReadingRID::_type = certi::e_ErrorReadingRID ;
-long certi::AttributeNotSubscribed::_type = certi::e_AttributeNotSubscribed ;
-long certi::FederationAlreadyPaused::_type = certi::e_FederationAlreadyPaused ;
-long certi::FederationNotPaused::_type = certi::e_FederationNotPaused ;
-long certi::SecurityError::_type = certi::e_SecurityError ;
-long certi::FederateAlreadyPaused::_type = certi::e_FederateAlreadyPaused ;
-long certi::FederateDoesNotExist::_type = certi::e_FederateDoesNotExist ;
-long certi::FederateNameAlreadyInUse::_type = certi::e_FederateNameAlreadyInUse ;
-long certi::FederateNotPaused::_type = certi::e_FederateNotPaused ;
-long certi::IDsupplyExhausted::_type = certi::e_IDsupplyExhausted ;
-long certi::InvalidDivestitureCondition::_type = certi::e_InvalidDivestitureCondition ;
-long certi::InvalidFederationTimeDelta::_type = certi::e_InvalidFederationTimeDelta ;
-long certi::InvalidRoutingSpace::_type = certi::e_InvalidRoutingSpace ;
-long certi::NoPauseRequested::_type = certi::e_NoPauseRequested ;
-long certi::NoResumeRequested::_type = certi::e_NoResumeRequested ;
-long certi::TooManyIDsRequested::_type = certi::e_TooManyIDsRequested ;
-long certi::UnimplementedService::_type = certi::e_UnimplementedService ;
-long certi::UnknownLabel::_type = certi::e_UnknownLabel ;
-long certi::NetworkError::_type = certi::e_NetworkError ;
-long certi::NetworkSignal::_type = certi::e_NetworkSignal ;
+long FederateNotPublishing::_type = e_FederateNotPublishing ;
+long FederateNotSubscribing::_type = e_FederateNotSubscribing ;
+long InvalidObjectHandle::_type = e_InvalidObjectHandle ;
+long CouldNotOpenRID::_type = e_CouldNotOpenRID ;
+long ErrorReadingRID::_type = e_ErrorReadingRID ;
+long AttributeNotSubscribed::_type = e_AttributeNotSubscribed ;
+long FederationAlreadyPaused::_type = e_FederationAlreadyPaused ;
+long FederationNotPaused::_type = e_FederationNotPaused ;
+long SecurityError::_type = e_SecurityError ;
+long FederateAlreadyPaused::_type = e_FederateAlreadyPaused ;
+long FederateDoesNotExist::_type = e_FederateDoesNotExist ;
+long FederateNameAlreadyInUse::_type = e_FederateNameAlreadyInUse ;
+long FederateNotPaused::_type = e_FederateNotPaused ;
+long IDsupplyExhausted::_type = e_IDsupplyExhausted ;
+long InvalidDivestitureCondition::_type = e_InvalidDivestitureCondition ;
+long InvalidFederationTimeDelta::_type = e_InvalidFederationTimeDelta ;
+long InvalidRoutingSpace::_type = e_InvalidRoutingSpace ;
+long NoPauseRequested::_type = e_NoPauseRequested ;
+long NoResumeRequested::_type = e_NoResumeRequested ;
+long TooManyIDsRequested::_type = e_TooManyIDsRequested ;
+long UnimplementedService::_type = e_UnimplementedService ;
+long UnknownLabel::_type = e_UnknownLabel ;
+long NetworkError::_type = e_NetworkError ;
+long NetworkSignal::_type = e_NetworkSignal ;
 
 static PrettyDebug PD_Exception("CERTI_EXCEPTION",__FILE__);
 
-const std::string certi::Exception::displayMe() const
+const std::string Exception::displayMe() const
 {
     std::stringstream msg;
 
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/FedTime.cc certi/libCERTI/FedTime.cc
--- certi.orig/libCERTI/FedTime.cc	2008-12-10 18:23:34.000000000 +0100
+++ certi/libCERTI/FedTime.cc	2008-12-13 18:28:14.000000000 +0100
@@ -17,241 +17,101 @@
 // You should have received a copy of the GNU Lesser General Public
 // License along with this program ; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// $Id: FedRegion.hh,v 3.4 2008/12/07 20:16:13 gotthardp Exp $
 // ----------------------------------------------------------------------------
 
 #include <math.h>
 
-#include "certi.hh"
-#include "fedtime.hh"
-#include "HLAtypesIEEE1516.hh"
-
-#ifdef _WIN32
-	#ifdef max
-		#undef max
-	#endif
-#endif
+#include "FedTimeD.hh"
 
-#include <algorithm>
 #include <limits>
 #include <sstream>
-#include <typeinfo>
 
-using std::stringstream ;
-
-typedef RTI::FedTime FedTime ;
-typedef RTI::Double Double ;
+using namespace certi;
 
 namespace
 {
 
-// ----------------------------------------------------------------------------
-/** FedTime to RTIfedTime reference cast
- */
-inline const RTIfedTime &
-rft(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
-{
-    try {
-	return dynamic_cast<const RTIfedTime &>(time);
-    }
-    catch (std::bad_cast) {
-	throw RTI::InvalidFederationTime("Could not cast to RTIfedTime");
-    }
-}
-
-inline bool
-is_infinity(const FedTime &time)
-{
-    return const_cast<FedTime &>(time).isPositiveInfinity() == RTI::RTI_TRUE ;
-}
-
-/*
- fcmp
- Copyright (c) 1998-2000 Theodore C. Belding
- University of Michigan Center for the Study of Complex Systems
- <mailto:Ted.Belding@umich.edu>
- <http://fcmp.sourceforge.net>
-
- This file is part of the fcmp distribution. fcmp is free software;
- you can redistribute and modify it under the terms of the GNU Library
- General Public License (LGPL), version 2 or later.  This software
- comes with absolutely no warranty. See the file COPYING for details
- and terms of copying.
-
- Description:
-
- Knuth's floating point comparison operators, from:
- Knuth, D. E. (1998). The Art of Computer Programming.
- Volume 2: Seminumerical Algorithms. 3rd ed. Addison-Wesley.
- Section 4.2.2, p. 233. ISBN 0-201-89684-2.
-
- Input parameters:
- x1, x2: numbers to be compared
- epsilon: determines tolerance
-
- epsilon should be carefully chosen based on the machine's precision,
- the observed magnitude of error, the desired precision, and the
- magnitude of the numbers to be compared. See the fcmp README file for
- more information.
-
- This routine may be used for both single-precision (float) and
- double-precision (double) floating-point numbers.
-
- Returns:
- -1 if x1 < x2
-  0 if x1 == x2
-  1 if x1 > x2
-*/
-
-inline int
-fcmp(double x1,double x2, double epsilon)
-{
-    int exponent;
-    double delta;
-    double difference;
-
-    /* Get exponent(max(fabs(x1), fabs(x2))) and store it in exponent. */
-
-    /* If neither x1 nor x2 is 0, */
-    /* this is equivalent to max(exponent(x1), exponent(x2)). */
-
-    /* If either x1 or x2 is 0, its exponent returned by frexp would be 0, */
-    /* which is much larger than the exponents of numbers close to 0 in */
-    /* magnitude. But the exponent of 0 should be less than any number */
-    /* whose magnitude is greater than 0. */
-
-    /* So we only want to set exponent to 0 if both x1 and */
-    /* x2 are 0. Hence, the following works for all x1 and x2. */
-
-    frexp(fabs(x1) > fabs(x2) ? x1 : x2, &exponent);
-
-    /* Do the comparison. */
-
-    /* delta = epsilon * pow(2, exponent) */
-
-    /* Form a neighborhood around x2 of size delta in either direction. */
-    /* If x1 is within this delta neighborhood of x2, x1 == x2. */
-    /* Otherwise x1 > x2 or x1 < x2, depending on which side of */
-    /* the neighborhood x1 is on. */
-
-    delta = ldexp(epsilon, exponent);
-
-    difference = x1 - x2;
-
-    if (difference > delta)
-        return 1; /* x1 > x2 */
-    else if (difference < -delta)
-        return -1;  /* x1 < x2 */
-    else /* -delta <= difference <= delta */
-        return 0;  /* x1 == x2 */
-}
-
 const char *infinity_str = "+inf" ;
 
 } // anonymous namespace
 
 // ----------------------------------------------------------------------------
-// FedTimeFactory
-RTI::FedTime *
-RTI::FedTimeFactory::makeZero()
-    throw (RTI::MemoryExhausted)
-{
-    return new RTIfedTime();
-}
-
-RTI::FedTime *
-RTI::FedTimeFactory::decode(const char *)
-    throw (RTI::MemoryExhausted)
-{
-    throw RTI::RTIinternalError("Not implemented");
-}
-
-// ----------------------------------------------------------------------------
 // FedTime
-//FedTime::~FedTime()
-//{
-//}
 
-const double RTIfedTime::epsilon = std::numeric_limits<double>::epsilon();
+const double FedTime::epsilon = std::numeric_limits<double>::epsilon();
 
 int
-RTIfedTime::fcmp(const double x1, const double x2) {
-	return ::fcmp(x1,x2,RTIfedTime::epsilon);
+FedTime::fcmp(const double x1, const double x2) {
+	return certi::fcmp(x1,x2,FedTime::epsilon);
 }
 
 // ----------------------------------------------------------------------------
-// RTIfedTime
-RTIfedTime::RTIfedTime()
+// FedTime
+FedTime::FedTime()
     : _fedTime(0),
       _zero(0),
-      _epsilon(RTIfedTime::epsilon),
+      _epsilon(FedTime::epsilon),
       _positiveInfinity(std::numeric_limits<double>::infinity()) { }
 
-RTIfedTime::RTIfedTime(const RTI::Double &time)
+FedTime::FedTime(const double &time)
     : _fedTime(time),
       _zero(0),
-      _epsilon(RTIfedTime::epsilon),
+      _epsilon(FedTime::epsilon),
       _positiveInfinity(std::numeric_limits<double>::infinity()) { }
 
-RTIfedTime::RTIfedTime(const FedTime &time)
-    : _fedTime(rft(time).getTime()),
-      _zero(0),
-      _epsilon(RTIfedTime::epsilon),
-      _positiveInfinity(std::numeric_limits<double>::infinity()) { }
-
-// ----------------------------------------------------------------------------
-RTIfedTime::RTIfedTime(const RTIfedTime &time)
-    : FedTime(),
-      _fedTime(time._fedTime),
+FedTime::FedTime(const FedTime &time)
+    : _fedTime(time._fedTime),
       _zero(time._zero),
       _epsilon(time._epsilon),
       _positiveInfinity(time._positiveInfinity) { }
 
 // ----------------------------------------------------------------------------
-RTIfedTime::~RTIfedTime()
+FedTime::~FedTime()
 {
 }
 
 // ----------------------------------------------------------------------------
 void
-RTIfedTime::setZero()
+FedTime::setZero()
 {
     _fedTime = _zero;
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::isZero()
+bool
+FedTime::isZero()
 {
-    return RTI::Boolean(_fedTime == _zero);
+    return bool(_fedTime == _zero);
 }
 
 // ----------------------------------------------------------------------------
 void
-RTIfedTime::setEpsilon()
+FedTime::setEpsilon()
 {
     _fedTime = _epsilon;
 }
 
 // ----------------------------------------------------------------------------
 void
-RTIfedTime::setPositiveInfinity()
+FedTime::setPositiveInfinity()
 {
     _fedTime = _positiveInfinity;
 }
 
 // ----------------------------------------------------------------------------
-inline RTI::Boolean
-RTIfedTime::isPositiveInfinity()
+inline bool
+FedTime::isPositiveInfinity() const
 {
-    return RTI::Boolean(_fedTime == _positiveInfinity);
+    return bool(_fedTime == _positiveInfinity);
 }
 
 // ----------------------------------------------------------------------------
 int
-RTIfedTime::encodedLength() const
+FedTime::encodedLength() const
 {
-	// current implementation of RTIfedtime takes
+	// current implementation of FedTime takes
 	// four IEEE-754 double values.
 	return (sizeof(_fedTime)+
 			sizeof(_zero)+
@@ -261,20 +121,20 @@
 
 // ----------------------------------------------------------------------------
 void
-RTIfedTime::encode(char *buffer) const
+FedTime::encode(char *buffer) const
 {
-	libhla::HLAfloat64LE encoded_fedTime;
-	encoded_fedTime = _fedTime;
-	strncpy(buffer,(char*)&(encoded_fedTime),encoded_fedTime.__sizeof());
+//	libhla::HLAfloat64LE encoded_fedTime;
+//	encoded_fedTime = _fedTime;
+//	strncpy(buffer,(char*)&(encoded_fedTime),encoded_fedTime.__sizeof());
 }
 
 // ----------------------------------------------------------------------------
 int
-RTIfedTime::getPrintableLength() const
+FedTime::getPrintableLength() const
 {
-    stringstream s ;
+    std::stringstream s ;
 
-    if (is_infinity(*this))
+    if (isPositiveInfinity())
 	s << infinity_str ;
     else
 	s << _fedTime ;
@@ -284,11 +144,11 @@
 
 // ----------------------------------------------------------------------------
 void
-RTIfedTime::getPrintableString(char *str)
+FedTime::getPrintableString(char *str)
 {
-    stringstream s ;
+    std::stringstream s ;
 
-    if (is_infinity(*this))
+    if (isPositiveInfinity())
 	s << infinity_str ;
     else
 	s << _fedTime ;
@@ -299,127 +159,107 @@
 
 // ----------------------------------------------------------------------------
 FedTime &
-RTIfedTime::operator+=(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator+=(const FedTime &time)
 {
-    _fedTime += rft(time)._fedTime ;
+    _fedTime += time._fedTime ;
     return *this;
 }
 
 // ----------------------------------------------------------------------------
 FedTime &
-RTIfedTime::operator-=(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator-=(const FedTime &time)
 {
-    _fedTime -= rft(time)._fedTime ;
+    _fedTime -= time._fedTime ;
     return *this;
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator<=(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator<=(const FedTime &time) const
 {
     if (const_cast<FedTime &>(time).isPositiveInfinity())
-	return RTI::RTI_TRUE ;
-    else if (is_infinity(*this))
-	return RTI::RTI_FALSE ;
+	return true;
+    else if (isPositiveInfinity())
+	return false;
     else
-	return RTI::Boolean(::fcmp(_fedTime, rft(time)._fedTime, _epsilon) <= 0);
+	return bool(::fcmp(_fedTime, time._fedTime, _epsilon) <= 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator<(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator<(const FedTime &time) const
 {
-    if (is_infinity(*this))
-	return RTI::RTI_FALSE ;
+    if (isPositiveInfinity())
+	return false;
     else
-	return RTI::Boolean(is_infinity(time) || ::fcmp(_fedTime, rft(time)._fedTime, _epsilon) < 0);
+	return bool(time.isPositiveInfinity() || ::fcmp(_fedTime, time._fedTime, _epsilon) < 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator>=(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator>=(const FedTime &time) const
 {
-    if (is_infinity(*this))
-	return RTI::RTI_TRUE ;
-    else if (is_infinity(time))
-	return RTI::RTI_FALSE ;
+    if (isPositiveInfinity())
+	return true;
+    else if (time.isPositiveInfinity())
+	return false;
     else
-	return RTI::Boolean(::fcmp(_fedTime, rft(time)._fedTime, _epsilon) >= 0);
+	return bool(::fcmp(_fedTime, time._fedTime, _epsilon) >= 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator>(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator>(const FedTime &time) const
 {
-    if (is_infinity(time))
-	return RTI::RTI_FALSE ;
+    if (time.isPositiveInfinity())
+	return false;
     else
-	return RTI::Boolean(is_infinity(*this) || ::fcmp(_fedTime, rft(time)._fedTime, _epsilon) > 0);
+	return bool(isPositiveInfinity() || ::fcmp(_fedTime, time._fedTime, _epsilon) > 0);
 }
 
 // ----------------------------------------------------------------------------
-inline RTI::Boolean
-RTIfedTime::operator==(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator==(const FedTime &time) const
 {
-    if (is_infinity(*this) && is_infinity(time))
-	return RTI::RTI_TRUE ;
-    else if (is_infinity(*this) || is_infinity(time))
-	return RTI::RTI_FALSE ;
+    if (isPositiveInfinity() && time.isPositiveInfinity())
+	return true;
+    else if (isPositiveInfinity() || time.isPositiveInfinity())
+	return false;
     else
-	return RTI::Boolean(::fcmp(_fedTime, rft(time)._fedTime, _epsilon) == 0);
-}
-
-// ----------------------------------------------------------------------------
-FedTime &
-RTIfedTime::operator=(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
-{
-    _fedTime = rft(time)._fedTime ;
-    return *this ;
+	return bool(::fcmp(_fedTime, time._fedTime, _epsilon) == 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Double
-RTIfedTime::getTime() const
+double
+FedTime::getTime() const
 {
     return _fedTime ;
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator==(const Double &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator==(const double &time) const
 {
-    return RTI::Boolean(!is_infinity(*this) && ::fcmp(_fedTime, time, _epsilon) == 0);
+    return bool(!isPositiveInfinity() && ::fcmp(_fedTime, time, _epsilon) == 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator!=(const FedTime &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator!=(const FedTime &time) const
 {
-    return RTI::Boolean(::fcmp(_fedTime, rft(time)._fedTime, _epsilon) != 0);
+    return bool(::fcmp(_fedTime, time._fedTime, _epsilon) != 0);
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
-RTIfedTime::operator!=(const Double &time) const
-    throw (RTI::InvalidFederationTime)
+bool
+FedTime::operator!=(const double &time) const
 {
-    return RTI::Boolean(is_infinity(*this) || ::fcmp(_fedTime, time, _epsilon) != 0);
+    return bool(isPositiveInfinity() || ::fcmp(_fedTime, time, _epsilon) != 0);
 }
 
 // ----------------------------------------------------------------------------
 FedTime &
-RTIfedTime::operator=(const RTIfedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator=(const FedTime &time)
 {
     _fedTime = time._fedTime ;
     return *this ;
@@ -427,170 +267,158 @@
 
 // ----------------------------------------------------------------------------
 FedTime &
-RTIfedTime::operator=(const Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator=(const double &time)
 {
     _fedTime = time ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator*=(const RTI::FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator*=(const FedTime &time)
 {
-    _fedTime *= rft(time)._fedTime ;
+    _fedTime *= time._fedTime ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator/=(const RTI::FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator/=(const FedTime &time)
 {
-    _fedTime /= rft(time)._fedTime ;
+    _fedTime /= time._fedTime ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator+=(const RTI::Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator+=(const double &time)
 {
     _fedTime += time ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator-=(const RTI::Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator-=(const double &time)
 {
     _fedTime -= time ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator*=(const RTI::Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator*=(const double &time)
 {
     _fedTime *= time ;
     return *this ;
 }
 
 FedTime &
-RTIfedTime::operator/=(const RTI::Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime::operator/=(const double &time)
 {
     _fedTime /= time ;
     return *this ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-RTIfedTime::operator+(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator+(const FedTime &time)
 {
-    RTIfedTime fedtime = _fedTime + rft(time)._fedTime ;
+    FedTime fedtime = _fedTime + time._fedTime ;
     return fedtime ;
 }
 
-RTIfedTime
-RTIfedTime::operator+(const Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator+(const double &time)
 {
-    RTIfedTime fedtime = _fedTime + time ;
+    FedTime fedtime = _fedTime + time ;
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-RTIfedTime::operator-(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator-(const FedTime &time)
 {
-    RTIfedTime fedtime = _fedTime - rft(time)._fedTime ;
+    FedTime fedtime = _fedTime - time._fedTime ;
     return fedtime ;
 }
 
-RTIfedTime
-RTIfedTime::operator-(const Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator-(const double &time)
 {
-    RTIfedTime fedtime = _fedTime - time ;
+    FedTime fedtime = _fedTime - time ;
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-RTIfedTime::operator*(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator*(const FedTime &time)
 {
-    RTIfedTime fedtime = _fedTime * rft(time)._fedTime ;
+    FedTime fedtime = _fedTime * time._fedTime ;
     return fedtime ;
 }
 
-RTIfedTime
-RTIfedTime::operator*(const Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator*(const double &time)
 {
-    RTIfedTime fedtime = _fedTime * time ;
+    FedTime fedtime = _fedTime * time ;
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-RTIfedTime::operator/(const FedTime &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator/(const FedTime &time)
 {
-    RTIfedTime fedtime = _fedTime / rft(time)._fedTime ;
+    FedTime fedtime = _fedTime / time._fedTime ;
     return fedtime ;
 }
 
-RTIfedTime
-RTIfedTime::operator/(const Double &time)
-    throw (RTI::InvalidFederationTime)
+FedTime
+FedTime::operator/(const double &time)
 {
-    RTIfedTime fedtime = _fedTime / time ;
+    FedTime fedtime = _fedTime / time ;
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
 std::ostream &
-operator<<(std::ostream &s, const FedTime &time)
+certi::operator<<(std::ostream &s, const FedTime &time)
 {
-    if (is_infinity(time))
+    if (time.isPositiveInfinity())
 	s << infinity_str ;
     else
-	s << rft(time).getTime();
+	s << time.getTime();
     return s ;
 }
 
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-operator+(const Double &d, const FedTime &time)
+FedTime
+operator+(const double &d, const FedTime &time)
 {
-    RTIfedTime fedtime = d + rft(time).getTime();
+    FedTime fedtime = d + time.getTime();
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-operator-(const Double &d, const FedTime &time)
+FedTime
+operator-(const double &d, const FedTime &time)
 {
-    RTIfedTime fedtime = d - rft(time).getTime();
+    FedTime fedtime = d - time.getTime();
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-operator*(const Double &d, const FedTime &time)
+FedTime
+operator*(const double &d, const FedTime &time)
 {
-    RTIfedTime fedtime = d * rft(time).getTime();
+    FedTime fedtime = d * time.getTime();
     return fedtime ;
 }
 
 // ----------------------------------------------------------------------------
-RTIfedTime
-operator/(const Double &d, const FedTime &time)
+FedTime
+operator/(const double &d, const FedTime &time)
 {
-    RTIfedTime fedtime = d / rft(time).getTime();
+    FedTime fedtime = d / time.getTime();
     return fedtime ;
 }
+
+// $Id: FedRegion.hh,v 3.4 2008/12/07 20:16:13 gotthardp Exp $
+
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/FedTimeD.hh certi/libCERTI/FedTimeD.hh
--- certi.orig/libCERTI/FedTimeD.hh	1970-01-01 01:00:00.000000000 +0100
+++ certi/libCERTI/FedTimeD.hh	2008-12-13 18:28:03.000000000 +0100
@@ -0,0 +1,185 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2005  ONERA
+//
+// This file is part of CERTI-libCERTI
+//
+// CERTI-libCERTI is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) any later version.
+//
+// CERTI-libCERTI is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA
+//
+// $Id: FedRegion.hh,v 3.4 2008/12/07 20:16:13 gotthardp Exp $
+// ----------------------------------------------------------------------------
+
+#ifndef CERTI_FEDTIMED_HH
+#define CERTI_FEDTIMED_HH
+
+#include <math.h>
+#include <ostream>
+
+namespace certi {
+
+/*
+ fcmp
+ Copyright (c) 1998-2000 Theodore C. Belding
+ University of Michigan Center for the Study of Complex Systems
+ <mailto:Ted.Belding@umich.edu>
+ <http://fcmp.sourceforge.net>
+
+ This file is part of the fcmp distribution. fcmp is free software;
+ you can redistribute and modify it under the terms of the GNU Library
+ General Public License (LGPL), version 2 or later.  This software
+ comes with absolutely no warranty. See the file COPYING for details
+ and terms of copying.
+
+ Description:
+
+ Knuth's floating point comparison operators, from:
+ Knuth, D. E. (1998). The Art of Computer Programming.
+ Volume 2: Seminumerical Algorithms. 3rd ed. Addison-Wesley.
+ Section 4.2.2, p. 233. ISBN 0-201-89684-2.
+
+ Input parameters:
+ x1, x2: numbers to be compared
+ epsilon: determines tolerance
+
+ epsilon should be carefully chosen based on the machine's precision,
+ the observed magnitude of error, the desired precision, and the
+ magnitude of the numbers to be compared. See the fcmp README file for
+ more information.
+
+ This routine may be used for both single-precision (float) and
+ double-precision (double) floating-point numbers.
+
+ Returns:
+ -1 if x1 < x2
+  0 if x1 == x2
+  1 if x1 > x2
+*/
+
+inline int
+fcmp(double x1,double x2, double epsilon)
+{
+    int exponent;
+    double delta;
+    double difference;
+
+    /* Get exponent(max(fabs(x1), fabs(x2))) and store it in exponent. */
+
+    /* If neither x1 nor x2 is 0, */
+    /* this is equivalent to max(exponent(x1), exponent(x2)). */
+
+    /* If either x1 or x2 is 0, its exponent returned by frexp would be 0, */
+    /* which is much larger than the exponents of numbers close to 0 in */
+    /* magnitude. But the exponent of 0 should be less than any number */
+    /* whose magnitude is greater than 0. */
+
+    /* So we only want to set exponent to 0 if both x1 and */
+    /* x2 are 0. Hence, the following works for all x1 and x2. */
+
+    frexp(fabs(x1) > fabs(x2) ? x1 : x2, &exponent);
+
+    /* Do the comparison. */
+
+    /* delta = epsilon * pow(2, exponent) */
+
+    /* Form a neighborhood around x2 of size delta in either direction. */
+    /* If x1 is within this delta neighborhood of x2, x1 == x2. */
+    /* Otherwise x1 > x2 or x1 < x2, depending on which side of */
+    /* the neighborhood x1 is on. */
+
+    delta = ldexp(epsilon, exponent);
+
+    difference = x1 - x2;
+
+    if (difference > delta)
+        return 1; /* x1 > x2 */
+    else if (difference < -delta)
+        return -1;  /* x1 < x2 */
+    else /* -delta <= difference <= delta */
+        return 0;  /* x1 == x2 */
+}
+
+class FedTime
+{
+public:
+    static const double epsilon;
+    static int fcmp(const double x1, const double x2);
+
+    FedTime();
+    FedTime(const double &);
+    FedTime(const FedTime &);
+    ~FedTime();
+
+public:
+    void setZero();
+    bool isZero();
+    void setEpsilon();
+    void setPositiveInfinity();
+    bool isPositiveInfinity() const;
+    int encodedLength() const;
+    void encode(char *) const;
+    int getPrintableLength() const;
+    void getPrintableString(char *);
+    double getTime() const;
+
+    FedTime& operator+=(const FedTime &);
+    FedTime& operator-=(const FedTime &);
+    bool operator<=(const FedTime &) const;
+    bool operator<(const FedTime &) const;
+    bool operator>=(const FedTime &) const;
+    bool operator>(const FedTime &) const;
+    bool operator==(const FedTime &) const;
+    bool operator==(const double &) const;
+    bool operator!=(const FedTime &) const;
+    bool operator!=(const double &) const;
+    FedTime &operator=(const FedTime &);
+    FedTime &operator=(const double &);
+    FedTime &operator*=(const FedTime &);
+    FedTime &operator/=(const FedTime &);
+    FedTime &operator+=(const double &);
+    FedTime &operator-=(const double &);
+    FedTime &operator*=(const double &);
+    FedTime &operator/=(const double &);
+    FedTime operator+(const FedTime &);
+    FedTime operator+(const double &);
+    FedTime operator-(const FedTime &);
+    FedTime operator-(const double &);
+    FedTime operator*(const FedTime &);
+    FedTime operator*(const double &);
+    FedTime operator/(const FedTime &);
+    FedTime operator/(const double &);
+
+    friend std::ostream &operator<<(std::ostream&, const FedTime &time);
+
+private:
+    double _fedTime ;
+    double _zero ;
+    double _epsilon ;
+    double _positiveInfinity ;
+};
+
+FedTime operator+(const double &, const FedTime &);
+FedTime operator-(const double &, const FedTime &);
+FedTime operator*(const double &, const FedTime &);
+FedTime operator/(const double &, const FedTime &);
+
+typedef FedTime FederationTime;
+typedef FedTime FederationTimeDelta;
+
+} // namespace certi
+
+#endif // CERTI_FEDTIMED_HH
+
+// $Id: fedtime.hh,v 3.12 2008/12/10 17:42:43 gotthardp Exp $
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/GAV.cc certi/libCERTI/GAV.cc
--- certi.orig/libCERTI/GAV.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/GAV.cc	2008-12-13 06:58:39.000000000 +0100
@@ -159,14 +159,6 @@
 }
 
 // ----------------------------------------------------------------------------
-RTI::Region *
-AttributeHandleValuePairSet::getRegion(ULong) const
-    throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext)
-{
-    throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
 void
 AttributeHandleValuePairSet::add(Handle h,
                                     const char *buff,
@@ -286,7 +278,7 @@
 AttributeHandleSet::remove(AttributeHandle h)
     throw (AttributeNotDefined)// not guaranteed safe while iterating
 {
-    if (isMember(h) == RTI::RTI_TRUE)
+    if (isMember(h) == true)
         list<AttributeHandle>::remove(h);
     else
         throw AttributeNotDefined("");
@@ -300,17 +292,17 @@
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
+bool
 AttributeHandleSet::isEmpty() const
 {
-    return RTI::Boolean(list<AttributeHandle>::empty());
+    return list<AttributeHandle>::empty();
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
+bool
 AttributeHandleSet::isMember(AttributeHandle h) const
 {
-    return RTI::Boolean(find(begin(), end(), h) != end());
+    return find(begin(), end(), h) != end();
 }
 
 // ----------------------------------------------------------------------------
@@ -356,7 +348,7 @@
 FederateHandleSet::remove(FederateHandle h)
     throw (ArrayIndexOutOfBounds)
 {
-    if (isMember(h) == RTI::RTI_TRUE)
+    if (isMember(h) == true)
         list<FederateHandle>::remove(h);
     else
         throw AttributeNotDefined("");
@@ -370,10 +362,10 @@
 }
 
 // ----------------------------------------------------------------------------
-RTI::Boolean
+bool
 FederateHandleSet::isMember(FederateHandle h) const
 {
-    return RTI::Boolean(find(begin(), end(), h) != end());
+    return find(begin(), end(), h) != end();
 }
 
 // ----------------------------------------------------------------------------
@@ -499,14 +491,6 @@
 }
 
 // ----------------------------------------------------------------------------
-RTI::Region *
-ParameterHandleValuePairSet::getRegion() const
-    throw (InvalidHandleValuePairSetContext)
-{
-    throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
 void
 ParameterHandleValuePairSet::add(Handle h,
                                     const char *buff,
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/GAV.hh certi/libCERTI/GAV.hh
--- certi.orig/libCERTI/GAV.hh	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/GAV.hh	2008-12-13 06:58:48.000000000 +0100
@@ -47,8 +47,8 @@
 
     virtual void empty();
 
-    virtual RTI::Boolean isEmpty() const ;
-    virtual RTI::Boolean isMember(AttributeHandle h) const ;
+    virtual bool isEmpty() const ;
+    virtual bool isMember(AttributeHandle h) const ;
 };
 
 class FederateHandleSet : public std::list<FederateHandle>
@@ -70,7 +70,7 @@
 
     virtual void empty();
 
-    virtual RTI::Boolean isMember(FederateHandle h) const ;
+    virtual bool isMember(FederateHandle h) const ;
 };
 
 class AttributeHandleValuePair
@@ -118,9 +118,6 @@
     virtual OrderType getOrderType(ULong i) const
         throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext);
 
-    virtual RTI::Region *getRegion(ULong i) const
-        throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext);
-
     virtual void add(Handle h, const char *buff, ULong valueLength)
         throw (ValueLengthExceeded, ValueCountExceeded);
     virtual void remove(Handle h) throw (ArrayIndexOutOfBounds);
@@ -174,9 +171,6 @@
     virtual OrderType getOrderType() const
         throw (InvalidHandleValuePairSetContext);
 
-    virtual RTI::Region *getRegion() const
-        throw (InvalidHandleValuePairSetContext);
-
     virtual void add(Handle h, const char *buff, ULong valueLength)
         throw (ValueLengthExceeded, ValueCountExceeded);
 
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/LBTS.cc certi/libCERTI/LBTS.cc
--- certi.orig/libCERTI/LBTS.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/LBTS.cc	2008-12-13 03:48:11.000000000 +0100
@@ -122,7 +122,7 @@
 void
 LBTS::update(FederateHandle num_fed, FederationTime time)
 {
-    D.Out(pdDebug, "LBTS.update: Updating federate %d(%f).", num_fed, time);
+    D.Out(pdDebug, "LBTS.update: Updating federate %d(%f).", num_fed, time.getTime());
 
     ClockSet::iterator it = clocks.find(num_fed);
 
@@ -136,10 +136,10 @@
               num_fed);
     else {
         D.Out(pdDebug, "before LBTS.update: federate %u, old time %f.",
-              it->first, it->second);
+              it->first, it->second.getTime());
         it->second = time ;
         D.Out(pdDebug, "after LBTS.update: federate %u, new time %f.",
-              it->first, it->second) ;
+              it->first, it->second.getTime());
         compute();
     }
 }
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/LBTS.hh certi/libCERTI/LBTS.hh
--- certi.orig/libCERTI/LBTS.hh	2007-11-20 10:04:54.000000000 +0100
+++ certi/libCERTI/LBTS.hh	2008-12-13 18:28:36.000000000 +0100
@@ -26,10 +26,11 @@
 #define LIBCERTI_LBTS_HH
 
 #include "certi.hh"
+#include "FedTimeD.hh"
 
 #ifndef _WIN32				
-#include <unistd.h>
-#include <stdlib.h>
+#include <unistd.h>
+#include <stdlib.h>
 #endif
 
 #include <map>
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/Message.cc certi/libCERTI/Message.cc
--- certi.orig/libCERTI/Message.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/Message.cc	2008-12-13 17:41:21.000000000 +0100
@@ -197,23 +197,23 @@
     @param the_time federation time
 */
 void
-Message::setFedTime(const RTI::FedTime &the_time)
+Message::setFedTime(const double the_time)
 {
-    fed_time = dynamic_cast<const RTIfedTime &>(the_time);
+    fed_time = the_time;
 }
 
 // ----------------------------------------------------------------------------
 void
-Message::setLookahead(const RTI::FedTime& the_lookahead)
+Message::setLookahead(const double the_lookahead)
 {
-    lookahead = (FederationTimeDelta) ((RTIfedTime&) the_lookahead).getTime();
+    lookahead = the_lookahead;
 }
 
 // ----------------------------------------------------------------------------
 void
 Message::setFederationTime(FederationTime the_time)
 {
-    fed_time = RTIfedTime(the_time);
+    fed_time = the_time;
 }
 
 // ----------------------------------------------------------------------------
@@ -238,14 +238,14 @@
 
 // ----------------------------------------------------------------------------
 void
-Message::setTransportation(RTI::TransportationHandle the_transport)
+Message::setTransportation(TransportType the_transport)
 {
     transport = the_transport;
 }
 
 // ----------------------------------------------------------------------------
 void
-Message::setOrdering(RTI::OrderingHandle the_ordering)
+Message::setOrdering(OrderType the_ordering)
 {
     order = the_ordering;
 }
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/Message.hh certi/libCERTI/Message.hh
--- certi.orig/libCERTI/Message.hh	2008-12-07 11:39:03.000000000 +0100
+++ certi/libCERTI/Message.hh	2008-12-13 18:28:33.000000000 +0100
@@ -26,7 +26,7 @@
 #include "SocketUN.hh"
 #include "BasicMessage.hh"
 #include "GAV.hh"
-#include "fedtime.hh"
+#include "FedTimeD.hh"
 
 #include <vector>
 #include <string>
@@ -327,10 +327,10 @@
     void setResignAction(RTI::ResignAction);
     RTI::ResignAction getResignAction() const { return resignAction ; };
 
-    void setFedTime(const RTI::FedTime&);
-    const RTI::FedTime& getFedTime() const { return fed_time; };
+    void setFedTime(const double);
+    double getFedTime() const { return fed_time.getTime(); };
 
-    void setLookahead(const RTI::FedTime&);
+    void setLookahead(const double);
 
     void setFederationTime(FederationTime);
     FederationTime getFederationTime() const { return fed_time.getTime(); };
@@ -341,12 +341,12 @@
     void setObject(ObjectHandle);
     ObjectHandle getObject() const { return object ; };
 
-    void setTransportation(RTI::TransportationHandle);
-    RTI::TransportationHandle getTransportation() const
+    void setTransportation(TransportType);
+    TransportType getTransportation() const
     { return transport; }
 
-    void setOrdering(RTI::OrderingHandle);
-    RTI::OrderingHandle getOrdering() const
+    void setOrdering(OrderType);
+    OrderType getOrdering() const
     { return order; }
 
     void setEventRetraction(EventRetractionHandle);
@@ -389,7 +389,7 @@
     TypeException exception ;
     std::string exceptionReason;
 
-    RTIfedTime fed_time;
+    FedTime fed_time;
     bool boolean ;
     FederationTimeDelta lookahead ;
     FederateHandle federate ;
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/Message_W.cc certi/libCERTI/Message_W.cc
--- certi.orig/libCERTI/Message_W.cc	2008-11-21 15:34:27.000000000 +0100
+++ certi/libCERTI/Message_W.cc	2008-12-13 03:50:03.000000000 +0100
@@ -494,7 +494,7 @@
           case ENABLE_TIME_CONSTRAINED:
           case DISABLE_TIME_CONSTRAINED:
             msgBuffer.write_bool(boolean);
-            msgBuffer.write_double(lookahead);
+            msgBuffer.write_double(lookahead.getTime());
             break ;
 
 	  // Body contains boolean
@@ -527,7 +527,7 @@
           case MODIFY_LOOKAHEAD:
           case QUERY_LOOKAHEAD:
             // we put another time but is the lookahead
-	    msgBuffer.write_double(lookahead) ;
+	    msgBuffer.write_double(lookahead.getTime());
             break ;
             // -- Default Handler --
 
@@ -564,7 +564,7 @@
     // Note sometimes federationTime is not useful.
     msgBuffer.write_int32(this->type) ;
     msgBuffer.write_int32(this->exception);
-    msgBuffer.write_double(getFederationTime());
+    msgBuffer.write_double(getFederationTime().getTime());
 
     // If the message carry an exception, the Body will only contain the
     // exception reason.
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/NetworkMessage.hh certi/libCERTI/NetworkMessage.hh
--- certi.orig/libCERTI/NetworkMessage.hh	2008-11-21 09:46:28.000000000 +0100
+++ certi/libCERTI/NetworkMessage.hh	2008-12-13 18:28:40.000000000 +0100
@@ -23,7 +23,7 @@
 #ifndef CERTI_NETWORK_MESSAGE_HH
 #define CERTI_NETWORK_MESSAGE_HH
 
-#include "fedtime.hh"
+#include "FedTimeD.hh"
 #include "Exception.hh"
 #include "Socket.hh"
 #include "RTIRegion.hh"
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libCERTI/NetworkMessage_RW.cc certi/libCERTI/NetworkMessage_RW.cc
--- certi.orig/libCERTI/NetworkMessage_RW.cc	2008-10-22 14:43:08.000000000 +0200
+++ certi/libCERTI/NetworkMessage_RW.cc	2008-12-13 03:58:37.000000000 +0100
@@ -18,6 +18,7 @@
 //
 // $Id: NetworkMessage_RW.cc,v 3.52 2008/10/23 13:46:19 erk Exp $
 // ----------------------------------------------------------------------------
+
 #include "NetworkMessage.hh"
 #include "PrettyDebug.hh"
 
@@ -53,8 +54,8 @@
 	 */
 	msgBuffer.write_bool(_isDated);
 	if (_isDated) {
-		msgBuffer.write_double(date);
-		D.Out(pdDebug, "Sent Message date is  <%f>", date);
+		msgBuffer.write_double(date.getTime());
+		D.Out(pdDebug, "Sent Message date is  <%f>", date.getTime());
 	}
 	msgBuffer.write_bool(_isLabelled);
 	if (_isLabelled) {
@@ -74,8 +75,8 @@
 	 */
 	D[pdDebug] << "Deserialize <" << getName().c_str()<<">"<<endl;
 	/* deserialize common part */
-	type        = static_cast<certi::NetworkMessage::Type>(msgBuffer.read_int32());
-	exception   = static_cast<certi::TypeException>(msgBuffer.read_int32());
+	type        = static_cast<NetworkMessage::Type>(msgBuffer.read_int32());
+	exception   = static_cast<TypeException>(msgBuffer.read_int32());
 	federate    = msgBuffer.read_int32();
 	federation  = msgBuffer.read_int32();
 	/*
@@ -87,7 +88,7 @@
 	_isDated = msgBuffer.read_bool();
 	if (_isDated) {
 		date = msgBuffer.read_double();
-		D.Out(pdDebug, "Received Message date is  <%f>", date);
+		D.Out(pdDebug, "Received Message date is  <%f>", date.getTime());
 	}
 	_isLabelled = msgBuffer.read_bool();
 	if (_isLabelled) {
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/CMakeLists.txt certi/libRTI/CMakeLists.txt
--- certi.orig/libRTI/CMakeLists.txt	2008-12-07 11:39:03.000000000 +0100
+++ certi/libRTI/CMakeLists.txt	2008-12-13 06:14:04.000000000 +0100
@@ -31,7 +31,44 @@
             DESTINATION lib)
 ENDIF (MINGW)
 
-INSTALL(TARGETS RTI
+##################################################################
+# Lib FedTime 
+# A replacement lib FedTime may be provided by the user
+# CERTI is provided one. The lib FedTime depends on libRTI
+# since it inherits from the RTI::FedTime abstract class.
+##################################################################
+IF(CMAKE_COMPILER_IS_GNUCC)
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
+INCLUDE_DIRECTORIES(../libHLA)
+SET(FEDTIME_SRCS
+    RTIfedTime.cc
+    ${CMAKE_SOURCE_DIR}/include/fedtime.hh
+)
+
+SOURCE_GROUP("Source Files\\FedTime" FILES ${FEDTIME_SRCS})
+
+ADD_LIBRARY(FedTime
+    ${FEDTIME_SRCS}
+)
+
+TARGET_LINK_LIBRARIES(FedTime RTI HLA)
+
+SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
+IF (MINGW)
+    SET_TARGET_PROPERTIES(FedTime PROPERTIES LINK_FLAGS "-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libFedTime.def")
+    INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/libFedTime.def
+            DESTINATION lib)
+ENDIF (MINGW)
+
+SET_TARGET_PROPERTIES(FedTime PROPERTIES VERSION 1.0.0 SOVERSION 1)
+
+# Install rules for both libRTI-NG and libFedTime
+INSTALL(TARGETS RTI FedTime
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib
     ARCHIVE DESTINATION lib)
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/RTIambassador.cc certi/libRTI/RTIambassador.cc
--- certi.orig/libRTI/RTIambassador.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libRTI/RTIambassador.cc	2008-12-13 18:04:19.000000000 +0100
@@ -22,8 +22,8 @@
 // $Id: RTIambassador.cc,v 3.101 2008/12/07 20:16:16 gotthardp Exp $
 // ----------------------------------------------------------------------------
 
-
-#include "certi.hh"
+#include "RTI.hh"
+#include "fedtime.hh"
 
 #include "RTIambPrivateRefs.hh"
 #include "RTItypesImp.hh"
@@ -612,7 +612,7 @@
 //! Request Federation Save with time.
 void
 RTI::RTIambassador::requestFederationSave(const char *label,
-                                     const FedTime& theTime)
+                                     const RTI::FedTime& theTime)
     throw (RTI::FederationTimeAlreadyPassed,
            RTI::InvalidFederationTime,
            RTI::FederateNotExecutionMember,
@@ -626,7 +626,7 @@
     G.Out(pdGendoc,"enter RTIambassador::requestFederationSave with time");
 
     req.type = Message::REQUEST_FEDERATION_SAVE ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     req.setLabel(label);
     // boolean true means time constrained
     req.setBoolean(true);
@@ -975,11 +975,11 @@
     @param theTime       Federation time
     @param theTag        User supplied tag
 */
-EventRetractionHandle
+RTI::EventRetractionHandle
 RTI::RTIambassador::
 updateAttributeValues(ObjectHandle theObject,
                       const AttributeHandleValuePairSet& theAttributes,
-                      const FedTime& theTime,
+                      const RTI::FedTime& theTime,
                       const char *theTag)
     throw (RTI::ObjectNotKnown,
            RTI::AttributeNotDefined,
@@ -996,7 +996,7 @@
 
     req.type = Message::UPDATE_ATTRIBUTE_VALUES ;
     req.setObject(theObject);
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     if ( theTag == NULL)
        {
        throw RTI::RTIinternalError ("Calling updateAttributeValues with Tag NULL");
@@ -1054,10 +1054,10 @@
     @param theTime Federation time
     @param theTag User-supplied tag
 */
-EventRetractionHandle
+RTI::EventRetractionHandle
 RTI::RTIambassador::sendInteraction(InteractionClassHandle theInteraction,
                                const ParameterHandleValuePairSet& theParameters,
-                               const FedTime& theTime,
+                               const RTI::FedTime& theTime,
                                const char *theTag)
     throw (RTI::InteractionClassNotDefined,
            RTI::InteractionClassNotPublished,
@@ -1073,7 +1073,7 @@
 
     req.type = Message::SEND_INTERACTION ;
     req.setInteractionClass(theInteraction);
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     if (theTag == NULL)
        {
        throw RTI::RTIinternalError ("Calling sendInteraction with Tag NULL") ;
@@ -1130,9 +1130,9 @@
     @param theTime Federation time
     @param theTag user supplied tag
 */
-EventRetractionHandle
+RTI::EventRetractionHandle
 RTI::RTIambassador::deleteObjectInstance(ObjectHandle theObject,
-                                    const FedTime& theTime,
+                                    const RTI::FedTime& theTime,
                                     const char *theTag)
     throw (RTI::ObjectNotKnown,
            RTI::DeletePrivilegeNotHeld,
@@ -1147,7 +1147,7 @@
 
     req.type = Message::DELETE_OBJECT_INSTANCE ;
     req.setObject(theObject);
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     if (theTag == NULL)
        {
        throw RTI::RTIinternalError ("Calling deleteObjectInstance with Tag NULL") ;
@@ -1531,8 +1531,8 @@
 // ----------------------------------------------------------------------------
 // Enable Time Regulation
 void
-RTI::RTIambassador::enableTimeRegulation(const FedTime& theFederateTime,
-                                    const FedTime& theLookahead)
+RTI::RTIambassador::enableTimeRegulation(const RTI::FedTime& theFederateTime,
+                                    const RTI::FedTime& theLookahead)
     throw (RTI::RTIinternalError, RTI::RestoreInProgress, 
 	   RTI::SaveInProgress, RTI::FederateNotExecutionMember, 
 	   RTI::ConcurrentAccessAttempted, RTI::InvalidLookahead, 
@@ -1541,8 +1541,8 @@
 {
     Message req, rep ;
     req.type = Message::ENABLE_TIME_REGULATION ;
-    req.setFedTime(theFederateTime);
-    req.setLookahead(theLookahead);
+    req.setFedTime(cast<RTIfedTime>()(theFederateTime).getTime());
+    req.setLookahead(cast<RTIfedTime>()(theLookahead).getTime());
     req.setBoolean(true);
     privateRefs->executeService(&req, &rep);
 }
@@ -1603,7 +1603,7 @@
 // ----------------------------------------------------------------------------
 // Time Advance Request
 void
-RTI::RTIambassador::timeAdvanceRequest(const FedTime& theTime)
+RTI::RTIambassador::timeAdvanceRequest(const RTI::FedTime& theTime)
     throw (RTI::TimeAdvanceAlreadyInProgress,
            RTI::FederationTimeAlreadyPassed,
            RTI::InvalidFederationTime,
@@ -1618,14 +1618,14 @@
     Message req, rep ;
 
     req.type = Message::TIME_ADVANCE_REQUEST ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     privateRefs->executeService(&req, &rep);
 }
 
 // ----------------------------------------------------------------------------
 // Time Advance Request Available
 void
-RTI::RTIambassador::timeAdvanceRequestAvailable(const FedTime& theTime)
+RTI::RTIambassador::timeAdvanceRequestAvailable(const RTI::FedTime& theTime)
     throw (RTI::RTIinternalError, RTI::RestoreInProgress, RTI::SaveInProgress, 
 	   RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember, 
 	   RTI::EnableTimeConstrainedPending, RTI::EnableTimeRegulationPending, 
@@ -1635,7 +1635,7 @@
     Message req, rep ;
 
     req.type = Message::TIME_ADVANCE_REQUEST_AVAILABLE ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
 
     privateRefs->executeService(&req, &rep);
 }
@@ -1643,7 +1643,7 @@
 // ----------------------------------------------------------------------------
 // Next Event Request
 void
-RTI::RTIambassador::nextEventRequest(const FedTime& theTime)
+RTI::RTIambassador::nextEventRequest(const RTI::FedTime& theTime)
     throw (RTI::TimeAdvanceAlreadyInProgress,
            RTI::FederationTimeAlreadyPassed,
            RTI::InvalidFederationTime,
@@ -1658,14 +1658,14 @@
     Message req, rep ;
 
     req.type = Message::NEXT_EVENT_REQUEST ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     privateRefs->executeService(&req, &rep);
 }
 
 // ----------------------------------------------------------------------------
 // Next Event Request Available
 void
-RTI::RTIambassador::nextEventRequestAvailable(const FedTime& theTime)
+RTI::RTIambassador::nextEventRequestAvailable(const RTI::FedTime& theTime)
     throw (RTI::RTIinternalError, RTI::RestoreInProgress, RTI::SaveInProgress, 
 	   RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember, 
 	   RTI::EnableTimeConstrainedPending, RTI::EnableTimeRegulationPending, 
@@ -1675,14 +1675,14 @@
     Message req, rep ;
 
     req.type = Message::NEXT_EVENT_REQUEST_AVAILABLE ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
     privateRefs->executeService(&req, &rep);
 }
 
 // ----------------------------------------------------------------------------
 // Flush Queue Request
 void
-RTI::RTIambassador::flushQueueRequest(const FedTime& theTime)
+RTI::RTIambassador::flushQueueRequest(const RTI::FedTime& theTime)
     throw (RTI::TimeAdvanceAlreadyInProgress,
            RTI::FederationTimeAlreadyPassed,
            RTI::InvalidFederationTime,
@@ -1698,7 +1698,7 @@
     Message req, rep ;
 
     req.type = Message::FLUSH_QUEUE_REQUEST ;
-    req.setFedTime(theTime);
+    req.setFedTime(cast<RTIfedTime>()(theTime).getTime());
 
     privateRefs->executeService(&req, &rep);
 }
@@ -1738,7 +1738,7 @@
 // ----------------------------------------------------------------------------
 // Query LBTS
 void
-RTI::RTIambassador::queryLBTS(FedTime& theTime)
+RTI::RTIambassador::queryLBTS(RTI::FedTime& theTime)
     throw (RTI::FederateNotExecutionMember,
            RTI::ConcurrentAccessAttempted,
            RTI::SaveInProgress,
@@ -1750,13 +1750,13 @@
     req.type = Message::QUERY_LBTS ;
     privateRefs->executeService(&req, &rep);
 
-    theTime = rep.getFedTime();
+    cast<RTIfedTime>()(theTime) = rep.getFedTime();
 }
 
 // ----------------------------------------------------------------------------
 // Query Federate Time
 void
-RTI::RTIambassador::queryFederateTime(FedTime& theTime)
+RTI::RTIambassador::queryFederateTime(RTI::FedTime& theTime)
     throw (RTI::FederateNotExecutionMember,
            RTI::ConcurrentAccessAttempted,
            RTI::SaveInProgress,
@@ -1768,13 +1768,13 @@
     req.type = Message::QUERY_FEDERATE_TIME ;
     privateRefs->executeService(&req, &rep);
 
-    theTime = rep.getFedTime();
+    cast<RTIfedTime>()(theTime) = rep.getFedTime();
 }
 
 // ----------------------------------------------------------------------------
 // Query Minimum Next Event Time
 void
-RTI::RTIambassador::queryMinNextEventTime(FedTime& theTime)
+RTI::RTIambassador::queryMinNextEventTime(RTI::FedTime& theTime)
     throw (RTI::FederateNotExecutionMember,
            RTI::ConcurrentAccessAttempted,
            RTI::SaveInProgress,
@@ -1786,13 +1786,13 @@
     req.type = Message::QUERY_MIN_NEXT_EVENT_TIME ;
     privateRefs->executeService(&req, &rep);
 
-    theTime = rep.getFedTime();
+    cast<RTIfedTime>()(theTime) = rep.getFedTime();
 }
 
 // ----------------------------------------------------------------------------
 // Modify Lookahead
 void
-RTI::RTIambassador::modifyLookahead(const FedTime& theLookahead)
+RTI::RTIambassador::modifyLookahead(const RTI::FedTime& theLookahead)
     throw (RTI::RTIinternalError, RTI::RestoreInProgress, RTI::SaveInProgress, 
 	   RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember, 
 	   RTI::InvalidLookahead)
@@ -1800,7 +1800,7 @@
     Message req, rep ;
 
     req.type = Message::MODIFY_LOOKAHEAD ;
-    req.setLookahead(theLookahead);
+    req.setLookahead(cast<RTIfedTime>()(theLookahead).getTime());
 
     privateRefs->executeService(&req, &rep);
 }
@@ -1808,7 +1808,7 @@
 // ----------------------------------------------------------------------------
 // Query Lookahead
 void
-RTI::RTIambassador::queryLookahead(FedTime &theTime)
+RTI::RTIambassador::queryLookahead(RTI::FedTime &theTime)
     throw (RTI::FederateNotExecutionMember,
            RTI::ConcurrentAccessAttempted,
            RTI::SaveInProgress,
@@ -1820,19 +1820,13 @@
     req.type = Message::QUERY_LOOKAHEAD ;
     privateRefs->executeService(&req, &rep);
 
-    try { 
-        RTIfedTime &ret = dynamic_cast<RTIfedTime&>(theTime); 
-        ret = RTIfedTime((Double) rep.getFederationTimeDelta());
-    }
-    catch (std::bad_cast) {
-	throw RTI::RTIinternalError("theTime is not a RTIfedTime object");
-    }
+    cast<RTIfedTime>()(theTime) = rep.getFederationTimeDelta().getTime();
 }
 
 // ----------------------------------------------------------------------------
 // Retract
 void
-RTI::RTIambassador::retract(EventRetractionHandle handle)
+RTI::RTIambassador::retract(RTI::EventRetractionHandle handle)
     throw (RTI::RTIinternalError, RTI::RestoreInProgress, RTI::SaveInProgress, 
 	   RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember, 
 	   RTI::InvalidRetractionHandle)
@@ -2234,10 +2228,10 @@
 
 // ----------------------------------------------------------------------------
 // Send Interaction With Region
-EventRetractionHandle
+RTI::EventRetractionHandle
 RTI::RTIambassador::sendInteractionWithRegion(InteractionClassHandle interaction,
                                          const ParameterHandleValuePairSet &par,
-                                         const FedTime &time,
+                                         const RTI::FedTime &time,
                                          const char *tag,
                                          const Region &region)
     throw (RTI::InteractionClassNotDefined,
@@ -2257,7 +2251,7 @@
     req.setType(Message::SEND_INTERACTION);
     req.setInteractionClass(interaction);
     req.setPHVPS(cast<ParameterHandleValuePairSetImp>()(par).getParameterHandleValuePairs());
-    req.setFedTime(time);
+    req.setFedTime(cast<RTIfedTime>()(time).getTime());
     if ( tag == NULL )
        {
        throw RTI::RTIinternalError ("Calling sendInteractionWithRegion with Tag NULL");
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/RTIambPrivateRefs.cc certi/libRTI/RTIambPrivateRefs.cc
--- certi.orig/libRTI/RTIambPrivateRefs.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/libRTI/RTIambPrivateRefs.cc	2008-12-13 07:40:10.000000000 +0100
@@ -712,7 +712,7 @@
             if (msg->getBoolean())
                fed_amb->reflectAttributeValues(msg->getObject(),
                                                *attributes,
-                                               msg->getFedTime(),
+                                               RTIfedTime(msg->getFedTime()),
                                                (msg->getTag()).c_str(),
                                                msg->getEventRetraction());
             else
@@ -733,7 +733,7 @@
                 fed_amb->receiveInteraction(
                                         msg->getInteractionClass(),
                                         *parameters,
-                                        msg->getFedTime(),
+                                        RTIfedTime(msg->getFedTime()),
                                         (msg->getTag()).c_str(),
                                         msg->getEventRetraction());
             else
@@ -752,7 +752,7 @@
             if (msg->getBoolean()) {
                 fed_amb->removeObjectInstance(
                                           msg->getObject(),
-                                          msg->getFedTime(),
+                                          RTIfedTime(msg->getFedTime()),
                                           (msg->getTag()).c_str(),
                                           msg->getEventRetraction());
             }
@@ -884,21 +884,21 @@
 
       case Message::TIME_ADVANCE_GRANT:
         try {
-            fed_amb->timeAdvanceGrant(msg->getFedTime());
+            fed_amb->timeAdvanceGrant(RTIfedTime(msg->getFedTime()));
         }
         CATCH_FEDERATE_AMBASSADOR_EXCEPTIONS("timeAdvanceGrant")
         break ;
 
       case Message::TIME_REGULATION_ENABLED:
         try {
-            fed_amb->timeRegulationEnabled(msg->getFedTime());
+            fed_amb->timeRegulationEnabled(RTIfedTime(msg->getFedTime()));
         }
         CATCH_FEDERATE_AMBASSADOR_EXCEPTIONS("timeRegulationEnabled")
         break ;
 
       case Message::TIME_CONSTRAINED_ENABLED:
         try {
-            fed_amb->timeConstrainedEnabled(msg->getFedTime());
+            fed_amb->timeConstrainedEnabled(RTIfedTime(msg->getFedTime()));
         }
         CATCH_FEDERATE_AMBASSADOR_EXCEPTIONS("timeConstrainedEnabled")
         break ;
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/RTIambPrivateRefs.hh certi/libRTI/RTIambPrivateRefs.hh
--- certi.orig/libRTI/RTIambPrivateRefs.hh	2008-12-07 11:39:03.000000000 +0100
+++ certi/libRTI/RTIambPrivateRefs.hh	2008-12-13 18:04:41.000000000 +0100
@@ -23,6 +23,7 @@
 // ----------------------------------------------------------------------------
 
 #include "RTI.hh"
+#include "fedtime.hh"
 #include "Message.hh"
 #include "RootObject.hh"
 #include "MessageBuffer.hh"
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/RTIfedTime.cc certi/libRTI/RTIfedTime.cc
--- certi.orig/libRTI/RTIfedTime.cc	1970-01-01 01:00:00.000000000 +0100
+++ certi/libRTI/RTIfedTime.cc	2008-12-13 18:28:56.000000000 +0100
@@ -0,0 +1,497 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2006  ONERA
+//
+// This file is part of CERTI-libCERTI
+//
+// CERTI-libCERTI is free software ; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public License
+// as published by the Free Software Foundation ; either version 2 of
+// the License, or (at your option) any later version.
+//
+// CERTI-libCERTI is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY ; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this program ; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// ----------------------------------------------------------------------------
+
+#include <math.h>
+
+#include "certi.hh"
+#include "fedtime.hh"
+#include "FedTimeD.hh"
+
+#ifdef _WIN32
+	#ifdef max
+		#undef max
+	#endif
+#endif
+
+#include <algorithm>
+#include <limits>
+#include <sstream>
+#include <typeinfo>
+
+using std::stringstream ;
+
+namespace
+{
+
+// ----------------------------------------------------------------------------
+/** FedTime to RTIfedTime reference cast
+ */
+inline const RTIfedTime &
+rft(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    try {
+	return dynamic_cast<const RTIfedTime &>(time);
+    }
+    catch (std::bad_cast) {
+	throw RTI::InvalidFederationTime("Could not cast to RTIfedTime");
+    }
+}
+
+inline bool
+is_infinity(const RTI::FedTime &time)
+{
+    return const_cast<RTI::FedTime &>(time).isPositiveInfinity() == RTI::RTI_TRUE ;
+}
+
+const char *infinity_str = "+inf" ;
+
+} // anonymous namespace
+
+// ----------------------------------------------------------------------------
+// FedTimeFactory
+RTI::FedTime *
+RTI::FedTimeFactory::makeZero()
+    throw (RTI::MemoryExhausted)
+{
+    return new RTIfedTime();
+}
+
+RTI::FedTime *
+RTI::FedTimeFactory::decode(const char *buf)
+    throw (RTI::MemoryExhausted)
+{
+    return new RTIfedTime(*(const RTI::Double*)buf);
+}
+
+// ----------------------------------------------------------------------------
+// RTIfedTime
+RTIfedTime::RTIfedTime()
+    : _fedTime(0),
+      _zero(0),
+      _epsilon(std::numeric_limits<double>::epsilon()),
+      _positiveInfinity(std::numeric_limits<double>::infinity()) { }
+
+RTIfedTime::RTIfedTime(const RTI::Double &time)
+    : _fedTime(time),
+      _zero(0),
+      _epsilon(std::numeric_limits<double>::epsilon()),
+      _positiveInfinity(std::numeric_limits<double>::infinity()) { }
+
+RTIfedTime::RTIfedTime(const RTI::FedTime &time)
+    : _fedTime(rft(time).getTime()),
+      _zero(0),
+      _epsilon(std::numeric_limits<double>::epsilon()),
+      _positiveInfinity(std::numeric_limits<double>::infinity()) { }
+
+// ----------------------------------------------------------------------------
+RTIfedTime::RTIfedTime(const RTIfedTime &time)
+    : FedTime(),
+      _fedTime(time._fedTime),
+      _zero(time._zero),
+      _epsilon(time._epsilon),
+      _positiveInfinity(time._positiveInfinity) { }
+
+// ----------------------------------------------------------------------------
+RTIfedTime::~RTIfedTime()
+{
+}
+
+// ----------------------------------------------------------------------------
+void
+RTIfedTime::setZero()
+{
+    _fedTime = _zero;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::isZero()
+{
+    return RTI::Boolean(_fedTime == _zero);
+}
+
+// ----------------------------------------------------------------------------
+void
+RTIfedTime::setEpsilon()
+{
+    _fedTime = _epsilon;
+}
+
+// ----------------------------------------------------------------------------
+void
+RTIfedTime::setPositiveInfinity()
+{
+    _fedTime = _positiveInfinity;
+}
+
+// ----------------------------------------------------------------------------
+inline RTI::Boolean
+RTIfedTime::isPositiveInfinity()
+{
+    return RTI::Boolean(_fedTime == _positiveInfinity);
+}
+
+// ----------------------------------------------------------------------------
+int
+RTIfedTime::encodedLength() const
+{
+	// current implementation of RTIfedtime takes
+	// four IEEE-754 double values.
+	return (sizeof(_fedTime)+
+			sizeof(_zero)+
+			sizeof(_epsilon)+
+			sizeof(_positiveInfinity));
+}
+
+// ----------------------------------------------------------------------------
+void
+RTIfedTime::encode(char *buffer) const
+{
+    memcpy(buffer, &_fedTime, sizeof(RTI::Double));
+}
+
+// ----------------------------------------------------------------------------
+int
+RTIfedTime::getPrintableLength() const
+{
+    stringstream s ;
+
+    if (is_infinity(*this))
+	s << infinity_str ;
+    else
+	s << _fedTime ;
+
+    return s.str().length() + 1 ;
+}
+
+// ----------------------------------------------------------------------------
+void
+RTIfedTime::getPrintableString(char *str)
+{
+    stringstream s ;
+
+    if (is_infinity(*this))
+	s << infinity_str ;
+    else
+	s << _fedTime ;
+
+    s >> str ;
+    str[s.str().length()] = 0 ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::FedTime &
+RTIfedTime::operator+=(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime += rft(time)._fedTime ;
+    return *this;
+}
+
+// ----------------------------------------------------------------------------
+RTI::FedTime &
+RTIfedTime::operator-=(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime -= rft(time)._fedTime ;
+    return *this;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator<=(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    if (const_cast<RTI::FedTime &>(time).isPositiveInfinity())
+	return RTI::RTI_TRUE ;
+    else if (is_infinity(*this))
+	return RTI::RTI_FALSE ;
+    else
+	return RTI::Boolean(certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) <= 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator<(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    if (is_infinity(*this))
+	return RTI::RTI_FALSE ;
+    else
+	return RTI::Boolean(is_infinity(time) || certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) < 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator>=(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    if (is_infinity(*this))
+	return RTI::RTI_TRUE ;
+    else if (is_infinity(time))
+	return RTI::RTI_FALSE ;
+    else
+	return RTI::Boolean(certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) >= 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator>(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    if (is_infinity(time))
+	return RTI::RTI_FALSE ;
+    else
+	return RTI::Boolean(is_infinity(*this) || certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) > 0);
+}
+
+// ----------------------------------------------------------------------------
+inline RTI::Boolean
+RTIfedTime::operator==(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    if (is_infinity(*this) && is_infinity(time))
+	return RTI::RTI_TRUE ;
+    else if (is_infinity(*this) || is_infinity(time))
+	return RTI::RTI_FALSE ;
+    else
+	return RTI::Boolean(certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) == 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::FedTime &
+RTIfedTime::operator=(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime = rft(time)._fedTime ;
+    return *this ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Double
+RTIfedTime::getTime() const
+{
+    return _fedTime ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator==(const RTI::Double &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    return RTI::Boolean(!is_infinity(*this) && certi::fcmp(_fedTime, time, _epsilon) == 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator!=(const RTI::FedTime &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    return RTI::Boolean(certi::fcmp(_fedTime, rft(time)._fedTime, _epsilon) != 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+RTIfedTime::operator!=(const RTI::Double &time) const
+    throw (RTI::InvalidFederationTime)
+{
+    return RTI::Boolean(is_infinity(*this) || certi::fcmp(_fedTime, time, _epsilon) != 0);
+}
+
+// ----------------------------------------------------------------------------
+RTI::FedTime &
+RTIfedTime::operator=(const RTIfedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime = time._fedTime ;
+    return *this ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::FedTime &
+RTIfedTime::operator=(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime = time ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator*=(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime *= rft(time)._fedTime ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator/=(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime /= rft(time)._fedTime ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator+=(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime += time ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator-=(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime -= time ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator*=(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime *= time ;
+    return *this ;
+}
+
+RTI::FedTime &
+RTIfedTime::operator/=(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    _fedTime /= time ;
+    return *this ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+RTIfedTime::operator+(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime + rft(time)._fedTime ;
+    return fedtime ;
+}
+
+RTIfedTime
+RTIfedTime::operator+(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime + time ;
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+RTIfedTime::operator-(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime - rft(time)._fedTime ;
+    return fedtime ;
+}
+
+RTIfedTime
+RTIfedTime::operator-(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime - time ;
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+RTIfedTime::operator*(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime * rft(time)._fedTime ;
+    return fedtime ;
+}
+
+RTIfedTime
+RTIfedTime::operator*(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime * time ;
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+RTIfedTime::operator/(const RTI::FedTime &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime / rft(time)._fedTime ;
+    return fedtime ;
+}
+
+RTIfedTime
+RTIfedTime::operator/(const RTI::Double &time)
+    throw (RTI::InvalidFederationTime)
+{
+    RTIfedTime fedtime = _fedTime / time ;
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+std::ostream &
+operator<<(std::ostream &s, const RTI::FedTime &time)
+{
+    if (is_infinity(time))
+	s << infinity_str ;
+    else
+	s << rft(time).getTime();
+    return s ;
+}
+
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+operator+(const RTI::Double &d, const RTI::FedTime &time)
+{
+    RTIfedTime fedtime = d + rft(time).getTime();
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+operator-(const RTI::Double &d, const RTI::FedTime &time)
+{
+    RTIfedTime fedtime = d - rft(time).getTime();
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+operator*(const RTI::Double &d, const RTI::FedTime &time)
+{
+    RTIfedTime fedtime = d * rft(time).getTime();
+    return fedtime ;
+}
+
+// ----------------------------------------------------------------------------
+RTIfedTime
+operator/(const RTI::Double &d, const RTI::FedTime &time)
+{
+    RTIfedTime fedtime = d / rft(time).getTime();
+    return fedtime ;
+}
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/libRTI/RTItypesImp.hh certi/libRTI/RTItypesImp.hh
--- certi.orig/libRTI/RTItypesImp.hh	2008-12-07 21:16:17.000000000 +0100
+++ certi/libRTI/RTItypesImp.hh	2008-12-13 07:36:17.000000000 +0100
@@ -44,6 +44,18 @@
             throw RTI::RTIinternalError("Incompatible object on input.");
         }
     }
+
+    template<class R>
+    I& operator()(R& imp)
+    {
+        try {
+            return dynamic_cast<I&>(imp);
+        }
+        catch (...)
+        {
+            throw RTI::RTIinternalError("Incompatible object on input.");
+        }
+    }
 };
 
 typedef std::pair<AttributeHandle, AttributeValue_t> AttributeHandleValuePair_t;
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/RTIA/RTIA_network.cc certi/RTIA/RTIA_network.cc
--- certi.orig/RTIA/RTIA_network.cc	2008-11-21 09:46:27.000000000 +0100
+++ certi/RTIA/RTIA_network.cc	2008-12-13 05:54:36.000000000 +0100
@@ -52,7 +52,7 @@
       {
           D.Out(pdTrace,
                 "Receving Message from RTIG, type NetworkMessage::MESSAGE_NULL(%f).",
-                msg->getDate());
+                msg->getDate().getTime());
 
           tm->update(msg->federate, msg->getDate());
           delete msg ;
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/RTIA/TimeManagement.cc certi/RTIA/TimeManagement.cc
--- certi.orig/RTIA/TimeManagement.cc	2008-09-09 16:00:29.000000000 +0200
+++ certi/RTIA/TimeManagement.cc	2008-12-13 05:59:44.000000000 +0100
@@ -107,11 +107,11 @@
 
         comm->sendMessage(&msg);
         lastNullMessageDate = heure_logique ;
-        D.Out(pdDebug, "NULL message sent (Time = %f).", heure_logique) ;
+        D.Out(pdDebug, "NULL message sent (Time = %f).", heure_logique.getTime()) ;
     }
     else {
         D.Out(pdExcept, "NULL message not sent (Time = %f, Last = %f).",
-              heure_logique, lastNullMessageDate);
+              heure_logique.getTime(), lastNullMessageDate.getTime());
     }
 }
 
@@ -497,11 +497,7 @@
 
         _type_granted_state = AFTER_TAR_OR_NER ;  // will be
 
-        // FIXME Erk-->Pierre 
-        // We were changing lookahead value to epsilon
-        // when doing zero lookahead I'd rather handle
-        // _any_ near-to-zero lookahead as ZERO_LK
-        if (0==RTIfedTime::fcmp(_lookahead_courant,0.0)) {           
+        if (_lookahead_courant == 0.0) {
            _type_granted_state = AFTER_TAR_OR_NER_WITH_ZERO_LK ;
         }
 
@@ -572,7 +568,7 @@
     else
         dateMNET = (_LBTS <= dateTSO ? _LBTS : dateTSO) ;
 
-   D.Out(pdRegister, "Minimum Next Event Time : %f.", dateMNET);
+   D.Out(pdRegister, "Minimum Next Event Time : %f.", dateMNET.getTime());
 
    return dateMNET ;
 }
@@ -597,7 +593,7 @@
         if (_est_regulateur)
             sendNullMessage(_heure_courante);
 
-        D.Out(pdRegister, "New Lookahead : %f.", _lookahead_courant);
+        D.Out(pdRegister, "New Lookahead : %f.", _lookahead_courant.getTime());
     }
 }
 
@@ -680,7 +676,7 @@
     // Modifier lookahead courant 
     _lookahead_courant = the_lookahead;
           D.Out(pdDebug,
-    	        "New lookahead = %f",_lookahead_courant);
+    	        "New lookahead = %f",_lookahead_courant.getTime());
     // faudrait peut etre remplacer heure courante par le temps en parametre      
         msg.setDate(_heure_courante + _lookahead_courant);
 
@@ -722,35 +718,23 @@
 bool
 TimeManagement::testValidTime(FederationTime theTime)
 {
-   int compareResult;
-   // FIXME Erk-->Pierre
-   // We should use RTIfedTime object and not _plain_ double
-   // value
    if (_avancee_en_cours == PAS_D_AVANCEE) {
       if (_type_granted_state == AFTER_TAR_OR_NER_WITH_ZERO_LK) {
-    	 compareResult = RTIfedTime::fcmp(theTime,_heure_courante);
-    	 // if theTime <= _heure_courante
-         if (compareResult==-1 || compareResult==0)
+         if (theTime <= _heure_courante)
             return false;
       }
       else {  // AFTER_TAR_OR_NER or AFTER_TARA_OR_NARA
-    	 compareResult = RTIfedTime::fcmp(theTime,_heure_courante + _lookahead_courant);
-    	 // if theTime  < _heure_courante + _lookahead_courant
-         if (compareResult == -1)
+         if (theTime  < _heure_courante + _lookahead_courant)
             return false;
       }
    }
    else {
       if (_type_granted_state == AFTER_TAR_OR_NER_WITH_ZERO_LK) {
-    	 compareResult = RTIfedTime::fcmp(theTime,date_avancee);
-    	 // if theTime <= date_avancee
-         if (compareResult==-1 || compareResult==0)
+         if (theTime <= date_avancee)
             return false;
       }
       else {  // AFTER_TAR_OR_NER or AFTER_TARA_OR_NARA
-    	 compareResult = RTIfedTime::fcmp(theTime,date_avancee + _lookahead_courant);
-    	 // if (theTime  < date_avancee + _lookahead_courant)
-         if (compareResult == -1)
+         if (theTime  < date_avancee + _lookahead_courant)
             return false;
       }
    }
@@ -838,9 +822,9 @@
     if (_est_contraint) {
         // give a TSO message.
         if (_LBTS == std::numeric_limits<double>::infinity())
-           D.Out(pdDebug, "Logical time : %f, LBTS : infini.", date_avancee);
+           D.Out(pdDebug, "Logical time : %f, LBTS : infini.", date_avancee.getTime());
         else
-           D.Out(pdDebug, "Logical time : %f, LBTS : %lf.", date_avancee, _LBTS);
+           D.Out(pdDebug, "Logical time : %f, LBTS : %lf.", date_avancee.getTime(), _LBTS.getTime());
         min = (_LBTS<date_avancee)?(_LBTS):(date_avancee);
         msg = queues->giveTsoMessage(min, msg_donne, msg_restant);
 
@@ -849,10 +833,10 @@
             // if LBTS allows to give a timeAdvanceGrant.
             if (_LBTS == std::numeric_limits<double>::infinity())
                D.Out(pdDebug, "Logical time : %f, LBTS : infini, lookahead : %f.",
-                     date_avancee, _lookahead_courant);
+                     date_avancee.getTime(), _lookahead_courant.getTime());
             else
                D.Out(pdDebug, "Logical time : %15.12f, LBTS : %15.12f, lookahead : %f.",
-                     date_avancee, _LBTS, _lookahead_courant);
+                     date_avancee.getTime(), _LBTS.getTime(), _lookahead_courant.getTime());
 
             if ((date_avancee < _LBTS) || 
                ((date_avancee == _LBTS) && (_avancee_en_cours == TARA))) {
@@ -895,7 +879,7 @@
     req.setFederationTime(logical_time);
 
     D.Out(pdRegister, "timeAdvanceGrant sent to federate (time = %f).",
-          req.getFederationTime());
+          req.getFederationTime().getTime());
 
     _tick_state = TICK_NEXT;  // indicate the callback was processed
 
@@ -920,15 +904,13 @@
     if (_avancee_en_cours != PAS_D_AVANCEE)
         e = e_TimeAdvanceAlreadyInProgress ;
 
-    /* logical_time <_heure_courante */
-    if (RTIfedTime::fcmp(logical_time ,_heure_courante) < 0)
+    if (logical_time < _heure_courante)
         e = e_FederationTimeAlreadyPassed ;
     
-    /* logical_time < _heure_courante + _lookahead_courant */
-    if (RTIfedTime::fcmp(logical_time , _heure_courante + _lookahead_courant)<0) {
+    if (logical_time < _heure_courante + _lookahead_courant) {
     	
     D.Out(pdDebug,"InvalidFederation time lkahead=%f, current=%f, requested=%f",
-    			_lookahead_courant,_heure_courante,logical_time);
+    			_lookahead_courant.getTime(),_heure_courante.getTime(),logical_time.getTime());
        e = e_InvalidFederationTime ;
     }
 
@@ -936,11 +918,7 @@
 
         _type_granted_state = AFTER_TAR_OR_NER ;  // will be
 
-        // FIXME Erk-->Pierre 
-        // We were changing lookahead value to epsilon
-        // when doing zero lookahead I'd rather handle
-        // _any_ near-to-zero lookahead as ZERO_LK
-        if (0==RTIfedTime::fcmp(_lookahead_courant,0.0)) {         
+        if (_lookahead_courant == 0.0) {         
            _type_granted_state = AFTER_TAR_OR_NER_WITH_ZERO_LK ;
         }
 
@@ -951,7 +929,7 @@
         date_avancee = logical_time ;
 
         D.Out(pdTrace, "timeAdvanceRequest accepted (asked time=%f).",
-              date_avancee);
+              date_avancee.getTime());
     }
     else {
         D.Out(pdExcept, "timeAdvanceRequest refused (exception = %d).", e);
@@ -987,7 +965,7 @@
         date_avancee = logical_time ;
 
         D.Out(pdTrace, "timeAdvanceRequestAvailable accepted (asked time=%f).",
-              date_avancee);
+              date_avancee.getTime());
     }
     else {
         D.Out(pdExcept, "timeAdvanceRequestAvailable refused (exception = %d).", e);
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/RTIG/Federation.cc certi/RTIG/Federation.cc
--- certi.orig/RTIG/Federation.cc	2008-11-21 09:46:27.000000000 +0100
+++ certi/RTIG/Federation.cc	2008-12-13 04:03:21.000000000 +0100
@@ -712,7 +712,7 @@
     federate.setRegulator(true);
 
     D.Out(pdTerm, "Federation %d: Federate %d is now a regulator(Time=%f).",
-          handle, federate_handle, time);
+          handle, federate_handle, time.getTime());
 
     NM_Set_Time_Regulating msg ;
     msg.exception = e_NO_EXCEPTION ;
@@ -1866,7 +1866,7 @@
     }
 
     D.Out(pdTerm, "Federation %d: Federate %d's new time is %f.",
-          handle, federate_handle, time);
+          handle, federate_handle, time.getTime());
 
     regulators.update(federate_handle, time);
 
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/RTIG/RTIG.cc certi/RTIG/RTIG.cc
--- certi.orig/RTIG/RTIG.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/RTIG/RTIG.cc	2008-12-13 04:03:39.000000000 +0100
@@ -205,7 +205,7 @@
 
       case NetworkMessage::SET_TIME_REGULATING:
         D.Out(pdTrace, "SetTimeRegulating du federe %u(date=%f).",
-              msg->federate, msg->getDate());
+              msg->federate, msg->getDate().getTime());
         auditServer.setLevel(8);
         processSetTimeRegulating(link, static_cast<NM_Set_Time_Regulating*>(msg));
         break ;
diff -Nru --exclude=CVS --exclude=CMakeFiles certi.orig/RTIG/RTIG_processing.cc certi/RTIG/RTIG_processing.cc
--- certi.orig/RTIG/RTIG_processing.cc	2008-12-07 11:39:03.000000000 +0100
+++ certi/RTIG/RTIG_processing.cc	2008-12-13 05:53:41.000000000 +0100
@@ -520,7 +520,7 @@
   G.Out(pdGendoc,"BEGIN ** SET TIME REGULATING **");
 
   if (msg->isRegulator()) {
-        auditServer << "ON at time " << msg->getDate();
+        auditServer << "ON at time " << msg->getDate().getTime();
 
         federations.createRegulator(msg->federation,
                                      msg->federate,
@@ -561,7 +561,7 @@
   G.Out(pdGendoc,"BEGIN ** SET TIME CONSTRAINED **");
 
   if (msg->isConstrained()) {
-        auditServer << "ON at time " << msg->getDate();
+        auditServer << "ON at time " << msg->getDate().getTime();
 
         federations.addConstrained(msg->federation,
                                     msg->federate);
@@ -597,7 +597,7 @@
 void
 RTIG::processMessageNull(NetworkMessage *msg)
 {
-    auditServer << "Date " << msg->getDate() ;
+    auditServer << "Date " << msg->getDate().getTime();
 
     // Catch all exceptions because RTIA does not expect an answer anyway.
     try {
@@ -919,7 +919,7 @@
     std::vector <AttributeValue_t> ValueArray ;
 
     auditServer << "ObjID = " << req->object
-		<< ", Date = " << req->getDate() ;
+		<< ", Date = " << req->getDate().getTime();
 
     // Get Value Array
     ValueArray = req->getAttribValueArray();
@@ -976,7 +976,7 @@
 
     // Building Value Array
     auditServer << "IntID = " << req->interactionClass
-		<< ", date = " << req->getDate() ;
+		<< ", date = " << req->getDate().getTime();
     values = req->getParamValueArray();
 
     if ( req->isDated() )
