Salome HOME
Update copyrights
[modules/smesh.git] / src / SMESH / SMESH_Group.cxx
index d76c3750bf0df253bd16e78b05fef3b10434c1a3..ccc79473dffbd3b7ca0bee3246197887938f9a16 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  SMESH SMESH : implementation of SMESH idl descriptions
 //  File   : SMESH_Group.cxx
 //  Author : Michael Sazonov (OCC)
 //  Module : SMESH
@@ -64,7 +64,7 @@ SMESH_Group::SMESH_Group (int                       theID,
 
 //================================================================================
 /*!
- * \brief Constructor accesible to SMESH_Mesh only
+ * \brief Constructor accessible to SMESH_Mesh only
  */
 //================================================================================
 
@@ -96,3 +96,14 @@ void SMESH_Group::SetName (const char* theName)
   myName = theName;
   myGroupDS->SetStoreName( theName );
 }
+
+//================================================================================
+/*!
+ * \brief Return persistent group ID. It is negative if no SMESHDS_GroupBase exist
+ */
+//================================================================================
+
+int SMESH_Group::GetID() const
+{
+  return myGroupDS ? myGroupDS->GetID() : -1;
+}