-// Copyright (C) 2013-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
using namespace XAO;
-DoubleStep::DoubleStep(const int& step, const int& stamp, const int& nbElements, const int& nbComponents)
+DoubleStep::DoubleStep(int step, int stamp, int nbElements, int nbComponents)
{
m_nbElements = nbElements;
m_nbComponents = nbComponents;
return result;
}
-std::vector<double> DoubleStep::getElement(const int& element)
-throw (XAO_Exception)
+std::vector<double> DoubleStep::getElement(int element)
+
{
checkElementIndex(element);
return result;
}
-std::vector<double> DoubleStep::getComponent(const int& component)
-throw (XAO_Exception)
+std::vector<double> DoubleStep::getComponent(int component)
+
{
checkComponentIndex(component);
return result;
}
-const double DoubleStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
+double DoubleStep::getValue(int element, int component)
+
{
checkElementIndex(element);
checkComponentIndex(component);
return m_values[element][component];
}
-const std::string DoubleStep::getStringValue(const int& element, const int& component)
-throw (XAO_Exception)
+const std::string DoubleStep::getStringValue(int element, int component)
+
{
return XaoUtils::doubleToString(getValue(element, component));
}
void DoubleStep::setValues(const std::vector<double>& values)
-throw (XAO_Exception)
+
{
checkNbValues(values.size());
}
}
-void DoubleStep::setElement(const int& element, const std::vector<double>& elements)
-throw (XAO_Exception)
+void DoubleStep::setElement(int element, const std::vector<double>& elements)
+
{
checkElementIndex(element);
checkNbComponents(elements.size());
m_values[element][i] = elements[i];
}
-void DoubleStep::setComponent(const int& component, const std::vector<double>& components)
-throw (XAO_Exception)
+void DoubleStep::setComponent(int component, const std::vector<double>& components)
+
{
checkElementIndex(component);
checkNbElements(components.size());
m_values[i][component] = components[i];
}
-void DoubleStep::setValue(const int& element, const int& component, const double& value)
-throw (XAO_Exception)
+void DoubleStep::setValue(int element, int component, double value)
+
{
checkElementIndex(element);
checkComponentIndex(component);
m_values[element][component] = value;
}
-void DoubleStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+void DoubleStep::setStringValue(int element, int component, const std::string& value)
+
{
setValue(element, component, XaoUtils::stringToDouble(value));
}