1 // Name : ExchangeAPI_Import.cpp
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "ExchangeAPI_Import.h"
9 //--------------------------------------------------------------------------------------
10 #include <ModelHighAPI_Tools.h>
11 //--------------------------------------------------------------------------------------
12 ExchangeAPI_Import::ExchangeAPI_Import(
13 const std::shared_ptr<ModelAPI_Feature> & theFeature)
14 : ModelHighAPI_Interface(theFeature)
19 ExchangeAPI_Import::ExchangeAPI_Import(
20 const std::shared_ptr<ModelAPI_Feature> & theFeature,
21 const std::string & theFilePath)
22 : ModelHighAPI_Interface(theFeature)
25 setFilePath(theFilePath);
28 ExchangeAPI_Import::~ExchangeAPI_Import()
33 //--------------------------------------------------------------------------------------
34 void ExchangeAPI_Import::setFilePath(const std::string & theFilePath)
36 fillAttribute(theFilePath, myfilePath);
41 //--------------------------------------------------------------------------------------
43 const std::shared_ptr<ModelAPI_Document> & thePart,
44 const std::string & theFilePath)
46 // TODO(spo): check that thePart is not empty
47 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangeAPI_Import::ID());
48 return ImportPtr(new ExchangeAPI_Import(aFeature, theFilePath));