Salome HOME
Copyright update 2022
[modules/yacs.git] / src / engine / NbBranches.cxx
index bf7a8e1193b8b5d23e5eec2e558117a8933b2762..bffeaa1a886fc74ad91b81af4f2c96561bc89cc4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2022  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
@@ -33,6 +33,11 @@ std::unique_ptr<NbBranchesAbstract> NbBranches::copy(Node *node) const
   return std::unique_ptr<NbBranchesAbstract>(new NbBranches(*this,node));
 }
 
+int NbBranches::getNumberOfBranches(int) const
+{
+  return this->getIntValue();
+}
+
 bool NbBranches::isMyName(const std::string& name) const
 {
   return NbBranchesAbstract::IsBranchPortName(name);
@@ -55,7 +60,7 @@ bool NbBranches::isMultiplicitySpecified(unsigned& value) const
     {
       value=_nbOfBranches.getIntValue();
       return true;
-    }   
+    }
   return false;
 }
 
@@ -70,6 +75,11 @@ std::unique_ptr<NbBranchesAbstract> NoNbBranches::copy(Node *) const
   return std::unique_ptr<NbBranchesAbstract>(new NoNbBranches);
 }
 
+int NoNbBranches::getNumberOfBranches(int nbOfElems) const
+{
+  return nbOfElems;
+}
+
 void NoNbBranches::exInit(bool start)
 {
 }