-// Copyright (C) 2013-2020 CEA/DEN, EDF R&D
+// 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;
-BooleanStep::BooleanStep(const int& step, const int& stamp, const int& nbElements, const int& nbComponents)
+BooleanStep::BooleanStep(int step, int stamp, int nbElements, int nbComponents)
{
m_nbElements = nbElements;
m_nbComponents = nbComponents;
return result;
}
-std::vector<bool> BooleanStep::getElement(const int& element)
-throw (XAO_Exception)
+std::vector<bool> BooleanStep::getElement(int element)
{
checkElementIndex(element);
return result;
}
-std::vector<bool> BooleanStep::getComponent(const int& component)
-throw (XAO_Exception)
+std::vector<bool> BooleanStep::getComponent(int component)
{
checkComponentIndex(component);
return result;
}
-const bool BooleanStep::getValue(const int& element, const int& component)
-throw (XAO_Exception)
+bool BooleanStep::getValue(int element, int component)
{
checkElementIndex(element);
checkComponentIndex(component);
return m_values[element][component];
}
-const std::string BooleanStep::getStringValue(const int& element, const int& component)
-throw (XAO_Exception)
+const std::string BooleanStep::getStringValue(int element, int component)
{
return XaoUtils::booleanToString(getValue(element, component));
}
void BooleanStep::setValues(const std::vector<bool>& values)
-throw (XAO_Exception)
{
checkNbValues((int)values.size());
}
}
-void BooleanStep::setElement(const int& element, const std::vector<bool>& elements)
-throw (XAO_Exception)
+void BooleanStep::setElement(int element, const std::vector<bool>& elements)
{
checkElementIndex(element);
- checkNbComponents((int)elements.size());
+ checkNbComponents(elements.size());
for (int i = 0; i < m_nbComponents; ++i)
m_values[element][i] = elements[i];
}
-void BooleanStep::setComponent(const int& component, const std::vector<bool>& components)
-throw (XAO_Exception)
+void BooleanStep::setComponent(int component, const std::vector<bool>& components)
{
checkComponentIndex(component);
- checkNbElements((int)components.size());
+ checkNbElements(components.size());
for (int i = 0; i < m_nbElements; ++i)
m_values[i][component] = components[i];
}
-void BooleanStep::setValue(const int& element, const int& component, const bool& value)
-throw (XAO_Exception)
+void BooleanStep::setValue(int element, int component, bool value)
{
checkElementIndex(element);
checkComponentIndex(component);
m_values[element][component] = value;
}
-void BooleanStep::setStringValue(const int& element, const int& component, const std::string& value)
-throw (XAO_Exception)
+void BooleanStep::setStringValue(int element, int component, const std::string& value)
{
setValue(element, component, XaoUtils::stringToBoolean(value));
}