[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi RTIA/CMakeLists.txt RTIA/OwnershipManagem...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi RTIA/CMakeLists.txt RTIA/OwnershipManagem... |
Date: |
Sun, 07 Dec 2008 20:16:18 +0000 |
CVSROOT: /cvsroot/certi
Module name: certi
Changes by: Petr Gotthard <gotthardp> 08/12/07 20:16:18
Modified files:
RTIA : CMakeLists.txt OwnershipManagement.cc
RTIA_federate.cc main.cc
RTIG : CMakeLists.txt Federate.hh Federation.hh
FederationsList.cc RTIG.cc RTIG_processing.cc
include : baseTypes.hh certi.hh
libCERTI : CMakeLists.txt Exception.cc Exception.hh
Extent.hh FedRegion.hh GAV.cc GAV.hh
GSSAPIHandler.cc LBTS.cc Message.cc Message.hh
MessageBuffer.cc Object.hh ObjectAttribute.hh
ObjectClass.cc ObjectClass.hh ObjectSet.hh
SecurityLevel.hh Socket.hh SocketTCP.cc
SocketUN.cc
libRTI : CMakeLists.txt RTIambPrivateRefs.cc
RTIambPrivateRefs.hh RTIambassador.cc
RTItypes.cc
test/Billard : CMakeLists.txt
test/utility : CMakeLists.txt
Added files:
libRTI : RTItypesImp.cc RTItypesImp.hh
Removed files:
libCERTI : GAV_aux.cc
Log message:
Bug #24930: First step of RTI:: and certi:: namespace separation.
Done: Exceptions, Region and "HandleSets" separated;
To-Do: FedTime separation and final cleanup.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/CMakeLists.txt?cvsroot=certi&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/OwnershipManagement.cc?cvsroot=certi&r1=3.16&r2=3.17
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/RTIA_federate.cc?cvsroot=certi&r1=3.95&r2=3.96
http://cvs.savannah.gnu.org/viewcvs/certi/RTIA/main.cc?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/CMakeLists.txt?cvsroot=certi&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federate.hh?cvsroot=certi&r1=3.14&r2=3.15
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/Federation.hh?cvsroot=certi&r1=3.55&r2=3.56
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/FederationsList.cc?cvsroot=certi&r1=3.62&r2=3.63
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG.cc?cvsroot=certi&r1=3.53&r2=3.54
http://cvs.savannah.gnu.org/viewcvs/certi/RTIG/RTIG_processing.cc?cvsroot=certi&r1=3.79&r2=3.80
http://cvs.savannah.gnu.org/viewcvs/certi/include/baseTypes.hh?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/include/certi.hh?cvsroot=certi&r1=3.36&r2=3.37
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.cc?cvsroot=certi&r1=3.16&r2=3.17
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Exception.hh?cvsroot=certi&r1=3.7&r2=3.8
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Extent.hh?cvsroot=certi&r1=3.9&r2=3.10
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/FedRegion.hh?cvsroot=certi&r1=3.3&r2=3.4
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/GAV.cc?cvsroot=certi&r1=3.17&r2=3.18
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/GAV.hh?cvsroot=certi&r1=3.12&r2=3.13
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/GSSAPIHandler.cc?cvsroot=certi&r1=3.6&r2=3.7
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/LBTS.cc?cvsroot=certi&r1=3.11&r2=3.12
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message.cc?cvsroot=certi&r1=3.61&r2=3.62
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Message.hh?cvsroot=certi&r1=3.53&r2=3.54
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/MessageBuffer.cc?cvsroot=certi&r1=3.13&r2=3.14
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Object.hh?cvsroot=certi&r1=3.19&r2=3.20
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectAttribute.hh?cvsroot=certi&r1=3.16&r2=3.17
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.cc?cvsroot=certi&r1=3.62&r2=3.63
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectClass.hh?cvsroot=certi&r1=3.43&r2=3.44
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/ObjectSet.hh?cvsroot=certi&r1=3.13&r2=3.14
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SecurityLevel.hh?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/Socket.hh?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketTCP.cc?cvsroot=certi&r1=3.26&r2=3.27
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/SocketUN.cc?cvsroot=certi&r1=3.27&r2=3.28
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/GAV_aux.cc?cvsroot=certi&r1=3.18&r2=0
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/CMakeLists.txt?cvsroot=certi&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.cc?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambPrivateRefs.hh?cvsroot=certi&r1=3.6&r2=3.7
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTIambassador.cc?cvsroot=certi&r1=3.100&r2=3.101
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTItypes.cc?cvsroot=certi&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTItypesImp.cc?cvsroot=certi&rev=3.1
http://cvs.savannah.gnu.org/viewcvs/certi/libRTI/RTItypesImp.hh?cvsroot=certi&rev=3.1
http://cvs.savannah.gnu.org/viewcvs/certi/test/Billard/CMakeLists.txt?cvsroot=certi&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/certi/test/utility/CMakeLists.txt?cvsroot=certi&r1=1.3&r2=1.4
Patches:
Index: RTIA/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/RTIA/CMakeLists.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- RTIA/CMakeLists.txt 25 Nov 2008 16:32:13 -0000 1.6
+++ RTIA/CMakeLists.txt 7 Dec 2008 20:16:08 -0000 1.7
@@ -20,7 +20,7 @@
)
ADD_EXECUTABLE(rtia ${rtia_SRCS})
-TARGET_LINK_LIBRARIES(rtia CERTI RTI-NG FedTime)
+TARGET_LINK_LIBRARIES(rtia CERTI RTI FedTime)
INSTALL(TARGETS rtia
RUNTIME DESTINATION bin
Index: RTIA/OwnershipManagement.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIA/OwnershipManagement.cc,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- RTIA/OwnershipManagement.cc 12 Jun 2008 07:39:50 -0000 3.16
+++ RTIA/OwnershipManagement.cc 7 Dec 2008 20:16:09 -0000 3.17
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: OwnershipManagement.cc,v 3.16 2008/06/12 07:39:50 erk Exp $
+// $Id: OwnershipManagement.cc,v 3.17 2008/12/07 20:16:09 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -319,7 +319,7 @@
if (e == e_NO_EXCEPTION) {
AttributeHandleSet *AttributeSet ;
- AttributeSet =
RTI::AttributeHandleSetFactory::create(rep->handleArraySize);
+ AttributeSet = new AttributeHandleSet(rep->handleArraySize);
for (int i = 0 ; i < rep->handleArraySize ; i++) {
AttributeSet->add(rep->handleArray[i]);
@@ -514,4 +514,4 @@
}} // namespace certi/rtia
-// $Id: OwnershipManagement.cc,v 3.16 2008/06/12 07:39:50 erk Exp $
+// $Id: OwnershipManagement.cc,v 3.17 2008/12/07 20:16:09 gotthardp Exp $
Index: RTIA/RTIA_federate.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIA/RTIA_federate.cc,v
retrieving revision 3.95
retrieving revision 3.96
diff -u -b -r3.95 -r3.96
--- RTIA/RTIA_federate.cc 21 Nov 2008 12:45:24 -0000 3.95
+++ RTIA/RTIA_federate.cc 7 Dec 2008 20:16:10 -0000 3.96
@@ -768,7 +768,7 @@
try {
rep.setObjectClass(om->getObjectClassHandle(req->getName().c_str()));
}
- catch (RTI::Exception &egoch)
+ catch (Exception &egoch)
{
rep.setException(static_cast<TypeException>(egoch.getType()),egoch._reason);
}
@@ -811,7 +811,7 @@
rep.setAttribute(om->getAttributeHandle(req->getName().c_str(),
req->getObjectClass()));
}
- catch (RTI::Exception &egah)
+ catch (Exception &egah)
{
rep.setException(static_cast<TypeException>(egah.getType()),egah._reason);
}
@@ -1441,7 +1441,7 @@
}
catch (RTIinternalError &e) {
cout << "RTIA sends InternalError to Fed., " ;
- if (e._reason != NULL)
+ if (!e._reason.empty())
cout << "reason : " << e._reason << endl ;
else
cout << "no reason given." << endl ;
Index: RTIA/main.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIA/main.cc,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- RTIA/main.cc 10 Nov 2008 13:19:01 -0000 3.24
+++ RTIA/main.cc 7 Dec 2008 20:16:10 -0000 3.25
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: main.cc,v 3.24 2008/11/10 13:19:01 erk Exp $
+// $Id: main.cc,v 3.25 2008/12/07 20:16:10 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -90,7 +90,7 @@
cerr << "RTIA:: RTIA has thrown " << e._name <<
" exception." << endl;
cerr.flush();
}
- if (e._reason) {
+ if (!e._reason.empty()) {
if (! normal_end) {
cerr << "RTIA:: Reason: " << e._reason <<
endl;
cerr.flush();
@@ -105,7 +105,7 @@
} catch (Exception &e) {
if (! normal_end) {
cerr << "RTIA:: RTIA has thrown " << e._name << "
exception." << endl;
- if (e._reason) {
+ if (!e._reason.empty()) {
cerr << "RTIA:: Reason: " << e._reason << endl;
}
}
@@ -128,4 +128,4 @@
throw MemoryExhausted("RTIA has exhausted memory error");
}
-// EOF $Id: main.cc,v 3.24 2008/11/10 13:19:01 erk Exp $
+// EOF $Id: main.cc,v 3.25 2008/12/07 20:16:10 gotthardp Exp $
Index: RTIG/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/CMakeLists.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- RTIG/CMakeLists.txt 25 Nov 2008 16:32:13 -0000 1.5
+++ RTIG/CMakeLists.txt 7 Dec 2008 20:16:11 -0000 1.6
@@ -13,7 +13,7 @@
)
ADD_EXECUTABLE(rtig ${rtig_SRCS})
-TARGET_LINK_LIBRARIES(rtig CERTI RTI-NG FedTime)
+TARGET_LINK_LIBRARIES(rtig CERTI RTI FedTime)
INSTALL(TARGETS rtig
RUNTIME DESTINATION bin
Index: RTIG/Federate.hh
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/Federate.hh,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15
--- RTIG/Federate.hh 21 Nov 2008 13:41:52 -0000 3.14
+++ RTIG/Federate.hh 7 Dec 2008 20:16:11 -0000 3.15
@@ -16,13 +16,14 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: Federate.hh,v 3.14 2008/11/21 13:41:52 approx Exp $
+// $Id: Federate.hh,v 3.15 2008/12/07 20:16:11 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_RTIG_FEDERATE_HH
#define CERTI_RTIG_FEDERATE_HH
#include "certi.hh"
+#include "Exception.hh"
#include <vector>
#include <string>
@@ -140,4 +141,4 @@
#endif // CERTI_RTIG_FEDERATE_HH
-// $Id: Federate.hh,v 3.14 2008/11/21 13:41:52 approx Exp $
+// $Id: Federate.hh,v 3.15 2008/12/07 20:16:11 gotthardp Exp $
Index: RTIG/Federation.hh
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/Federation.hh,v
retrieving revision 3.55
retrieving revision 3.56
diff -u -b -r3.55 -r3.56
--- RTIG/Federation.hh 20 Nov 2008 18:21:55 -0000 3.55
+++ RTIG/Federation.hh 7 Dec 2008 20:16:11 -0000 3.56
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: Federation.hh,v 3.55 2008/11/20 18:21:55 approx Exp $
+// $Id: Federation.hh,v 3.56 2008/12/07 20:16:11 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_RTIG_FEDERATION_HH
@@ -27,6 +27,7 @@
#include "Federate.hh"
#include "RootObject.hh"
#include "LBTS.hh"
+#include "GAV.hh"
#include "SecurityServer.hh"
#include "HandleManager.hh"
#include "certi.hh"
@@ -667,4 +668,4 @@
#endif // _CERTI_RTIG_FEDERATION_HH
-// $Id: Federation.hh,v 3.55 2008/11/20 18:21:55 approx Exp $
+// $Id: Federation.hh,v 3.56 2008/12/07 20:16:11 gotthardp Exp $
Index: RTIG/FederationsList.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/FederationsList.cc,v
retrieving revision 3.62
retrieving revision 3.63
diff -u -b -r3.62 -r3.63
--- RTIG/FederationsList.cc 20 Nov 2008 18:21:56 -0000 3.62
+++ RTIG/FederationsList.cc 7 Dec 2008 20:16:11 -0000 3.63
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: FederationsList.cc,v 3.62 2008/11/20 18:21:56 approx Exp $
+// $Id: FederationsList.cc,v 3.63 2008/12/07 20:16:11 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -388,12 +388,12 @@
federation = new Federation(name, handle, socketServer, auditFile,
FEDid,verboseLevel);
D.Out(pdDebug,"new Federation created.");
}
- catch (RTI::CouldNotOpenFED& e) {
+ catch (CouldNotOpenFED& e) {
D.Out(pdInit, "Federation constructor : Could not open FED file.");
G.Out(pdGendoc,"exit FederationsList::createFederation on exception
CouldNotOpenFED");
throw CouldNotOpenFED(e._reason);
}
- catch (RTI::ErrorReadingFED &e) {
+ catch (ErrorReadingFED &e) {
D.Out(pdInit, "Federation constructor : Could not read FED file (maybe
incorrect).");
G.Out(pdGendoc,"exit FederationsList::createFederation on exception
ErrorReadingFED");
throw ErrorReadingFED(e._reason);
@@ -1750,5 +1750,5 @@
}} // certi::rtig
-// EOF $Id: FederationsList.cc,v 3.62 2008/11/20 18:21:56 approx Exp $
+// EOF $Id: FederationsList.cc,v 3.63 2008/12/07 20:16:11 gotthardp Exp $
Index: RTIG/RTIG.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/RTIG.cc,v
retrieving revision 3.53
retrieving revision 3.54
diff -u -b -r3.53 -r3.54
--- RTIG/RTIG.cc 20 Nov 2008 18:21:56 -0000 3.53
+++ RTIG/RTIG.cc 7 Dec 2008 20:16:11 -0000 3.54
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIG.cc,v 3.53 2008/11/20 18:21:56 approx Exp $
+// $Id: RTIG.cc,v 3.54 2008/12/07 20:16:11 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -510,8 +510,8 @@
} while (link->isDataReady());
}
catch (NetworkError &e) {
- if (e._reason != NULL)
- D.Out(pdExcept, "Catching Network Error, reason : %s",
e._reason);
+ if (!e._reason.empty())
+ D.Out(pdExcept, "Catching Network Error, reason : %s",
e._reason.c_str());
else
D.Out(pdExcept, "Catching Network Error, no reason
string.");
cout << "RTIG dropping client connection " <<
link->returnSocket()
@@ -539,7 +539,7 @@
socketServer.open();
}
catch (RTIinternalError &e) {
- D.Out(pdExcept, "Error while accepting new connection : %s.",
e._reason);
+ D.Out(pdExcept, "Error while accepting new connection : %s.",
e._reason.c_str());
}
D.Out(pdInit, "Accepting new connection.");
@@ -579,7 +579,7 @@
// This macro is used to copy any non null exception reason
// string into our buffer(used for Audit purpose).
-#define CPY_NOT_NULL(A) { if (A._reason != NULL)strcpy(buffer, A._reason); }
+#define CPY_NOT_NULL(A) { if (!A._reason.empty())strcpy(buffer,
A._reason.c_str()); }
buffer[0] = 0 ;
@@ -912,10 +912,10 @@
rep->exception = e_RestoreNotRequested ;
}
catch (RTIinternalError &e) {
- if (e._reason == NULL)
+ if (e._reason.empty())
D.Out(pdExcept, "Catching \"%s\" exception.", e._name);
else
- D.Out(pdExcept, "Catching \"%s\" exception: %s.", e._name,
e._reason);
+ D.Out(pdExcept, "Catching \"%s\" exception: %s.", e._name,
e._reason.c_str());
CPY_NOT_NULL(e);
rep->exception = e_RTIinternalError ;
}
@@ -1039,4 +1039,4 @@
}} // namespace certi/rtig
-// $Id: RTIG.cc,v 3.53 2008/11/20 18:21:56 approx Exp $
+// $Id: RTIG.cc,v 3.54 2008/12/07 20:16:11 gotthardp Exp $
Index: RTIG/RTIG_processing.cc
===================================================================
RCS file: /cvsroot/certi/certi/RTIG/RTIG_processing.cc,v
retrieving revision 3.79
retrieving revision 3.80
diff -u -b -r3.79 -r3.80
--- RTIG/RTIG_processing.cc 20 Nov 2008 18:21:56 -0000 3.79
+++ RTIG/RTIG_processing.cc 7 Dec 2008 20:16:11 -0000 3.80
@@ -18,7 +18,7 @@
// along with this program ; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// $Id: RTIG_processing.cc,v 3.79 2008/11/20 18:21:56 approx Exp $
+// $Id: RTIG_processing.cc,v 3.80 2008/12/07 20:16:11 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
@@ -159,7 +159,7 @@
federate.c_str(),
static_cast<SocketTCP*>(link));
}
- catch (RTI::FederateAlreadyExecutionMember &e)
+ catch (FederateAlreadyExecutionMember &e)
{
// Federate yet has joined this federation(same or another with same
name)
// RTIG has to return something to RTIA
@@ -358,8 +358,8 @@
federationHandles.free(num_federation);
D.Out(pdInit, "Federation \"%s\" has been destroyed.",
federation.c_str());
}
- catch (RTI::Exception &e)
- { printf("ERROR : %s reason : %s\n",e._name,e._reason);
+ catch (Exception &e)
+ { printf("ERROR : %s reason : %s\n",e._name,e._reason.c_str());
if (strcmp(e._name,"RTIinternalError")==0 )
{
rep.exception = e_RTIinternalError;
@@ -1556,4 +1556,4 @@
}} // namespace certi/rtig
-// $Id: RTIG_processing.cc,v 3.79 2008/11/20 18:21:56 approx Exp $
+// $Id: RTIG_processing.cc,v 3.80 2008/12/07 20:16:11 gotthardp Exp $
Index: include/baseTypes.hh
===================================================================
RCS file: /cvsroot/certi/certi/include/baseTypes.hh,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- include/baseTypes.hh 29 Sep 2008 12:31:28 -0000 3.12
+++ include/baseTypes.hh 7 Dec 2008 20:16:12 -0000 3.13
@@ -17,7 +17,7 @@
RTI_TRUE
};
-class CERTI_EXPORT Exception
+class RTI_EXPORT Exception
{
public:
ULong _serial ;
@@ -35,7 +35,7 @@
};
#define RTI_EXCEPT(A) \
-class CERTI_EXPORT A : public Exception { \
+class RTI_EXPORT A : public Exception { \
public: \
static const char *_ex ; \
static long type ; \
Index: include/certi.hh
===================================================================
RCS file: /cvsroot/certi/certi/include/certi.hh,v
retrieving revision 3.36
retrieving revision 3.37
diff -u -b -r3.36 -r3.37
--- include/certi.hh 28 Oct 2008 12:07:26 -0000 3.36
+++ include/certi.hh 7 Dec 2008 20:16:12 -0000 3.37
@@ -16,7 +16,7 @@
// 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: certi.hh,v 3.36 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: certi.hh,v 3.37 2008/12/07 20:16:12 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <vector>
@@ -98,10 +98,8 @@
// RTI Shortcuts
typedef RTI::AttributeHandle AttributeHandle ;
-typedef RTI::AttributeHandleSet AttributeHandleSet ;
typedef RTI::DimensionHandle DimensionHandle ;
typedef RTI::EventRetractionHandle EventRetractionHandle ;
-typedef RTI::Exception Exception ;
typedef RTI::ExtentIndex ExtentIndex ;
typedef RTI::FederateHandle FederateHandle ;
typedef RTI::Handle Handle ;
@@ -115,113 +113,6 @@
typedef RTI::ULong ULong ;
typedef RTI::UShort UShort ;
-// RTI Shortcuts (exceptions)
-typedef RTI::ArrayIndexOutOfBounds ArrayIndexOutOfBounds ;
-typedef RTI::AsynchronousDeliveryAlreadyDisabled
AsynchronousDeliveryAlreadyDisabled ;
-typedef RTI::AsynchronousDeliveryAlreadyEnabled
AsynchronousDeliveryAlreadyEnabled ;
-typedef RTI::AttributeAcquisitionWasNotRequested
AttributeAcquisitionWasNotRequested ;
-typedef RTI::AttributeAcquisitionWasNotCanceled
AttributeAcquisitionWasNotCanceled ;
-typedef RTI::AttributeAlreadyBeingAcquired AttributeAlreadyBeingAcquired ;
-typedef RTI::AttributeAlreadyBeingDivested AttributeAlreadyBeingDivested ;
-typedef RTI::AttributeAlreadyOwned AttributeAlreadyOwned ;
-typedef RTI::AttributeDivestitureWasNotRequested
AttributeDivestitureWasNotRequested ;
-typedef RTI::AttributeNotDefined AttributeNotDefined ;
-typedef RTI::AttributeNotKnown AttributeNotKnown ;
-typedef RTI::AttributeNotOwned AttributeNotOwned ;
-typedef RTI::AttributeNotPublished AttributeNotPublished ;
-typedef RTI::ConcurrentAccessAttempted ConcurrentAccessAttempted ;
-typedef RTI::CouldNotDiscover CouldNotDiscover ;
-typedef RTI::CouldNotOpenFED CouldNotOpenFED ;
-typedef RTI::CouldNotRestore CouldNotRestore ;
-typedef RTI::DeletePrivilegeNotHeld DeletePrivilegeNotHeld ;
-typedef RTI::DimensionNotDefined DimensionNotDefined ;
-typedef RTI::EnableTimeConstrainedPending EnableTimeConstrainedPending ;
-typedef RTI::EnableTimeConstrainedWasNotPending
EnableTimeConstrainedWasNotPending ;
-typedef RTI::EnableTimeRegulationPending EnableTimeRegulationPending ;
-typedef RTI::EnableTimeRegulationWasNotPending
EnableTimeRegulationWasNotPending ;
-typedef RTI::ErrorReadingFED ErrorReadingFED ;
-typedef RTI::EventNotKnown EventNotKnown ;
-typedef RTI::FederateAlreadyExecutionMember FederateAlreadyExecutionMember ;
-typedef RTI::FederateInternalError FederateInternalError ;
-typedef RTI::FederateLoggingServiceCalls FederateLoggingServiceCalls ;
-typedef RTI::FederateNotExecutionMember FederateNotExecutionMember ;
-typedef RTI::FederateOwnsAttributes FederateOwnsAttributes ;
-typedef RTI::FederateWasNotAskedToReleaseAttribute
FederateWasNotAskedToReleaseAttribute ;
-typedef RTI::FederatesCurrentlyJoined FederatesCurrentlyJoined ;
-typedef RTI::FederationExecutionAlreadyExists FederationExecutionAlreadyExists
;
-typedef RTI::FederationExecutionDoesNotExist FederationExecutionDoesNotExist ;
-typedef RTI::FederationTimeAlreadyPassed FederationTimeAlreadyPassed ;
-typedef RTI::HandleValuePairMaximumExceeded HandleValuePairMaximumExceeded ;
-typedef RTI::InteractionClassNotDefined InteractionClassNotDefined ;
-typedef RTI::InteractionClassNotKnown InteractionClassNotKnown ;
-typedef RTI::InteractionClassNotPublished InteractionClassNotPublished ;
-typedef RTI::InteractionClassNotSubscribed InteractionClassNotSubscribed ;
-typedef RTI::InteractionParameterNotDefined InteractionParameterNotDefined ;
-typedef RTI::InteractionParameterNotKnown InteractionParameterNotKnown ;
-typedef RTI::InvalidExtents InvalidExtents ;
-typedef RTI::InvalidFederationTime InvalidFederationTime ;
-typedef RTI::InvalidHandleValuePairSetContext InvalidHandleValuePairSetContext
;
-typedef RTI::InvalidLookahead InvalidLookahead ;
-typedef RTI::InvalidOrderingHandle InvalidOrderingHandle ;
-typedef RTI::InvalidRegionContext InvalidRegionContext ;
-typedef RTI::InvalidResignAction InvalidResignAction ;
-typedef RTI::InvalidRetractionHandle InvalidRetractionHandle ;
-typedef RTI::InvalidTransportationHandle InvalidTransportationHandle ;
-typedef RTI::MemoryExhausted MemoryExhausted ;
-typedef RTI::NameNotFound NameNotFound ;
-typedef RTI::ObjectClassNotDefined ObjectClassNotDefined ;
-typedef RTI::ObjectClassNotKnown ObjectClassNotKnown ;
-typedef RTI::ObjectClassNotPublished ObjectClassNotPublished ;
-typedef RTI::ObjectClassNotSubscribed ObjectClassNotSubscribed ;
-typedef RTI::ObjectNotKnown ObjectNotKnown ;
-typedef RTI::ObjectAlreadyRegistered ObjectAlreadyRegistered ;
-typedef RTI::OwnershipAcquisitionPending OwnershipAcquisitionPending ;
-typedef RTI::RegionInUse RegionInUse ;
-typedef RTI::RegionNotKnown RegionNotKnown ;
-typedef RTI::RestoreInProgress RestoreInProgress ;
-typedef RTI::RestoreNotRequested RestoreNotRequested ;
-typedef RTI::RTIinternalError RTIinternalError ;
-typedef RTI::SpaceNotDefined SpaceNotDefined ;
-typedef RTI::SaveInProgress SaveInProgress ;
-typedef RTI::SaveNotInitiated SaveNotInitiated ;
-typedef RTI::SpecifiedSaveLabelDoesNotExist SpecifiedSaveLabelDoesNotExist ;
-typedef RTI::SynchronizationPointLabelWasNotAnnounced
SynchronizationPointLabelWasNotAnnounced ;
-typedef RTI::TimeAdvanceAlreadyInProgress TimeAdvanceAlreadyInProgress ;
-typedef RTI::TimeAdvanceWasNotInProgress TimeAdvanceWasNotInProgress ;
-typedef RTI::TimeConstrainedAlreadyEnabled TimeConstrainedAlreadyEnabled ;
-typedef RTI::TimeConstrainedWasNotEnabled TimeConstrainedWasNotEnabled ;
-typedef RTI::TimeRegulationAlreadyEnabled TimeRegulationAlreadyEnabled ;
-typedef RTI::TimeRegulationWasNotEnabled TimeRegulationWasNotEnabled ;
-typedef RTI::UnableToPerformSave UnableToPerformSave ;
-typedef RTI::ValueCountExceeded ValueCountExceeded ;
-typedef RTI::ValueLengthExceeded ValueLengthExceeded ;
-
-// CERTI Exception-derived Exceptions (including deprecated HLA exceptions)
-RTI_EXCEPT(FederateNotPublishing)
-RTI_EXCEPT(FederateNotSubscribing)
-RTI_EXCEPT(InvalidObjectHandle)
-RTI_EXCEPT(SecurityError)
-RTI_EXCEPT(CouldNotOpenRID)
-RTI_EXCEPT(ErrorReadingRID)
-RTI_EXCEPT(FederationAlreadyPaused)
-RTI_EXCEPT(FederationNotPaused)
-RTI_EXCEPT(AttributeNotSubscribed)
-RTI_EXCEPT(FederateAlreadyPaused)
-RTI_EXCEPT(FederateDoesNotExist)
-RTI_EXCEPT(FederateNameAlreadyInUse)
-RTI_EXCEPT(FederateNotPaused)
-RTI_EXCEPT(IDsupplyExhausted)
-RTI_EXCEPT(InvalidDivestitureCondition)
-RTI_EXCEPT(InvalidFederationTimeDelta)
-RTI_EXCEPT(InvalidRoutingSpace)
-RTI_EXCEPT(NoPauseRequested)
-RTI_EXCEPT(NoResumeRequested)
-RTI_EXCEPT(TooManyIDsRequested)
-RTI_EXCEPT(UnimplementedService)
-RTI_EXCEPT(UnknownLabel)
-RTI_EXCEPT(NetworkSignal)
-RTI_EXCEPT(NetworkError)
-
typedef RTI::Double FederationTime ;
typedef UShort ObjectHandlecount ;
typedef std::string ObjectName_t ;
@@ -350,4 +241,4 @@
(uint64_t) CERTI_INT64_CONSTANT(0xff00000000000000U)) >> 56)))
#endif // CERTI_HH_INCLUDED
-// $Id: certi.hh,v 3.36 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: certi.hh,v 3.37 2008/12/07 20:16:12 gotthardp Exp $
Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- libCERTI/CMakeLists.txt 3 Dec 2008 10:23:54 -0000 1.21
+++ libCERTI/CMakeLists.txt 7 Dec 2008 20:16:12 -0000 1.22
@@ -46,7 +46,6 @@
)
SET(CERTI_OWNERSHIP_SRCS
-GAV_aux.cc
GAV.cc
GAV.hh
)
@@ -225,8 +224,9 @@
${FEDTIME_SRCS}
)
-SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
+TARGET_LINK_LIBRARIES(FedTime RTI)
+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
Index: libCERTI/Exception.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Exception.cc,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- libCERTI/Exception.cc 25 Nov 2008 16:32:14 -0000 3.16
+++ libCERTI/Exception.cc 7 Dec 2008 20:16:12 -0000 3.17
@@ -19,62 +19,143 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Exception.cc,v 3.16 2008/11/25 16:32:14 gotthardp Exp $
+// $Id: Exception.cc,v 3.17 2008/12/07 20:16:12 gotthardp Exp $
// ----------------------------------------------------------------------------
#include "Exception.hh"
#include "certi.hh"
+#include "PrettyDebug.hh"
+#include <sstream>
// static members for HLA Exceptions
-const char *certi::FederateNotPublishing::_ex = "FederateNotPublishing" ;
-const char *certi::FederateNotSubscribing::_ex = "FederateNotSubscribing" ;
-const char *certi::InvalidObjectHandle::_ex = "InvalidObjectHandle" ;
-const char *certi::SecurityError::_ex = "SecurityError" ;
-const char *certi::CouldNotOpenRID::_ex = "CouldNotOpenRID" ;
-const char *certi::ErrorReadingRID::_ex = "ErrorReadingRID" ;
-const char *certi::FederationAlreadyPaused::_ex = "FederationAlreadyPaused" ;
-const char *certi::FederationNotPaused::_ex = "FederationNotPaused" ;
-const char *certi::AttributeNotSubscribed::_ex = "AttributeNotSubscribed" ;
-const char *certi::FederateAlreadyPaused::_ex = "FederateAlreadyPaused" ;
-const char *certi::FederateDoesNotExist::_ex = "FederateDoesNotExist" ;
-const char *certi::FederateNameAlreadyInUse::_ex = "FederateNameAlreadyInUse" ;
-const char *certi::FederateNotPaused::_ex = "FederateNotPaused" ;
-const char *certi::IDsupplyExhausted::_ex = "IDsupplyExhausted" ;
-const char *certi::InvalidDivestitureCondition::_ex =
"InvalidDivestitureCondition" ;
-const char *certi::InvalidFederationTimeDelta::_ex =
"InvalidFederationTimeDelta" ;
-const char *certi::InvalidRoutingSpace::_ex = "InvalidRoutingSpace" ;
-const char *certi::NoPauseRequested::_ex = "NoPauseRequested" ;
-const char *certi::NoResumeRequested::_ex = "NoResumeRequested" ;
-const char *certi::TooManyIDsRequested::_ex = "TooManyIDsRequested" ;
-const char *certi::UnimplementedService::_ex = "UnimplementedService" ;
-const char *certi::UnknownLabel::_ex = "UnknownLabel" ;
-const char *certi::NetworkError::_ex = "NetworkError" ;
-const char *certi::NetworkSignal::_ex = "NetworkSignal" ;
+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 ;
// 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::SecurityError::type = certi::e_SecurityError ;
-long certi::CouldNotOpenRID::type = certi::e_CouldNotOpenRID ;
-long certi::ErrorReadingRID::type = certi::e_ErrorReadingRID ;
-long certi::FederationAlreadyPaused::type = certi::e_FederationAlreadyPaused ;
-long certi::FederationNotPaused::type = certi::e_FederationNotPaused ;
-long certi::AttributeNotSubscribed::type = certi::e_AttributeNotSubscribed ;
-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 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 ;
-// $Id: Exception.cc,v 3.16 2008/11/25 16:32:14 gotthardp Exp $
+static PrettyDebug PD_Exception("CERTI_EXCEPTION",__FILE__);
+
+const std::string certi::Exception::displayMe() const
+{
+ std::stringstream msg;
+
+ msg << "CERTI::Exception [";
+ if (NULL!=_name) {
+ msg <<_name;
+ } else {
+ msg<<"<noname>";
+ }
+ msg << " - reason=";
+ if (!_reason.empty()) {
+ msg << _reason;
+ } else {
+ msg << "<noreason>";
+ }
+ msg << std::endl;
+ msg << std::flush;
+
+ PD_Exception[pdExcept] << msg.str().c_str();
+ return msg.str();
+}
+// $Id: Exception.cc,v 3.17 2008/12/07 20:16:12 gotthardp Exp $
Index: libCERTI/Exception.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Exception.hh,v
retrieving revision 3.7
retrieving revision 3.8
diff -u -b -r3.7 -r3.8
--- libCERTI/Exception.hh 28 Oct 2008 12:07:26 -0000 3.7
+++ libCERTI/Exception.hh 7 Dec 2008 20:16:13 -0000 3.8
@@ -20,13 +20,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Exception.hh,v 3.7 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Exception.hh,v 3.8 2008/12/07 20:16:13 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_EXCEPTION_HH
#define _CERTI_EXCEPTION_HH
-#define MAX_EXCEPTION_REASON_LENGTH 256
+#include "certi.hh"
+#include <string>
namespace certi {
@@ -138,8 +139,136 @@
e_NetworkSignal
} TypeException ;
+class CERTI_EXPORT Exception
+{
+public:
+ const std::string _reason;
+ const char *_name;
+
+ Exception(const std::string &reason)
+ : _reason(reason) { }
+ virtual ~Exception() { }
+ const std::string displayMe() const;
+ virtual long getType() const = 0;
+};
+
+#define CERTI_EXCEPTION(A) \
+ class CERTI_EXPORT A : public Exception { \
+ public: \
+ static long _type; \
+ A(const std::string &reason) : Exception(reason) { _name = #A;
this->displayMe();} \
+ long getType() const { return _type; } \
+};
+
+// RTI Exceptions for use inside libCERTI
+CERTI_EXCEPTION(ArrayIndexOutOfBounds)
+CERTI_EXCEPTION(AsynchronousDeliveryAlreadyDisabled)
+CERTI_EXCEPTION(AsynchronousDeliveryAlreadyEnabled)
+CERTI_EXCEPTION(AttributeAcquisitionWasNotRequested)
+CERTI_EXCEPTION(AttributeAcquisitionWasNotCanceled)
+CERTI_EXCEPTION(AttributeAlreadyBeingAcquired)
+CERTI_EXCEPTION(AttributeAlreadyBeingDivested)
+CERTI_EXCEPTION(AttributeAlreadyOwned)
+CERTI_EXCEPTION(AttributeDivestitureWasNotRequested)
+CERTI_EXCEPTION(AttributeNotDefined)
+CERTI_EXCEPTION(AttributeNotKnown)
+CERTI_EXCEPTION(AttributeNotOwned)
+CERTI_EXCEPTION(AttributeNotPublished)
+CERTI_EXCEPTION(ConcurrentAccessAttempted)
+CERTI_EXCEPTION(CouldNotDiscover)
+CERTI_EXCEPTION(CouldNotOpenFED)
+CERTI_EXCEPTION(CouldNotRestore)
+CERTI_EXCEPTION(DeletePrivilegeNotHeld)
+CERTI_EXCEPTION(DimensionNotDefined)
+CERTI_EXCEPTION(EnableTimeConstrainedPending)
+CERTI_EXCEPTION(EnableTimeConstrainedWasNotPending)
+CERTI_EXCEPTION(EnableTimeRegulationPending)
+CERTI_EXCEPTION(EnableTimeRegulationWasNotPending)
+CERTI_EXCEPTION(ErrorReadingFED)
+CERTI_EXCEPTION(EventNotKnown)
+CERTI_EXCEPTION(FederateAlreadyExecutionMember)
+CERTI_EXCEPTION(FederateInternalError)
+CERTI_EXCEPTION(FederateLoggingServiceCalls)
+CERTI_EXCEPTION(FederateNotExecutionMember)
+CERTI_EXCEPTION(FederateOwnsAttributes)
+CERTI_EXCEPTION(FederateWasNotAskedToReleaseAttribute)
+CERTI_EXCEPTION(FederatesCurrentlyJoined)
+CERTI_EXCEPTION(FederationExecutionAlreadyExists)
+CERTI_EXCEPTION(FederationExecutionDoesNotExist)
+CERTI_EXCEPTION(FederationTimeAlreadyPassed)
+CERTI_EXCEPTION(HandleValuePairMaximumExceeded)
+CERTI_EXCEPTION(InteractionClassNotDefined)
+CERTI_EXCEPTION(InteractionClassNotKnown)
+CERTI_EXCEPTION(InteractionClassNotPublished)
+CERTI_EXCEPTION(InteractionClassNotSubscribed)
+CERTI_EXCEPTION(InteractionParameterNotDefined)
+CERTI_EXCEPTION(InteractionParameterNotKnown)
+CERTI_EXCEPTION(InvalidExtents)
+CERTI_EXCEPTION(InvalidFederationTime)
+CERTI_EXCEPTION(InvalidHandleValuePairSetContext)
+CERTI_EXCEPTION(InvalidLookahead)
+CERTI_EXCEPTION(InvalidOrderingHandle)
+CERTI_EXCEPTION(InvalidRegionContext)
+CERTI_EXCEPTION(InvalidResignAction)
+CERTI_EXCEPTION(InvalidRetractionHandle)
+CERTI_EXCEPTION(InvalidTransportationHandle)
+CERTI_EXCEPTION(MemoryExhausted)
+CERTI_EXCEPTION(NameNotFound)
+CERTI_EXCEPTION(ObjectClassNotDefined)
+CERTI_EXCEPTION(ObjectClassNotKnown)
+CERTI_EXCEPTION(ObjectClassNotPublished)
+CERTI_EXCEPTION(ObjectClassNotSubscribed)
+CERTI_EXCEPTION(ObjectNotKnown)
+CERTI_EXCEPTION(ObjectAlreadyRegistered)
+CERTI_EXCEPTION(OwnershipAcquisitionPending)
+CERTI_EXCEPTION(RegionInUse)
+CERTI_EXCEPTION(RegionNotKnown)
+CERTI_EXCEPTION(RestoreInProgress)
+CERTI_EXCEPTION(RestoreNotRequested)
+CERTI_EXCEPTION(RTIinternalError)
+CERTI_EXCEPTION(SpaceNotDefined)
+CERTI_EXCEPTION(SaveInProgress)
+CERTI_EXCEPTION(SaveNotInitiated)
+CERTI_EXCEPTION(SpecifiedSaveLabelDoesNotExist)
+CERTI_EXCEPTION(SynchronizationPointLabelWasNotAnnounced)
+CERTI_EXCEPTION(TimeAdvanceAlreadyInProgress)
+CERTI_EXCEPTION(TimeAdvanceWasNotInProgress)
+CERTI_EXCEPTION(TimeConstrainedAlreadyEnabled)
+CERTI_EXCEPTION(TimeConstrainedWasNotEnabled)
+CERTI_EXCEPTION(TimeRegulationAlreadyEnabled)
+CERTI_EXCEPTION(TimeRegulationWasNotEnabled)
+CERTI_EXCEPTION(UnableToPerformSave)
+CERTI_EXCEPTION(ValueCountExceeded)
+CERTI_EXCEPTION(ValueLengthExceeded)
+
+// Additional CERTI exceptions
+CERTI_EXCEPTION(FederateNotPublishing)
+CERTI_EXCEPTION(FederateNotSubscribing)
+CERTI_EXCEPTION(InvalidObjectHandle)
+CERTI_EXCEPTION(SecurityError)
+CERTI_EXCEPTION(CouldNotOpenRID)
+CERTI_EXCEPTION(ErrorReadingRID)
+CERTI_EXCEPTION(FederationAlreadyPaused)
+CERTI_EXCEPTION(FederationNotPaused)
+CERTI_EXCEPTION(AttributeNotSubscribed)
+CERTI_EXCEPTION(FederateAlreadyPaused)
+CERTI_EXCEPTION(FederateDoesNotExist)
+CERTI_EXCEPTION(FederateNameAlreadyInUse)
+CERTI_EXCEPTION(FederateNotPaused)
+CERTI_EXCEPTION(IDsupplyExhausted)
+CERTI_EXCEPTION(InvalidDivestitureCondition)
+CERTI_EXCEPTION(InvalidFederationTimeDelta)
+CERTI_EXCEPTION(InvalidRoutingSpace)
+CERTI_EXCEPTION(NoPauseRequested)
+CERTI_EXCEPTION(NoResumeRequested)
+CERTI_EXCEPTION(TooManyIDsRequested)
+CERTI_EXCEPTION(UnimplementedService)
+CERTI_EXCEPTION(UnknownLabel)
+CERTI_EXCEPTION(NetworkSignal)
+CERTI_EXCEPTION(NetworkError)
+
} // namespace certi
#endif // _CERTI_EXCEPTION_HH
-// $Id: Exception.hh,v 3.7 2008/10/28 12:07:26 gotthardp Exp $
+// $Id: Exception.hh,v 3.8 2008/12/07 20:16:13 gotthardp Exp $
Index: libCERTI/Extent.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Extent.hh,v
retrieving revision 3.9
retrieving revision 3.10
diff -u -b -r3.9 -r3.10
--- libCERTI/Extent.hh 3 Sep 2007 13:26:05 -0000 3.9
+++ libCERTI/Extent.hh 7 Dec 2008 20:16:13 -0000 3.10
@@ -19,13 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Extent.hh,v 3.9 2007/09/03 13:26:05 erk Exp $
+// $Id: Extent.hh,v 3.10 2008/12/07 20:16:13 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_EXTENT_HH
#define CERTI_EXTENT_HH
#include "certi.hh"
+#include "Exception.hh"
#include <vector>
#include <utility>
@@ -71,4 +72,4 @@
#endif // CERTI_EXTENT_HH
-// $Id: Extent.hh,v 3.9 2007/09/03 13:26:05 erk Exp $
+// $Id: Extent.hh,v 3.10 2008/12/07 20:16:13 gotthardp Exp $
Index: libCERTI/FedRegion.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/FedRegion.hh,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -b -r3.3 -r3.4
--- libCERTI/FedRegion.hh 23 Jun 2008 13:25:05 -0000 3.3
+++ libCERTI/FedRegion.hh 7 Dec 2008 20:16:13 -0000 3.4
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: FedRegion.hh,v 3.3 2008/06/23 13:25:05 erk Exp $
+// $Id: FedRegion.hh,v 3.4 2008/12/07 20:16:13 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_FED_REGION_HH
@@ -32,7 +32,7 @@
class RoutingSpace ;
-class CERTI_EXPORT FedRegion : public BaseRegion, public RTI::Region
+class CERTI_EXPORT FedRegion : public BaseRegion
{
public:
FedRegion(RegionHandle, SpaceHandle, const std::vector<Extent> &);
@@ -75,4 +75,4 @@
#endif // CERTI_FED_REGION_HH
-// $Id: FedRegion.hh,v 3.3 2008/06/23 13:25:05 erk Exp $
+// $Id: FedRegion.hh,v 3.4 2008/12/07 20:16:13 gotthardp Exp $
Index: libCERTI/GAV.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/GAV.cc,v
retrieving revision 3.17
retrieving revision 3.18
diff -u -b -r3.17 -r3.18
--- libCERTI/GAV.cc 6 Jul 2007 09:25:17 -0000 3.17
+++ libCERTI/GAV.cc 7 Dec 2008 20:16:13 -0000 3.18
@@ -15,35 +15,571 @@
// 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: GAV.cc,v 3.18 2008/12/07 20:16:13 gotthardp Exp $
// ----------------------------------------------------------------------------
-// $id
-
-
#include "GAV.hh"
#include "PrettyDebug.hh"
+#include <string.h>
#include <algorithm>
#include <assert.h>
+using std::list ;
+
+using namespace certi ;
+
+// ----------------------------------------------------------------------------
+// AttributeHandleValuePair
+// ----------------------------------------------------------------------------
+
namespace certi {
static pdCDebug D("GAV", "(gav) - ");
// ----------------------------------------------------------------------------
-// CAttributeHandleValuePair deleted
+AttributeHandleValuePair::AttributeHandleValuePair(Handle handle,
+ const char *value,
+ ULong value_length)
+{
+ _handle = handle ;
+ _valueLength = value_length ;
+
+ _value = new char[value_length];
+ memcpy(_value, value, value_length);
+}
+
+// ----------------------------------------------------------------------------
+AttributeHandleValuePair::~AttributeHandleValuePair()
+{
+ delete[] _value ;
+}
+
+// ----------------------------------------------------------------------------
+// AttributeHandleValuePairSet
+// ----------------------------------------------------------------------------
+AttributeHandleValuePairSet::AttributeHandleValuePairSet(ULong)
+{
+ _order = RECEIVE ;
+ _transport = RELIABLE ;
+}
+
// ----------------------------------------------------------------------------
+AttributeHandleValuePairSet::~AttributeHandleValuePairSet()
+{
+ empty();
+}
// ----------------------------------------------------------------------------
-// CParameterHandleValuePair deleted
+ULong
+AttributeHandleValuePairSet::size() const
+{
+ return list<AttributeHandleValuePair *>::size();
+}
+
// ----------------------------------------------------------------------------
+Handle
+AttributeHandleValuePairSet::getHandle(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k)
+ return (*j)->_handle ;
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
// ----------------------------------------------------------------------------
-// CAttributeHandleValuePairSet deleted
+ULong
+AttributeHandleValuePairSet::getValueLength(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k)
+ return (*j)->_valueLength ;
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleValuePairSet::getValue(ULong i,
+ char *buff,
+ ULong& value_length) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k) {
+ value_length = (*j)->_valueLength ;
+ memcpy(buff, (*j)->_value, (*j)->_valueLength);
+ return ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+char *
+AttributeHandleValuePairSet::getValuePointer(ULong i,
+ ULong& value_length) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k) {
+ value_length = (*j)->_valueLength ;
+ return (*j)->_value ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+TransportType
+AttributeHandleValuePairSet::getTransportType(ULong) const
+ throw (InvalidHandleValuePairSetContext)
+{
+ return _transport ;
+}
+
+// ----------------------------------------------------------------------------
+OrderType
+AttributeHandleValuePairSet::getOrderType(ULong) const
+ throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext)
+{
+ return _order ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Region *
+AttributeHandleValuePairSet::getRegion(ULong) const
+ throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext)
+{
+ throw RTIinternalError("Unimplemented service");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleValuePairSet::add(Handle h,
+ const char *buff,
+ ULong value_length)
+ throw (ValueLengthExceeded, ValueCountExceeded)
+{
+ AttributeHandleValuePair *ahvp ;
+ ahvp = new AttributeHandleValuePair(h, buff, value_length);
+
+ push_front(ahvp);
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleValuePairSet::remove(Handle h)
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandleValuePair *>::iterator j ;
+ for (j = begin(); j != end(); j++) {
+ if ((*j)->_handle == h) {
+ delete (*j);
+ erase(j);
+ return ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleValuePairSet::moveFrom(const AttributeHandleValuePairSet&,
+ ULong&)
+ throw (ValueCountExceeded, ArrayIndexOutOfBounds)
+{
+ throw RTIinternalError("Unimplemented service");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleValuePairSet::empty()
+{
+ while (!list<AttributeHandleValuePair *>::empty()) {
+ delete front();
+ pop_front();
+ }
+}
+
+// ----------------------------------------------------------------------------
+ULong
+AttributeHandleValuePairSet::start() const
+{
+ //not implemented
+ return 0 ;
+}
+
+// ----------------------------------------------------------------------------
+ULong
+AttributeHandleValuePairSet::valid(ULong) const
+{
+ //not implemented
+ return 0 ;
+}
+
+// ----------------------------------------------------------------------------
+ULong
+AttributeHandleValuePairSet::next(ULong) const
+{
+ //not implemented
+ return 0 ;
+}
+
+// ----------------------------------------------------------------------------
+// AttributeHandleSet
+// ----------------------------------------------------------------------------
+AttributeHandleSet::AttributeHandleSet(ULong size)
+{
+}
+
+AttributeHandleSet::~AttributeHandleSet()
+{
+ empty();
+}
+
+// ----------------------------------------------------------------------------
+inline ULong
+AttributeHandleSet::size() const
+{
+ return list<AttributeHandle>::size();
+}
+
+// ----------------------------------------------------------------------------
+AttributeHandle
+AttributeHandleSet::getHandle(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<AttributeHandle>::const_iterator h ;
+ ULong j ;
+ for (j = 0, h = begin(); h != end(); h++, j++) {
+ if (i == j)
+ return (*h);
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleSet::add(AttributeHandle h)
+ throw (ArrayIndexOutOfBounds, AttributeNotDefined)
+{
+ push_front(h);
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleSet::remove(AttributeHandle h)
+ throw (AttributeNotDefined)// not guaranteed safe while iterating
+{
+ if (isMember(h) == RTI::RTI_TRUE)
+ list<AttributeHandle>::remove(h);
+ else
+ throw AttributeNotDefined("");
+}
+
+// ----------------------------------------------------------------------------
+void
+AttributeHandleSet::empty()
+{
+ list<AttributeHandle>::clear();
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+AttributeHandleSet::isEmpty() const
+{
+ return RTI::Boolean(list<AttributeHandle>::empty());
+}
+
// ----------------------------------------------------------------------------
+RTI::Boolean
+AttributeHandleSet::isMember(AttributeHandle h) const
+{
+ return RTI::Boolean(find(begin(), end(), h) != end());
+}
// ----------------------------------------------------------------------------
-// CParameterHandleValuePairSet deleted
+// FederateHandleSet
// ----------------------------------------------------------------------------
+FederateHandleSet::~FederateHandleSet()
+{
+ empty();
+}
+
+// ----------------------------------------------------------------------------
+inline ULong
+FederateHandleSet::size() const
+{
+ return list<FederateHandle>::size();
+}
+
+// ----------------------------------------------------------------------------
+FederateHandle
+FederateHandleSet::getHandle(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<FederateHandle>::const_iterator h ;
+ ULong j ;
+ for (j = 0, h = begin(); h != end(); h++, j++) {
+ if (i == j)
+ return (*h);
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+FederateHandleSet::add(FederateHandle h)
+ throw (ValueCountExceeded)
+{
+ push_front(h);
+}
+
+// ----------------------------------------------------------------------------
+void
+FederateHandleSet::remove(FederateHandle h)
+ throw (ArrayIndexOutOfBounds)
+{
+ if (isMember(h) == RTI::RTI_TRUE)
+ list<FederateHandle>::remove(h);
+ else
+ throw AttributeNotDefined("");
+}
+
+// ----------------------------------------------------------------------------
+void
+FederateHandleSet::empty()
+{
+ list<FederateHandle>::clear();
+}
+
+// ----------------------------------------------------------------------------
+RTI::Boolean
+FederateHandleSet::isMember(FederateHandle h) const
+{
+ return RTI::Boolean(find(begin(), end(), h) != end());
+}
+
+// ----------------------------------------------------------------------------
+// ParameterHandleValuePair
+// ----------------------------------------------------------------------------
+
+ParameterHandleValuePair::ParameterHandleValuePair(Handle handle,
+ const char *value,
+ ULong value_length)
+{
+ _handle = handle ;
+ _valueLength = value_length ;
+
+ _value = (char *) malloc(value_length);
+ memcpy(_value, value, value_length);
+}
+
+// ----------------------------------------------------------------------------
+ParameterHandleValuePair::~ParameterHandleValuePair()
+{
+ free(_value);
+}
+
+// ----------------------------------------------------------------------------
+// ParameterHandleValuePairSet
+// ----------------------------------------------------------------------------
+ParameterHandleValuePairSet::ParameterHandleValuePairSet(ULong)
+{
+ _order = RECEIVE ;
+ _transport = RELIABLE ;
+}
+
+ParameterHandleValuePairSet::~ParameterHandleValuePairSet()
+{
+ empty();
+}
+
+// ----------------------------------------------------------------------------
+ULong
+ParameterHandleValuePairSet::size() const
+{
+ return list<ParameterHandleValuePair *>::size();
+}
+
+// ----------------------------------------------------------------------------
+Handle
+ParameterHandleValuePairSet::getHandle(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<ParameterHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k)
+ return (*j)->_handle ;
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+ULong
+ParameterHandleValuePairSet::getValueLength(ULong i) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<ParameterHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k)
+ return (*j)->_valueLength ;
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+ParameterHandleValuePairSet::getValue(ULong i,
+ char *buff,
+ ULong& value_length) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<ParameterHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k) {
+ value_length = (*j)->_valueLength ;
+ memcpy(buff, (*j)->_value, (*j)->_valueLength);
+ return ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+char *
+ParameterHandleValuePairSet::getValuePointer(ULong i,
+ ULong& value_length) const
+ throw (ArrayIndexOutOfBounds)
+{
+ list<ParameterHandleValuePair *>::const_iterator j = begin();
+ for (ULong k = 0 ; j != end(); j++, k++) {
+ if (i == k) {
+ value_length = (*j)->_valueLength ;
+ return (*j)->_value ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+inline TransportType
+ParameterHandleValuePairSet::getTransportType() const
+ throw (InvalidHandleValuePairSetContext)
+{
+ return _transport ;
+}
+
+// ----------------------------------------------------------------------------
+inline OrderType
+ParameterHandleValuePairSet::getOrderType() const
+ throw (InvalidHandleValuePairSetContext)
+{
+ return _order ;
+}
+
+// ----------------------------------------------------------------------------
+RTI::Region *
+ParameterHandleValuePairSet::getRegion() const
+ throw (InvalidHandleValuePairSetContext)
+{
+ throw RTIinternalError("Unimplemented service");
+}
+
+// ----------------------------------------------------------------------------
+void
+ParameterHandleValuePairSet::add(Handle h,
+ const char *buff,
+ ULong value_length)
+ throw (ValueLengthExceeded, ValueCountExceeded)
+{
+ ParameterHandleValuePair *phvp ;
+ phvp = new ParameterHandleValuePair(h, buff, value_length);
+
+ push_front(phvp);
+}
+
+// ----------------------------------------------------------------------------
+void
+ParameterHandleValuePairSet::remove(Handle h)
+ throw (ArrayIndexOutOfBounds)
+{
+ list<ParameterHandleValuePair *>::iterator j ;
+ for (j = begin(); j != end(); j++) {
+ if ((*j)->_handle == h) {
+ delete (*j);
+ erase(j);
+ return ;
+ }
+ }
+
+ throw ArrayIndexOutOfBounds("");
+}
+
+// ----------------------------------------------------------------------------
+void
+ParameterHandleValuePairSet::moveFrom(const ParameterHandleValuePairSet&,
+ ULong&)
+ throw (ValueCountExceeded, ArrayIndexOutOfBounds)
+{
+ throw RTIinternalError("Unimplemented service");
+}
+
+// ----------------------------------------------------------------------------
+void
+ParameterHandleValuePairSet::empty()
+{
+ while (!list<ParameterHandleValuePair *>::empty()) {
+ delete front();
+ pop_front();
+ }
+}
+
+// ----------------------------------------------------------------------------
+ULong
+ParameterHandleValuePairSet::start() const
+{
+ //not implemented
+ return 0 ;
+}
+
+// ----------------------------------------------------------------------------
+ULong
+ParameterHandleValuePairSet::valid(ULong) const
+{
+ //not implemented
+ return 0 ;
+}
+
+// ----------------------------------------------------------------------------
+ULong
+ParameterHandleValuePairSet::next(ULong) const
+{
+ //not implemented
+ return 0 ;
+}
} // namespace certi
+
+// $Id: GAV.cc,v 3.18 2008/12/07 20:16:13 gotthardp Exp $
+
Index: libCERTI/GAV.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/GAV.hh,v
retrieving revision 3.12
retrieving revision 3.13
diff -u -b -r3.12 -r3.13
--- libCERTI/GAV.hh 25 Jun 2008 08:27:47 -0000 3.12
+++ libCERTI/GAV.hh 7 Dec 2008 20:16:13 -0000 3.13
@@ -21,16 +21,18 @@
#define CERTI_GAV_HH
#include "certi.hh"
+#include "Exception.hh"
#include <list>
namespace certi {
-class AttributeHandleSetImp
- : public std::list<AttributeHandle>, public AttributeHandleSet
+class AttributeHandleSet
+ : public std::list<AttributeHandle>
{
public:
- virtual ~AttributeHandleSetImp();
+ AttributeHandleSet(ULong size);
+ virtual ~AttributeHandleSet();
virtual ULong size() const ;
@@ -49,10 +51,11 @@
virtual RTI::Boolean isMember(AttributeHandle h) const ;
};
-class FederateHandleSetImp : public std::list<FederateHandle>,
RTI::FederateHandleSet
+class FederateHandleSet : public std::list<FederateHandle>
{
public:
- virtual ~FederateHandleSetImp();
+ FederateHandleSet(ULong size);
+ virtual ~FederateHandleSet();
virtual ULong size() const ;
@@ -63,7 +66,7 @@
throw (ValueCountExceeded);
virtual void remove(FederateHandle h)
- throw (RTI::ArrayIndexOutOfBounds);
+ throw (ArrayIndexOutOfBounds);
virtual void empty();
@@ -86,8 +89,8 @@
~AttributeHandleValuePair();
};
-class AttributeHandleValuePairSetImp
- : public std::list<AttributeHandleValuePair *>,
RTI::AttributeHandleValuePairSet
+class AttributeHandleValuePairSet
+ : public std::list<AttributeHandleValuePair *>
{
// ATTRIBUTES
public:
@@ -96,7 +99,8 @@
// METHODS
public:
- virtual ~AttributeHandleValuePairSetImp();
+ AttributeHandleValuePairSet(ULong size);
+ virtual ~AttributeHandleValuePairSet();
virtual ULong size() const ;
virtual Handle getHandle(ULong i) const throw (ArrayIndexOutOfBounds);
@@ -109,7 +113,7 @@
throw (ArrayIndexOutOfBounds);
virtual TransportType getTransportType(ULong i) const
- throw (RTI::InvalidHandleValuePairSetContext);
+ throw (InvalidHandleValuePairSetContext);
virtual OrderType getOrderType(ULong i) const
throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext);
@@ -141,16 +145,16 @@
~ParameterHandleValuePair();
};
-class ParameterHandleValuePairSetImp
- : public std::list<ParameterHandleValuePair *>, public
RTI::ParameterHandleValuePairSet
+class ParameterHandleValuePairSet
+ : public std::list<ParameterHandleValuePair *>
{
public:
OrderType _order ;
TransportType _transport ;
public:
- ParameterHandleValuePairSetImp(ULong size);
- virtual ~ParameterHandleValuePairSetImp();
+ ParameterHandleValuePairSet(ULong size);
+ virtual ~ParameterHandleValuePairSet();
virtual ULong size() const ;
Index: libCERTI/GSSAPIHandler.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/GSSAPIHandler.cc,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -b -r3.6 -r3.7
--- libCERTI/GSSAPIHandler.cc 6 Jul 2007 09:25:17 -0000 3.6
+++ libCERTI/GSSAPIHandler.cc 7 Dec 2008 20:16:14 -0000 3.7
@@ -19,15 +19,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: GSSAPIHandler.cc,v 3.6 2007/07/06 09:25:17 erk Exp $
+// $Id: GSSAPIHandler.cc,v 3.7 2008/12/07 20:16:14 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifdef WITH_GSSAPI
-
-
#include "GSSAPIHandler.hh"
-#include "RTItypes.hh"
#include "PrettyDebug.hh"
#include "SocketTCP.hh"
@@ -691,4 +688,4 @@
#endif // WITH_GSSAPI
-// $Id: GSSAPIHandler.cc,v 3.6 2007/07/06 09:25:17 erk Exp $
+// $Id: GSSAPIHandler.cc,v 3.7 2008/12/07 20:16:14 gotthardp Exp $
Index: libCERTI/LBTS.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/LBTS.cc,v
retrieving revision 3.11
retrieving revision 3.12
diff -u -b -r3.11 -r3.12
--- libCERTI/LBTS.cc 23 Jun 2008 13:25:05 -0000 3.11
+++ libCERTI/LBTS.cc 7 Dec 2008 20:16:14 -0000 3.12
@@ -19,12 +19,13 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: LBTS.cc,v 3.11 2008/06/23 13:25:05 erk Exp $
+// $Id: LBTS.cc,v 3.12 2008/12/07 20:16:14 gotthardp Exp $
// ----------------------------------------------------------------------------
#include "LBTS.hh"
+#include "Exception.hh"
#include "PrettyDebug.hh"
#ifndef _WIN32
@@ -159,4 +160,4 @@
} // namespace certi
-// $Id: LBTS.cc,v 3.11 2008/06/23 13:25:05 erk Exp $
+// $Id: LBTS.cc,v 3.12 2008/12/07 20:16:14 gotthardp Exp $
Index: libCERTI/Message.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Message.cc,v
retrieving revision 3.61
retrieving revision 3.62
diff -u -b -r3.61 -r3.62
--- libCERTI/Message.cc 28 Oct 2008 12:07:26 -0000 3.61
+++ libCERTI/Message.cc 7 Dec 2008 20:16:14 -0000 3.62
@@ -23,7 +23,6 @@
#include "Message.hh"
#include "certi.hh"
#include "PrettyDebug.hh"
-#include "GAV.hh"
#include <stdlib.h>
#include <cstdio>
@@ -272,13 +271,9 @@
*/
void
Message::setException(TypeException the_exception,
- const char *the_reason)
+ const std::string& the_reason)
{
exception = the_exception ;
-
- if (strlen(the_reason) > MAX_EXCEPTION_REASON_LENGTH)
- throw ValueLengthExceeded("Exception reason too long to fit in"
- " Message.");
exceptionReason = the_reason;
}
@@ -290,29 +285,22 @@
}
// ----------------------------------------------------------------------------
-AttributeHandleSet*
+const std::vector<AttributeHandle>&
Message::getAHS() const
{
- AttributeHandleSet *attributeSet ;
- attributeSet = RTI::AttributeHandleSetFactory::create(handleArraySize);
-
- for (int i = 0 ; i < handleArraySize ; i++) {
- attributeSet->add(handleArray[i]);
- }
-
- return attributeSet ;
+ return handleArray;
}
// ----------------------------------------------------------------------------
void
-Message::setAHS(const AttributeHandleSet &the_attributes)
+Message::setAHS(const std::vector<AttributeHandle> &the_attributes)
{
G.Out(pdGendoc,"enter Message::setAHS");
handleArraySize = the_attributes.size();
handleArray.resize(handleArraySize);
for (unsigned int i = 0 ; i < the_attributes.size(); ++i) {
- handleArray[i] = the_attributes.getHandle(i);
+ handleArray[i] = the_attributes[i];
}
G.Out(pdGendoc,"exit Message::setAHS");
}
@@ -332,16 +320,18 @@
}
// ----------------------------------------------------------------------------
-RTI::AttributeHandleValuePairSet *
+std::vector<std::pair<AttributeHandle, AttributeValue_t> >
Message::getAHVPS() const
{
- RTI::AttributeHandleValuePairSet *ahvps ;
- ahvps = RTI::AttributeSetFactory::create(handleArraySize);
+ std::vector<std::pair<AttributeHandle, AttributeValue_t> > result;
+ result.resize(handleArraySize);
- for (int i = 0 ; i < handleArraySize ; i++)
- ahvps->add(handleArray[i], valueArray[i].data(),
valueArray[i].length());
+ for (int i = 0 ; i < handleArraySize ; i++) {
+ result[i].first = handleArray[i];
+ result[i].second.assign(valueArray[i].data(), valueArray[i].length());
+ }
- return ahvps ;
+ return result;
}
// ----------------------------------------------------------------------------
@@ -349,7 +339,7 @@
@param the_attributes attribute set
*/
void
-Message::setAHVPS(const RTI::AttributeHandleValuePairSet &the_attributes)
+Message::setAHVPS(const std::vector<std::pair<AttributeHandle,
AttributeValue_t> > &the_attributes)
{
G.Out(pdGendoc,"enter Message::setAHVPS");
@@ -361,35 +351,30 @@
valueArray.resize(size) ;
for (unsigned long i = 0 ; i < size ; i++) {
-
- // handle stored into handleArray[i]
- handleArray[i] = the_attributes.getHandle(size-1-i);
-
- // value stored into valueArray[i]
- ULong length;
- char *valueptr = the_attributes.getValuePointer(size-1-i, length);
- valueArray[i].assign(valueptr, length);
- // no free(valueptr), getValuePointer does not allocate memory
+ handleArray[i] = the_attributes[size-1-i].first;
+ valueArray[i] = the_attributes[size-1-i].second;
}
G.Out(pdGendoc,"exit Message::setAHVPS");
}
// ----------------------------------------------------------------------------
-RTI::ParameterHandleValuePairSet *
+std::vector<std::pair<ParameterHandle, ParameterValue_t> >
Message::getPHVPS() const
{
- ParameterHandleValuePairSetImp *phvps ;
- phvps = new ParameterHandleValuePairSetImp(handleArraySize);
+ std::vector<std::pair<ParameterHandle, ParameterValue_t> > result;
+ result.resize(handleArraySize);
- for (int i = 0 ; i < handleArraySize ; i++)
- phvps->add(handleArray[i], valueArray[i].data(),
valueArray[i].length());
+ for (int i = 0 ; i < handleArraySize ; i++) {
+ result[i].first = handleArray[i];
+ result[i].second.assign(valueArray[i].data(), valueArray[i].length());
+ }
- return phvps ;
+ return result;
}
// ----------------------------------------------------------------------------
void
-Message::setPHVPS(const RTI::ParameterHandleValuePairSet &the_parameters)
+Message::setPHVPS(const std::vector<std::pair<ParameterHandle,
ParameterValue_t> > &the_parameters)
{
G.Out(pdGendoc,"enter Message::setPHVPS");
@@ -401,15 +386,8 @@
valueArray.resize(size) ;
for (unsigned long i = 0 ; i < size ; i++) {
-
- // handle stored into handleArray[i]
- handleArray[i] = the_parameters.getHandle(size-1-i);
-
- // value stored into valueArray[i]
- ULong length;
- char *valueptr = the_parameters.getValuePointer(size-1-i, length);
- valueArray[i].assign(valueptr, length);
- // no free(valueptr), getValuePointer does not allocate memory
+ handleArray[i] = the_parameters[size-1-i].first;
+ valueArray[i] = the_parameters[size-1-i].second;
}
G.Out(pdGendoc,"exit Message::setPHVPS");
}
@@ -441,9 +419,7 @@
valueArray.resize(the_size) ;
for (int i = 0 ; i < the_size ; i++) {
- // attributes into handleArray
handleArray[i] = the_attributes[i] ;
- // values into valueArray
valueArray[i] = the_values[i] ;
}
G.Out(pdGendoc,"exit Message::setAttributes");
@@ -464,9 +440,7 @@
valueArray.resize(the_size) ;
for (int i = 0 ; i < the_size ; i++) {
- // parameters into handleArray
handleArray[i] = the_parameters[i] ;
- // values into valueArray
valueArray[i] = the_values[i] ;
}
}
@@ -599,7 +573,7 @@
printf("NO_EXCEPTION ");
else
printf(" exception=%d: ",exception);
- printf(" reason=%s:
",((exceptionReason.c_str()==NULL)?"empty":exceptionReason.c_str()));
+ printf(" reason=%s:
",(exceptionReason.empty()?"empty":exceptionReason.c_str()));
printf(" objectClass=%ld: ", objectClass);
printf(" interactionClass=%ld:\n", interactionClass);
printf(" attribute=%ld:\n", attribute);
Index: libCERTI/Message.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Message.hh,v
retrieving revision 3.53
retrieving revision 3.54
diff -u -b -r3.53 -r3.54
--- libCERTI/Message.hh 6 Nov 2008 14:28:58 -0000 3.53
+++ libCERTI/Message.hh 7 Dec 2008 20:16:14 -0000 3.54
@@ -25,6 +25,7 @@
#include "Exception.hh"
#include "SocketUN.hh"
#include "BasicMessage.hh"
+#include "GAV.hh"
#include "fedtime.hh"
#include <vector>
@@ -350,7 +351,6 @@
void setEventRetraction(EventRetractionHandle);
EventRetractionHandle getEventRetraction() const
-
{ return eventRetraction ; };
void setParameter(ParameterHandle);
@@ -359,21 +359,21 @@
void setFederate(FederateHandle);
FederateHandle getFederate() const { return federate ; };
- AttributeHandleSet* getAHS() const ;
- void setAHS(const AttributeHandleSet &);
+ const std::vector<AttributeHandle>& getAHS() const ;
+ void setAHS(const std::vector<AttributeHandle> &);
void setAHS(const AttributeHandle *, int);
- RTI::AttributeHandleValuePairSet* getAHVPS() const ;
- void setAHVPS(const RTI::AttributeHandleValuePairSet &);
+ std::vector<std::pair<AttributeHandle, AttributeValue_t> > getAHVPS()
const ;
+ void setAHVPS(const std::vector<std::pair<AttributeHandle,
AttributeValue_t> > &);
- RTI::ParameterHandleValuePairSet* getPHVPS() const ;
- void setPHVPS(const RTI::ParameterHandleValuePairSet &);
+ std::vector<std::pair<ParameterHandle, ParameterValue_t> > getPHVPS()
const ;
+ void setPHVPS(const std::vector<std::pair<ParameterHandle,
ParameterValue_t> > &);
void setAttributes(std::vector <AttributeHandle> &, ushort);
void setAttributes(std::vector <AttributeHandle> &, std::vector
<AttributeValue_t> &, ushort);
void setParameters(std::vector <ParameterHandle> &, std::vector
<ParameterValue_t> &, ushort);
- void setException(TypeException, const char *the_reason = "\0");
+ void setException(TypeException, const std::string& the_reason = "");
TypeException getExceptionType() const { return exception ; };
const char *getExceptionReason() const { return exceptionReason.c_str() ;
};
@@ -387,7 +387,6 @@
protected:
TypeException exception ;
- //char exceptionReason[MAX_EXCEPTION_REASON_LENGTH + 1] ;
std::string exceptionReason;
RTIfedTime fed_time;
Index: libCERTI/MessageBuffer.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/MessageBuffer.cc,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -b -r3.13 -r3.14
--- libCERTI/MessageBuffer.cc 18 Sep 2008 14:41:28 -0000 3.13
+++ libCERTI/MessageBuffer.cc 7 Dec 2008 20:16:14 -0000 3.14
@@ -20,6 +20,7 @@
// ----------------------------------------------------------------------------
#include "MessageBuffer.hh"
+#include "Exception.hh"
#include "PrettyDebug.hh"
#include <cassert>
#include <sstream>
Index: libCERTI/Object.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Object.hh,v
retrieving revision 3.19
retrieving revision 3.20
diff -u -b -r3.19 -r3.20
--- libCERTI/Object.hh 18 Sep 2008 17:13:32 -0000 3.19
+++ libCERTI/Object.hh 7 Dec 2008 20:16:14 -0000 3.20
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: Object.hh,v 3.19 2008/09/18 17:13:32 erk Exp $
+// $Id: Object.hh,v 3.20 2008/12/07 20:16:14 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_HH
@@ -34,6 +34,7 @@
#include "certi.hh"
#include "Named.hh"
#include "Handled.hh"
+#include "Exception.hh"
#include <deque>
#include <list>
@@ -93,4 +94,4 @@
#endif // _CERTI_OBJECT_HH
-// $Id: Object.hh,v 3.19 2008/09/18 17:13:32 erk Exp $
+// $Id: Object.hh,v 3.20 2008/12/07 20:16:14 gotthardp Exp $
Index: libCERTI/ObjectAttribute.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/ObjectAttribute.hh,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -b -r3.16 -r3.17
--- libCERTI/ObjectAttribute.hh 22 Jun 2007 08:51:38 -0000 3.16
+++ libCERTI/ObjectAttribute.hh 7 Dec 2008 20:16:14 -0000 3.17
@@ -19,13 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectAttribute.hh,v 3.16 2007/06/22 08:51:38 erk Exp $
+// $Id: ObjectAttribute.hh,v 3.17 2008/12/07 20:16:14 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef CERTI_OBJECT_ATTRIBUTE_HH
#define CERTI_OBJECT_ATTRIBUTE_HH
#include "certi.hh"
+#include "Exception.hh"
#include <list>
@@ -94,4 +95,4 @@
#endif // CERTI_OBJECT_ATTRIBUTE_HH
-// $Id: ObjectAttribute.hh,v 3.16 2007/06/22 08:51:38 erk Exp $
+// $Id: ObjectAttribute.hh,v 3.17 2008/12/07 20:16:14 gotthardp Exp $
Index: libCERTI/ObjectClass.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/ObjectClass.cc,v
retrieving revision 3.62
retrieving revision 3.63
diff -u -b -r3.62 -r3.63
--- libCERTI/ObjectClass.cc 8 Nov 2008 11:36:05 -0000 3.62
+++ libCERTI/ObjectClass.cc 7 Dec 2008 20:16:15 -0000 3.63
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.cc,v 3.62 2008/11/08 11:36:05 erk Exp $
+// $Id: ObjectClass.cc,v 3.63 2008/12/07 20:16:15 gotthardp Exp $
// ----------------------------------------------------------------------------
#include "Object.hh"
@@ -1603,7 +1603,7 @@
if (server != NULL) {
CDiffusion *diffusionAcquisition = new CDiffusion();
- theAttribute = RTI::AttributeHandleSetFactory::create(the_size);
+ theAttribute = new AttributeHandleSet(the_size);
ObjectClassAttribute * oca ;
for (int i = 0 ; i < the_size ; i++) {
@@ -1830,4 +1830,4 @@
} // namespace certi
-// $Id: ObjectClass.cc,v 3.62 2008/11/08 11:36:05 erk Exp $
+// $Id: ObjectClass.cc,v 3.63 2008/12/07 20:16:15 gotthardp Exp $
Index: libCERTI/ObjectClass.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/ObjectClass.hh,v
retrieving revision 3.43
retrieving revision 3.44
diff -u -b -r3.43 -r3.44
--- libCERTI/ObjectClass.hh 8 Nov 2008 11:08:03 -0000 3.43
+++ libCERTI/ObjectClass.hh 7 Dec 2008 20:16:15 -0000 3.44
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: ObjectClass.hh,v 3.43 2008/11/08 11:08:03 erk Exp $
+// $Id: ObjectClass.hh,v 3.44 2008/12/07 20:16:15 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_OBJECT_CLASS_HH
@@ -39,6 +39,7 @@
#include "certi.hh"
#include "SecurityServer.hh"
#include "Named.hh"
+#include "GAV.hh"
// Standard
#include <list>
@@ -322,4 +323,4 @@
#endif // _CERTI_OBJECT_CLASS_HH
-// $Id: ObjectClass.hh,v 3.43 2008/11/08 11:08:03 erk Exp $
+// $Id: ObjectClass.hh,v 3.44 2008/12/07 20:16:15 gotthardp Exp $
Index: libCERTI/ObjectSet.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/ObjectSet.hh,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -b -r3.13 -r3.14
--- libCERTI/ObjectSet.hh 10 Jun 2008 13:41:47 -0000 3.13
+++ libCERTI/ObjectSet.hh 7 Dec 2008 20:16:15 -0000 3.14
@@ -28,6 +28,7 @@
class Object;
#include "SecurityServer.hh"
#include "MessageBuffer.hh"
+#include "GAV.hh"
#include "certi.hh"
// Standard
Index: libCERTI/SecurityLevel.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/SecurityLevel.hh,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- libCERTI/SecurityLevel.hh 24 Jun 2008 12:23:31 -0000 3.10
+++ libCERTI/SecurityLevel.hh 7 Dec 2008 20:16:15 -0000 3.11
@@ -19,13 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: SecurityLevel.hh,v 3.10 2008/06/24 12:23:31 rousse Exp $
+// $Id: SecurityLevel.hh,v 3.11 2008/12/07 20:16:15 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_SECURITY_LEVEL_HH
#define _CERTI_SECURITY_LEVEL_HH
#include "certi.hh"
+#include "Exception.hh"
#include <stdlib.h>
#include <string.h>
@@ -68,4 +69,4 @@
#endif // _CERTI_SECURITY_LEVEL_HH
-// $Id: SecurityLevel.hh,v 3.10 2008/06/24 12:23:31 rousse Exp $
+// $Id: SecurityLevel.hh,v 3.11 2008/12/07 20:16:15 gotthardp Exp $
Index: libCERTI/Socket.hh
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/Socket.hh,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/Socket.hh 13 Oct 2008 11:27:51 -0000 3.15
+++ libCERTI/Socket.hh 7 Dec 2008 20:16:15 -0000 3.16
@@ -21,6 +21,7 @@
#define CERTI_SOCKET_HH
#include "certi.hh"
+#include "Exception.hh"
#ifndef _WIN32
#include <sys/time.h>
#include <sys/types.h>
Index: libCERTI/SocketTCP.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/SocketTCP.cc,v
retrieving revision 3.26
retrieving revision 3.27
diff -u -b -r3.26 -r3.27
--- libCERTI/SocketTCP.cc 12 Oct 2008 11:46:41 -0000 3.26
+++ libCERTI/SocketTCP.cc 7 Dec 2008 20:16:15 -0000 3.27
@@ -17,7 +17,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: SocketTCP.cc,v 3.26 2008/10/12 11:46:41 gotthardp Exp $
+// $Id: SocketTCP.cc,v 3.27 2008/12/07 20:16:15 gotthardp Exp $
// ----------------------------------------------------------------------------
#ifdef _WIN32
@@ -32,7 +32,6 @@
#include "SocketTCP.hh"
#include "PrettyDebug.hh"
-#include "baseTypes.hh"
#include <cassert>
#include <cerrno>
@@ -59,11 +58,11 @@
if (winsockInits > 0)
{
winsockInits++;
- return RTI_TRUE;
+ return true;
}
else if (winsockInits <0)
{
- return RTI_FALSE;
+ return false;
}
wVersionRequested = MAKEWORD( 2, 0 );
@@ -71,18 +70,18 @@
if (lError != 0)
{
winsockInits = -1;
- return RTI_FALSE;
+ return false;
}
if (LOBYTE( wsaData.wVersion ) != 2 || HIBYTE( wsaData.wVersion ) != 0)
{// Tell the user that we couldn't find a usable WinSock DLL.
WSACleanup( );
winsockInits = -1;
- return RTI_FALSE;
+ return false;
}
winsockInits = 1;
-return RTI_TRUE;
+return true;
}
void SocketTCP::winsockShutdown()
@@ -597,4 +596,4 @@
} // namespace
-// $Id: SocketTCP.cc,v 3.26 2008/10/12 11:46:41 gotthardp Exp $
+// $Id: SocketTCP.cc,v 3.27 2008/12/07 20:16:15 gotthardp Exp $
Index: libCERTI/SocketUN.cc
===================================================================
RCS file: /cvsroot/certi/certi/libCERTI/SocketUN.cc,v
retrieving revision 3.27
retrieving revision 3.28
diff -u -b -r3.27 -r3.28
--- libCERTI/SocketUN.cc 11 Oct 2008 12:53:53 -0000 3.27
+++ libCERTI/SocketUN.cc 7 Dec 2008 20:16:15 -0000 3.28
@@ -18,10 +18,8 @@
// ----------------------------------------------------------------------------
-
#include "certi.hh"
#include "SocketUN.hh"
-#include "baseTypes.hh"
#if defined(RTIA_USE_TCP)
#include "SocketTCP.hh"
@@ -275,7 +273,7 @@
{
#ifdef _WIN32
closesocket(_socket_un);
- if(_est_serveur == RTI_TRUE)
+ if (_est_serveur)
closesocket(sock_connect);
#else
close(_socket_un);
Index: libRTI/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/libRTI/CMakeLists.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- libRTI/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.9
+++ libRTI/CMakeLists.txt 7 Dec 2008 20:16:16 -0000 1.10
@@ -5,6 +5,7 @@
RTIambassador.cc
RTIambPrivateRefs.cc
RTItypes.cc
+ RTItypesImp.cc
)
SET(RTI_LIB_INCLUDE
@@ -19,17 +20,18 @@
#SOURCE_GROUP("RTI\\Header" FILES ${RTI_LIB_INCLUDE})
-ADD_LIBRARY(RTI-NG ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
-TARGET_LINK_LIBRARIES(RTI-NG CERTI)
+ADD_LIBRARY(RTI ${RTI_LIB_SRCS} ${RTI_LIB_INCLUDE})
+TARGET_LINK_LIBRARIES(RTI CERTI)
-SET_TARGET_PROPERTIES(RTI-NG PROPERTIES VERSION 1.0.0 SOVERSION 1)
+SET_TARGET_PROPERTIES(RTI PROPERTIES OUTPUT_NAME "RTI-NG")
+SET_TARGET_PROPERTIES(RTI PROPERTIES VERSION 1.0.0 SOVERSION 1)
IF (MINGW)
- SET_TARGET_PROPERTIES(RTI-NG PROPERTIES LINK_FLAGS
"-Wl,--output-def,${LIBRARY_OUTPUT_PATH}/libRTI.def")
+ SET_TARGET_PROPERTIES(RTI 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-NG
+INSTALL(TARGETS RTI
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Index: libRTI/RTIambPrivateRefs.cc
===================================================================
RCS file: /cvsroot/certi/certi/libRTI/RTIambPrivateRefs.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libRTI/RTIambPrivateRefs.cc 6 Nov 2008 14:28:58 -0000 3.15
+++ libRTI/RTIambPrivateRefs.cc 7 Dec 2008 20:16:16 -0000 3.16
@@ -19,11 +19,12 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambPrivateRefs.cc,v 3.15 2008/11/06 14:28:58 gotthardp Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.16 2008/12/07 20:16:16 gotthardp Exp $
// ----------------------------------------------------------------------------
#include <config.h>
#include "RTIambPrivateRefs.hh"
+#include "RTItypesImp.hh"
#include "PrettyDebug.hh"
#include <sstream>
@@ -48,11 +49,11 @@
// ----------------------------------------------------------------------------
void
-RTIambPrivateRefs::leave(const char *msg) throw (RTIinternalError)
+RTIambPrivateRefs::leave(const char *msg) throw (RTI::RTIinternalError)
{
std::stringstream smsg;
smsg << "RTI called leave because <" <<msg<<">";
- throw RTIinternalError(smsg.str().c_str());
+ throw RTI::RTIinternalError(smsg.str().c_str());
}
// ----------------------------------------------------------------------------
@@ -68,7 +69,7 @@
}
catch (NetworkError) {
std::cerr << "libRTI: exception: NetworkError (write)" << std::endl ;
- throw RTIinternalError("libRTI: Network Write Error");
+ throw RTI::RTIinternalError("libRTI: Network Write Error");
}
D.Out(pdDebug, "waiting RTIA reply.");
@@ -79,7 +80,7 @@
}
catch (NetworkError) {
std::cerr << "libRTI: exception: NetworkError (read)" << std::endl ;
- throw RTIinternalError("libRTI: Network Read Error waiting RTI reply");
+ throw RTI::RTIinternalError("libRTI: Network Read Error waiting RTI
reply");
}
D.Out(pdDebug, "RTIA reply received.");
@@ -87,7 +88,7 @@
if (rep->type != req->type) {
std::cout << "LibRTI: Assertion failed: rep->type != req->type" <<
std::endl ;
- throw RTIinternalError("RTIambPrivateRefs::executeService: "
+ throw RTI::RTIinternalError("RTIambPrivateRefs::executeService: "
"rep->type != req->type");
}
@@ -113,7 +114,7 @@
}
catch (NetworkError) {
std::cerr << "libRTI: exception: NetworkError (write)" << std::endl ;
- throw RTIinternalError("libRTI: Network Write Error");
+ throw RTI::RTIinternalError("libRTI: Network Write Error");
}
try {
@@ -121,7 +122,7 @@
}
catch (NetworkError) {
std::cerr << "libRTI: exception: NetworkError (read)" << std::endl ;
- throw RTIinternalError("libRTI: Network Read Error waiting RTI reply");
+ throw RTI::RTIinternalError("libRTI: Network Read Error waiting RTI
reply");
}
// ignore the response, ignore exceptions
@@ -145,162 +146,162 @@
case e_ArrayIndexOutOfBounds: {
D.Out(pdExcept, "Throwing e_ArrayIndexOutOfBounds exception.");
- throw ArrayIndexOutOfBounds(msg->getExceptionReason());
+ throw RTI::ArrayIndexOutOfBounds(msg->getExceptionReason());
} break ;
case e_AsynchronousDeliveryAlreadyEnabled: {
D.Out(pdExcept, "Throwing e_AsynchronousDeliveryAlreadyEnabled
exception.");
- throw AsynchronousDeliveryAlreadyEnabled(msg->getExceptionReason());
+ throw
RTI::AsynchronousDeliveryAlreadyEnabled(msg->getExceptionReason());
} break ;
case e_AsynchronousDeliveryAlreadyDisabled: {
D.Out(pdExcept, "Throwing e_AsynchronousDeliveryAlreadyDisabled
exception.");
- throw AsynchronousDeliveryAlreadyDisabled(msg->getExceptionReason());
+ throw
RTI::AsynchronousDeliveryAlreadyDisabled(msg->getExceptionReason());
} break ;
case e_AttributeAlreadyOwned: {
D.Out(pdExcept, "Throwing e_AttributeAlreadyOwned exception.");
- throw AttributeAlreadyOwned(msg->getExceptionReason());
+ throw RTI::AttributeAlreadyOwned(msg->getExceptionReason());
} break ;
case e_AttributeAlreadyBeingAcquired: {
D.Out(pdExcept,
"Throwing e_AttributeAlreadyBeingAcquired exception.");
- throw AttributeAlreadyBeingAcquired(msg->getExceptionReason());
+ throw RTI::AttributeAlreadyBeingAcquired(msg->getExceptionReason());
} break ;
case e_AttributeAlreadyBeingDivested: {
D.Out(pdExcept,
"Throwing e_AttributeAlreadyBeingDivested exception.");
- throw AttributeAlreadyBeingDivested(msg->getExceptionReason());
+ throw RTI::AttributeAlreadyBeingDivested(msg->getExceptionReason());
} break ;
case e_AttributeDivestitureWasNotRequested: {
D.Out(pdExcept,
"Throwing e_AttributeDivestitureWasNotRequested exception.");
- throw AttributeDivestitureWasNotRequested(msg->getExceptionReason());
+ throw
RTI::AttributeDivestitureWasNotRequested(msg->getExceptionReason());
} break ;
case e_AttributeAcquisitionWasNotRequested: {
D.Out(pdExcept,
"Throwing e_AttributeAcquisitionWasNotRequested exception.");
- throw AttributeAcquisitionWasNotRequested(msg->getExceptionReason());
+ throw
RTI::AttributeAcquisitionWasNotRequested(msg->getExceptionReason());
} break ;
case e_AttributeNotDefined: {
D.Out(pdExcept, "Throwing e_AttributeNotDefined exception.");
- throw AttributeNotDefined(msg->getExceptionReason());
+ throw RTI::AttributeNotDefined(msg->getExceptionReason());
} break ;
case e_AttributeNotKnown: {
D.Out(pdExcept, "Throwing e_AttributeNotKnown exception.");
- throw AttributeNotKnown(msg->getExceptionReason());
+ throw RTI::AttributeNotKnown(msg->getExceptionReason());
} break ;
case e_AttributeNotOwned: {
D.Out(pdExcept, "Throwing e_AttributeNotOwned exception.");
- throw AttributeNotOwned(msg->getExceptionReason());
+ throw RTI::AttributeNotOwned(msg->getExceptionReason());
} break ;
case e_AttributeNotPublished: {
D.Out(pdExcept, "Throwing e_AttributeNotPublished exception.");
- throw AttributeNotPublished(msg->getExceptionReason());
+ throw RTI::AttributeNotPublished(msg->getExceptionReason());
} break ;
case e_AttributeNotSubscribed: {
D.Out(pdExcept, "Throwing e_AttributeNotSubscribed exception.");
- throw AttributeNotSubscribed(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_ConcurrentAccessAttempted: {
D.Out(pdExcept, "Throwing e_ConcurrentAccessAttempted exception.");
- throw ConcurrentAccessAttempted(msg->getExceptionReason());
+ throw RTI::ConcurrentAccessAttempted(msg->getExceptionReason());
} break ;
case e_CouldNotDiscover: {
D.Out(pdExcept, "Throwing e_CouldNotDiscover exception.");
- throw CouldNotDiscover(msg->getExceptionReason());
+ throw RTI::CouldNotDiscover(msg->getExceptionReason());
} break ;
case e_CouldNotOpenFED: {
D.Out(pdExcept, "Throwing e_CouldNotOpenFED exception.");
- throw CouldNotOpenFED(msg->getExceptionReason());
+ throw RTI::CouldNotOpenFED(msg->getExceptionReason());
} break ;
case e_CouldNotOpenRID: {
D.Out(pdExcept, "Throwing e_CouldNotOpenRID exception.");
- throw CouldNotOpenRID(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_CouldNotRestore: {
D.Out(pdExcept, "Throwing e_CouldNotRestore exception.");
- throw CouldNotRestore(msg->getExceptionReason());
+ throw RTI::CouldNotRestore(msg->getExceptionReason());
} break ;
case e_DeletePrivilegeNotHeld: {
D.Out(pdExcept, "Throwing e_DeletePrivilegeNotHeld exception.");
- throw DeletePrivilegeNotHeld(msg->getExceptionReason());
+ throw RTI::DeletePrivilegeNotHeld(msg->getExceptionReason());
} break ;
case e_ErrorReadingRID: {
D.Out(pdExcept, "Throwing e_ErrorReadingRID exception.");
- throw ErrorReadingRID(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_ErrorReadingFED: {
D.Out(pdExcept, "Throwing e_ErrorReadingFED exception.");
- throw ErrorReadingFED(msg->getExceptionReason());
+ throw RTI::ErrorReadingFED(msg->getExceptionReason());
} break ;
case e_EventNotKnown: {
D.Out(pdExcept, "Throwing e_EventNotKnown exception.");
- throw EventNotKnown(msg->getExceptionReason());
+ throw RTI::EventNotKnown(msg->getExceptionReason());
} break ;
case e_FederateAlreadyPaused: {
D.Out(pdExcept, "Throwing e_FederateAlreadyPaused exception.");
- throw FederateAlreadyPaused(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederateAlreadyExecutionMember: {
D.Out(pdExcept,
"Throwing e_FederateAlreadyExecutionMember exception.");
- throw FederateAlreadyExecutionMember(msg->getExceptionReason());
+ throw RTI::FederateAlreadyExecutionMember(msg->getExceptionReason());
} break ;
case e_FederateDoesNotExist: {
D.Out(pdExcept, "Throwing e_FederateDoesNotExist exception.");
- throw FederateDoesNotExist(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederateInternalError: {
D.Out(pdExcept, "Throwing e_FederateInternalError exception.");
- throw FederateInternalError(msg->getExceptionReason());
+ throw RTI::FederateInternalError(msg->getExceptionReason());
} break ;
case e_FederateNameAlreadyInUse: {
D.Out(pdExcept, "Throwing e_FederateNameAlreadyInUse exception.");
- throw FederateNameAlreadyInUse(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederateNotExecutionMember: {
D.Out(pdExcept, "Throwing e_FederateNotExecutionMember exception.");
- throw FederateNotExecutionMember(msg->getExceptionReason());
+ throw RTI::FederateNotExecutionMember(msg->getExceptionReason());
} break ;
case e_FederateNotPaused: {
D.Out(pdExcept, "Throwing e_FederateNotPaused exception.");
- throw FederateNotPaused(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederateOwnsAttributes: {
D.Out(pdExcept, "Throwing e_FederateOwnsAttributes exception.");
- throw FederateOwnsAttributes(msg->getExceptionReason());
+ throw RTI::FederateOwnsAttributes(msg->getExceptionReason());
} break ;
case e_FederatesCurrentlyJoined: {
D.Out(pdExcept, "Throwing e_FederatesCurrentlyJoined exception.");
- throw FederatesCurrentlyJoined(msg->getExceptionReason());
+ throw RTI::FederatesCurrentlyJoined(msg->getExceptionReason());
} break ;
case e_FederateWasNotAskedToReleaseAttribute: {
@@ -308,266 +309,265 @@
"Throwing e_FederateWasNotAskedToReleaseAttribute exception.");
D.Out(pdDebug,
"Throwing e_FederateWasNotAskedToReleaseAttribute exception.");
- throw
- FederateWasNotAskedToReleaseAttribute(msg->getExceptionReason());
+ throw
RTI::FederateWasNotAskedToReleaseAttribute(msg->getExceptionReason());
} break ;
case e_FederationAlreadyPaused: {
D.Out(pdExcept, "Throwing e_FederationAlreadyPaused exception.");
- throw FederationAlreadyPaused(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederationExecutionAlreadyExists: {
D.Out(pdExcept, "Throwing e_FederationExecutionAlreadyExists
excep.");
- throw FederationExecutionAlreadyExists(msg->getExceptionReason());
+ throw
RTI::FederationExecutionAlreadyExists(msg->getExceptionReason());
} break ;
case e_FederationExecutionDoesNotExist: {
D.Out(pdExcept, "Throwing e_FederationExecutionDoesNotExist
except.");
- throw FederationExecutionDoesNotExist(msg->getExceptionReason());
+ throw
RTI::FederationExecutionDoesNotExist(msg->getExceptionReason());
} break ;
case e_FederationNotPaused: {
D.Out(pdExcept, "Throwing e_FederationNotPaused exception.");
- throw FederationNotPaused(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederationTimeAlreadyPassed: {
D.Out(pdExcept, "Throwing e_FederationTimeAlreadyPassed exception.");
- throw FederationTimeAlreadyPassed(msg->getExceptionReason());
+ throw RTI::FederationTimeAlreadyPassed(msg->getExceptionReason());
} break ;
case e_FederateNotPublishing: {
D.Out(pdExcept, "Throwing e_FederateNotPublishing exception.");
- throw FederateNotPublishing(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_FederateNotSubscribing: {
D.Out(pdExcept, "Throwing e_FederateNotSubscribing exception.");
- throw FederateNotSubscribing(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_RegionNotKnown: {
D.Out(pdExcept, "Throwing e_RegionNotKnown exception.");
- throw RegionNotKnown(msg->getExceptionReason());
+ throw RTI::RegionNotKnown(msg->getExceptionReason());
} break ;
case e_IDsupplyExhausted: {
D.Out(pdExcept, "Throwing e_IDsupplyExhausted exception.");
- throw IDsupplyExhausted(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_InteractionClassNotDefined: {
D.Out(pdExcept, "Throwing e_InteractionClassNotDefined exception.");
- throw InteractionClassNotDefined(msg->getExceptionReason());
+ throw RTI::InteractionClassNotDefined(msg->getExceptionReason());
} break ;
case e_InteractionClassNotKnown: {
D.Out(pdExcept, "Throwing e_InteractionClassNotKnown exception.");
- throw InteractionClassNotKnown(msg->getExceptionReason());
+ throw RTI::InteractionClassNotKnown(msg->getExceptionReason());
} break ;
case e_InteractionClassNotPublished: {
D.Out(pdExcept, "Throwing e_InteractionClassNotPublished
exception.");
- throw InteractionClassNotPublished(msg->getExceptionReason());
+ throw RTI::InteractionClassNotPublished(msg->getExceptionReason());
} break ;
case e_InteractionParameterNotDefined: {
D.Out(pdExcept,
"Throwing e_InteractionParameterNotDefined exception.");
- throw InteractionParameterNotDefined(msg->getExceptionReason());
+ throw RTI::InteractionParameterNotDefined(msg->getExceptionReason());
} break ;
case e_InteractionParameterNotKnown: {
D.Out(pdExcept, "Throwing e_InteractionParameterNotKnown
exception.");
- throw InteractionParameterNotKnown(msg->getExceptionReason());
+ throw RTI::InteractionParameterNotKnown(msg->getExceptionReason());
} break ;
case e_InvalidDivestitureCondition: {
D.Out(pdExcept, "Throwing e_InvalidDivestitureCondition exception.");
- throw InvalidDivestitureCondition(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_InvalidExtents: {
D.Out(pdExcept, "Throwing e_InvalidExtents exception.");
- throw InvalidExtents(msg->getExceptionReason());
+ throw RTI::InvalidExtents(msg->getExceptionReason());
} break ;
case e_InvalidFederationTime: {
D.Out(pdExcept, "Throwing e_InvalidFederationTime exception.");
- throw InvalidFederationTime(msg->getExceptionReason());
+ throw RTI::InvalidFederationTime(msg->getExceptionReason());
} break ;
case e_InvalidFederationTimeDelta: {
D.Out(pdExcept, "Throwing e_InvalidFederationTimeDelta exception.");
- throw InvalidFederationTimeDelta(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_InvalidObjectHandle: {
D.Out(pdExcept, "Throwing e_InvalidObjectHandle exception.");
- throw InvalidObjectHandle(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_InvalidOrderingHandle: {
D.Out(pdExcept, "Throwing e_InvalidOrderingHandle exception.");
- throw InvalidOrderingHandle(msg->getExceptionReason());
+ throw RTI::InvalidOrderingHandle(msg->getExceptionReason());
} break ;
case e_InvalidResignAction: {
D.Out(pdExcept, "Throwing e_InvalidResignAction exception.");
- throw InvalidResignAction(msg->getExceptionReason());
+ throw RTI::InvalidResignAction(msg->getExceptionReason());
} break ;
case e_InvalidRetractionHandle: {
D.Out(pdExcept, "Throwing e_InvalidRetractionHandle exception.");
- throw InvalidRetractionHandle(msg->getExceptionReason());
+ throw RTI::InvalidRetractionHandle(msg->getExceptionReason());
} break ;
case e_InvalidRoutingSpace: {
D.Out(pdExcept, "Throwing e_InvalidRoutingSpace exception.");
- throw InvalidRoutingSpace(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_InvalidTransportationHandle: {
D.Out(pdExcept, "Throwing e_InvalidTransportationHandle exception.");
- throw InvalidTransportationHandle(msg->getExceptionReason());
+ throw RTI::InvalidTransportationHandle(msg->getExceptionReason());
} break ;
case e_MemoryExhausted: {
D.Out(pdExcept, "Throwing e_MemoryExhausted exception.");
- throw MemoryExhausted(msg->getExceptionReason());
+ throw RTI::MemoryExhausted(msg->getExceptionReason());
} break ;
case e_NameNotFound: {
D.Out(pdExcept, "Throwing e_NameNotFound exception.");
- throw NameNotFound(msg->getExceptionReason());
+ throw RTI::NameNotFound(msg->getExceptionReason());
} break ;
case e_NoPauseRequested: {
D.Out(pdExcept, "Throwing e_NoPauseRequested exception.");
- throw NoPauseRequested(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_NoResumeRequested: {
D.Out(pdExcept, "Throwing e_NoResumeRequested exception.");
- throw NoResumeRequested(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_ObjectClassNotDefined: {
D.Out(pdExcept, "Throwing e_ObjectClassNotDefined exception.");
- throw ObjectClassNotDefined(msg->getExceptionReason());
+ throw RTI::ObjectClassNotDefined(msg->getExceptionReason());
} break ;
case e_ObjectClassNotKnown: {
D.Out(pdExcept, "Throwing e_ObjectClassNotKnown exception.");
- throw ObjectClassNotKnown(msg->getExceptionReason());
+ throw RTI::ObjectClassNotKnown(msg->getExceptionReason());
} break ;
case e_ObjectClassNotPublished: {
D.Out(pdExcept, "Throwing e_ObjectClassNotPublished exception.");
- throw ObjectClassNotPublished(msg->getExceptionReason());
+ throw RTI::ObjectClassNotPublished(msg->getExceptionReason());
} break ;
case e_ObjectClassNotSubscribed: {
D.Out(pdExcept, "Throwing e_ObjectClassNotSubscribed exception.");
- throw ObjectClassNotSubscribed(msg->getExceptionReason());
+ throw RTI::ObjectClassNotSubscribed(msg->getExceptionReason());
} break ;
case e_ObjectNotKnown: {
D.Out(pdExcept, "Throwing e_ObjectNotKnown exception.");
- throw ObjectNotKnown(msg->getExceptionReason());
+ throw RTI::ObjectNotKnown(msg->getExceptionReason());
} break ;
case e_ObjectAlreadyRegistered: {
D.Out(pdExcept, "Throwing e_ObjectAlreadyRegistered exception.");
- throw ObjectAlreadyRegistered(msg->getExceptionReason());
+ throw RTI::ObjectAlreadyRegistered(msg->getExceptionReason());
} break ;
case e_RestoreInProgress: {
D.Out(pdExcept, "Throwing e_RestoreInProgress exception.");
- throw RestoreInProgress(msg->getExceptionReason());
+ throw RTI::RestoreInProgress(msg->getExceptionReason());
} break ;
case e_RestoreNotRequested: {
D.Out(pdExcept, "Throwing e_RestoreNotRequested exception.");
- throw RestoreNotRequested(msg->getExceptionReason());
+ throw RTI::RestoreNotRequested(msg->getExceptionReason());
} break ;
case e_RTIinternalError: {
D.Out(pdExcept, "Throwing e_RTIinternalError exception.");
- throw RTIinternalError(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_SpaceNotDefined: {
D.Out(pdExcept, "Throwing e_SpaceNotDefined exception.");
- throw SpaceNotDefined(msg->getExceptionReason());
+ throw RTI::SpaceNotDefined(msg->getExceptionReason());
} break ;
case e_SaveInProgress: {
D.Out(pdExcept, "Throwing e_SaveInProgress exception.");
- throw SaveInProgress(msg->getExceptionReason());
+ throw RTI::SaveInProgress(msg->getExceptionReason());
} break ;
case e_SaveNotInitiated: {
D.Out(pdExcept, "Throwing e_SaveNotInitiated exception.");
- throw SaveNotInitiated(msg->getExceptionReason());
+ throw RTI::SaveNotInitiated(msg->getExceptionReason());
} break ;
case e_SecurityError: {
D.Out(pdExcept, "Throwing e_SecurityError exception.");
- throw SecurityError(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_SpecifiedSaveLabelDoesNotExist: {
D.Out(pdExcept,
"Throwing e_SpecifiedSaveLabelDoesNotExist exception.");
- throw SpecifiedSaveLabelDoesNotExist(msg->getExceptionReason());
+ throw RTI::SpecifiedSaveLabelDoesNotExist(msg->getExceptionReason());
} break ;
case e_TimeAdvanceAlreadyInProgress: {
D.Out(pdExcept, "Throwing e_TimeAdvanceAlreadyInProgress
exception.");
- throw TimeAdvanceAlreadyInProgress(msg->getExceptionReason());
+ throw RTI::TimeAdvanceAlreadyInProgress(msg->getExceptionReason());
} break ;
case e_TimeAdvanceWasNotInProgress: {
D.Out(pdExcept, "Throwing e_TimeAdvanceWasNotInProgress exception.");
- throw TimeAdvanceWasNotInProgress(msg->getExceptionReason());
+ throw RTI::TimeAdvanceWasNotInProgress(msg->getExceptionReason());
} break ;
case e_TooManyIDsRequested: {
D.Out(pdExcept, "Throwing e_TooManyIDsRequested exception.");
- throw TooManyIDsRequested(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_UnableToPerformSave: {
D.Out(pdExcept, "Throwing e_UnableToPerformSave exception.");
- throw UnableToPerformSave(msg->getExceptionReason());
+ throw RTI::UnableToPerformSave(msg->getExceptionReason());
} break ;
case e_UnimplementedService: {
D.Out(pdExcept, "Throwing e_UnimplementedService exception.");
- throw UnimplementedService(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_UnknownLabel: {
D.Out(pdExcept, "Throwing e_UnknownLabel exception.");
- throw UnknownLabel(msg->getExceptionReason());
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
case e_ValueCountExceeded: {
D.Out(pdExcept, "Throwing e_ValueCountExceeded exception.");
- throw ValueCountExceeded(msg->getExceptionReason());
+ throw RTI::ValueCountExceeded(msg->getExceptionReason());
} break ;
case e_ValueLengthExceeded: {
D.Out(pdExcept, "Throwing e_ValueLengthExceeded exception.");
- throw ValueLengthExceeded(msg->getExceptionReason());
+ throw RTI::ValueLengthExceeded(msg->getExceptionReason());
} break ;
default: {
D.Out(pdExcept, "Throwing unknown exception !");
- std::cout << "LibRTI: Receiving unknown exception." << std::endl ;
- throw RTIinternalError(msg->getExceptionReason());
+ std::cout << "LibRTI: Receiving unknown RTI exception." << std::endl;
+ throw RTI::RTIinternalError(msg->getExceptionReason());
} break ;
}
}
@@ -576,12 +576,12 @@
catch (Exception &e) { \
std::stringstream msg; \
msg << "Error in " << service << ": " << e._name << "[" << e._reason
<< "]"; \
- throw RTIinternalError(msg.str().c_str()); \
+ throw RTI::RTIinternalError(msg.str().c_str()); \
}
void
RTIambPrivateRefs::callFederateAmbassador(Message *msg)
- throw (RTIinternalError)
+ throw (RTI::RTIinternalError)
{
switch (msg->type) {
@@ -706,7 +706,9 @@
case Message::REFLECT_ATTRIBUTE_VALUES:
try {
G.Out(pdGendoc," tick_kernel call to
reflectAttributeValues");
- RTI::AttributeHandleValuePairSet *attributes = msg->getAHVPS();
+ RTI::AttributeHandleValuePairSet *attributes =
+ new AttributeHandleValuePairSetImp(msg->getAHVPS());
+
if (msg->getBoolean())
fed_amb->reflectAttributeValues(msg->getObject(),
*attributes,
@@ -724,7 +726,9 @@
case Message::RECEIVE_INTERACTION:
try {
- RTI::ParameterHandleValuePairSet *parameters = msg->getPHVPS();
+ RTI::ParameterHandleValuePairSet *parameters =
+ new ParameterHandleValuePairSetImp(msg->getPHVPS());
+
if (msg->getBoolean())
fed_amb->receiveInteraction(
msg->getInteractionClass(),
@@ -763,7 +767,8 @@
case Message::PROVIDE_ATTRIBUTE_VALUE_UPDATE:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->provideAttributeValueUpdate(msg->getObject(),*attributeSet);
delete attributeSet ;
@@ -777,7 +782,8 @@
case Message::REQUEST_ATTRIBUTE_OWNERSHIP_ASSUMPTION:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->
requestAttributeOwnershipAssumption(msg->getObject(),
@@ -790,7 +796,8 @@
case Message::REQUEST_ATTRIBUTE_OWNERSHIP_RELEASE:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->requestAttributeOwnershipRelease(
msg->getObject(),
@@ -804,7 +811,8 @@
case Message::ATTRIBUTE_OWNERSHIP_UNAVAILABLE:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->attributeOwnershipUnavailable(msg->getObject(),
*attributeSet);
@@ -816,7 +824,8 @@
case Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_NOTIFICATION:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->attributeOwnershipAcquisitionNotification(
msg->getObject(),
@@ -829,7 +838,8 @@
case Message::ATTRIBUTE_OWNERSHIP_DIVESTITURE_NOTIFICATION:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->attributeOwnershipDivestitureNotification(
msg->getObject(),
@@ -842,7 +852,8 @@
case Message::CONFIRM_ATTRIBUTE_OWNERSHIP_ACQUISITION_CANCELLATION:
try {
- AttributeHandleSet *attributeSet = msg->getAHS();
+ RTI::AttributeHandleSet *attributeSet =
+ new AttributeHandleSetImp(msg->getAHS());
fed_amb->confirmAttributeOwnershipAcquisitionCancellation(
msg->getObject(),
@@ -897,4 +908,4 @@
}
}
-// $Id: RTIambPrivateRefs.cc,v 3.15 2008/11/06 14:28:58 gotthardp Exp $
+// $Id: RTIambPrivateRefs.cc,v 3.16 2008/12/07 20:16:16 gotthardp Exp $
Index: libRTI/RTIambPrivateRefs.hh
===================================================================
RCS file: /cvsroot/certi/certi/libRTI/RTIambPrivateRefs.hh,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -b -r3.6 -r3.7
--- libRTI/RTIambPrivateRefs.hh 6 Nov 2008 14:28:58 -0000 3.6
+++ libRTI/RTIambPrivateRefs.hh 7 Dec 2008 20:16:16 -0000 3.7
@@ -19,7 +19,7 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambPrivateRefs.hh,v 3.6 2008/11/06 14:28:58 gotthardp Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.7 2008/12/07 20:16:16 gotthardp Exp $
// ----------------------------------------------------------------------------
#include "RTI.hh"
@@ -38,8 +38,8 @@
void processException(Message *);
void executeService(Message *requete, Message *reponse);
void sendTickRequestStop();
- void callFederateAmbassador(Message *msg) throw (RTIinternalError);
- void leave(const char *msg) throw (RTIinternalError);
+ void callFederateAmbassador(Message *msg) throw (RTI::RTIinternalError);
+ void leave(const char *msg) throw (RTI::RTIinternalError);
#ifdef _WIN32
HANDLE handle_RTIA;
@@ -59,4 +59,4 @@
MessageBuffer msgBufSend,msgBufReceive ;
};
-// $Id: RTIambPrivateRefs.hh,v 3.6 2008/11/06 14:28:58 gotthardp Exp $
+// $Id: RTIambPrivateRefs.hh,v 3.7 2008/12/07 20:16:16 gotthardp Exp $
Index: libRTI/RTIambassador.cc
===================================================================
RCS file: /cvsroot/certi/certi/libRTI/RTIambassador.cc,v
retrieving revision 3.100
retrieving revision 3.101
diff -u -b -r3.100 -r3.101
--- libRTI/RTIambassador.cc 21 Nov 2008 13:41:52 -0000 3.100
+++ libRTI/RTIambassador.cc 7 Dec 2008 20:16:16 -0000 3.101
@@ -19,13 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: RTIambassador.cc,v 3.100 2008/11/21 13:41:52 approx Exp $
+// $Id: RTIambassador.cc,v 3.101 2008/12/07 20:16:16 gotthardp Exp $
// ----------------------------------------------------------------------------
#include "certi.hh"
#include "RTIambPrivateRefs.hh"
+#include "RTItypesImp.hh"
#include "FedRegion.hh"
#include "Message.hh"
@@ -74,7 +75,7 @@
RTI::Handle
get_handle(const RTI::Region ®ion)
- throw (RegionNotKnown, RTIinternalError)
+ throw (RTI::RegionNotKnown, RTI::RTIinternalError)
{
try {
return dynamic_cast<const FedRegion &>(region).getHandle();
@@ -87,7 +88,7 @@
char *
hla_strdup(const std::string &s)
- throw (RTIinternalError)
+ throw (RTI::RTIinternalError)
{
try {
size_t len = s.length();
@@ -114,7 +115,7 @@
*/
RTI::RTIambassador::RTIambassador()
- throw (MemoryExhausted, RTIinternalError)
+ throw (RTI::MemoryExhausted, RTI::RTIinternalError)
{
G.Out(pdGendoc,"enter RTIambassador::RTIambassador");
PrettyDebug::setFederateName( "Federate" );
@@ -156,7 +157,7 @@
<< GetLastError() <<"> "
<< "Cannot connect to RTIA.exe";
//perror("CreateProcess");
- throw RTIinternalError( msg.str().c_str());
+ throw RTI::RTIinternalError( msg.str().c_str());
}
privateRefs->handle_RTIA = pi.hProcess;
@@ -175,7 +176,7 @@
switch((privateRefs->pid_RTIA = fork())) {
case -1: // fork failed.
perror("fork");
- throw RTIinternalError("fork failed in RTIambassador constructor");
+ throw RTI::RTIinternalError("fork failed in RTIambassador
constructor");
break ;
case 0: // child process (RTIA).
@@ -184,7 +185,7 @@
<< strerror(errno)
<< endl
<< "Maybe RTIA is not in search PATH environment.";
- throw RTIinternalError(msg.str().c_str());
+ throw RTI::RTIinternalError(msg.str().c_str());
default: // father process (Federe).
// We sleep before trying to connect to the socket
@@ -198,7 +199,7 @@
{
D.Out( pdError, "Cannot connect to RTIA. Abort." ) ;
kill( privateRefs->pid_RTIA, SIGINT ) ;
- throw RTIinternalError( "Cannot connect to RTIA" ) ;
+ throw RTI::RTIinternalError( "Cannot connect to RTIA" );
};
break ;
}
@@ -214,7 +215,7 @@
/*! When destructor is called, kill rtia process.
*/
RTI::RTIambassador::~RTIambassador()
- throw (RTIinternalError)
+ throw (RTI::RTIinternalError)
{
Message req, rep ;
@@ -235,7 +236,7 @@
RTI::RTIambassador::tick()
throw (SpecifiedSaveLabelDoesNotExist,
ConcurrentAccessAttempted,
- RTIinternalError)
+ RTI::RTIinternalError)
{
__tick_kernel(RTI_FALSE, 0.0, 0.0);
return RTI_FALSE;
@@ -250,9 +251,9 @@
*/
RTI::Boolean
RTI::RTIambassador::tick2()
- throw (SpecifiedSaveLabelDoesNotExist,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpecifiedSaveLabelDoesNotExist,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
__tick_kernel(RTI_FALSE, std::numeric_limits<double>::infinity(), 0.0);
return RTI_FALSE;
@@ -267,9 +268,9 @@
*/
RTI::Boolean
RTI::RTIambassador::__tick_kernel(RTI::Boolean multiple, TickTime minimum,
TickTime maximum)
- throw (SpecifiedSaveLabelDoesNotExist,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpecifiedSaveLabelDoesNotExist,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message vers_RTI, vers_Fed ;
@@ -286,7 +287,7 @@
std::stringstream msg;
msg << "NetworkError in tick() while sending TICK_REQUEST: " <<
e._reason;
- throw RTIinternalError(msg.str().c_str());
+ throw RTI::RTIinternalError(msg.str().c_str());
}
// Read response(s) from the local RTIA until Message::TICK_REQUEST is
received.
@@ -298,7 +299,7 @@
std::stringstream msg;
msg << "NetworkError in tick() while receiving response: " <<
e._reason;
- throw RTIinternalError(msg.str().c_str());
+ throw RTI::RTIinternalError(msg.str().c_str());
}
//D.Mes( pdMessage, 'M', vers_Fed.type);
@@ -318,7 +319,7 @@
// Otherwise, the RTI calls a FederateAmbassador service.
privateRefs->callFederateAmbassador(&vers_Fed);
}
- catch (RTIinternalError) {
+ catch (RTI::RTIinternalError) {
// RTIA awaits TICK_REQUEST_NEXT, terminate the tick() processing
privateRefs->sendTickRequestStop();
// ignore the response and re-throw the original exception
@@ -336,7 +337,7 @@
std::stringstream msg;
msg << "NetworkError in tick() while sending TICK_REQUEST_NEXT: "
<< e._reason;
- throw RTIinternalError(msg.str().c_str());
+ throw RTI::RTIinternalError(msg.str().c_str());
}
} // while(1)
}
@@ -350,8 +351,8 @@
*/
RTI::Boolean
RTI::RTIambassador::tick(TickTime minimum, TickTime maximum)
- throw (SpecifiedSaveLabelDoesNotExist, ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpecifiedSaveLabelDoesNotExist, RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
return __tick_kernel(RTI_TRUE, minimum, maximum);
}
@@ -373,7 +374,7 @@
throw (RTI::FederateNotExecutionMember, RTI::ConcurrentAccessAttempted,
RTI::RegionNotKnown, RTI::RTIinternalError)
{
- throw UnimplementedService("");
+ throw RTI::RTIinternalError("unimplemented service getRegion");
}
// ----------------------------------------------------------------------------
@@ -458,9 +459,9 @@
G.Out(pdGendoc,"enter RTIambassador::joinFederationExecution");
if ( yourName == NULL || strlen(yourName) == 0 )
- throw RTIinternalError("Incorrect or empty federate name");
+ throw RTI::RTIinternalError("Incorrect or empty federate name");
if ( executionName == NULL || strlen(executionName) == 0 )
- throw RTIinternalError("Incorrect or empty federation name");
+ throw RTI::RTIinternalError("Incorrect or empty federation name");
privateRefs->fed_amb = (FederateAmbassador *) fedamb ;
@@ -477,11 +478,11 @@
//! Resign Federation Execution.
void
RTI::RTIambassador::resignFederationExecution(ResignAction theAction)
- throw (FederateOwnsAttributes,
- FederateNotExecutionMember,
- InvalidResignAction,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::FederateOwnsAttributes,
+ RTI::FederateNotExecutionMember,
+ RTI::InvalidResignAction,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -507,11 +508,11 @@
void
RTI::RTIambassador::registerFederationSynchronizationPoint(const char *label,
const char *the_tag)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -521,7 +522,7 @@
req.setLabel(label);
if ( the_tag == NULL )
{
- throw RTIinternalError ("Calling registerFederationSynchronizationPoint
with Tag NULL");
+ throw RTI::RTIinternalError ("Calling
registerFederationSynchronizationPoint with Tag NULL");
}
req.setTag(the_tag);
// boolean false because without set of federates
@@ -557,7 +558,7 @@
req.setLabel(label);
if ( theTag == NULL )
{
- throw RTIinternalError ("Calling registerFederationSynchronizationPoint
with Tag NULL");
+ throw RTI::RTIinternalError ("Calling
registerFederationSynchronizationPoint with Tag NULL");
}
req.setTag(theTag);
// boolean must be true because federate set exists but if size=0 (set
empty)
@@ -588,12 +589,12 @@
//! Synchronization Point Achieved
void
RTI::RTIambassador::synchronizationPointAchieved(const char *label)
- throw (SynchronizationPointLabelWasNotAnnounced,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::SynchronizationPointLabelWasNotAnnounced,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -612,13 +613,13 @@
void
RTI::RTIambassador::requestFederationSave(const char *label,
const FedTime& theTime)
- throw (FederationTimeAlreadyPassed,
- InvalidFederationTime,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederationTimeAlreadyPassed,
+ RTI::InvalidFederationTime,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -640,11 +641,11 @@
//! Request Federation Save without time.
void
RTI::RTIambassador::requestFederationSave(const char *label)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -666,11 +667,11 @@
//! Federate Save Begun.
void
RTI::RTIambassador::federateSaveBegun()
- throw (SaveNotInitiated,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::SaveNotInitiated,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -687,11 +688,11 @@
//! Federate Save Complete.
void
RTI::RTIambassador::federateSaveComplete()
- throw (SaveNotInitiated,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::SaveNotInitiated,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -707,11 +708,11 @@
// Federate Save Not Complete.
void
RTI::RTIambassador::federateSaveNotComplete()
- throw (SaveNotInitiated,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::SaveNotInitiated,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -795,7 +796,7 @@
req.type = Message::PUBLISH_OBJECT_CLASS ;
req.setObjectClass(theClass);
- req.setAHS(attributeList);
+
req.setAHS(cast<AttributeHandleSetImp>()(attributeList).getAttributeHandles());
G.Out(pdGendoc," ====>executeService PUBLISH_OBJECT_CLASS");
privateRefs->executeService(&req, &rep);
G.Out(pdGendoc,"exit RTIambassador::publishObjectClass");
@@ -869,7 +870,7 @@
G.Out(pdGendoc,"enter RTIambassador::subscribeObjectClassAttributes");
req.type = Message::SUBSCRIBE_OBJECT_CLASS_ATTRIBUTES ;
req.setObjectClass(theClass);
- req.setAHS(attributeList);
+
req.setAHS(cast<AttributeHandleSetImp>()(attributeList).getAttributeHandles());
req.setBoolean(active);
privateRefs->executeService(&req, &rep);
@@ -980,15 +981,15 @@
const AttributeHandleValuePairSet& theAttributes,
const FedTime& theTime,
const char *theTag)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeNotOwned,
- InvalidFederationTime,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotOwned,
+ RTI::InvalidFederationTime,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
G.Out(pdGendoc,"enter RTIambassador::updateAttributeValues with time");
Message req, rep ;
@@ -998,10 +999,10 @@
req.setFedTime(theTime);
if ( theTag == NULL)
{
- throw RTIinternalError ("Calling updateAttributeValues with Tag NULL");
+ throw RTI::RTIinternalError ("Calling updateAttributeValues with Tag
NULL");
}
req.setTag(theTag);
- req.setAHVPS(theAttributes);
+
req.setAHVPS(cast<AttributeHandleValuePairSetImp>()(theAttributes).getAttributeHandleValuePairs());
req.setBoolean(true);
privateRefs->executeService(&req, &rep);
@@ -1034,10 +1035,10 @@
req.setObject(the_object);
if ( theTag == NULL)
{
- throw RTIinternalError ("Calling updateAttributeValues with Tag NULL");
+ throw RTI::RTIinternalError ("Calling updateAttributeValues with Tag
NULL");
}
req.setTag(theTag);
- req.setAHVPS(theAttributes);
+
req.setAHVPS(cast<AttributeHandleValuePairSetImp>()(theAttributes).getAttributeHandleValuePairs());
req.setBoolean(false);
privateRefs->executeService(&req, &rep);
@@ -1058,15 +1059,15 @@
const ParameterHandleValuePairSet&
theParameters,
const FedTime& theTime,
const char *theTag)
- throw (InteractionClassNotDefined,
- InteractionClassNotPublished,
- InteractionParameterNotDefined,
- InvalidFederationTime,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::InteractionClassNotPublished,
+ RTI::InteractionParameterNotDefined,
+ RTI::InvalidFederationTime,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1075,10 +1076,10 @@
req.setFedTime(theTime);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling sendInteraction with Tag NULL") ;
+ throw RTI::RTIinternalError ("Calling sendInteraction with Tag NULL") ;
}
req.setTag((std::string)theTag);
- req.setPHVPS(theParameters);
+
req.setPHVPS(cast<ParameterHandleValuePairSetImp>()(theParameters).getParameterHandleValuePairs());
req.setRegion(0);
req.setBoolean(true);
@@ -1111,10 +1112,10 @@
req.setInteractionClass(theInteraction);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling sendIntercation with Tag NULL") ;
+ throw RTI::RTIinternalError ("Calling sendIntercation with Tag NULL") ;
}
req.setTag((std::string)theTag);
- req.setPHVPS(theParameters);
+
req.setPHVPS(cast<ParameterHandleValuePairSetImp>()(theParameters).getParameterHandleValuePairs());
req.setRegion(0);
req.setBoolean(false);
@@ -1133,14 +1134,14 @@
RTI::RTIambassador::deleteObjectInstance(ObjectHandle theObject,
const FedTime& theTime,
const char *theTag)
- throw (ObjectNotKnown,
- DeletePrivilegeNotHeld,
- InvalidFederationTime,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::DeletePrivilegeNotHeld,
+ RTI::InvalidFederationTime,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1149,7 +1150,7 @@
req.setFedTime(theTime);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling deleteObjectInstance with Tag NULL") ;
+ throw RTI::RTIinternalError ("Calling deleteObjectInstance with Tag
NULL") ;
}
req.setTag(theTag);
req.setBoolean(true);
@@ -1177,7 +1178,7 @@
req.setObject(theObject);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling deleteObjectInstance with Tag NULL") ;
+ throw RTI::RTIinternalError ("Calling deleteObjectInstance with Tag
NULL") ;
}
req.setTag(theTag);
@@ -1194,7 +1195,7 @@
RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember,
RTI::FederateOwnsAttributes, RTI::ObjectNotKnown)
{
- throw UnimplementedService("");
+ throw RTI::RTIinternalError("unimplemented service
localDeleteObjectInstance");
Message req, rep ;
req.type = Message::LOCAL_DELETE_OBJECT_INSTANCE ;
@@ -1221,7 +1222,7 @@
req.type = Message::CHANGE_ATTRIBUTE_TRANSPORTATION_TYPE ;
req.setObject(theObject);
req.setTransportation(theType);
- req.setAHS(theAttributes);
+
req.setAHS(cast<AttributeHandleSetImp>()(theAttributes).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1261,7 +1262,7 @@
G.Out(pdGendoc,"enter RTIambassador::requestObjectAttributeValueUpdate");
req.type = Message::REQUEST_OBJECT_ATTRIBUTE_VALUE_UPDATE ;
req.setObject(theObject);
- req.setAHS(ahs);
+ req.setAHS(cast<AttributeHandleSetImp>()(ahs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
G.Out(pdGendoc,"exit RTIambassador::requestObjectAttributeValueUpdate");
@@ -1282,7 +1283,7 @@
G.Out(pdGendoc,"enter RTIambassador::requestClassAttributeValueUpdate");
req.type = Message::REQUEST_CLASS_ATTRIBUTE_VALUE_UPDATE ;
req.setObjectClass(theClass);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
G.Out(pdGendoc,"exit RTIambassador::requestClassAttributeValueUpdate");
@@ -1294,20 +1295,20 @@
RTI::RTIambassador::
unconditionalAttributeOwnershipDivestiture(ObjectHandle theObject,
const AttributeHandleSet &attrs)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeNotOwned,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotOwned,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::UNCONDITIONAL_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
req.setObject(theObject);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1319,15 +1320,15 @@
negotiatedAttributeOwnershipDivestiture(ObjectHandle theObject,
const AttributeHandleSet& attrs,
const char *theTag)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeNotOwned,
- AttributeAlreadyBeingDivested,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotOwned,
+ RTI::AttributeAlreadyBeingDivested,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1335,10 +1336,10 @@
req.setObject(theObject);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling
negotiatedAttributeOwnershipDivestiture with Tag NULL") ;
+ throw RTI::RTIinternalError ("Calling
negotiatedAttributeOwnershipDivestiture with Tag NULL") ;
}
req.setTag(theTag);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1350,16 +1351,16 @@
attributeOwnershipAcquisition(ObjectHandle theObject,
const AttributeHandleSet& desiredAttributes,
const char *theTag)
- throw (ObjectNotKnown,
- ObjectClassNotPublished,
- AttributeNotDefined,
- AttributeNotPublished,
- FederateOwnsAttributes,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::ObjectClassNotPublished,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotPublished,
+ RTI::FederateOwnsAttributes,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1367,40 +1368,40 @@
req.setObject(theObject);
if (theTag == NULL)
{
- throw RTIinternalError ("Calling attributeOwnershipAcquisition with Tag
NULL") ;
+ throw RTI::RTIinternalError ("Calling attributeOwnershipAcquisition
with Tag NULL") ;
}
req.setTag(theTag);
- req.setAHS(desiredAttributes);
+
req.setAHS(cast<AttributeHandleSetImp>()(desiredAttributes).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
// ----------------------------------------------------------------------------
// Attribute Ownership Release Response
-AttributeHandleSet*
+RTI::AttributeHandleSet*
RTI::RTIambassador::
attributeOwnershipReleaseResponse(ObjectHandle theObject,
const AttributeHandleSet& attrs)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeNotOwned,
- FederateWasNotAskedToReleaseAttribute,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotOwned,
+ RTI::FederateWasNotAskedToReleaseAttribute,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::ATTRIBUTE_OWNERSHIP_RELEASE_RESPONSE ;
req.setObject(theObject);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
if (rep.getExceptionType() == e_NO_EXCEPTION) {
- return rep.getAHS();
+ return new AttributeHandleSetImp(rep.getAHS());
}
return NULL ;
@@ -1412,21 +1413,21 @@
RTI::RTIambassador::
cancelNegotiatedAttributeOwnershipDivestiture(ObjectHandle theObject,
const AttributeHandleSet& attrs)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeNotOwned,
- AttributeDivestitureWasNotRequested,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotOwned,
+ RTI::AttributeDivestitureWasNotRequested,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::CANCEL_NEGOTIATED_ATTRIBUTE_OWNERSHIP_DIVESTITURE ;
req.setObject(theObject);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1437,21 +1438,21 @@
RTI::RTIambassador::
cancelAttributeOwnershipAcquisition(ObjectHandle theObject,
const AttributeHandleSet& attrs)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- AttributeAlreadyOwned,
- AttributeAcquisitionWasNotRequested,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::AttributeAlreadyOwned,
+ RTI::AttributeAcquisitionWasNotRequested,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::CANCEL_ATTRIBUTE_OWNERSHIP_ACQUISITION ;
req.setObject(theObject);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1462,23 +1463,23 @@
RTI::RTIambassador::
attributeOwnershipAcquisitionIfAvailable(ObjectHandle theObject,
const AttributeHandleSet& desired)
- throw (ObjectNotKnown,
- ObjectClassNotPublished,
- AttributeNotDefined,
- AttributeNotPublished,
- FederateOwnsAttributes,
- AttributeAlreadyBeingAcquired,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::ObjectClassNotPublished,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotPublished,
+ RTI::FederateOwnsAttributes,
+ RTI::AttributeAlreadyBeingAcquired,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::ATTRIBUTE_OWNERSHIP_ACQUISITION_IF_AVAILABLE ;
req.setObject(theObject);
- req.setAHS(desired);
+ req.setAHS(cast<AttributeHandleSetImp>()(desired).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1508,13 +1509,13 @@
RTI::Boolean
RTI::RTIambassador::isAttributeOwnedByFederate(ObjectHandle theObject,
AttributeHandle theAttribute)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1565,14 +1566,14 @@
// Enable Time Constrained
void
RTI::RTIambassador::enableTimeConstrained()
- throw (TimeConstrainedAlreadyEnabled, //not implemented
- EnableTimeConstrainedPending, //not implemented
- TimeAdvanceAlreadyInProgress, //not implemented
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::TimeConstrainedAlreadyEnabled, //not implemented
+ RTI::EnableTimeConstrainedPending, //not implemented
+ RTI::TimeAdvanceAlreadyInProgress, //not implemented
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1585,12 +1586,12 @@
// Disable Time Constrained
void
RTI::RTIambassador::disableTimeConstrained()
- throw (TimeConstrainedWasNotEnabled, //not implemented
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::TimeConstrainedWasNotEnabled, //not implemented
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1603,16 +1604,16 @@
// Time Advance Request
void
RTI::RTIambassador::timeAdvanceRequest(const FedTime& theTime)
- throw (TimeAdvanceAlreadyInProgress,
- FederationTimeAlreadyPassed,
- InvalidFederationTime,
- EnableTimeRegulationPending, //not implemented
- EnableTimeConstrainedPending, //not implemented
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::TimeAdvanceAlreadyInProgress,
+ RTI::FederationTimeAlreadyPassed,
+ RTI::InvalidFederationTime,
+ RTI::EnableTimeRegulationPending, //not implemented
+ RTI::EnableTimeConstrainedPending, //not implemented
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1643,16 +1644,16 @@
// Next Event Request
void
RTI::RTIambassador::nextEventRequest(const FedTime& theTime)
- throw (TimeAdvanceAlreadyInProgress,
- FederationTimeAlreadyPassed,
- InvalidFederationTime,
- EnableTimeRegulationPending, //not implemented
- EnableTimeConstrainedPending, //not implemented
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::TimeAdvanceAlreadyInProgress,
+ RTI::FederationTimeAlreadyPassed,
+ RTI::InvalidFederationTime,
+ RTI::EnableTimeRegulationPending, //not implemented
+ RTI::EnableTimeConstrainedPending, //not implemented
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1682,18 +1683,18 @@
// Flush Queue Request
void
RTI::RTIambassador::flushQueueRequest(const FedTime& theTime)
- throw (TimeAdvanceAlreadyInProgress,
- FederationTimeAlreadyPassed,
- InvalidFederationTime,
- EnableTimeRegulationPending, //not implemented
- EnableTimeConstrainedPending, //not implemented
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::TimeAdvanceAlreadyInProgress,
+ RTI::FederationTimeAlreadyPassed,
+ RTI::InvalidFederationTime,
+ RTI::EnableTimeRegulationPending, //not implemented
+ RTI::EnableTimeConstrainedPending, //not implemented
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
- throw RTIinternalError("Unimplemented Service flushQueueRequest");
+ throw RTI::RTIinternalError("Unimplemented Service flushQueueRequest");
Message req, rep ;
req.type = Message::FLUSH_QUEUE_REQUEST ;
@@ -1738,11 +1739,11 @@
// Query LBTS
void
RTI::RTIambassador::queryLBTS(FedTime& theTime)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1756,11 +1757,11 @@
// Query Federate Time
void
RTI::RTIambassador::queryFederateTime(FedTime& theTime)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1774,11 +1775,11 @@
// Query Minimum Next Event Time
void
RTI::RTIambassador::queryMinNextEventTime(FedTime& theTime)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1786,7 +1787,6 @@
privateRefs->executeService(&req, &rep);
theTime = rep.getFedTime();
-
}
// ----------------------------------------------------------------------------
@@ -1809,11 +1809,11 @@
// Query Lookahead
void
RTI::RTIambassador::queryLookahead(FedTime &theTime)
- throw (FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -1825,7 +1825,7 @@
ret = RTIfedTime((Double) rep.getFederationTimeDelta());
}
catch (std::bad_cast) {
- throw RTIinternalError("theTime is not a RTIfedTime object");
+ throw RTI::RTIinternalError("theTime is not a RTIfedTime object");
}
}
@@ -1837,7 +1837,7 @@
RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember,
RTI::InvalidRetractionHandle)
{
- throw RTIinternalError("Unimplemented Service retract");
+ throw RTI::RTIinternalError("Unimplemented Service retract");
Message req, rep ;
req.type = Message::RETRACT ;
@@ -1862,7 +1862,7 @@
req.type = Message::CHANGE_ATTRIBUTE_ORDER_TYPE ;
req.setObject(theObject);
req.setOrdering(theType);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
privateRefs->executeService(&req, &rep);
}
@@ -1894,20 +1894,20 @@
*/
RTI::Region *
RTI::RTIambassador::createRegion(SpaceHandle space, ULong nb_extents)
- throw (SpaceNotDefined,
- InvalidExtents,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::SpaceNotDefined,
+ RTI::InvalidExtents,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.setType(Message::DDM_CREATE_REGION);
req.setSpace(space);
req.setNumber(nb_extents);
privateRefs->executeService(&req, &rep);
- Region *region = new FedRegion(rep.getRegion(), space,
+ RTI::Region *region = new RegionImp(rep.getRegion(), space,
std::vector<Extent>(nb_extents,
Extent(rep.getNumber())));
@@ -1922,13 +1922,13 @@
*/
void
RTI::RTIambassador::notifyAboutRegionModification(Region &r)
- throw (RegionNotKnown,
- InvalidExtents,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::RegionNotKnown,
+ RTI::InvalidExtents,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
try {
FedRegion ®ion = dynamic_cast<FedRegion &>(r);
@@ -1958,13 +1958,13 @@
*/
void
RTI::RTIambassador::deleteRegion(Region *region)
- throw (RegionNotKnown,
- RegionInUse,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::RegionNotKnown,
+ RTI::RegionInUse,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
if (region == 0) {
throw RegionNotKnown("");
@@ -1992,18 +1992,18 @@
AttributeHandle attrs[],
Region *regions[],
ULong nb)
- throw (ObjectClassNotDefined,
- ObjectClassNotPublished,
- AttributeNotDefined,
- AttributeNotPublished,
- RegionNotKnown,
- InvalidRegionContext,
- ObjectAlreadyRegistered,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::ObjectClassNotPublished,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotPublished,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::ObjectAlreadyRegistered,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2027,17 +2027,17 @@
AttributeHandle attrs[],
Region *regions[],
ULong nb)
- throw (ObjectClassNotDefined,
- ObjectClassNotPublished,
- AttributeNotDefined,
- AttributeNotPublished,
- RegionNotKnown,
- InvalidRegionContext,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::ObjectClassNotPublished,
+ RTI::AttributeNotDefined,
+ RTI::AttributeNotPublished,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2063,15 +2063,15 @@
RTI::RTIambassador::associateRegionForUpdates(Region ®ion,
ObjectHandle object,
const AttributeHandleSet &attributes)
- throw (ObjectNotKnown,
- AttributeNotDefined,
- InvalidRegionContext,
- RegionNotKnown,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::AttributeNotDefined,
+ RTI::InvalidRegionContext,
+ RTI::RegionNotKnown,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
D[pdDebug] << "+ Associate Region for Updates" << endl ;
@@ -2080,7 +2080,7 @@
req.type = Message::DDM_ASSOCIATE_REGION ;
req.setObject(object);
req.setRegion(get_handle(region));
- req.setAHS(attributes);
+
req.setAHS(cast<AttributeHandleSetImp>()(attributes).getAttributeHandles());
privateRefs->executeService(&req, &rep);
D[pdDebug] << "- Associate Region for Updates" << endl ;
@@ -2096,14 +2096,14 @@
void
RTI::RTIambassador::unassociateRegionForUpdates(Region ®ion,
ObjectHandle object)
- throw (ObjectNotKnown,
- InvalidRegionContext,
- RegionNotKnown,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::RegionNotKnown,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
D[pdDebug] << "+ Unassociate Region for Updates" << endl ;
Message req, rep ;
@@ -2130,15 +2130,15 @@
Region ®ion,
const AttributeHandleSet &attributes,
Boolean passive)
- throw (ObjectClassNotDefined,
- AttributeNotDefined,
- RegionNotKnown,
- InvalidRegionContext,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::AttributeNotDefined,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
D[pdDebug] << "+ Subscribe Object Class Attributes with Region" << endl ;
Message req, rep ;
@@ -2146,7 +2146,7 @@
req.type = Message::DDM_SUBSCRIBE_ATTRIBUTES ;
req.setObjectClass(object_class);
req.setRegion(get_handle(region));
- req.setAHS(attributes);
+
req.setAHS(cast<AttributeHandleSetImp>()(attributes).getAttributeHandles());
req.setBoolean(passive);
privateRefs->executeService(&req, &rep);
@@ -2162,14 +2162,14 @@
void
RTI::RTIambassador::unsubscribeObjectClassWithRegion(ObjectClassHandle
object_class,
Region ®ion)
- throw (ObjectClassNotDefined,
- RegionNotKnown,
- ObjectClassNotSubscribed,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::RegionNotKnown,
+ RTI::ObjectClassNotSubscribed,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
D[pdDebug] << "+ Unsubscribe Object Class " << object_class
<< " with Region" << endl ;
@@ -2189,15 +2189,15 @@
RTI::RTIambassador::subscribeInteractionClassWithRegion(InteractionClassHandle
ic,
Region ®ion,
RTI::Boolean passive)
- throw (InteractionClassNotDefined,
- RegionNotKnown,
- InvalidRegionContext,
- FederateLoggingServiceCalls,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::FederateLoggingServiceCalls,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2214,14 +2214,14 @@
void
RTI::RTIambassador::unsubscribeInteractionClassWithRegion(InteractionClassHandle
ic,
Region ®ion)
- throw (InteractionClassNotDefined,
- InteractionClassNotSubscribed,
- RegionNotKnown,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::InteractionClassNotSubscribed,
+ RTI::RegionNotKnown,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2240,27 +2240,27 @@
const FedTime &time,
const char *tag,
const Region ®ion)
- throw (InteractionClassNotDefined,
- InteractionClassNotPublished,
- InteractionParameterNotDefined,
- InvalidFederationTime,
- RegionNotKnown,
- InvalidRegionContext,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::InteractionClassNotPublished,
+ RTI::InteractionParameterNotDefined,
+ RTI::InvalidFederationTime,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.setType(Message::SEND_INTERACTION);
req.setInteractionClass(interaction);
- req.setPHVPS(par);
+
req.setPHVPS(cast<ParameterHandleValuePairSetImp>()(par).getParameterHandleValuePairs());
req.setFedTime(time);
if ( tag == NULL )
{
- throw RTIinternalError ("Calling sendInteractionWithRegion with Tag
NULL");
+ throw RTI::RTIinternalError ("Calling sendInteractionWithRegion with
Tag NULL");
}
req.setTag(tag);
req.setRegion(get_handle(region));
@@ -2276,25 +2276,25 @@
const ParameterHandleValuePairSet
&par,
const char *tag,
const Region ®ion)
- throw (InteractionClassNotDefined,
- InteractionClassNotPublished,
- InteractionParameterNotDefined,
- RegionNotKnown,
- InvalidRegionContext,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- SaveInProgress,
- RestoreInProgress,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::InteractionClassNotPublished,
+ RTI::InteractionParameterNotDefined,
+ RTI::RegionNotKnown,
+ RTI::InvalidRegionContext,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::SaveInProgress,
+ RTI::RestoreInProgress,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.setType(Message::SEND_INTERACTION);
req.setInteractionClass(interaction);
- req.setPHVPS(par);
+
req.setPHVPS(cast<ParameterHandleValuePairSetImp>()(par).getParameterHandleValuePairs());
if ( tag == NULL )
{
- throw RTIinternalError ("Calling sendInteractionWithRegion with Tag
NULL");
+ throw RTI::RTIinternalError ("Calling sendInteractionWithRegion with
Tag NULL");
}
req.setTag(tag);
req.setRegion(get_handle(region));
@@ -2312,11 +2312,11 @@
RTI::ConcurrentAccessAttempted, RTI::FederateNotExecutionMember,
RTI::RegionNotKnown, RTI::AttributeNotDefined,
RTI::ObjectClassNotDefined)
{
- throw UnimplementedService("");
+ throw RTI::RTIinternalError("unimplemented service
requestClassAttributeValueUpdateWithRegion");
Message req, rep ;
req.setType(Message::DDM_REQUEST_UPDATE);
- req.setAHS(attrs);
+ req.setAHS(cast<AttributeHandleSetImp>()(attrs).getAttributeHandles());
req.setRegion(get_handle(region));
privateRefs->executeService(&req, &rep);
}
@@ -2327,10 +2327,10 @@
*/
ObjectClassHandle
RTI::RTIambassador::getObjectClassHandle(const char *theName)
- throw (NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2353,10 +2353,10 @@
*/
char *
RTI::RTIambassador::getObjectClassName(ObjectClassHandle handle)
- throw (ObjectClassNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_OBJECT_CLASS_NAME ;
@@ -2373,12 +2373,11 @@
AttributeHandle
RTI::RTIambassador::getAttributeHandle(const char *theName,
ObjectClassHandle whichClass)
- throw (ObjectClassNotDefined,
- NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
-
+ throw (RTI::ObjectClassNotDefined,
+ RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
G.Out(pdGendoc,"enter RTI::RTIambassador::getAttributeHandle");
Message req, rep ;
@@ -2399,11 +2398,11 @@
char *
RTI::RTIambassador::getAttributeName(AttributeHandle theHandle,
ObjectClassHandle whichClass)
- throw (ObjectClassNotDefined,
- AttributeNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::AttributeNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_ATTRIBUTE_NAME ;
@@ -2417,10 +2416,10 @@
// Get Interaction Class Handle
InteractionClassHandle
RTI::RTIambassador::getInteractionClassHandle(const char *theName)
- throw (NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2436,10 +2435,10 @@
// Get Interaction Class Name
char *
RTI::RTIambassador::getInteractionClassName(InteractionClassHandle theHandle)
- throw (InteractionClassNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2456,11 +2455,11 @@
ParameterHandle
RTI::RTIambassador::getParameterHandle(const char *theName,
InteractionClassHandle whichClass)
- throw (InteractionClassNotDefined,
- NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2478,11 +2477,11 @@
char *
RTI::RTIambassador::getParameterName(ParameterHandle theHandle,
InteractionClassHandle whichClass)
- throw (InteractionClassNotDefined,
- InteractionParameterNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::InteractionParameterNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
@@ -2535,10 +2534,10 @@
*/
SpaceHandle
RTI::RTIambassador::getRoutingSpaceHandle(const char *rs_name)
- throw (NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
D[pdDebug] << "Get routing space handle: " << rs_name << endl ;
Message req, rep ;
@@ -2554,10 +2553,10 @@
*/
char *
RTI::RTIambassador::getRoutingSpaceName(SpaceHandle handle)
- throw (SpaceNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpaceNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_SPACE_NAME ;
@@ -2574,11 +2573,11 @@
DimensionHandle
RTI::RTIambassador::getDimensionHandle(const char *dimension,
SpaceHandle space)
- throw (SpaceNotDefined,
- NameNotFound,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpaceNotDefined,
+ RTI::NameNotFound,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_DIMENSION_HANDLE ;
@@ -2596,11 +2595,11 @@
char *
RTI::RTIambassador::getDimensionName(DimensionHandle dimension,
SpaceHandle space)
- throw (SpaceNotDefined,
- DimensionNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::SpaceNotDefined,
+ RTI::DimensionNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_DIMENSION_NAME ;
@@ -2619,11 +2618,11 @@
SpaceHandle
RTI::RTIambassador::getAttributeRoutingSpaceHandle(AttributeHandle attribute,
ObjectClassHandle object_class)
- throw (ObjectClassNotDefined,
- AttributeNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::ObjectClassNotDefined,
+ RTI::AttributeNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_ATTRIBUTE_SPACE_HANDLE ;
@@ -2654,10 +2653,10 @@
*/
SpaceHandle
RTI::RTIambassador::getInteractionRoutingSpaceHandle(InteractionClassHandle
inter)
- throw (InteractionClassNotDefined,
- FederateNotExecutionMember,
- ConcurrentAccessAttempted,
- RTIinternalError)
+ throw (RTI::InteractionClassNotDefined,
+ RTI::FederateNotExecutionMember,
+ RTI::ConcurrentAccessAttempted,
+ RTI::RTIinternalError)
{
Message req, rep ;
req.type = Message::GET_INTERACTION_SPACE_HANDLE ;
@@ -2956,4 +2955,4 @@
privateRefs->executeService(&req, &rep);
}
-// $Id: RTIambassador.cc,v 3.100 2008/11/21 13:41:52 approx Exp $
+// $Id: RTIambassador.cc,v 3.101 2008/12/07 20:16:16 gotthardp Exp $
Index: libRTI/RTItypes.cc
===================================================================
RCS file: /cvsroot/certi/certi/libRTI/RTItypes.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- libRTI/RTItypes.cc 25 Nov 2008 16:32:14 -0000 1.1
+++ libRTI/RTItypes.cc 7 Dec 2008 20:16:16 -0000 1.2
@@ -15,9 +15,11 @@
// 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.2 2008/12/07 20:16:16 gotthardp Exp $
// ----------------------------------------------------------------------------
-#include "GAV.hh"
+#include "RTItypesImp.hh"
#include "Exception.hh"
#include "PrettyDebug.hh"
#include <assert.h>
@@ -271,45 +273,4 @@
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 $
+// $Id: RTItypes.cc,v 1.2 2008/12/07 20:16:16 gotthardp Exp $
Index: test/Billard/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/test/Billard/CMakeLists.txt,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- test/Billard/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.7
+++ test/Billard/CMakeLists.txt 7 Dec 2008 20:16:17 -0000 1.8
@@ -22,7 +22,7 @@
)
ADD_EXECUTABLE(billard ${billard_SRCS})
-TARGET_LINK_LIBRARIES(billard graph RTI-NG FedTime)
+TARGET_LINK_LIBRARIES(billard graph RTI FedTime)
IF (X11_FOUND)
TARGET_LINK_LIBRARIES(billard ${X11_LIBRARIES})
Index: test/utility/CMakeLists.txt
===================================================================
RCS file: /cvsroot/certi/certi/test/utility/CMakeLists.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- test/utility/CMakeLists.txt 25 Nov 2008 16:32:14 -0000 1.3
+++ test/utility/CMakeLists.txt 7 Dec 2008 20:16:17 -0000 1.4
@@ -8,7 +8,7 @@
ADD_EXECUTABLE(CertiUtilTests ${CertiUtil_SRCS})
-TARGET_LINK_LIBRARIES(CertiUtilTests CERTI RTI-NG FedTime)
+TARGET_LINK_LIBRARIES(CertiUtilTests CERTI RTI FedTime)
INSTALL(TARGETS CertiUtilTests
RUNTIME DESTINATION bin
Index: libRTI/RTItypesImp.cc
===================================================================
RCS file: libRTI/RTItypesImp.cc
diff -N libRTI/RTItypesImp.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libRTI/RTItypesImp.cc 7 Dec 2008 20:16:17 -0000 3.1
@@ -0,0 +1,542 @@
+// ----------------------------------------------------------------------------
+// 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: RTItypesImp.cc,v 3.1 2008/12/07 20:16:17 gotthardp Exp $
+// ----------------------------------------------------------------------------
+
+#include "certi.hh"
+
+#include "RTItypesImp.hh"
+#include "GAV.hh"
+#include "PrettyDebug.hh"
+
+#include <algorithm>
+#include <string.h>
+
+using namespace certi ;
+
+namespace {
+
+static PrettyDebug D("LIBRTI", __FILE__);
+static PrettyDebug G("GENDOC",__FILE__);
+
+}
+
+// ----------------------------------------------------------------------------
+AttributeHandleValuePairSetImp::AttributeHandleValuePairSetImp(ULong size)
+{
+ _order = RECEIVE;
+ _transport = RELIABLE;
+
+ std::vector<AttributeHandleValuePair_t>::reserve(size);
+}
+
+AttributeHandleValuePairSetImp::AttributeHandleValuePairSetImp(const
std::vector<AttributeHandleValuePair_t> &val)
+ : std::vector<AttributeHandleValuePair_t>(val)
+{
+ _order = RECEIVE;
+ _transport = RELIABLE;
+}
+
+AttributeHandleValuePairSetImp::~AttributeHandleValuePairSetImp()
+{
+}
+
+ULong AttributeHandleValuePairSetImp::size() const
+{
+ return std::vector<AttributeHandleValuePair_t>::size();
+}
+
+Handle AttributeHandleValuePairSetImp::getHandle(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i).first;
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+ULong AttributeHandleValuePairSetImp::getValueLength(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i).second.size();
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void AttributeHandleValuePairSetImp::getValue(ULong i, char *buff, ULong &len)
const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size()) {
+ const AttributeHandleValuePair_t& item = operator[](i);
+ len = item.second.size();
+ memcpy(buff, item.second.data(), len);
+ }
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+char *AttributeHandleValuePairSetImp::getValuePointer(ULong i, ULong &len)
const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size()) {
+ const AttributeHandleValuePair_t& item = operator[](i);
+ len = item.second.size();
+ return (char *)item.second.data();
+ }
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+TransportType AttributeHandleValuePairSetImp::getTransportType(ULong) const
+ throw (RTI::InvalidHandleValuePairSetContext)
+{
+ return _transport;
+}
+
+OrderType AttributeHandleValuePairSetImp::getOrderType(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds, RTI::InvalidHandleValuePairSetContext)
+{
+ return _order;
+}
+
+RTI::Region *AttributeHandleValuePairSetImp::getRegion(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds, RTI::InvalidHandleValuePairSetContext)
+{
+ throw RTI::RTIinternalError("unimplemented function getRegion()");
+}
+
+void AttributeHandleValuePairSetImp::add(Handle h, const char *str, ULong len)
+ throw (RTI::ValueLengthExceeded, RTI::ValueCountExceeded)
+{
+ push_back(AttributeHandleValuePair_t(h, std::string(str, len)));
+}
+
+void AttributeHandleValuePairSetImp::remove(Handle h)
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ for (iterator pos = begin(); pos != end(); pos++) {
+ if (pos->first == h) {
+ std::vector<AttributeHandleValuePair_t>::erase(pos);
+ return;
+ }
+ }
+
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void AttributeHandleValuePairSetImp::moveFrom(const
AttributeHandleValuePairSet &, ULong &)
+ throw (RTI::ValueCountExceeded, RTI::ArrayIndexOutOfBounds)
+{
+ throw RTI::RTIinternalError("unimplemented function moveFrom()");
+}
+
+void AttributeHandleValuePairSetImp::empty()
+{
+ std::vector<AttributeHandleValuePair_t>::clear();
+}
+
+ULong AttributeHandleValuePairSetImp::start() const
+{
+ // not implemented
+ return 0 ;
+}
+
+ULong AttributeHandleValuePairSetImp::valid(ULong i) const
+{
+ // not implemented
+ return 0 ;
+}
+
+ULong AttributeHandleValuePairSetImp::next(ULong i) const
+{
+ // not implemented
+ return 0 ;
+}
+
+const std::vector<AttributeHandleValuePair_t>&
+AttributeHandleValuePairSetImp::getAttributeHandleValuePairs() const
+{
+ return *this;
+}
+
+// ----------------------------------------------------------------------------
+AttributeHandleSetImp::AttributeHandleSetImp(ULong size)
+{
+ std::vector<AttributeHandle>::reserve(size);
+}
+
+AttributeHandleSetImp::AttributeHandleSetImp(const
std::vector<AttributeHandle> &val)
+ : std::vector<AttributeHandle>(val)
+{
+}
+
+AttributeHandleSetImp::~AttributeHandleSetImp()
+{
+}
+
+ULong AttributeHandleSetImp::size() const
+{
+ return std::vector<AttributeHandle>::size();
+}
+
+AttributeHandle AttributeHandleSetImp::getHandle(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i);
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void AttributeHandleSetImp::add(AttributeHandle h)
+ throw (RTI::ArrayIndexOutOfBounds, RTI::AttributeNotDefined)
+{
+ std::vector<AttributeHandle>::push_back(h);
+}
+
+void AttributeHandleSetImp::remove(AttributeHandle h)
+ throw (RTI::AttributeNotDefined)
+{
+ iterator pos = std::find(begin(), end(), h);
+ if (pos != end())
+ std::vector<AttributeHandle>::erase(pos);
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void AttributeHandleSetImp::empty()
+{
+ std::vector<AttributeHandle>::clear();
+}
+
+RTI::Boolean AttributeHandleSetImp::isEmpty() const
+{
+ return RTI::Boolean(std::vector<AttributeHandle>::empty());
+}
+
+RTI::Boolean AttributeHandleSetImp::isMember(AttributeHandle h) const
+{
+ return RTI::Boolean(std::find(begin(), end(), h) != end());
+}
+
+const std::vector<AttributeHandle>&
+AttributeHandleSetImp::getAttributeHandles() const
+{
+ return *this;
+}
+
+// ----------------------------------------------------------------------------
+FederateHandleSetImp::FederateHandleSetImp(ULong size)
+{
+ std::vector<FederateHandle>::reserve(size);
+}
+
+FederateHandleSetImp::~FederateHandleSetImp()
+{
+}
+
+ULong FederateHandleSetImp::size() const
+{
+ return std::vector<FederateHandle>::size();
+}
+
+FederateHandle FederateHandleSetImp::getHandle(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i);
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void FederateHandleSetImp::add(FederateHandle h)
+ throw (RTI::ValueCountExceeded)
+{
+ std::vector<FederateHandle>::push_back(h);
+}
+
+void FederateHandleSetImp::remove(FederateHandle h)
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ iterator pos = std::find(begin(), end(), h);
+ if (pos != end())
+ std::vector<FederateHandle>::erase(pos);
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void FederateHandleSetImp::empty()
+{
+ std::vector<AttributeHandle>::clear();
+}
+
+RTI::Boolean FederateHandleSetImp::isMember(FederateHandle h) const
+{
+ return RTI::Boolean(std::find(begin(), end(), h) != end());
+}
+
+// ----------------------------------------------------------------------------
+ParameterHandleValuePairSetImp::ParameterHandleValuePairSetImp(ULong size)
+{
+ _order = RECEIVE;
+ _transport = RELIABLE;
+
+ std::vector<ParameterHandleValuePair_t>::reserve(size);
+}
+
+ParameterHandleValuePairSetImp::ParameterHandleValuePairSetImp(const
std::vector<ParameterHandleValuePair_t> &val)
+ : std::vector<ParameterHandleValuePair_t>(val)
+{
+ _order = RECEIVE;
+ _transport = RELIABLE;
+}
+
+ParameterHandleValuePairSetImp::~ParameterHandleValuePairSetImp()
+{
+}
+
+ULong ParameterHandleValuePairSetImp::size() const
+{
+ return std::vector<ParameterHandleValuePair_t>::size();
+}
+
+Handle ParameterHandleValuePairSetImp::getHandle(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i).first;
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+ULong ParameterHandleValuePairSetImp::getValueLength(ULong i) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size())
+ return operator[](i).second.size();
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void ParameterHandleValuePairSetImp::getValue(ULong i, char *buff, ULong &len)
const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size()) {
+ const ParameterHandleValuePair_t& item = operator[](i);
+ len = item.second.size();
+ memcpy(buff, item.second.data(), len);
+ }
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+char *ParameterHandleValuePairSetImp::getValuePointer(ULong i, ULong &len)
const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (i < size()) {
+ const ParameterHandleValuePair_t& item = operator[](i);
+ len = item.second.size();
+ return (char *)item.second.data();
+ }
+ else
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+TransportType ParameterHandleValuePairSetImp::getTransportType() const
+ throw (RTI::InvalidHandleValuePairSetContext)
+{
+ return _transport;
+}
+
+OrderType ParameterHandleValuePairSetImp::getOrderType() const
+ throw (RTI::InvalidHandleValuePairSetContext)
+{
+ return _order;
+}
+
+RTI::Region *ParameterHandleValuePairSetImp::getRegion() const
+ throw (RTI::InvalidHandleValuePairSetContext)
+{
+ throw RTI::RTIinternalError("unimplemented function getRegion()");
+}
+
+void ParameterHandleValuePairSetImp::add(Handle h, const char *str, ULong len)
+ throw (RTI::ValueLengthExceeded, RTI::ValueCountExceeded)
+{
+ push_back(ParameterHandleValuePair_t(h, std::string(str, len)));
+}
+
+void ParameterHandleValuePairSetImp::remove(Handle h)
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ for (iterator pos = begin(); pos != end(); pos++) {
+ if (pos->first == h) {
+ std::vector<ParameterHandleValuePair_t>::erase(pos);
+ return;
+ }
+ }
+
+ throw RTI::ArrayIndexOutOfBounds("");
+}
+
+void ParameterHandleValuePairSetImp::moveFrom(const
ParameterHandleValuePairSet &, ULong &)
+ throw (RTI::ValueCountExceeded, RTI::ArrayIndexOutOfBounds)
+{
+ throw RTI::RTIinternalError("unimplemented function moveFrom()");
+}
+
+void ParameterHandleValuePairSetImp::empty()
+{
+ return std::vector<ParameterHandleValuePair_t>::clear();
+}
+
+ULong ParameterHandleValuePairSetImp::start() const
+{
+ // not implemented
+ return 0;
+}
+
+ULong ParameterHandleValuePairSetImp::valid(ULong i) const
+{
+ // not implemented
+ return 0;
+}
+
+ULong ParameterHandleValuePairSetImp::next(ULong i) const
+{
+ // not implemented
+ return 0;
+}
+
+const std::vector<ParameterHandleValuePair_t> &
+ParameterHandleValuePairSetImp::getParameterHandleValuePairs() const
+{
+ return *this;
+}
+
+// ----------------------------------------------------------------------------
+RTI::AttributeHandleValuePairSet *
+RTI::AttributeSetFactory::create(ULong size)
+ throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
+{
+ return new AttributeHandleValuePairSetImp(size);
+}
+
+// ----------------------------------------------------------------------------
+RTI::AttributeHandleSet *
+RTI::AttributeHandleSetFactory::create(ULong size)
+ throw (MemoryExhausted, ValueCountExceeded)
+{
+ return new AttributeHandleSetImp(size);
+}
+
+// ----------------------------------------------------------------------------
+RTI::FederateHandleSet *
+RTI::FederateHandleSetFactory::create(ULong size)
+ throw (MemoryExhausted, ValueCountExceeded)
+{
+ return new FederateHandleSetImp(size);
+}
+
+// ----------------------------------------------------------------------------
+RTI::ParameterHandleValuePairSet *
+RTI::ParameterSetFactory::create(ULong size)
+ throw (MemoryExhausted, ValueCountExceeded, HandleValuePairMaximumExceeded)
+{
+ return new ParameterHandleValuePairSetImp(size);
+}
+
+// ----------------------------------------------------------------------------
+RegionImp::RegionImp(RegionHandle h, SpaceHandle s, const std::vector<Extent>
&ext)
+ : handle(h), space(s), coExtents(ext)
+{
+}
+
+RegionImp::~RegionImp()
+{
+}
+
+ULong RegionImp::getRangeLowerBound(ExtentIndex index, DimensionHandle
dimension) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < extents.size())
+ return extents[index].getRangeLowerBound(dimension);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+ULong RegionImp::getRangeUpperBound(ExtentIndex index, DimensionHandle
dimension) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < extents.size())
+ return extents[index].getRangeUpperBound(dimension);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+void RegionImp::setRangeLowerBound(ExtentIndex index, DimensionHandle
dimension, ULong val)
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < extents.size())
+ extents[index].setRangeLowerBound(dimension, val);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+void RegionImp::setRangeUpperBound(ExtentIndex index, DimensionHandle
dimension, ULong val)
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < extents.size())
+ extents[index].setRangeUpperBound(dimension, val);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+SpaceHandle RegionImp::getSpaceHandle() const
+ throw ()
+{
+ return space;
+}
+
+ULong RegionImp::getNumberOfExtents() const
+ throw ()
+{
+ return coExtents.size();
+}
+
+ULong RegionImp::getRangeLowerBoundNotificationLimit(ExtentIndex index,
DimensionHandle dimension) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < coExtents.size())
+ return coExtents[index].getRangeLowerBound(dimension);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+ULong RegionImp::getRangeUpperBoundNotificationLimit(ExtentIndex index,
DimensionHandle dimension) const
+ throw (RTI::ArrayIndexOutOfBounds)
+{
+ if (index < coExtents.size())
+ return coExtents[index].getRangeUpperBound(dimension);
+ else
+ throw RTI::ArrayIndexOutOfBounds("Extent index above limit");
+}
+
+// $Id: RTItypesImp.cc,v 3.1 2008/12/07 20:16:17 gotthardp Exp $
Index: libRTI/RTItypesImp.hh
===================================================================
RCS file: libRTI/RTItypesImp.hh
diff -N libRTI/RTItypesImp.hh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ libRTI/RTItypesImp.hh 7 Dec 2008 20:16:17 -0000 3.1
@@ -0,0 +1,254 @@
+// ----------------------------------------------------------------------------
+// CERTI - HLA RunTime Infrastructure
+// Copyright (C) 2002-2005 ONERA
+//
+// This file is part of CERTI-libRTI
+//
+// CERTI-libRTI 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-libRTI 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: RTItypesImp.hh,v 3.1 2008/12/07 20:16:17 gotthardp Exp $
+// ----------------------------------------------------------------------------
+
+#ifndef _RTI_TYPESIMP_HH
+#define _RTI_TYPESIMP_HH
+
+#include "certi.hh"
+#include "Extent.hh"
+
+namespace certi {
+
+template<class I>
+struct cast
+{
+ template<class R>
+ const I& operator()(const R& imp)
+ {
+ try {
+ return dynamic_cast<const I&>(imp);
+ }
+ catch (...)
+ {
+ throw RTI::RTIinternalError("Incompatible object on input.");
+ }
+ }
+};
+
+typedef std::pair<AttributeHandle, AttributeValue_t>
AttributeHandleValuePair_t;
+
+class RTI_EXPORT AttributeHandleValuePairSetImp
+ : public RTI::AttributeHandleValuePairSet, protected
std::vector<AttributeHandleValuePair_t>
+{
+public:
+ AttributeHandleValuePairSetImp(ULong);
+ AttributeHandleValuePairSetImp(const
std::vector<AttributeHandleValuePair_t> &);
+
+ virtual ~AttributeHandleValuePairSetImp();
+
+ virtual ULong size() const;
+
+ virtual Handle getHandle(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual ULong getValueLength(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void getValue(ULong, char *, ULong &) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual char *getValuePointer(ULong, ULong &) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual TransportType getTransportType(ULong) const
+ throw (RTI::InvalidHandleValuePairSetContext);
+
+ virtual OrderType getOrderType(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds,
RTI::InvalidHandleValuePairSetContext);
+
+ virtual RTI::Region *getRegion(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds,
RTI::InvalidHandleValuePairSetContext);
+
+ virtual void add(Handle, const char *, ULong)
+ throw (RTI::ValueLengthExceeded, RTI::ValueCountExceeded);
+
+ virtual void remove(Handle h)
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void moveFrom(const AttributeHandleValuePairSet &, ULong &)
+ throw (RTI::ValueCountExceeded, RTI::ArrayIndexOutOfBounds);
+
+ virtual void empty();
+
+ virtual ULong start() const;
+ virtual ULong valid(ULong i) const;
+ virtual ULong next(ULong i) const;
+
+ const std::vector<AttributeHandleValuePair_t>&
getAttributeHandleValuePairs() const;
+
+protected:
+ OrderType _order ;
+ TransportType _transport ;
+};
+
+class RTI_EXPORT AttributeHandleSetImp
+ : public RTI::AttributeHandleSet, protected std::vector<AttributeHandle>
+{
+public:
+ AttributeHandleSetImp(ULong);
+ AttributeHandleSetImp(const std::vector<AttributeHandle> &);
+
+ virtual ~AttributeHandleSetImp();
+
+ virtual ULong size() const;
+
+ virtual AttributeHandle getHandle(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void add(AttributeHandle)
+ throw (RTI::ArrayIndexOutOfBounds, RTI::AttributeNotDefined);
+
+ virtual void remove(AttributeHandle)
+ throw (RTI::AttributeNotDefined);
+
+ virtual void empty();
+
+ virtual RTI::Boolean isEmpty() const;
+ virtual RTI::Boolean isMember(AttributeHandle h) const;
+
+ const std::vector<AttributeHandle>& getAttributeHandles() const;
+};
+
+class RTI_EXPORT FederateHandleSetImp
+ : public RTI::FederateHandleSet, protected std::vector<FederateHandle>
+{
+public:
+ FederateHandleSetImp(ULong);
+ virtual ~FederateHandleSetImp();
+
+ virtual ULong size() const;
+
+ virtual FederateHandle getHandle(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void add(FederateHandle)
+ throw (RTI::ValueCountExceeded);
+
+ virtual void remove(FederateHandle)
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void empty();
+
+ virtual RTI::Boolean isMember(FederateHandle) const;
+};
+
+typedef std::pair<ParameterHandle, ParameterValue_t>
ParameterHandleValuePair_t;
+
+class RTI_EXPORT ParameterHandleValuePairSetImp
+ : public RTI::ParameterHandleValuePairSet, protected
std::vector<ParameterHandleValuePair_t>
+{
+public:
+ ParameterHandleValuePairSetImp(ULong);
+ ParameterHandleValuePairSetImp(const
std::vector<ParameterHandleValuePair_t> &);
+ virtual ~ParameterHandleValuePairSetImp();
+
+ virtual ULong size() const;
+
+ virtual Handle getHandle(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual ULong getValueLength(ULong) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void getValue(ULong, char *, ULong &) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual char *getValuePointer(ULong, ULong &) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual TransportType getTransportType() const
+ throw (RTI::InvalidHandleValuePairSetContext);
+
+ virtual OrderType getOrderType() const
+ throw (RTI::InvalidHandleValuePairSetContext);
+
+ virtual RTI::Region *getRegion() const
+ throw (RTI::InvalidHandleValuePairSetContext);
+
+ virtual void add(Handle, const char *, ULong)
+ throw (RTI::ValueLengthExceeded, RTI::ValueCountExceeded);
+
+ virtual void remove(Handle)
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void moveFrom(const ParameterHandleValuePairSet &, ULong &)
+ throw (RTI::ValueCountExceeded, RTI::ArrayIndexOutOfBounds);
+
+ virtual void empty();
+
+ virtual ULong start() const;
+ virtual ULong valid(ULong i) const;
+ virtual ULong next(ULong i) const;
+
+ const std::vector<ParameterHandleValuePair_t>&
getParameterHandleValuePairs() const;
+
+protected:
+ OrderType _order ;
+ TransportType _transport ;
+};
+
+
+class RTI_EXPORT RegionImp : public RTI::Region
+{
+public:
+ RegionImp(RegionHandle, SpaceHandle, const std::vector<Extent> &);
+ virtual ~RegionImp();
+
+ virtual ULong getRangeLowerBound(ExtentIndex, DimensionHandle) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual ULong getRangeUpperBound(ExtentIndex, DimensionHandle) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void setRangeLowerBound(ExtentIndex, DimensionHandle, ULong)
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual void setRangeUpperBound(ExtentIndex, DimensionHandle, ULong)
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual SpaceHandle getSpaceHandle() const
+ throw ();
+
+ virtual ULong getNumberOfExtents() const
+ throw ();
+
+ virtual ULong getRangeLowerBoundNotificationLimit(ExtentIndex,
DimensionHandle) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+ virtual ULong getRangeUpperBoundNotificationLimit(ExtentIndex,
DimensionHandle) const
+ throw (RTI::ArrayIndexOutOfBounds);
+
+private:
+ RegionHandle handle;
+ SpaceHandle space;
+ std::vector<Extent> extents;
+
+ std::vector<Extent> coExtents;
+};
+
+}
+
+#endif // _RTI_TYPESIMP_HH
+
+// $Id: RTItypesImp.hh,v 3.1 2008/12/07 20:16:17 gotthardp Exp $
Index: libCERTI/GAV_aux.cc
===================================================================
RCS file: libCERTI/GAV_aux.cc
diff -N libCERTI/GAV_aux.cc
--- libCERTI/GAV_aux.cc 25 Nov 2008 16:32:14 -0000 3.18
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,570 +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
-// ----------------------------------------------------------------------------
-
-
-#include "GAV.hh"
-#include "PrettyDebug.hh"
-#include <string.h>
-
-#include <algorithm>
-#include <assert.h>
-
-using std::list ;
-
-using namespace certi ;
-
-// ----------------------------------------------------------------------------
-// AttributeHandleValuePair
-// ----------------------------------------------------------------------------
-
-namespace certi {
-
-// ----------------------------------------------------------------------------
-AttributeHandleValuePair::AttributeHandleValuePair(Handle handle,
- const char *value,
- ULong value_length)
-{
- _handle = handle ;
- _valueLength = value_length ;
-
- _value = new char[value_length];
- memcpy(_value, value, value_length);
-}
-
-// ----------------------------------------------------------------------------
-AttributeHandleValuePair::~AttributeHandleValuePair()
-{
- delete[] _value ;
-}
-
-// ----------------------------------------------------------------------------
-// AttributeHandleValuePairSetImp
-// ----------------------------------------------------------------------------
-AttributeHandleValuePairSetImp::~AttributeHandleValuePairSetImp()
-{
- empty();
-}
-
-// ----------------------------------------------------------------------------
-ULong
-AttributeHandleValuePairSetImp::size() const
-{
- return list<AttributeHandleValuePair *>::size();
-}
-
-// ----------------------------------------------------------------------------
-Handle
-AttributeHandleValuePairSetImp::getHandle(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k)
- return (*j)->_handle ;
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-ULong
-AttributeHandleValuePairSetImp::getValueLength(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k)
- return (*j)->_valueLength ;
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleValuePairSetImp::getValue(ULong i,
- char *buff,
- ULong& value_length) const
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k) {
- value_length = (*j)->_valueLength ;
- memcpy(buff, (*j)->_value, (*j)->_valueLength);
- return ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-char *
-AttributeHandleValuePairSetImp::getValuePointer(ULong i,
- ULong& value_length) const
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k) {
- value_length = (*j)->_valueLength ;
- return (*j)->_value ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-TransportType
-AttributeHandleValuePairSetImp::getTransportType(ULong) const
- throw (RTI::InvalidHandleValuePairSetContext)
-{
- return _transport ;
-}
-
-// ----------------------------------------------------------------------------
-OrderType
-AttributeHandleValuePairSetImp::getOrderType(ULong) const
- throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext)
-{
- return _order ;
-}
-
-// ----------------------------------------------------------------------------
-RTI::Region *
-AttributeHandleValuePairSetImp::getRegion(ULong) const
- throw (ArrayIndexOutOfBounds, InvalidHandleValuePairSetContext)
-{
- throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleValuePairSetImp::add(Handle h,
- const char *buff,
- ULong value_length)
- throw (ValueLengthExceeded, ValueCountExceeded)
-{
- AttributeHandleValuePair *ahvp ;
- ahvp = new AttributeHandleValuePair(h, buff, value_length);
-
- push_front(ahvp);
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleValuePairSetImp::remove(Handle h)
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandleValuePair *>::iterator j ;
- for (j = begin(); j != end(); j++) {
- if ((*j)->_handle == h) {
- delete (*j);
- erase(j);
- return ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleValuePairSetImp::moveFrom(const AttributeHandleValuePairSet&,
- ULong&)
- throw (ValueCountExceeded, ArrayIndexOutOfBounds)
-{
- throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleValuePairSetImp::empty()
-{
- while (!list<AttributeHandleValuePair *>::empty()) {
- delete front();
- pop_front();
- }
-}
-
-// ----------------------------------------------------------------------------
-ULong
-AttributeHandleValuePairSetImp::start() const
-{
- //not implemented
- return 0 ;
-}
-
-// ----------------------------------------------------------------------------
-ULong
-AttributeHandleValuePairSetImp::valid(ULong) const
-{
- //not implemented
- return 0 ;
-}
-
-// ----------------------------------------------------------------------------
-ULong
-AttributeHandleValuePairSetImp::next(ULong) const
-{
- //not implemented
- return 0 ;
-}
-
-// ----------------------------------------------------------------------------
-// AttributeHandleSetImp
-// ----------------------------------------------------------------------------
-AttributeHandleSetImp::~AttributeHandleSetImp()
-{
- empty();
-}
-
-// ----------------------------------------------------------------------------
-inline ULong
-AttributeHandleSetImp::size() const
-{
- return list<AttributeHandle>::size();
-}
-
-// ----------------------------------------------------------------------------
-AttributeHandle
-AttributeHandleSetImp::getHandle(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<AttributeHandle>::const_iterator h ;
- ULong j ;
- for (j = 0, h = begin(); h != end(); h++, j++) {
- if (i == j)
- return (*h);
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleSetImp::add(AttributeHandle h)
- throw (ArrayIndexOutOfBounds, AttributeNotDefined)
-{
- push_front(h);
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleSetImp::remove(AttributeHandle h)
- throw (AttributeNotDefined)// not guaranteed safe while iterating
-{
- if (isMember(h) == RTI::RTI_TRUE)
- list<AttributeHandle>::remove(h);
- else
- throw AttributeNotDefined("");
-}
-
-// ----------------------------------------------------------------------------
-void
-AttributeHandleSetImp::empty()
-{
- list<AttributeHandle>::clear();
-}
-
-// ----------------------------------------------------------------------------
-RTI::Boolean
-AttributeHandleSetImp::isEmpty() const
-{
- return RTI::Boolean(list<AttributeHandle>::empty());
-}
-
-// ----------------------------------------------------------------------------
-RTI::Boolean
-AttributeHandleSetImp::isMember(AttributeHandle h) const
-{
- return RTI::Boolean(find(begin(), end(), h) != end());
-}
-
-// ----------------------------------------------------------------------------
-// FederateHandleSetImp
-// ----------------------------------------------------------------------------
-FederateHandleSetImp::~FederateHandleSetImp()
-{
- empty();
-}
-
-// ----------------------------------------------------------------------------
-inline ULong
-FederateHandleSetImp::size() const
-{
- return list<FederateHandle>::size();
-}
-
-// ----------------------------------------------------------------------------
-FederateHandle
-FederateHandleSetImp::getHandle(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<FederateHandle>::const_iterator h ;
- ULong j ;
- for (j = 0, h = begin(); h != end(); h++, j++) {
- if (i == j)
- return (*h);
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-FederateHandleSetImp::add(FederateHandle h)
- throw (ValueCountExceeded)
-{
- push_front(h);
-}
-
-// ----------------------------------------------------------------------------
-void
-FederateHandleSetImp::remove(FederateHandle h)
- throw (ArrayIndexOutOfBounds)
-{
- if (isMember(h) == RTI::RTI_TRUE)
- list<FederateHandle>::remove(h);
- else
- throw AttributeNotDefined("");
-}
-
-// ----------------------------------------------------------------------------
-void
-FederateHandleSetImp::empty()
-{
- list<FederateHandle>::clear();
-}
-
-// ----------------------------------------------------------------------------
-RTI::Boolean
-FederateHandleSetImp::isMember(FederateHandle h) const
-{
- return RTI::Boolean(find(begin(), end(), h) != end());
-}
-
-// ----------------------------------------------------------------------------
-// ParameterHandleValuePair
-// ----------------------------------------------------------------------------
-
-ParameterHandleValuePair::ParameterHandleValuePair(Handle handle,
- const char *value,
- ULong value_length)
-{
- _handle = handle ;
- _valueLength = value_length ;
-
- _value = (char *) malloc(value_length);
- memcpy(_value, value, value_length);
-}
-
-// ----------------------------------------------------------------------------
-ParameterHandleValuePair::~ParameterHandleValuePair()
-{
- free(_value);
-}
-
-// ----------------------------------------------------------------------------
-// ParameterHandleValuePairSetImp
-// ----------------------------------------------------------------------------
-ParameterHandleValuePairSetImp::ParameterHandleValuePairSetImp(ULong)
-{
- _order = RECEIVE ;
- _transport = RELIABLE ;
-}
-
-ParameterHandleValuePairSetImp::~ParameterHandleValuePairSetImp()
-{
- empty();
-}
-
-// ----------------------------------------------------------------------------
-ULong
-ParameterHandleValuePairSetImp::size() const
-{
- return list<ParameterHandleValuePair *>::size();
-}
-
-// ----------------------------------------------------------------------------
-Handle
-ParameterHandleValuePairSetImp::getHandle(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<ParameterHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k)
- return (*j)->_handle ;
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-ULong
-ParameterHandleValuePairSetImp::getValueLength(ULong i) const
- throw (ArrayIndexOutOfBounds)
-{
- list<ParameterHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k)
- return (*j)->_valueLength ;
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-ParameterHandleValuePairSetImp::getValue(ULong i,
- char *buff,
- ULong& value_length) const
- throw (ArrayIndexOutOfBounds)
-{
- list<ParameterHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k) {
- value_length = (*j)->_valueLength ;
- memcpy(buff, (*j)->_value, (*j)->_valueLength);
- return ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-char *
-ParameterHandleValuePairSetImp::getValuePointer(ULong i,
- ULong& value_length) const
- throw (ArrayIndexOutOfBounds)
-{
- list<ParameterHandleValuePair *>::const_iterator j = begin();
- for (ULong k = 0 ; j != end(); j++, k++) {
- if (i == k) {
- value_length = (*j)->_valueLength ;
- return (*j)->_value ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-inline TransportType
-ParameterHandleValuePairSetImp::getTransportType() const
- throw (InvalidHandleValuePairSetContext)
-{
- return _transport ;
-}
-
-// ----------------------------------------------------------------------------
-inline OrderType
-ParameterHandleValuePairSetImp::getOrderType() const
- throw (InvalidHandleValuePairSetContext)
-{
- return _order ;
-}
-
-// ----------------------------------------------------------------------------
-RTI::Region *
-ParameterHandleValuePairSetImp::getRegion() const
- throw (InvalidHandleValuePairSetContext)
-{
- throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
-void
-ParameterHandleValuePairSetImp::add(Handle h,
- const char *buff,
- ULong value_length)
- throw (ValueLengthExceeded, ValueCountExceeded)
-{
- ParameterHandleValuePair *phvp ;
- phvp = new ParameterHandleValuePair(h, buff, value_length);
-
- push_front(phvp);
-}
-
-// ----------------------------------------------------------------------------
-void
-ParameterHandleValuePairSetImp::remove(Handle h)
- throw (ArrayIndexOutOfBounds)
-{
- list<ParameterHandleValuePair *>::iterator j ;
- for (j = begin(); j != end(); j++) {
- if ((*j)->_handle == h) {
- delete (*j);
- erase(j);
- return ;
- }
- }
-
- throw ArrayIndexOutOfBounds("");
-}
-
-// ----------------------------------------------------------------------------
-void
-ParameterHandleValuePairSetImp::moveFrom(const ParameterHandleValuePairSet&,
- ULong&)
- throw (ValueCountExceeded, ArrayIndexOutOfBounds)
-{
- throw RTIinternalError("Unimplemented service");
-}
-
-// ----------------------------------------------------------------------------
-void
-ParameterHandleValuePairSetImp::empty()
-{
- while (!list<ParameterHandleValuePair *>::empty()) {
- delete front();
- pop_front();
- }
-}
-
-// ----------------------------------------------------------------------------
-ULong
-ParameterHandleValuePairSetImp::start() const
-{
- //not implemented
- return 0 ;
-}
-
-// ----------------------------------------------------------------------------
-ULong
-ParameterHandleValuePairSetImp::valid(ULong) const
-{
- //not implemented
- return 0 ;
-}
-
-// ----------------------------------------------------------------------------
-ULong
-ParameterHandleValuePairSetImp::next(ULong) const
-{
- //not implemented
- return 0 ;
-}
-
-} // namespace certi
-
-// $Id: GAV_aux.cc,v 3.18 2008/11/25 16:32:14 gotthardp Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi RTIA/CMakeLists.txt RTIA/OwnershipManagem...,
certi-cvs <=