certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi libCERTI/NM_Classes.hh libCERTI/NM_Classe...


From: CERTI CVS commits
Subject: [certi-cvs] certi libCERTI/NM_Classes.hh libCERTI/NM_Classe...
Date: Thu, 08 Sep 2011 20:24:06 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      11/09/08 20:24:06

Modified files:
        libCERTI       : NM_Classes.hh NM_Classes.cc M_Classes.hh 
                         M_Classes.cc 
        scripts        : GenMsgCXX.py 

Log message:
        Fix compilation error on Windows.
        STL std::vector does not have .a standard .data() accessor.
        Should use &(v[0]) which should always work.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.hh?cvsroot=certi&r1=3.24&r2=3.25
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/NM_Classes.cc?cvsroot=certi&r1=3.30&r2=3.31
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/M_Classes.hh?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/libCERTI/M_Classes.cc?cvsroot=certi&r1=3.15&r2=3.16
http://cvs.savannah.gnu.org/viewcvs/certi/scripts/GenMsgCXX.py?cvsroot=certi&r1=1.24&r2=1.25

Patches:
Index: libCERTI/NM_Classes.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/NM_Classes.hh,v
retrieving revision 3.24
retrieving revision 3.25
diff -u -b -r3.24 -r3.25
--- libCERTI/NM_Classes.hh      13 Jul 2011 15:43:17 -0000      3.24
+++ libCERTI/NM_Classes.hh      8 Sep 2011 20:24:05 -0000       3.25
@@ -1,4 +1,4 @@
-// Generated on 2011 July Wed, 13 at 17:02:50 by the CERTI message generator
+// Generated on 2011 September Thu, 08 at 22:08:47 by the CERTI message 
generator
 #ifndef NM_CLASSES_HH
 #define NM_CLASSES_HH
 // ****-**** Global System includes ****-****
@@ -51,15 +51,15 @@
 
    }
    // The EventRetraction is not inheriting from base "Message"
-   // this is a plain message which may be used as field
-   // in messages merging from "Message". As such
-   // it won't appear in the generated factory method.
-   // It's a convenient way to describe a structured native
-   // message using "combine". 
-   //message EventRetraction {
-   //    required FederateHandle sendingFederate {default = 0}
-   //    required uint64         SN              {default = 0}
-   //}
+// this is a plain message which may be used as field   
+// in messages merging from "Message". As such   
+// it won't appear in the generated factory method.   
+// It's a convenient way to describe a structured native   
+// message using "combine".    
+//message EventRetraction {   
+//    required FederateHandle sendingFederate {default = 0}   
+//    required uint64         SN              {default = 0}   
+//}
    class CERTI_EXPORT NM_FOM_Dimension {
       public:
          NM_FOM_Dimension();
@@ -493,7 +493,7 @@
       private:
    };
    // HLA 1.3    - §4.7
-   // IEEE-1516  - §4.7
+// IEEE-1516  - §4.7
    class CERTI_EXPORT NM_Confirm_Synchronization_Point_Registration : public 
NetworkMessage {
       public:
          typedef NetworkMessage Super;
@@ -1367,8 +1367,8 @@
       private:
    };
    // This is a base message which is used to 
-   // define several Attribute_Ownership_XXX
-   // since all these message contains the same fields
+// define several Attribute_Ownership_XXX   
+// since all these message contains the same fields
    class CERTI_EXPORT NM_Attribute_Ownership_Unavailable : public 
NM_Attribute_Ownership_Base {
       public:
          typedef NM_Attribute_Ownership_Base Super;

Index: libCERTI/NM_Classes.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/NM_Classes.cc,v
retrieving revision 3.30
retrieving revision 3.31
diff -u -b -r3.30 -r3.31
--- libCERTI/NM_Classes.cc      13 Jul 2011 15:43:17 -0000      3.30
+++ libCERTI/NM_Classes.cc      8 Sep 2011 20:24:05 -0000       3.31
@@ -1,4 +1,4 @@
-// Generated on 2011 July Wed, 13 at 17:02:50 by the CERTI message generator
+// Generated on 2011 September Thu, 08 at 22:08:47 by the CERTI message 
generator
 #include <vector>
 #include <string>
 #include "NM_Classes.hh"
@@ -1213,7 +1213,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_bool(_hasEvent);
       if (_hasEvent) {
@@ -1290,7 +1290,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_bool(_hasEvent);
       if (_hasEvent) {
@@ -1366,7 +1366,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_uint32(region);
    }
@@ -1439,7 +1439,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_bool(_hasEvent);
       if (_hasEvent) {

Index: libCERTI/M_Classes.hh
===================================================================
RCS file: /sources/certi/certi/libCERTI/M_Classes.hh,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/M_Classes.hh       13 Jul 2011 15:43:17 -0000      3.15
+++ libCERTI/M_Classes.hh       8 Sep 2011 20:24:05 -0000       3.16
@@ -1,4 +1,4 @@
-// Generated on 2011 July Wed, 13 at 17:02:50 by the CERTI message generator
+// Generated on 2011 September Thu, 08 at 22:08:47 by the CERTI message 
generator
 #ifndef M_CLASSES_HH
 #define M_CLASSES_HH
 // ****-**** Global System includes ****-****
@@ -54,11 +54,11 @@
 
    }
    // The EventRetraction is not inheriting from base "Message"
-   // this is a plain message which may be used as field
-   // in messages merging from "Message". As such
-   // it won't appear in the generated factory method.
-   // It's a convenient way to describe a structured native
-   // message using "combine". 
+// this is a plain message which may be used as field   
+// in messages merging from "Message". As such   
+// it won't appear in the generated factory method.   
+// It's a convenient way to describe a structured native   
+// message using "combine". 
    class CERTI_EXPORT EventRetraction {
       public:
          EventRetraction();

Index: libCERTI/M_Classes.cc
===================================================================
RCS file: /sources/certi/certi/libCERTI/M_Classes.cc,v
retrieving revision 3.15
retrieving revision 3.16
diff -u -b -r3.15 -r3.16
--- libCERTI/M_Classes.cc       13 Jul 2011 15:43:17 -0000      3.15
+++ libCERTI/M_Classes.cc       8 Sep 2011 20:24:06 -0000       3.16
@@ -1,4 +1,4 @@
-// Generated on 2011 July Wed, 13 at 17:02:50 by the CERTI message generator
+// Generated on 2011 September Thu, 08 at 22:08:47 by the CERTI message 
generator
 #include <vector>
 #include <string>
 #include "M_Classes.hh"
@@ -996,7 +996,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_bool(_hasEventRetraction);
       if (_hasEventRetraction) {
@@ -1130,7 +1130,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_bool(_hasEventRetraction);
       if (_hasEventRetraction) {
@@ -1212,7 +1212,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_uint32(region);
       msgBuffer.write_bool(_hasEventRetraction);
@@ -1295,7 +1295,7 @@
       for (uint32_t i = 0; i < valuesSize; ++i) {
          //serialize native whose representation is 'repeated' byte 
          msgBuffer.write_uint32(values[i].size());
-         msgBuffer.write_bytes(values[i].data(),values[i].size());
+         msgBuffer.write_bytes(&(values[i][0]),values[i].size());
       }
       msgBuffer.write_uint32(region);
       msgBuffer.write_bool(_hasEventRetraction);

Index: scripts/GenMsgCXX.py
===================================================================
RCS file: /sources/certi/certi/scripts/GenMsgCXX.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- scripts/GenMsgCXX.py        29 Jul 2011 09:08:23 -0000      1.24
+++ scripts/GenMsgCXX.py        8 Sep 2011 20:24:06 -0000       1.25
@@ -20,7 +20,7 @@
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 ## USA
 ##
-## $Id: GenMsgCXX.py,v 1.24 2011/07/29 09:08:23 erk Exp $
+## $Id: GenMsgCXX.py,v 1.25 2011/09/08 20:24:06 erk Exp $
 ## ----------------------------------------------------------------------------
 
 """
@@ -659,7 +659,7 @@
                             stream.write(self.getIndent() + 'msgBuffer.'+ 
self.getSerializeMethodName('uint32'))
                             stream.write('('+field.name + indexField + 
'.size()' +');\n')
                             stream.write(self.getIndent() + 'msgBuffer.'+ 
self.getSerializeMethodName(repLine.representation)+'s')
-                            stream.write('('+field.name + indexField 
+'.data(),')
+                            stream.write('(&('+field.name + indexField 
+'[0]),')
                             stream.write(field.name + indexField + '.size()' 
+');\n')
                 # we can not handle this native case: no representation given
                 else:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]