Salome HOME
Copyright update: 2016
[modules/med.git] / src / MEDCouplingCorba / MEDCouplingRefCountServant.cxx
index 7f6606e63a0b64ea78155f8bde3713b02b5ead8c..ba9580e23ac003914276d868097cd7533f1beae1 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +16,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
 
 #include "MEDCouplingRefCountServant.hxx"
 #include "InterpKernelException.hxx"
@@ -51,6 +52,20 @@ CORBA::Long MEDCouplingRefCountServant::getTimeLabel()
   return -1;
 }
 
+char *MEDCouplingRefCountServant::versionStr()
+{
+  return CORBA::string_dup(MEDCouplingVersionStr());
+}
+
+void MEDCouplingRefCountServant::versionMajMinRel(CORBA::Long_out maj, CORBA::Long_out minor, CORBA::Long_out releas)
+{
+  int _maj,_minor,_releas;
+  MEDCouplingVersionMajMinRel(_maj,_minor,_releas);
+  maj = _maj;
+  minor = _minor;
+  releas = _releas;
+}
+
 SALOME::StringSeq *MEDCouplingRefCountServant::GetExportableFormats()
 {
   SALOME::StringSeq *ret=new SALOME::StringSeq;
@@ -69,7 +84,7 @@ void MEDCouplingRefCountServant::Register()
 void MEDCouplingRefCountServant::UnRegister()
 {
   if(_cpp_pointer)
-    ((RefCountObject *)_cpp_pointer)->decrRef();
+    const_cast<RefCountObject *>(_cpp_pointer)->decrRef();
   _ref_counter--;
   if(_ref_counter<=0)
     {