[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi RTIA/CMakeLists.txt RTIG/CMakeLists.txt l...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi RTIA/CMakeLists.txt RTIG/CMakeLists.txt l... |
Date: |
Tue, 25 Nov 2008 16:32:14 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Petr Gotthard <gotthardp> 08/11/25 16:32:14
Modified files:
RTIA : CMakeLists.txt
RTIG : CMakeLists.txt
libCERTI : CMakeLists.txt Exception.cc GAV_aux.cc
libRTI : CMakeLists.txt
test/Billard : CMakeLists.txt
test/utility : CMakeLists.txt
Added files:
libRTI : RTItypes.cc
Log message:
Bug #22881: Better DLC compliancy.
- Symbols in RTI namespace moved from libCERTI to libRTI;
- RTI::FedTime moved to libFedTime.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/CMakeLists.txt?cvsroot=certi&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/CMakeLists.txt?cvsroot=certi&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.cc?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/GAV_aux.cc?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/CMakeLists.txt?cvsroot=certi&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTItypes.cc?cvsroot=certi&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/certi/test/Billard/CMakeLists.txt?cvsroot=certi&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/certi/test/utility/CMakeLists.txt?cvsroot=certi&r1=1.2&r2=1.3
Patches:
Index: RTIA/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/RTIA/CMakeLists.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- RTIA/CMakeLists.txt 23 Jun 2008 12:49:15 -0000 1.5
+++ RTIA/CMakeLists.txt 25 Nov 2008 16:32:13 -0000 1.6
@@ -20,8 +20,7 @@
)
ADD_EXECUTABLE(rtia ${rtia_SRCS})
-
-TARGET_LINK_LIBRARIES(rtia ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES} CERTI RTI)
+TARGET_LINK_LIBRARIES(rtia CERTI RTI-NG FedTime)
INSTALL(TARGETS rtia
RUNTIME DESTINATION bin
Index: RTIG/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/RTIG/CMakeLists.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- RTIG/CMakeLists.txt 30 Oct 2008 10:49:27 -0000 1.4
+++ RTIG/CMakeLists.txt 25 Nov 2008 16:32:13 -0000 1.5
@@ -13,8 +13,7 @@
)
ADD_EXECUTABLE(rtig ${rtig_SRCS})
-
-TARGET_LINK_LIBRARIES(rtig ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES} CERTI)
+TARGET_LINK_LIBRARIES(rtig CERTI RTI-NG FedTime)
INSTALL(TARGETS rtig
RUNTIME DESTINATION bin
Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- libCERTI/CMakeLists.txt 25 Nov 2008 15:13:57 -0000 1.19
+++ libCERTI/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.20
@@ -59,11 +59,14 @@
)
SET(CERTI_TIME_SRCS
-FedTime.cc
LBTS.cc
LBTS.hh
)
+SET(CERTI_FEDTIME_SRCS
+FedTime.cc
+)
+
SET(CERTI_SUPPORT_SRCS
AuditFile.cc AuditFile.hh
AuditLine.cc AuditLine.hh
@@ -206,7 +209,21 @@
SET_TARGET_PROPERTIES(CERTI PROPERTIES VERSION 1.0.0 SOVERSION 1)
-INSTALL(TARGETS CERTI
+ADD_LIBRARY(FedTime
+ ${CERTI_FEDTIME_SRCS}
+)
+
+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(TARGETS CERTI FedTime
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Index: libCERTI/Exception.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/Exception.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/Exception.cc 28 Oct 2008 12:07:26 -0000 3.15
+++ libCERTI/Exception.cc 25 Nov 2008 16:32:14 -0000 3.16
@@ -19,99 +19,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Exception.cc,v 3.15 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Exception.cc,v 3.16 2008/11/25 16:32:14 gotthardp Exp $
// ----------------------------------------------------------------------------
-#include <assert.h>
#include "Exception.hh"
#include "certi.hh"
-#include "PrettyDebug.hh"
-#include <sstream>
-#include <cstdlib>
-#include <cstring>
// 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" ;
-
-// From certi.hh
const char *certi::FederateNotPublishing::_ex = "FederateNotPublishing" ;
const char *certi::FederateNotSubscribing::_ex = "FederateNotSubscribing" ;
const char *certi::InvalidObjectHandle::_ex = "InvalidObjectHandle" ;
@@ -138,87 +52,6 @@
const char *certi::NetworkSignal::_ex = "NetworkSignal" ;
// 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 ;
-
-// From certi.hh
long certi::FederateNotPublishing::type = certi::e_FederateNotPublishing ;
long certi::FederateNotSubscribing::type = certi::e_FederateNotSubscribing ;
long certi::InvalidObjectHandle::type = certi::e_InvalidObjectHandle ;
@@ -244,76 +77,4 @@
long certi::NetworkError::type = certi::e_NetworkError ;
long certi::NetworkSignal::type = certi::e_NetworkSignal ;
-static PrettyDebug PD_Exception("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;
-
- PD_Exception[pdExcept] << msg.str().c_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: Exception.cc,v 3.16 2008/11/25 16:32:14 gotthardp Exp $
Index: libCERTI/GAV_aux.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/GAV_aux.cc,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- libCERTI/GAV_aux.cc 12 Jun 2008 07:39:49 -0000 3.17
+++ libCERTI/GAV_aux.cc 25 Nov 2008 16:32:14 -0000 3.18
@@ -18,7 +18,6 @@
// ----------------------------------------------------------------------------
-
#include "GAV.hh"
#include "PrettyDebug.hh"
#include <string.h>
@@ -568,43 +567,4 @@
} // namespace certi
-// ----------------------------------------------------------------------------
-RTI::AttributeHandleValuePairSet *
-RTI::AttributeSetFactory::create(ULong)
- throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
-{
- AttributeHandleValuePairSetImp *ahvps ;
- ahvps = new AttributeHandleValuePairSetImp ;
- ahvps->_order = RECEIVE ;
- ahvps->_transport = RELIABLE ;
- return (AttributeHandleValuePairSet *) ahvps ;
-}
-
-// ----------------------------------------------------------------------------
-RTI::AttributeHandleSet *
-RTI::AttributeHandleSetFactory::create(ULong)
- throw (MemoryExhausted, ValueCountExceeded)
-{
- return new AttributeHandleSetImp();
-}
-
-// ----------------------------------------------------------------------------
-RTI::FederateHandleSet *
-RTI::FederateHandleSetFactory::create(ULong)
- throw (MemoryExhausted, ValueCountExceeded)
-{
- return ((FederateHandleSet *) new FederateHandleSetImp());
-}
-
-// ----------------------------------------------------------------------------
-RTI::ParameterHandleValuePairSet *
-RTI::ParameterSetFactory::create(ULong size)
- throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
-{
- ParameterHandleValuePairSetImp *phvps ;
- phvps = new ParameterHandleValuePairSetImp(size);
-
- phvps->_order = RECEIVE ;
- phvps->_transport = RELIABLE ;
- return (ParameterHandleValuePairSet *) phvps ;
-}
+// $Id: GAV_aux.cc,v 3.18 2008/11/25 16:32:14 gotthardp Exp $
Index: libRTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libRTI/CMakeLists.txt,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- libRTI/CMakeLists.txt 24 Jan 2008 16:15:57 -0000 1.8
+++ libRTI/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.9
@@ -4,6 +4,7 @@
SET(RTI_LIB_SRCS
RTIambassador.cc
RTIambPrivateRefs.cc
+ RTItypes.cc
)
SET(RTI_LIB_INCLUDE
@@ -18,16 +19,17 @@
#SOURCE_GROUP("RTI\\Header" FILES ${RTI_LIB_INCLUDE})
-ADD_LIBRARY(RTI ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
-TARGET_LINK_LIBRARIES(RTI CERTI)
-SET_TARGET_PROPERTIES(RTI PROPERTIES VERSION 1.0.0 SOVERSION 1)
+ADD_LIBRARY(RTI-NG ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
+TARGET_LINK_LIBRARIES(RTI-NG CERTI)
+
+SET_TARGET_PROPERTIES(RTI-NG PROPERTIES VERSION 1.0.0 SOVERSION 1)
IF (MINGW)
- SET_TARGET_PROPERTIES(RTI PROPERTIES LINK_FLAGS
"-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libRTI.def")
+ SET_TARGET_PROPERTIES(RTI-NG PROPERTIES LINK_FLAGS
"-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libRTI.def")
INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/libRTI.def
DESTINATION lib)
ENDIF (MINGW)
-INSTALL(TARGETS RTI
+INSTALL(TARGETS RTI-NG
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
\ No newline at end of file
Index: test/Billard/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/test/Billard/CMakeLists.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- test/Billard/CMakeLists.txt 18 Jun 2008 11:13:26 -0000 1.6
+++ test/Billard/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.7
@@ -22,9 +22,7 @@
)
ADD_EXECUTABLE(billard ${billard_SRCS})
-ADD_DEPENDENCIES(billard graph CERTI RTI)
-
-TARGET_LINK_LIBRARIES(billard ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES} graph
CERTI RTI)
+TARGET_LINK_LIBRARIES(billard graph RTI-NG FedTime)
IF (X11_FOUND)
TARGET_LINK_LIBRARIES(billard ${X11_LIBRARIES})
Index: test/utility/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/test/utility/CMakeLists.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- test/utility/CMakeLists.txt 5 Nov 2008 20:41:26 -0000 1.2
+++ test/utility/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.3
@@ -8,7 +8,7 @@
ADD_EXECUTABLE(CertiUtilTests ${CertiUtil_SRCS})
-TARGET_LINK_LIBRARIES(CertiUtilTests ${SOCKET_LIBRARY} ${LIBXML2_LIBRARIES}
CERTI)
+TARGET_LINK_LIBRARIES(CertiUtilTests CERTI RTI-NG FedTime)
INSTALL(TARGETS CertiUtilTests
RUNTIME DESTINATION bin
Index: libRTI/RTItypes.cc
===================================================================
RCS file: libRTI/RTItypes.cc
diff -N libRTI/RTItypes.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libRTI/RTItypes.cc 25 Nov 2008 16:32:14 -0000 1.1
@@ -0,0 +1,315 @@
+// ----------------------------------------------------------------------------
+// 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
+// ----------------------------------------------------------------------------
+
+#include "GAV.hh"
+#include "Exception.hh"
+#include "PrettyDebug.hh"
+#include <assert.h>
+#include <sstream>
+#include <cstdlib>
+#include <cstring>
+
+using namespace certi ;
+
+namespace {
+
+static PrettyDebug D("LIBRTI", __FILE__);
+static PrettyDebug G("GENDOC",__FILE__);
+
+}
+
+// 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_Exception("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;
+
+ PD_Exception[pdExcept] << msg.str().c_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);
+}
+
+// ----------------------------------------------------------------------------
+RTI::AttributeHandleValuePairSet *
+RTI::AttributeSetFactory::create(ULong)
+ throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
+{
+ AttributeHandleValuePairSetImp *ahvps ;
+ ahvps = new AttributeHandleValuePairSetImp ;
+ ahvps->_order = RECEIVE ;
+ ahvps->_transport = RELIABLE ;
+ return (AttributeHandleValuePairSet *) ahvps ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::AttributeHandleSet *
+RTI::AttributeHandleSetFactory::create(ULong)
+ throw (MemoryExhausted, ValueCountExceeded)
+{
+ return new AttributeHandleSetImp();
+}
+
+// ----------------------------------------------------------------------------
+RTI::FederateHandleSet *
+RTI::FederateHandleSetFactory::create(ULong)
+ throw (MemoryExhausted, ValueCountExceeded)
+{
+ return ((FederateHandleSet *) new FederateHandleSetImp());
+}
+
+// ----------------------------------------------------------------------------
+RTI::ParameterHandleValuePairSet *
+RTI::ParameterSetFactory::create(ULong size)
+ throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
+{
+ ParameterHandleValuePairSetImp *phvps ;
+ phvps = new ParameterHandleValuePairSetImp(size);
+
+ phvps->_order = RECEIVE ;
+ phvps->_transport = RELIABLE ;
+ return (ParameterHandleValuePairSet *) phvps ;
+}
+
+// $Id: RTItypes.cc,v 1.1 2008/11/25 16:32:14 gotthardp Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi RTIA/CMakeLists.txt RTIG/CMakeLists.txt l...,
certi-cvs <=