mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-28 07:20:33 +05:00
add setComponentsNames
This commit is contained in:
parent
f552e9aa9d
commit
6eb6c1dbb9
@ -78,6 +78,16 @@ throw (XAO_Exception)
|
||||
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();
|
||||
|
@ -149,6 +149,12 @@ namespace XAO
|
||||
*/
|
||||
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.
|
||||
|
@ -24,6 +24,7 @@ namespace XAO
|
||||
CPPUNIT_TEST(testIntegerStepValues);
|
||||
CPPUNIT_TEST(testDoubleStepValues);
|
||||
CPPUNIT_TEST(testStringStepValues);
|
||||
CPPUNIT_TEST(testSetComponents);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
@ -47,6 +48,7 @@ namespace XAO
|
||||
void testIntegerStepValues();
|
||||
void testDoubleStepValues();
|
||||
void testStringStepValues();
|
||||
void testSetComponents();
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user