m_components[index] = name;
}
+void Field::setComponentsNames(const std::vector<std::string>& names)
+throw (XAO_Exception)
+{
+ for (int i = 0; i < names.size(); ++i)
+ {
+ if (i < m_nbComponents)
+ m_components[i] = names[i];
+ }
+}
+
bool Field::removeStep(Step* step)
{
std::vector<Step*>::iterator it = m_steps.begin();
*/
void setComponentName(const int& componentIndex, const std::string& name) throw (XAO_Exception);
+ /**
+ * Sets the name of the components.
+ * @param names the names to set.
+ */
+ void setComponentsNames(const std::vector<std::string>& names) throw (XAO_Exception);
+
/**
* Adds a new step of the same type than the field.
* @param number the numer of the step.
CPPUNIT_TEST(testIntegerStepValues);
CPPUNIT_TEST(testDoubleStepValues);
CPPUNIT_TEST(testStringStepValues);
+ CPPUNIT_TEST(testSetComponents);
CPPUNIT_TEST_SUITE_END();
public:
void testIntegerStepValues();
void testDoubleStepValues();
void testStringStepValues();
+ void testSetComponents();
};
}