]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI_Tools.cpp
Salome HOME
Add ExchangeAPI, fillAttribute in ModelHighAPI_Tools, ModelHighAPI_Selection and...
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Tools.cpp
1 // Name   : ModelHighAPI_Tools.cpp
2 // Purpose: 
3 //
4 // History:
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
6
7 //--------------------------------------------------------------------------------------
8 #include "ModelHighAPI_Tools.h"
9
10 #include <ModelAPI_AttributeSelectionList.h>
11 #include <ModelAPI_AttributeString.h>
12
13 #include "ModelHighAPI_Selection.h"
14 //--------------------------------------------------------------------------------------
15 void fillAttribute(const std::list<ModelHighAPI_Selection> & theValue,
16                    const std::shared_ptr<ModelAPI_AttributeSelectionList> & theAttribute)
17 {
18   theAttribute->clear();
19   for (auto it = theValue.begin(); it != theValue.end(); ++it)
20     it->appendToList(theAttribute);
21 }
22
23 //--------------------------------------------------------------------------------------
24 void fillAttribute(const std::string & theValue,
25                    const std::shared_ptr<ModelAPI_AttributeString> & theAttribute)
26 {
27   theAttribute->setValue(theValue);
28 }
29 //--------------------------------------------------------------------------------------