[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[certi-cvs] certi libCERTI/DebugOStream.hh libCERTI/FedTime...
From: |
certi-cvs |
Subject: |
[certi-cvs] certi libCERTI/DebugOStream.hh libCERTI/FedTime... |
Date: |
Wed, 10 Dec 2008 16:53:24 +0000 |
CVSROOT: /sources/certi
Module name: certi
Changes by: Eric NOULARD <erk> 08/12/10 16:53:24
Modified files:
libCERTI : DebugOStream.hh FedTime.cc CMakeLists.txt
include : RTItypes.hh fedtime.hh RTI.hh certi.hh
Log message:
More work for a (as far as possible) clean libFedTime
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/DebugOStream.hh?cvsroot=certi&r1=4.1&r2=4.2
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/FedTime.cc?cvsroot=certi&r1=3.14&r2=3.15
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/CMakeLists.txt?cvsroot=certi&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTItypes.hh?cvsroot=certi&r1=3.18&r2=3.19
http://cvs.savannah.gnu.org/viewcvs/certi/include/fedtime.hh?cvsroot=certi&r1=3.10&r2=3.11
http://cvs.savannah.gnu.org/viewcvs/certi/include/RTI.hh?cvsroot=certi&r1=3.13&r2=3.14
http://cvs.savannah.gnu.org/viewcvs/certi/include/certi.hh?cvsroot=certi&r1=3.37&r2=3.38
Patches:
Index: libCERTI/DebugOStream.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/DebugOStream.hh,v
retrieving revision 4.1
retrieving revision 4.2
diff -u -b -r4.1 -r4.2
--- libCERTI/DebugOStream.hh 22 Jun 2007 08:51:36 -0000 4.1
+++ libCERTI/DebugOStream.hh 10 Dec 2008 16:53:23 -0000 4.2
@@ -19,14 +19,14 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
//
-// $Id: DebugOStream.hh,v 4.1 2007/06/22 08:51:36 erk Exp $
+// $Id: DebugOStream.hh,v 4.2 2008/12/10 16:53:23 erk Exp $
// ----------------------------------------------------------------------------
#ifndef _CERTI_DEBUGOSTREAM_HH
#define _CERTI_DEBUGOSTREAM_HH
#include <iostream>
-#include "RTI.hh"
+#include "certi.hh"
/** Stream used by PrettyDebug
*/
@@ -175,7 +175,7 @@
return(*this);
}
- //Dans la norme C++, il faut passer une référence et pas un
+ //Dans la norme C++, il faut passer une r�f�rence et pas un
//pointeur mais ca marche pas avec gcc
//DebugOStream& operator<<(streambuf& sb)
@@ -258,4 +258,4 @@
#endif // _CERTI_DEBUGOSTREAM_HH
-// $Id: DebugOStream.hh,v 4.1 2007/06/22 08:51:36 erk Exp $
+// $Id: DebugOStream.hh,v 4.2 2008/12/10 16:53:23 erk Exp $
Index: libCERTI/FedTime.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/FedTime.cc,v
retrieving revision 3.14
retrieving revision 3.15
diff -u -b -r3.14 -r3.15
--- libCERTI/FedTime.cc 12 Jun 2008 07:39:49 -0000 3.14
+++ libCERTI/FedTime.cc 10 Dec 2008 16:53:24 -0000 3.15
@@ -23,6 +23,7 @@
#include "certi.hh"
#include "fedtime.hh"
+#include "HLAtypesIEEE1516.hh"
#ifdef _WIN32
#ifdef max
@@ -151,18 +152,18 @@
// ----------------------------------------------------------------------------
// FedTimeFactory
-FedTime *
+RTI::FedTime *
RTI::FedTimeFactory::makeZero()
throw (RTI::MemoryExhausted)
{
return new RTIfedTime();
}
-FedTime *
+RTI::FedTime *
RTI::FedTimeFactory::decode(const char *)
throw (RTI::MemoryExhausted)
{
- throw RTIinternalError("Not implemented");
+ throw RTI::RTIinternalError("Not implemented");
}
// ----------------------------------------------------------------------------
@@ -250,14 +251,21 @@
int
RTIfedTime::encodedLength() const
{
- throw RTI::RTIinternalError("Not implemented");
+ // current implementation of RTIfedtime takes
+ // four IEEE-754 double values.
+ return (sizeof(_fedTime)+
+ sizeof(_zero)+
+ sizeof(_epsilon)+
+ sizeof(_positiveInfinity));
}
// ----------------------------------------------------------------------------
void
-RTIfedTime::encode(char *) const
+RTIfedTime::encode(char *buffer) const
{
- throw RTI::RTIinternalError("Not implemented");
+ libhla::HLAfloat64LE encoded_fedTime;
+ encoded_fedTime = _fedTime;
+ strncpy(buffer,(char*)&(encoded_fedTime),encoded_fedTime.__sizeof());
}
// ----------------------------------------------------------------------------
Index: libCERTI/CMakeLists.txt
===================================================================
RCS file: /sources/certi/certi/libCERTI/CMakeLists.txt,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- libCERTI/CMakeLists.txt 7 Dec 2008 20:16:12 -0000 1.22
+++ libCERTI/CMakeLists.txt 10 Dec 2008 16:53:24 -0000 1.23
@@ -212,7 +212,14 @@
# CERTI is provided one. The lib FedTime depends on libRTI
# since it inherits from the RTI::FedTime abstract class.
##################################################################
+IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long")
+ENDIF(CMAKE_COMPILER_IS_GNUCC)
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+INCLUDE_DIRECTORIES(../libHLA)
SET(FEDTIME_SRCS
FedTime.cc
${CMAKE_SOURCE_DIR}/include/fedtime.hh
@@ -224,7 +231,7 @@
${FEDTIME_SRCS}
)
-TARGET_LINK_LIBRARIES(FedTime RTI)
+TARGET_LINK_LIBRARIES(FedTime RTI HLA)
SET_TARGET_PROPERTIES(FedTime PROPERTIES PROJECT_LABEL LibFedTime)
IF (MINGW)
Index: include/RTItypes.hh
===================================================================
RCS file: /sources/certi/certi/include/RTItypes.hh,v
retrieving revision 3.18
retrieving revision 3.19
diff -u -b -r3.18 -r3.19
--- include/RTItypes.hh 25 Sep 2007 13:42:54 -0000 3.18
+++ include/RTItypes.hh 10 Dec 2008 16:53:24 -0000 3.19
@@ -1,5 +1,5 @@
// HLA 1.3 Header "RTItypes.hh"
-// $Id: RTItypes.hh,v 3.18 2007/09/25 13:42:54 erk Exp $
+// $Id: RTItypes.hh,v 3.19 2008/12/10 16:53:24 erk Exp $
#ifndef RTITYPES_HH_INCLUDED
#define RTITYPES_HH_INCLUDED
@@ -141,7 +141,7 @@
typedef Double TickTime ;
typedef ULong RegionToken ;
-class CERTI_EXPORT AttributeHandleValuePairSet
+class RTI_EXPORT AttributeHandleValuePairSet
{
public:
virtual ~AttributeHandleValuePairSet() {}
@@ -185,14 +185,14 @@
virtual ULong next(ULong i) const = 0 ;
};
-class CERTI_EXPORT AttributeSetFactory
+class RTI_EXPORT AttributeSetFactory
{
public:
static AttributeHandleValuePairSet* create(ULong)
throw (MemoryExhausted, ValueCountExceeded,
HandleValuePairMaximumExceeded);
};
-class CERTI_EXPORT AttributeHandleSet
+class RTI_EXPORT AttributeHandleSet
{
public:
virtual ~AttributeHandleSet() { }
@@ -214,14 +214,14 @@
virtual Boolean isMember(AttributeHandle h) const = 0 ;
};
-class CERTI_EXPORT AttributeHandleSetFactory
+class RTI_EXPORT AttributeHandleSetFactory
{
public:
static AttributeHandleSet *create(ULong)
throw(MemoryExhausted, ValueCountExceeded);
};
-class CERTI_EXPORT FederateHandleSet
+class RTI_EXPORT FederateHandleSet
{
public:
virtual ~FederateHandleSet() { }
@@ -242,14 +242,14 @@
virtual Boolean isMember(FederateHandle) const = 0 ;
};
-class CERTI_EXPORT FederateHandleSetFactory
+class RTI_EXPORT FederateHandleSetFactory
{
public:
static FederateHandleSet *create(ULong)
throw (MemoryExhausted, ValueCountExceeded);
};
-class CERTI_EXPORT ParameterHandleValuePairSet
+class RTI_EXPORT ParameterHandleValuePairSet
{
public:
virtual ~ParameterHandleValuePairSet() { }
@@ -293,14 +293,14 @@
virtual ULong next(ULong i) const = 0 ;
};
-class CERTI_EXPORT ParameterSetFactory
+class RTI_EXPORT ParameterSetFactory
{
public:
static ParameterHandleValuePairSet *create(ULong)
throw (MemoryExhausted, ValueCountExceeded,
HandleValuePairMaximumExceeded);
};
-class CERTI_EXPORT Region
+class RTI_EXPORT Region
{
public:
virtual ~Region() { }
@@ -330,7 +330,7 @@
throw (ArrayIndexOutOfBounds) = 0 ;
} ;
-class CERTI_EXPORT FedTime
+class RTI_EXPORT FedTime
{
public:
virtual ~FedTime(){};
@@ -371,14 +371,14 @@
virtual void getPrintableString(char *) = 0 ;
};
-class CERTI_EXPORT FedTimeFactory
+class FEDTIME_EXPORT FedTimeFactory
{
public:
- static FedTime *makeZero()
- throw (MemoryExhausted);
+ static RTI::FedTime *makeZero()
+ throw (RTI::MemoryExhausted);
- static FedTime* decode(const char *buf)
- throw (MemoryExhausted);
+ static RTI::FedTime* decode(const char *buf)
+ throw (RTI::MemoryExhausted);
};
struct EventRetractionHandle_s {
@@ -390,4 +390,4 @@
#endif // RTITYPES_HH_INCLUDED
-// $Id: RTItypes.hh,v 3.18 2007/09/25 13:42:54 erk Exp $
+// $Id: RTItypes.hh,v 3.19 2008/12/10 16:53:24 erk Exp $
Index: include/fedtime.hh
===================================================================
RCS file: /sources/certi/certi/include/fedtime.hh,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -b -r3.10 -r3.11
--- include/fedtime.hh 3 Dec 2008 10:23:53 -0000 3.10
+++ include/fedtime.hh 10 Dec 2008 16:53:24 -0000 3.11
@@ -1,5 +1,5 @@
// HLA 1.3 Header "fedtime.hh"
-// $Id: fedtime.hh,v 3.10 2008/12/03 10:23:53 erk Exp $
+// $Id: fedtime.hh,v 3.11 2008/12/10 16:53:24 erk Exp $
#ifndef HLA_FEDTIME_HH
#define HLA_FEDTIME_HH
@@ -10,6 +10,17 @@
#include <sys/types.h>
#include <string.h>
#endif
+
+#if defined(_WIN32)
+ #if defined(FEDTIME_EXPORTS)
+ #define FEDTIME_EXPORT __declspec(dllexport)
+ #else
+ #define FEDTIME_EXPORT __declspec(dllimport)
+ #endif
+#else
+ #define FEDTIME_EXPORT
+#endif
+
#include "RTI.hh"
class FEDTIME_EXPORT RTIfedTime : public RTI::FedTime
@@ -135,4 +146,4 @@
#endif // HLA_FEDTIME_HH
-// $Id: fedtime.hh,v 3.10 2008/12/03 10:23:53 erk Exp $
+// $Id: fedtime.hh,v 3.11 2008/12/10 16:53:24 erk Exp $
Index: include/RTI.hh
===================================================================
RCS file: /sources/certi/certi/include/RTI.hh,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -b -r3.13 -r3.14
--- include/RTI.hh 3 Dec 2008 10:23:53 -0000 3.13
+++ include/RTI.hh 10 Dec 2008 16:53:24 -0000 3.14
@@ -1,5 +1,5 @@
// HLA 1.3 Header "RTI.hh"
-// $Id: RTI.hh,v 3.13 2008/12/03 10:23:53 erk Exp $
+// $Id: RTI.hh,v 3.14 2008/12/10 16:53:24 erk Exp $
#ifndef RTI_hh
#define RTI_hh
@@ -16,21 +16,14 @@
#else
#define RTI_EXPORT __declspec(dllimport)
#endif
-
- #if defined(CERTI_EXPORTS)
- #define CERTI_EXPORT __declspec(dllexport)
- #else
- #define CERTI_EXPORT __declspec(dllimport)
- #endif
- #if defined(FEDTIME_EXPORTS)
- #define FEDTIME_EXPORT __declspec(dllexport)
- #else
- #define FEDTIME_EXPORT __declspec(dllimport)
+ #if not defined(FEDTIME_EXPORT)
+ #define FEDTIME_EXPORT
#endif
#else
#define RTI_EXPORT
- #define CERTI_EXPORT
+ #if not defined(FEDTIME_EXPORT)
#define FEDTIME_EXPORT
+ #endif
#endif
#ifdef RTI_USES_STD_FSTREAM
@@ -73,10 +66,10 @@
};
};
-RTI_STD::ostream CERTI_EXPORT &
+RTI_STD::ostream RTI_EXPORT &
operator<<(RTI_STD::ostream &os, RTI::Exception *ex);
-RTI_STD::ostream CERTI_EXPORT &
+RTI_STD::ostream RTI_EXPORT &
operator<<(RTI_STD::ostream &os, RTI::Exception const &ex);
/** @} */
Index: include/certi.hh
===================================================================
RCS file: /sources/certi/certi/include/certi.hh,v
retrieving revision 3.37
retrieving revision 3.38
diff -u -b -r3.37 -r3.38
--- include/certi.hh 7 Dec 2008 20:16:12 -0000 3.37
+++ include/certi.hh 10 Dec 2008 16:53:24 -0000 3.38
@@ -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.37 2008/12/07 20:16:12 gotthardp Exp $
+// $Id: certi.hh,v 3.38 2008/12/10 16:53:24 erk Exp $
// ----------------------------------------------------------------------------
#include <vector>
@@ -70,6 +70,11 @@
#define CERTI_INT64_FORMAT "ll"
#endif
#endif
+ #if defined(CERTI_EXPORTS)
+ #define CERTI_EXPORT __declspec(dllexport)
+ #else
+ #define CERTI_EXPORT __declspec(dllimport)
+ #endif
#else
#include <stdint.h>
#define STAT_FUNCTION stat
@@ -81,6 +86,7 @@
#define CERTI_INT64_CONSTANT(val) (val##LL)
#define CERTI_INT64_FORMAT "ll"
#endif
+ #define CERTI_EXPORT
#endif
#include "RTI.hh"
@@ -241,4 +247,4 @@
(uint64_t) CERTI_INT64_CONSTANT(0xff00000000000000U)) >> 56)))
#endif // CERTI_HH_INCLUDED
-// $Id: certi.hh,v 3.37 2008/12/07 20:16:12 gotthardp Exp $
+// $Id: certi.hh,v 3.38 2008/12/10 16:53:24 erk Exp $
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [certi-cvs] certi libCERTI/DebugOStream.hh libCERTI/FedTime...,
certi-cvs <=