File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/main/java/com/eprosima/fastdds/idl Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 3333import com .eprosima .idl .parser .typecode .TypeCode ;
3434import com .eprosima .idl .parser .typecode .Member ;
3535import com .eprosima .idl .parser .typecode .MemberedTypeCode ;
36+ import com .eprosima .log .ColorMessage ;
37+ import java .io .InputStream ;
3638import java .util .ArrayList ;
3739import java .util .Collection ;
3840import java .util .Map .Entry ;
@@ -323,6 +325,25 @@ public String getProduct()
323325 return "fastcdr" ;
324326 }
325327
328+ public String getVersion ()
329+ {
330+ try
331+ {
332+ InputStream input = this .getClass ().getClassLoader ().getResourceAsStream ("version" );
333+ byte [] b = new byte [input .available ()];
334+ input .read (b );
335+ String text = new String (b );
336+ int beginindex = text .indexOf ("=" );
337+ return text .substring (beginindex + 1 ).trim ();
338+ }
339+ catch (Exception ex )
340+ {
341+ System .out .println (ColorMessage .error () + "Getting version. " + ex .getMessage ());
342+ }
343+
344+ return "" ;
345+ }
346+
326347 public String getNamespace ()
327348 {
328349 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