File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
src/main/java/com/eprosima/fastdds/idl Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 2323import com .eprosima .idl .parser .typecode .Member ;
2424import com .eprosima .idl .parser .typecode .MapTypeCode ;
2525import com .eprosima .idl .parser .typecode .MemberedTypeCode ;
26+ <<<<<<< HEAD
2627import com .eprosima .idl .parser .typecode .SequenceTypeCode ;
2728import com .eprosima .idl .parser .typecode .EnumTypeCode ;
29+ =======
30+ import com .eprosima .log .ColorMessage ;
31+ import java .io .InputStream ;
32+ >>>>>>> a2ff4a4 (Sign the generated code with the Fast DDS -Gen version (#458 ))
2833import java .util .ArrayList ;
2934import java .util .Collection ;
3035import java .util .Map .Entry ;
@@ -224,6 +229,25 @@ public String getProduct()
224229 return "fastcdr" ;
225230 }
226231
232+ public String getVersion ()
233+ {
234+ try
235+ {
236+ InputStream input = this .getClass ().getClassLoader ().getResourceAsStream ("version" );
237+ byte [] b = new byte [input .available ()];
238+ input .read (b );
239+ String text = new String (b );
240+ int beginindex = text .indexOf ("=" );
241+ return text .substring (beginindex + 1 ).trim ();
242+ }
243+ catch (Exception ex )
244+ {
245+ System .out .println (ColorMessage .error () + "Getting version. " + ex .getMessage ());
246+ }
247+
248+ return "" ;
249+ }
250+
227251 public String getNamespace ()
228252 {
229253 return "fastcdr" ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const $typecode.cppTypename$&
2222$endif$
2323>>
2424
25+ <<<<<<< HEAD
2526varDecl(variable, create) ::= <<
2627$if(variable)$
2728$if(variable.typecode.primitive)$
@@ -30,6 +31,14 @@ $else$
3031$variable.typecode.cppTypename$ $variable.name$;
3132$endif$
3233$endif$
34+ =======
35+ /*!
36+ * @file $file$
37+ * $description$
38+ *
39+ * This file was generated by the tool $ctx.product$gen (version: $ctx.version$).
40+ */
41+ >>>>>>> a2ff4a4 (Sign the generated code with the Fast DDS-Gen version (#458))
3342>>
3443
3544varDel(variable) ::= <<>>
You can’t perform that action at this time.
0 commit comments