### Eclipse Workspace Patch 1.0
#P certi
Index: include/RTI/Exception.h
===================================================================
RCS file: /sources/certi/certi/include/RTI/Exception.h,v
retrieving revision 1.2
diff -u -r1.2 Exception.h
--- include/RTI/Exception.h	31 May 2010 12:29:44 -0000	1.2
+++ include/RTI/Exception.h	13 Jul 2011 16:15:41 -0000
@@ -10,8 +10,8 @@
 #include <string>
 
 // The RTI::exception class follows the interface of the C++ standard exception
-// class.  The key method, what, returns a null terminated character string that
-// describes details of the exception that has occured.
+// class. The key method, what, returns a null terminated character string that
+// describes details of the exception that has occurred.
 
 namespace rti1516
 {
Index: libRTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libRTI/CMakeLists.txt,v
retrieving revision 1.20
diff -u -r1.20 CMakeLists.txt
--- libRTI/CMakeLists.txt	26 Apr 2011 11:07:38 -0000	1.20
+++ libRTI/CMakeLists.txt	13 Jul 2011 16:15:41 -0000
@@ -1,8 +1,10 @@
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libCERTI)
 
+SET(RTI1516_LIB_EXCEPTION_SRCS
+    RTI1516exception.cpp)
+
 SET(RTI1516_LIB_SRCS
   RTI1516ambassadorFactory.cpp
-  RTI1516exception.cpp
   RTI1516variableLengthData.cpp
   RTI1516variableLengthDataImplementation.h
   RTI1516ambassador.cpp
@@ -37,11 +39,12 @@
    ../include/RTI/VariableLengthData.h
 )
 
+SET(RTI_LIB_EXCEPTION_SRCS RTIexception.cc)
+
 SET(RTI_LIB_SRCS
   RTIambassador.cc
   RTIambPrivateRefs.cc
   RTIambPrivateRefs.hh
-  RTItypes.cc
   RTItypesImp.cc
   RTItypesImp.hh
   )
@@ -58,8 +61,11 @@
 
 #SOURCE_GROUP("RTI\\Header" FILES ${RTI_LIB_INCLUDE})
 
+add_library(RTIException ${RTI_LIB_EXCEPTION_SRCS})
+set_target_properties(RTIException PROPERTIES COMPILE_FLAGS "-DRTI_EXPORTS")
+
 ADD_LIBRARY(RTI ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
-TARGET_LINK_LIBRARIES(RTI CERTI)
+TARGET_LINK_LIBRARIES(RTI RTIException CERTI FedTime)
 
 IF (BUILD_LEGACY_LIBRTI)
     MESSAGE(STATUS "libRTI variant: CERTI legacy")
@@ -77,12 +83,11 @@
             DESTINATION lib)
 ENDIF (MINGW)
 
+add_library(RTI1516Exception ${RTI1516_LIB_EXCEPTION_SRCS})
+set_target_properties(RTI1516Exception PROPERTIES COMPILE_FLAGS "-DRTI_EXPORTS")
 
 ADD_LIBRARY(RTI1516 ${RTI1516_LIB_SRCS} ${RTI1516_LIB_INCLUDE})
-# Incorrect line
-#TARGET_LINK_LIBRARIES(RTI1516 CERTI)
-# Correct line
-TARGET_LINK_LIBRARIES(RTI1516 CERTI FedTime1516)
+TARGET_LINK_LIBRARIES(RTI1516 RTI1516Exception CERTI FedTime1516)
 
 MESSAGE(STATUS "libRTI variant: HLA 1516")
 SET_TARGET_PROPERTIES(RTI1516 PROPERTIES OUTPUT_NAME "RTI1516")
@@ -119,7 +124,7 @@
     ${FEDTIME_SRCS}
 )
 
-TARGET_LINK_LIBRARIES(FedTime RTI)
+TARGET_LINK_LIBRARIES(FedTime RTIException)
 
 SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
 IF (MINGW)
@@ -160,9 +165,7 @@
 )
 
 # Correct line
-TARGET_LINK_LIBRARIES(FedTime1516)
-# Incorrect line
-#TARGET_LINK_LIBRARIES(FedTime1516 RTI1516)
+TARGET_LINK_LIBRARIES(FedTime1516 RTI1516Exception)
 
 SET_TARGET_PROPERTIES(FedTime1516 PROPERTIES PROJECT_LABEL LibFedTime1516)
 SET_TARGET_PROPERTIES(FedTime1516 PROPERTIES COMPILE_FLAGS "-DBUILDING_FEDTIME -DRTI_DISABLE_WARNINGS")
@@ -188,7 +191,7 @@
 
 
 # Install rules for both libRTI-NG and libFedTime
-INSTALL(TARGETS RTI FedTime RTI1516 FedTime1516
+INSTALL(TARGETS RTI FedTime RTIException RTI1516 FedTime1516 RTI1516Exception
     RUNTIME DESTINATION bin
     LIBRARY DESTINATION lib
     ARCHIVE DESTINATION lib)
Index: libRTI/RTI1516ambTime.cpp
===================================================================
RCS file: /sources/certi/certi/libRTI/RTI1516ambTime.cpp,v
retrieving revision 1.1
diff -u -r1.1 RTI1516ambTime.cpp
--- libRTI/RTI1516ambTime.cpp	28 Apr 2010 18:48:30 -0000	1.1
+++ libRTI/RTI1516ambTime.cpp	13 Jul 2011 16:15:41 -0000
@@ -2,6 +2,8 @@
 #include <RTI/certiLogicalTimeInterval.h>
 #include <RTI/certiLogicalTimeFactory.h>
 
+/* FIXME Eric: this almost empty file is strange */
+
 //rti1516::LogicalTime::~LogicalTime()
 //{
 //}
Index: libRTI/RTIexception.cc
===================================================================
RCS file: libRTI/RTIexception.cc
diff -N libRTI/RTIexception.cc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ libRTI/RTIexception.cc	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,267 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2006  ONERA
+//
+// This program 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.
+//
+// This program 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: RTItypes.cc,v 1.6 2010/03/07 18:23:39 erk Exp $
+// ----------------------------------------------------------------------------
+
+#include "Exception.hh"
+#include "PrettyDebug.hh"
+#include <assert.h>
+#include <sstream>
+#include <cstdlib>
+#include <cstring>
+#include "RTI.hh"
+
+// static members for HLA Exceptions
+const char *RTI::ArrayIndexOutOfBounds::_ex = "ArrayIndexOutOfBounds" ;
+const char *RTI::AsynchronousDeliveryAlreadyDisabled::_ex = "AsynchronousDeliveryAlreadyDisabled" ;
+const char *RTI::AsynchronousDeliveryAlreadyEnabled::_ex = "AsynchronousDeliveryAlreadyEnabled" ;
+const char *RTI::AttributeAcquisitionWasNotRequested::_ex = "AttributeAcquisitionWasNotRequested" ;
+const char *RTI::AttributeAcquisitionWasNotCanceled::_ex = "AttributeAcquisitionWasNotCanceled" ;
+const char *RTI::AttributeAlreadyBeingAcquired::_ex = "AttributeAlreadyBeingAcquired" ;
+const char *RTI::AttributeAlreadyBeingDivested::_ex = "AttributeAlreadyBeingDivested" ;
+const char *RTI::AttributeAlreadyOwned::_ex = "AttributeAlreadyOwned" ;
+const char *RTI::AttributeDivestitureWasNotRequested::_ex = "AttributeDivestitureWasNotRequested" ;
+const char *RTI::AttributeNotDefined::_ex = "AttributeNotDefined" ;
+const char *RTI::AttributeNotKnown::_ex = "AttributeNotKnown" ;
+const char *RTI::AttributeNotOwned::_ex = "AttributeNotOwned" ;
+const char *RTI::AttributeNotPublished::_ex = "AttributeNotPublished" ;
+const char *RTI::ConcurrentAccessAttempted::_ex = "ConcurrentAccessAttempted" ;
+const char *RTI::CouldNotDiscover::_ex = "CouldNotDiscover" ;
+const char *RTI::CouldNotOpenFED::_ex = "CouldNotOpenFED" ;
+const char *RTI::CouldNotRestore::_ex = "CouldNotRestore" ;
+const char *RTI::DeletePrivilegeNotHeld::_ex = "DeletePrivilegeNotHeld" ;
+const char *RTI::DimensionNotDefined::_ex = "DimensionNotDefined" ;
+const char *RTI::EnableTimeConstrainedPending::_ex = "EnableTimeConstrainedPending" ;
+const char *RTI::EnableTimeConstrainedWasNotPending::_ex = "EnableTimeConstrainedWasNotPending" ;
+const char *RTI::EnableTimeRegulationPending::_ex = "EnableTimeRegulationPending" ;
+const char *RTI::EnableTimeRegulationWasNotPending::_ex = "EnableTimeRegulationWasNotPending" ;
+const char *RTI::ErrorReadingFED::_ex = "ErrorReadingFED" ;
+const char *RTI::EventNotKnown::_ex = "EventNotKnown" ;
+const char *RTI::FederateAlreadyExecutionMember::_ex = "FederateAlreadyExecutionMember" ;
+const char *RTI::FederateInternalError::_ex = "FederateInternalError" ;
+const char *RTI::FederateLoggingServiceCalls::_ex = "FederateLoggingServiceCalls" ;
+const char *RTI::FederateNotExecutionMember::_ex = "FederateNotExecutionMember" ;
+const char *RTI::FederateOwnsAttributes::_ex = "FederateOwnsAttributes" ;
+const char *RTI::FederateWasNotAskedToReleaseAttribute::_ex = "FederateWasNotAskedToReleaseAttribute" ;
+const char *RTI::FederatesCurrentlyJoined::_ex = "FederatesCurrentlyJoined" ;
+const char *RTI::FederationExecutionAlreadyExists::_ex = "FederationExecutionAlreadyExists" ;
+const char *RTI::FederationExecutionDoesNotExist::_ex = "FederationExecutionDoesNotExist" ;
+const char *RTI::FederationTimeAlreadyPassed::_ex = "FederationTimeAlreadyPassed" ;
+const char *RTI::HandleValuePairMaximumExceeded::_ex = "HandleValuePairMaximumExceeded" ;
+const char *RTI::InteractionClassNotDefined::_ex = "InteractionClassNotDefined" ;
+const char *RTI::InteractionClassNotKnown::_ex = "InteractionClassNotKnown" ;
+const char *RTI::InteractionClassNotPublished::_ex = "InteractionClassNotPublished" ;
+const char *RTI::InteractionClassNotSubscribed::_ex = "InteractionClassNotSubscribed" ;
+const char *RTI::InteractionParameterNotDefined::_ex = "InteractionParameterNotDefined" ;
+const char *RTI::InteractionParameterNotKnown::_ex = "InteractionParameterNotKnown" ;
+const char *RTI::InvalidExtents::_ex = "InvalidExtents" ;
+const char *RTI::InvalidFederationTime::_ex = "InvalidFederationTime" ;
+const char *RTI::InvalidHandleValuePairSetContext::_ex = "InvalidHandleValuePairSetContext" ;
+const char *RTI::InvalidLookahead::_ex = "InvalidLookahead" ;
+const char *RTI::InvalidOrderingHandle::_ex = "InvalidOrderingHandle" ;
+const char *RTI::InvalidRegionContext::_ex = "InvalidRegionContext" ;
+const char *RTI::InvalidResignAction::_ex = "InvalidResignAction" ;
+const char *RTI::InvalidRetractionHandle::_ex = "InvalidRetractionHandle" ;
+const char *RTI::InvalidTransportationHandle::_ex = "InvalidTransportationHandle" ;
+const char *RTI::MemoryExhausted::_ex = "MemoryExhausted" ;
+const char *RTI::NameNotFound::_ex = "NameNotFound" ;
+const char *RTI::ObjectClassNotDefined::_ex = "ObjectClassNotDefined" ;
+const char *RTI::ObjectClassNotKnown::_ex = "ObjectClassNotKnown" ;
+const char *RTI::ObjectClassNotPublished::_ex = "ObjectClassNotPublished" ;
+const char *RTI::ObjectClassNotSubscribed::_ex = "ObjectClassNotSubscribed" ;
+const char *RTI::ObjectNotKnown::_ex = "ObjectNotKnown" ;
+const char *RTI::ObjectAlreadyRegistered::_ex = "ObjectAlreadyRegistered" ;
+const char *RTI::OwnershipAcquisitionPending::_ex = "OwnershipAcquisitionPending" ;
+const char *RTI::RegionInUse::_ex = "RegionInUse" ;
+const char *RTI::RegionNotKnown::_ex = "RegionNotKnown" ;
+const char *RTI::RestoreInProgress::_ex = "RestoreInProgress" ;
+const char *RTI::RestoreNotRequested::_ex = "RestoreNotRequested" ;
+const char *RTI::RTIinternalError::_ex = "RTIinternalError" ;
+const char *RTI::SpaceNotDefined::_ex = "SpaceNotDefined" ;
+const char *RTI::SaveInProgress::_ex = "SaveInProgress" ;
+const char *RTI::SaveNotInitiated::_ex = "SaveNotInitiated" ;
+const char *RTI::SpecifiedSaveLabelDoesNotExist::_ex = "SpecifiedSaveLabelDoesNotExist" ;
+const char *RTI::SynchronizationPointLabelWasNotAnnounced::_ex = "SynchronizationPointLabelWasNotAnnounced" ;
+const char *RTI::TimeAdvanceAlreadyInProgress::_ex = "TimeAdvanceAlreadyInProgress" ;
+const char *RTI::TimeAdvanceWasNotInProgress::_ex = "TimeAdvanceWasNotInProgress" ;
+const char *RTI::TimeConstrainedAlreadyEnabled::_ex = "TimeConstrainedAlreadyEnabled" ;
+const char *RTI::TimeConstrainedWasNotEnabled::_ex = "TimeConstrainedWasNotEnabled" ;
+const char *RTI::TimeRegulationAlreadyEnabled::_ex = "TimeRegulationAlreadyEnabled" ;
+const char *RTI::TimeRegulationWasNotEnabled::_ex = "TimeRegulationWasNotEnabled" ;
+const char *RTI::UnableToPerformSave::_ex = "UnableToPerformSave" ;
+const char *RTI::ValueCountExceeded::_ex = "ValueCountExceeded" ;
+const char *RTI::ValueLengthExceeded::_ex = "ValueLengthExceeded" ;
+
+// TypeException managing (how to obtain TypeException from Exception name ?)
+long RTI::ArrayIndexOutOfBounds::type = certi::e_ArrayIndexOutOfBounds ;
+long RTI::AsynchronousDeliveryAlreadyDisabled::type = certi::e_AsynchronousDeliveryAlreadyDisabled ;
+long RTI::AsynchronousDeliveryAlreadyEnabled::type = certi::e_AsynchronousDeliveryAlreadyEnabled ;
+long RTI::AttributeAcquisitionWasNotRequested::type = certi::e_AttributeAcquisitionWasNotRequested ;
+long RTI::AttributeAcquisitionWasNotCanceled::type = certi::e_AttributeAcquisitionWasNotCanceled ;
+long RTI::AttributeAlreadyBeingAcquired::type = certi::e_AttributeAlreadyBeingAcquired ;
+long RTI::AttributeAlreadyBeingDivested::type = certi::e_AttributeAlreadyBeingDivested ;
+long RTI::AttributeAlreadyOwned::type = certi::e_AttributeAlreadyOwned ;
+long RTI::AttributeDivestitureWasNotRequested::type = certi::e_AttributeDivestitureWasNotRequested ;
+long RTI::AttributeNotDefined::type = certi::e_AttributeNotDefined ;
+long RTI::AttributeNotKnown::type = certi::e_AttributeNotKnown ;
+long RTI::AttributeNotOwned::type = certi::e_AttributeNotOwned ;
+long RTI::AttributeNotPublished::type = certi::e_AttributeNotPublished ;
+long RTI::ConcurrentAccessAttempted::type = certi::e_ConcurrentAccessAttempted ;
+long RTI::CouldNotDiscover::type = certi::e_CouldNotDiscover ;
+long RTI::CouldNotOpenFED::type = certi::e_CouldNotOpenFED ;
+long RTI::CouldNotRestore::type = certi::e_CouldNotRestore ;
+long RTI::DeletePrivilegeNotHeld::type = certi::e_DeletePrivilegeNotHeld ;
+long RTI::DimensionNotDefined::type = certi::e_DimensionNotDefined ;
+long RTI::EnableTimeConstrainedPending::type = certi::e_EnableTimeConstrainedPending ;
+long RTI::EnableTimeConstrainedWasNotPending::type = certi::e_EnableTimeConstrainedWasNotPending ;
+long RTI::EnableTimeRegulationPending::type = certi::e_EnableTimeRegulationPending ;
+long RTI::EnableTimeRegulationWasNotPending::type = certi::e_EnableTimeRegulationWasNotPending ;
+long RTI::ErrorReadingFED::type = certi::e_ErrorReadingFED ;
+long RTI::EventNotKnown::type = certi::e_EventNotKnown ;
+long RTI::FederateAlreadyExecutionMember::type = certi::e_FederateAlreadyExecutionMember ;
+long RTI::FederateInternalError::type = certi::e_FederateInternalError ;
+long RTI::FederateLoggingServiceCalls::type = certi::e_FederateLoggingServiceCalls ;
+long RTI::FederateNotExecutionMember::type = certi::e_FederateNotExecutionMember ;
+long RTI::FederateOwnsAttributes::type = certi::e_FederateOwnsAttributes ;
+long RTI::FederateWasNotAskedToReleaseAttribute::type = certi::e_FederateWasNotAskedToReleaseAttribute ;
+long RTI::FederatesCurrentlyJoined::type = certi::e_FederatesCurrentlyJoined ;
+long RTI::FederationExecutionAlreadyExists::type = certi::e_FederationExecutionAlreadyExists ;
+long RTI::FederationExecutionDoesNotExist::type = certi::e_FederationExecutionDoesNotExist ;
+long RTI::FederationTimeAlreadyPassed::type = certi::e_FederationTimeAlreadyPassed ;
+long RTI::HandleValuePairMaximumExceeded::type = certi::e_HandleValuePairMaximumExceeded ;
+long RTI::InteractionClassNotDefined::type = certi::e_InteractionClassNotDefined ;
+long RTI::InteractionClassNotKnown::type = certi::e_InteractionClassNotKnown ;
+long RTI::InteractionClassNotPublished::type = certi::e_InteractionClassNotPublished ;
+long RTI::InteractionClassNotSubscribed::type = certi::e_InteractionClassNotSubscribed ;
+long RTI::InteractionParameterNotDefined::type = certi::e_InteractionParameterNotDefined ;
+long RTI::InteractionParameterNotKnown::type = certi::e_InteractionParameterNotKnown ;
+long RTI::InvalidExtents::type = certi::e_InvalidExtents ;
+long RTI::InvalidFederationTime::type = certi::e_InvalidFederationTime ;
+long RTI::InvalidHandleValuePairSetContext::type = certi::e_InvalidHandleValuePairSetContext ;
+long RTI::InvalidLookahead::type = certi::e_InvalidLookahead ;
+long RTI::InvalidOrderingHandle::type = certi::e_InvalidOrderingHandle ;
+long RTI::InvalidRegionContext::type = certi::e_InvalidRegionContext ;
+long RTI::InvalidResignAction::type = certi::e_InvalidResignAction ;
+long RTI::InvalidRetractionHandle::type = certi::e_InvalidRetractionHandle ;
+long RTI::InvalidTransportationHandle::type = certi::e_InvalidTransportationHandle ;
+long RTI::MemoryExhausted::type = certi::e_MemoryExhausted ;
+long RTI::NameNotFound::type = certi::e_NameNotFound ;
+long RTI::ObjectClassNotDefined::type = certi::e_ObjectClassNotDefined ;
+long RTI::ObjectClassNotKnown::type = certi::e_ObjectClassNotKnown ;
+long RTI::ObjectClassNotPublished::type = certi::e_ObjectClassNotPublished ;
+long RTI::ObjectClassNotSubscribed::type = certi::e_ObjectClassNotSubscribed ;
+long RTI::ObjectNotKnown::type = certi::e_ObjectNotKnown ;
+long RTI::ObjectAlreadyRegistered::type = certi::e_ObjectAlreadyRegistered ;
+long RTI::OwnershipAcquisitionPending::type = certi::e_OwnershipAcquisitionPending ;
+long RTI::RegionInUse::type = certi::e_RegionInUse ;
+long RTI::RegionNotKnown::type = certi::e_RegionNotKnown ;
+long RTI::RestoreInProgress::type = certi::e_RestoreInProgress ;
+long RTI::RestoreNotRequested::type = certi::e_RestoreNotRequested ;
+long RTI::RTIinternalError::type = certi::e_RTIinternalError ;
+long RTI::SpaceNotDefined::type = certi::e_SpaceNotDefined ;
+long RTI::SaveInProgress::type = certi::e_SaveInProgress ;
+long RTI::SaveNotInitiated::type = certi::e_SaveNotInitiated ;
+long RTI::SpecifiedSaveLabelDoesNotExist::type = certi::e_SpecifiedSaveLabelDoesNotExist ;
+long RTI::SynchronizationPointLabelWasNotAnnounced::type = certi::e_SynchronizationPointLabelWasNotAnnounced ;
+long RTI::TimeAdvanceAlreadyInProgress::type = certi::e_TimeAdvanceAlreadyInProgress ;
+long RTI::TimeAdvanceWasNotInProgress::type = certi::e_TimeAdvanceWasNotInProgress ;
+long RTI::TimeConstrainedAlreadyEnabled::type = certi::e_TimeConstrainedAlreadyEnabled ;
+long RTI::TimeConstrainedWasNotEnabled::type = certi::e_TimeConstrainedWasNotEnabled ;
+long RTI::TimeRegulationAlreadyEnabled::type = certi::e_TimeRegulationAlreadyEnabled ;
+long RTI::TimeRegulationWasNotEnabled::type = certi::e_TimeRegulationWasNotEnabled ;
+long RTI::UnableToPerformSave::type = certi::e_UnableToPerformSave ;
+long RTI::ValueCountExceeded::type = certi::e_ValueCountExceeded ;
+long RTI::ValueLengthExceeded::type = certi::e_ValueLengthExceeded ;
+
+static PrettyDebug PD_RTIException("RTI_EXCEPTION",__FILE__);
+
+RTI::Exception::~Exception()
+{
+    if (NULL!=_reason) {
+        free(_reason);
+    }
+}
+
+RTI::Exception::Exception(const char *reason)
+{
+    _reason = (reason == NULL)?NULL:strdup(reason);
+    _serial = 0 ;
+}
+
+RTI::Exception::Exception(ULong serial, const char *reason)
+{
+    _serial = serial ;
+    _reason = (reason == NULL)?NULL:strdup(reason);
+}
+
+
+RTI::Exception::Exception(const Exception &toCopy)
+{
+    _serial = toCopy._serial ;
+    _reason = ( toCopy._reason== NULL)?NULL:strdup(toCopy._reason) ;
+    _name = toCopy._name ;
+}
+
+RTI::Exception& RTI::Exception::operator=(const Exception &toCopy)
+{
+    _serial = toCopy._serial ;
+    _reason = (toCopy._reason == NULL)?NULL:strdup(toCopy._reason) ;
+    _name = toCopy._name ;
+    return *this ;
+}
+
+const std::string RTI::Exception::displayMe() const
+{
+    std::stringstream msg;
+
+    msg << "RTI::Exception [";
+    if (NULL!=_name) {
+        msg <<_name;
+    } else {
+        msg<<"<noname>";
+    }
+    msg <<",0x"<<std::hex<<_serial<<"]";
+    msg << " - reason=";
+    if (NULL !=_reason) {
+        msg << _reason;
+    } else {
+        msg << "<noreason>";
+    }
+    msg << std::endl;
+    msg << std::flush;
+
+    Debug(PD_RTIException, pdExcept) << msg.str();
+    return msg.str();
+}
+
+RTI_STD::ostream &
+operator<<(RTI_STD::ostream &os, RTI::Exception const &ex)
+{
+    // FIXME
+    return os << ex.displayMe();
+}
+
+RTI_STD::ostream &
+operator<<(RTI_STD::ostream &os, RTI::Exception *ex)
+{
+    assert(ex);
+    return os<<(*ex);
+}
+
+// $Id: RTItypes.cc,v 1.6 2010/03/07 18:23:39 erk Exp $
Index: libRTI/RTItypes.cc
===================================================================
RCS file: libRTI/RTItypes.cc
diff -N libRTI/RTItypes.cc
--- libRTI/RTItypes.cc	7 Mar 2010 18:23:39 -0000	1.6
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,267 +0,0 @@
-// ----------------------------------------------------------------------------
-// CERTI - HLA RunTime Infrastructure
-// Copyright (C) 2002-2006  ONERA
-//
-// This program 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.
-//
-// This program 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: RTItypes.cc,v 1.6 2010/03/07 18:23:39 erk Exp $
-// ----------------------------------------------------------------------------
-
-#include "Exception.hh"
-#include "PrettyDebug.hh"
-#include <assert.h>
-#include <sstream>
-#include <cstdlib>
-#include <cstring>
-#include "RTI.hh"
-
-// static members for HLA Exceptions
-const char *RTI::ArrayIndexOutOfBounds::_ex = "ArrayIndexOutOfBounds" ;
-const char *RTI::AsynchronousDeliveryAlreadyDisabled::_ex = "AsynchronousDeliveryAlreadyDisabled" ;
-const char *RTI::AsynchronousDeliveryAlreadyEnabled::_ex = "AsynchronousDeliveryAlreadyEnabled" ;
-const char *RTI::AttributeAcquisitionWasNotRequested::_ex = "AttributeAcquisitionWasNotRequested" ;
-const char *RTI::AttributeAcquisitionWasNotCanceled::_ex = "AttributeAcquisitionWasNotCanceled" ;
-const char *RTI::AttributeAlreadyBeingAcquired::_ex = "AttributeAlreadyBeingAcquired" ;
-const char *RTI::AttributeAlreadyBeingDivested::_ex = "AttributeAlreadyBeingDivested" ;
-const char *RTI::AttributeAlreadyOwned::_ex = "AttributeAlreadyOwned" ;
-const char *RTI::AttributeDivestitureWasNotRequested::_ex = "AttributeDivestitureWasNotRequested" ;
-const char *RTI::AttributeNotDefined::_ex = "AttributeNotDefined" ;
-const char *RTI::AttributeNotKnown::_ex = "AttributeNotKnown" ;
-const char *RTI::AttributeNotOwned::_ex = "AttributeNotOwned" ;
-const char *RTI::AttributeNotPublished::_ex = "AttributeNotPublished" ;
-const char *RTI::ConcurrentAccessAttempted::_ex = "ConcurrentAccessAttempted" ;
-const char *RTI::CouldNotDiscover::_ex = "CouldNotDiscover" ;
-const char *RTI::CouldNotOpenFED::_ex = "CouldNotOpenFED" ;
-const char *RTI::CouldNotRestore::_ex = "CouldNotRestore" ;
-const char *RTI::DeletePrivilegeNotHeld::_ex = "DeletePrivilegeNotHeld" ;
-const char *RTI::DimensionNotDefined::_ex = "DimensionNotDefined" ;
-const char *RTI::EnableTimeConstrainedPending::_ex = "EnableTimeConstrainedPending" ;
-const char *RTI::EnableTimeConstrainedWasNotPending::_ex = "EnableTimeConstrainedWasNotPending" ;
-const char *RTI::EnableTimeRegulationPending::_ex = "EnableTimeRegulationPending" ;
-const char *RTI::EnableTimeRegulationWasNotPending::_ex = "EnableTimeRegulationWasNotPending" ;
-const char *RTI::ErrorReadingFED::_ex = "ErrorReadingFED" ;
-const char *RTI::EventNotKnown::_ex = "EventNotKnown" ;
-const char *RTI::FederateAlreadyExecutionMember::_ex = "FederateAlreadyExecutionMember" ;
-const char *RTI::FederateInternalError::_ex = "FederateInternalError" ;
-const char *RTI::FederateLoggingServiceCalls::_ex = "FederateLoggingServiceCalls" ;
-const char *RTI::FederateNotExecutionMember::_ex = "FederateNotExecutionMember" ;
-const char *RTI::FederateOwnsAttributes::_ex = "FederateOwnsAttributes" ;
-const char *RTI::FederateWasNotAskedToReleaseAttribute::_ex = "FederateWasNotAskedToReleaseAttribute" ;
-const char *RTI::FederatesCurrentlyJoined::_ex = "FederatesCurrentlyJoined" ;
-const char *RTI::FederationExecutionAlreadyExists::_ex = "FederationExecutionAlreadyExists" ;
-const char *RTI::FederationExecutionDoesNotExist::_ex = "FederationExecutionDoesNotExist" ;
-const char *RTI::FederationTimeAlreadyPassed::_ex = "FederationTimeAlreadyPassed" ;
-const char *RTI::HandleValuePairMaximumExceeded::_ex = "HandleValuePairMaximumExceeded" ;
-const char *RTI::InteractionClassNotDefined::_ex = "InteractionClassNotDefined" ;
-const char *RTI::InteractionClassNotKnown::_ex = "InteractionClassNotKnown" ;
-const char *RTI::InteractionClassNotPublished::_ex = "InteractionClassNotPublished" ;
-const char *RTI::InteractionClassNotSubscribed::_ex = "InteractionClassNotSubscribed" ;
-const char *RTI::InteractionParameterNotDefined::_ex = "InteractionParameterNotDefined" ;
-const char *RTI::InteractionParameterNotKnown::_ex = "InteractionParameterNotKnown" ;
-const char *RTI::InvalidExtents::_ex = "InvalidExtents" ;
-const char *RTI::InvalidFederationTime::_ex = "InvalidFederationTime" ;
-const char *RTI::InvalidHandleValuePairSetContext::_ex = "InvalidHandleValuePairSetContext" ;
-const char *RTI::InvalidLookahead::_ex = "InvalidLookahead" ;
-const char *RTI::InvalidOrderingHandle::_ex = "InvalidOrderingHandle" ;
-const char *RTI::InvalidRegionContext::_ex = "InvalidRegionContext" ;
-const char *RTI::InvalidResignAction::_ex = "InvalidResignAction" ;
-const char *RTI::InvalidRetractionHandle::_ex = "InvalidRetractionHandle" ;
-const char *RTI::InvalidTransportationHandle::_ex = "InvalidTransportationHandle" ;
-const char *RTI::MemoryExhausted::_ex = "MemoryExhausted" ;
-const char *RTI::NameNotFound::_ex = "NameNotFound" ;
-const char *RTI::ObjectClassNotDefined::_ex = "ObjectClassNotDefined" ;
-const char *RTI::ObjectClassNotKnown::_ex = "ObjectClassNotKnown" ;
-const char *RTI::ObjectClassNotPublished::_ex = "ObjectClassNotPublished" ;
-const char *RTI::ObjectClassNotSubscribed::_ex = "ObjectClassNotSubscribed" ;
-const char *RTI::ObjectNotKnown::_ex = "ObjectNotKnown" ;
-const char *RTI::ObjectAlreadyRegistered::_ex = "ObjectAlreadyRegistered" ;
-const char *RTI::OwnershipAcquisitionPending::_ex = "OwnershipAcquisitionPending" ;
-const char *RTI::RegionInUse::_ex = "RegionInUse" ;
-const char *RTI::RegionNotKnown::_ex = "RegionNotKnown" ;
-const char *RTI::RestoreInProgress::_ex = "RestoreInProgress" ;
-const char *RTI::RestoreNotRequested::_ex = "RestoreNotRequested" ;
-const char *RTI::RTIinternalError::_ex = "RTIinternalError" ;
-const char *RTI::SpaceNotDefined::_ex = "SpaceNotDefined" ;
-const char *RTI::SaveInProgress::_ex = "SaveInProgress" ;
-const char *RTI::SaveNotInitiated::_ex = "SaveNotInitiated" ;
-const char *RTI::SpecifiedSaveLabelDoesNotExist::_ex = "SpecifiedSaveLabelDoesNotExist" ;
-const char *RTI::SynchronizationPointLabelWasNotAnnounced::_ex = "SynchronizationPointLabelWasNotAnnounced" ;
-const char *RTI::TimeAdvanceAlreadyInProgress::_ex = "TimeAdvanceAlreadyInProgress" ;
-const char *RTI::TimeAdvanceWasNotInProgress::_ex = "TimeAdvanceWasNotInProgress" ;
-const char *RTI::TimeConstrainedAlreadyEnabled::_ex = "TimeConstrainedAlreadyEnabled" ;
-const char *RTI::TimeConstrainedWasNotEnabled::_ex = "TimeConstrainedWasNotEnabled" ;
-const char *RTI::TimeRegulationAlreadyEnabled::_ex = "TimeRegulationAlreadyEnabled" ;
-const char *RTI::TimeRegulationWasNotEnabled::_ex = "TimeRegulationWasNotEnabled" ;
-const char *RTI::UnableToPerformSave::_ex = "UnableToPerformSave" ;
-const char *RTI::ValueCountExceeded::_ex = "ValueCountExceeded" ;
-const char *RTI::ValueLengthExceeded::_ex = "ValueLengthExceeded" ;
-
-// TypeException managing (how to obtain TypeException from Exception name ?)
-long RTI::ArrayIndexOutOfBounds::type = certi::e_ArrayIndexOutOfBounds ;
-long RTI::AsynchronousDeliveryAlreadyDisabled::type = certi::e_AsynchronousDeliveryAlreadyDisabled ;
-long RTI::AsynchronousDeliveryAlreadyEnabled::type = certi::e_AsynchronousDeliveryAlreadyEnabled ;
-long RTI::AttributeAcquisitionWasNotRequested::type = certi::e_AttributeAcquisitionWasNotRequested ;
-long RTI::AttributeAcquisitionWasNotCanceled::type = certi::e_AttributeAcquisitionWasNotCanceled ;
-long RTI::AttributeAlreadyBeingAcquired::type = certi::e_AttributeAlreadyBeingAcquired ;
-long RTI::AttributeAlreadyBeingDivested::type = certi::e_AttributeAlreadyBeingDivested ;
-long RTI::AttributeAlreadyOwned::type = certi::e_AttributeAlreadyOwned ;
-long RTI::AttributeDivestitureWasNotRequested::type = certi::e_AttributeDivestitureWasNotRequested ;
-long RTI::AttributeNotDefined::type = certi::e_AttributeNotDefined ;
-long RTI::AttributeNotKnown::type = certi::e_AttributeNotKnown ;
-long RTI::AttributeNotOwned::type = certi::e_AttributeNotOwned ;
-long RTI::AttributeNotPublished::type = certi::e_AttributeNotPublished ;
-long RTI::ConcurrentAccessAttempted::type = certi::e_ConcurrentAccessAttempted ;
-long RTI::CouldNotDiscover::type = certi::e_CouldNotDiscover ;
-long RTI::CouldNotOpenFED::type = certi::e_CouldNotOpenFED ;
-long RTI::CouldNotRestore::type = certi::e_CouldNotRestore ;
-long RTI::DeletePrivilegeNotHeld::type = certi::e_DeletePrivilegeNotHeld ;
-long RTI::DimensionNotDefined::type = certi::e_DimensionNotDefined ;
-long RTI::EnableTimeConstrainedPending::type = certi::e_EnableTimeConstrainedPending ;
-long RTI::EnableTimeConstrainedWasNotPending::type = certi::e_EnableTimeConstrainedWasNotPending ;
-long RTI::EnableTimeRegulationPending::type = certi::e_EnableTimeRegulationPending ;
-long RTI::EnableTimeRegulationWasNotPending::type = certi::e_EnableTimeRegulationWasNotPending ;
-long RTI::ErrorReadingFED::type = certi::e_ErrorReadingFED ;
-long RTI::EventNotKnown::type = certi::e_EventNotKnown ;
-long RTI::FederateAlreadyExecutionMember::type = certi::e_FederateAlreadyExecutionMember ;
-long RTI::FederateInternalError::type = certi::e_FederateInternalError ;
-long RTI::FederateLoggingServiceCalls::type = certi::e_FederateLoggingServiceCalls ;
-long RTI::FederateNotExecutionMember::type = certi::e_FederateNotExecutionMember ;
-long RTI::FederateOwnsAttributes::type = certi::e_FederateOwnsAttributes ;
-long RTI::FederateWasNotAskedToReleaseAttribute::type = certi::e_FederateWasNotAskedToReleaseAttribute ;
-long RTI::FederatesCurrentlyJoined::type = certi::e_FederatesCurrentlyJoined ;
-long RTI::FederationExecutionAlreadyExists::type = certi::e_FederationExecutionAlreadyExists ;
-long RTI::FederationExecutionDoesNotExist::type = certi::e_FederationExecutionDoesNotExist ;
-long RTI::FederationTimeAlreadyPassed::type = certi::e_FederationTimeAlreadyPassed ;
-long RTI::HandleValuePairMaximumExceeded::type = certi::e_HandleValuePairMaximumExceeded ;
-long RTI::InteractionClassNotDefined::type = certi::e_InteractionClassNotDefined ;
-long RTI::InteractionClassNotKnown::type = certi::e_InteractionClassNotKnown ;
-long RTI::InteractionClassNotPublished::type = certi::e_InteractionClassNotPublished ;
-long RTI::InteractionClassNotSubscribed::type = certi::e_InteractionClassNotSubscribed ;
-long RTI::InteractionParameterNotDefined::type = certi::e_InteractionParameterNotDefined ;
-long RTI::InteractionParameterNotKnown::type = certi::e_InteractionParameterNotKnown ;
-long RTI::InvalidExtents::type = certi::e_InvalidExtents ;
-long RTI::InvalidFederationTime::type = certi::e_InvalidFederationTime ;
-long RTI::InvalidHandleValuePairSetContext::type = certi::e_InvalidHandleValuePairSetContext ;
-long RTI::InvalidLookahead::type = certi::e_InvalidLookahead ;
-long RTI::InvalidOrderingHandle::type = certi::e_InvalidOrderingHandle ;
-long RTI::InvalidRegionContext::type = certi::e_InvalidRegionContext ;
-long RTI::InvalidResignAction::type = certi::e_InvalidResignAction ;
-long RTI::InvalidRetractionHandle::type = certi::e_InvalidRetractionHandle ;
-long RTI::InvalidTransportationHandle::type = certi::e_InvalidTransportationHandle ;
-long RTI::MemoryExhausted::type = certi::e_MemoryExhausted ;
-long RTI::NameNotFound::type = certi::e_NameNotFound ;
-long RTI::ObjectClassNotDefined::type = certi::e_ObjectClassNotDefined ;
-long RTI::ObjectClassNotKnown::type = certi::e_ObjectClassNotKnown ;
-long RTI::ObjectClassNotPublished::type = certi::e_ObjectClassNotPublished ;
-long RTI::ObjectClassNotSubscribed::type = certi::e_ObjectClassNotSubscribed ;
-long RTI::ObjectNotKnown::type = certi::e_ObjectNotKnown ;
-long RTI::ObjectAlreadyRegistered::type = certi::e_ObjectAlreadyRegistered ;
-long RTI::OwnershipAcquisitionPending::type = certi::e_OwnershipAcquisitionPending ;
-long RTI::RegionInUse::type = certi::e_RegionInUse ;
-long RTI::RegionNotKnown::type = certi::e_RegionNotKnown ;
-long RTI::RestoreInProgress::type = certi::e_RestoreInProgress ;
-long RTI::RestoreNotRequested::type = certi::e_RestoreNotRequested ;
-long RTI::RTIinternalError::type = certi::e_RTIinternalError ;
-long RTI::SpaceNotDefined::type = certi::e_SpaceNotDefined ;
-long RTI::SaveInProgress::type = certi::e_SaveInProgress ;
-long RTI::SaveNotInitiated::type = certi::e_SaveNotInitiated ;
-long RTI::SpecifiedSaveLabelDoesNotExist::type = certi::e_SpecifiedSaveLabelDoesNotExist ;
-long RTI::SynchronizationPointLabelWasNotAnnounced::type = certi::e_SynchronizationPointLabelWasNotAnnounced ;
-long RTI::TimeAdvanceAlreadyInProgress::type = certi::e_TimeAdvanceAlreadyInProgress ;
-long RTI::TimeAdvanceWasNotInProgress::type = certi::e_TimeAdvanceWasNotInProgress ;
-long RTI::TimeConstrainedAlreadyEnabled::type = certi::e_TimeConstrainedAlreadyEnabled ;
-long RTI::TimeConstrainedWasNotEnabled::type = certi::e_TimeConstrainedWasNotEnabled ;
-long RTI::TimeRegulationAlreadyEnabled::type = certi::e_TimeRegulationAlreadyEnabled ;
-long RTI::TimeRegulationWasNotEnabled::type = certi::e_TimeRegulationWasNotEnabled ;
-long RTI::UnableToPerformSave::type = certi::e_UnableToPerformSave ;
-long RTI::ValueCountExceeded::type = certi::e_ValueCountExceeded ;
-long RTI::ValueLengthExceeded::type = certi::e_ValueLengthExceeded ;
-
-static PrettyDebug PD_RTIException("RTI_EXCEPTION",__FILE__);
-
-RTI::Exception::~Exception()
-{
-    if (NULL!=_reason) {
-        free(_reason);
-    }
-}
-
-RTI::Exception::Exception(const char *reason)
-{
-    _reason = (reason == NULL)?NULL:strdup(reason);
-    _serial = 0 ;
-}
-
-RTI::Exception::Exception(ULong serial, const char *reason)
-{
-    _serial = serial ;
-    _reason = (reason == NULL)?NULL:strdup(reason);
-}
-
-
-RTI::Exception::Exception(const Exception &toCopy)
-{
-    _serial = toCopy._serial ;
-    _reason = ( toCopy._reason== NULL)?NULL:strdup(toCopy._reason) ;
-    _name = toCopy._name ;
-}
-
-RTI::Exception& RTI::Exception::operator=(const Exception &toCopy)
-{
-    _serial = toCopy._serial ;
-    _reason = (toCopy._reason == NULL)?NULL:strdup(toCopy._reason) ;
-    _name = toCopy._name ;
-    return *this ;
-}
-
-const std::string RTI::Exception::displayMe() const
-{
-    std::stringstream msg;
-
-    msg << "RTI::Exception [";
-    if (NULL!=_name) {
-        msg <<_name;
-    } else {
-        msg<<"<noname>";
-    }
-    msg <<",0x"<<std::hex<<_serial<<"]";
-    msg << " - reason=";
-    if (NULL !=_reason) {
-        msg << _reason;
-    } else {
-        msg << "<noreason>";
-    }
-    msg << std::endl;
-    msg << std::flush;
-
-    Debug(PD_RTIException, pdExcept) << msg.str();
-    return msg.str();
-}
-
-RTI_STD::ostream &
-operator<<(RTI_STD::ostream &os, RTI::Exception const &ex)
-{
-    // FIXME
-    return os << ex.displayMe();
-}
-
-RTI_STD::ostream &
-operator<<(RTI_STD::ostream &os, RTI::Exception *ex)
-{
-    assert(ex);
-    return os<<(*ex);
-}
-
-// $Id: RTItypes.cc,v 1.6 2010/03/07 18:23:39 erk Exp $
Index: scripts/FindRTI.cmake
===================================================================
RCS file: /sources/certi/certi/scripts/FindRTI.cmake,v
retrieving revision 1.13
diff -u -r1.13 FindRTI.cmake
--- scripts/FindRTI.cmake	3 May 2010 17:14:44 -0000	1.13
+++ scripts/FindRTI.cmake	13 Jul 2011 16:15:44 -0000
@@ -61,6 +61,18 @@
   PATH_SUFFIXES lib Debug
   DOC "The HLA 1.3 RTI Debug Library")
 
+FIND_LIBRARY(RTIEXCEPTION_LIBRARY
+  NAMES RTIException
+  PATHS ${RTI_POSSIBLE_DIRS}
+  PATH_SUFFIXES lib Release
+  DOC "The HLA 1.3 RTI Exception Library")
+    
+FIND_LIBRARY(RTIEXCEPTION_LIBRARY_DEBUG
+  NAMES RTIExceptiond
+  PATHS ${RTI_POSSIBLE_DIRS}
+  PATH_SUFFIXES lib Debug
+  DOC "The HLA 1.3 RTI Exception Debug Library")
+
 # Handle IEEE 1516 
 FIND_LIBRARY(RTI1516_LIBRARY
   NAMES RTI1516
@@ -72,7 +84,19 @@
   NAMES RTI1516d
   PATHS ${RTI_POSSIBLE_DIRS}
   PATH_SUFFIXES lib Debug
-  DOC "The IEEE 1516 RTI Debug Library")  
+  DOC "The IEEE 1516 RTI Debug Library")
+  
+FIND_LIBRARY(RTI1516EXCEPTION_LIBRARY
+  NAMES RTI1516Exception
+  PATHS ${RTI_POSSIBLE_DIRS}
+  PATH_SUFFIXES lib Release
+  DOC "The IEEE 1516 RTI Exception Library")
+    
+FIND_LIBRARY(RTI1516EXCEPTION_LIBRARY_DEBUG
+  NAMES RTI1516Exceptiond
+  PATHS ${RTI_POSSIBLE_DIRS}
+  PATH_SUFFIXES lib Debug
+  DOC "The IEEE 1516 RTI Exception Debug Library")
 
 MACRO(RTI_SET_LIBRARIES VAR_LIBRARIES VAR_RELEASELIB VAR_DEBUGLIB MESSAGE)
   IF(${VAR_RELEASELIB} AND ${VAR_DEBUGLIB})
@@ -96,7 +120,13 @@
 
 RTI_SET_LIBRARIES(
   RTI1516_LIBRARIES RTI1516_LIBRARY RTI1516_LIBRARY_DEBUG "IEEE 1516 RTI library")
+  
+RTI_SET_LIBRARIES(
+  RTIEXCEPTION_LIBRARIES RTIEXCEPTION_LIBRARY RTIEXCEPTION_LIBRARY_DEBUG "HLA 1.3 RTIException library")
 
+RTI_SET_LIBRARIES(
+  RTI1516EXCEPTION_LIBRARIES RTI1516EXCEPTION_LIBRARY RTI1516EXCEPTION_LIBRARY_DEBUG "IEEE 1516 RTIException library")
+  
 FIND_LIBRARY(RTI_FEDTIME_LIBRARY
   NAMES FedTime
   PATHS ${RTI_POSSIBLE_DIRS}
@@ -197,9 +227,9 @@
 ENDIF (RTI13_FOUND OR RTI1516_FOUND)  
 
 SET(RTI_LIBRARIES
-  ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARIES})
+  ${RTI_LIBRARIES} ${RTI_FEDTIME_LIBRARIES} ${RTIEXCEPTION_LIBRARIES})
 
 SET(RTI1516_LIBRARIES
-  ${RTI1516_LIBRARIES} ${RTI1516_FEDTIME_LIBRARIES})
+  ${RTI1516_LIBRARIES} ${RTI1516_FEDTIME_LIBRARIES} ${RTI1516EXCEPTION_LIBRARIES})
 
 # $Id: FindRTI.cmake,v 1.13 2010/05/03 17:14:44 erk Exp $
