From 72d471b3212c807193c1fd329367ee2026f09b50 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 16 Oct 2012 08:27:41 +0000 Subject: [PATCH] 0021478: EDF 2083 ALL: Write the version of Salome used to create the study in the hdf file --- src/GEOM_I/GEOM_Gen_i.cc | 11 +++++++++++ src/GEOM_I/GEOM_Gen_i.hh | 3 +++ src/GEOM_I/Makefile.am | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index fe877f791..3dec74459 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -28,6 +28,7 @@ #include "GEOM_Gen_i.hh" #include "GEOM_Object_i.hh" +#include "GEOM_version.h" #include #include @@ -2551,6 +2552,16 @@ char* GEOM_Gen_i::getObjectInfo(CORBA::Long studyId, const char* entry) return ret; } +// Version information +char* GEOM_Gen_i::getVersion() +{ +#if GEOM_DEVELOPMENT + return CORBA::string_dup(GEOM_VERSION_STR"dev"); +#else + return CORBA::string_dup(GEOM_VERSION_STR); +#endif +} + //===================================================================================== // EXPORTED METHODS //===================================================================================== diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh index 9e65dea0c..021ce1bcb 100644 --- a/src/GEOM_I/GEOM_Gen_i.hh +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -264,6 +264,9 @@ class GEOM_I_EXPORT GEOM_Gen_i: virtual public POA_GEOM::GEOM_Gen, virtual publi virtual bool hasObjectInfo(); virtual char* getObjectInfo(CORBA::Long studyId, const char* entry); + // Version information + virtual char* getVersion(); + //-----------------------------------------------------------------------// // Internal methods // //-----------------------------------------------------------------------// diff --git a/src/GEOM_I/Makefile.am b/src/GEOM_I/Makefile.am index dfdba30a5..b5cd51165 100644 --- a/src/GEOM_I/Makefile.am +++ b/src/GEOM_I/Makefile.am @@ -81,7 +81,8 @@ libGEOMEngine_la_CPPFLAGS = \ -I$(srcdir)/../GEOMImpl \ -I$(srcdir)/../GEOMAlgo \ -I$(srcdir)/../GEOM \ - -I$(top_builddir)/idl + -I$(top_builddir)/idl \ + -I$(top_builddir) libGEOMEngine_la_LDFLAGS = \ -- 2.39.2