mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-04-24 04:42:04 +05:00
add setComponentsNames
This commit is contained in:
parent
f552e9aa9d
commit
6eb6c1dbb9
@ -78,6 +78,16 @@ throw (XAO_Exception)
|
|||||||
m_components[index] = name;
|
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)
|
bool Field::removeStep(Step* step)
|
||||||
{
|
{
|
||||||
std::vector<Step*>::iterator it = m_steps.begin();
|
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);
|
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.
|
* Adds a new step of the same type than the field.
|
||||||
* @param number the numer of the step.
|
* @param number the numer of the step.
|
||||||
|
@ -24,6 +24,7 @@ namespace XAO
|
|||||||
CPPUNIT_TEST(testIntegerStepValues);
|
CPPUNIT_TEST(testIntegerStepValues);
|
||||||
CPPUNIT_TEST(testDoubleStepValues);
|
CPPUNIT_TEST(testDoubleStepValues);
|
||||||
CPPUNIT_TEST(testStringStepValues);
|
CPPUNIT_TEST(testStringStepValues);
|
||||||
|
CPPUNIT_TEST(testSetComponents);
|
||||||
CPPUNIT_TEST_SUITE_END();
|
CPPUNIT_TEST_SUITE_END();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -47,6 +48,7 @@ namespace XAO
|
|||||||
void testIntegerStepValues();
|
void testIntegerStepValues();
|
||||||
void testDoubleStepValues();
|
void testDoubleStepValues();
|
||||||
void testStringStepValues();
|
void testStringStepValues();
|
||||||
|
void testSetComponents();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user