1 // Name : ExchangeAPI_Import.cpp
5 // 07/06/16 - Sergey POKHODENKO - Creation of the file
7 //--------------------------------------------------------------------------------------
8 #include "ExchangeAPI_Import.h"
10 #include <ModelAPI_Document.h>
11 #include <ModelAPI_Feature.h>
13 #include <ModelHighAPI_Tools.h>
14 //--------------------------------------------------------------------------------------
15 ExchangeAPI_Import::ExchangeAPI_Import(
16 const std::shared_ptr<ModelAPI_Feature> & theFeature)
17 : ModelHighAPI_Interface(theFeature)
22 ExchangeAPI_Import::ExchangeAPI_Import(
23 const std::shared_ptr<ModelAPI_Feature> & theFeature,
24 const std::string & theFilePath)
25 : ModelHighAPI_Interface(theFeature)
28 setFilePath(theFilePath);
31 ExchangeAPI_Import::~ExchangeAPI_Import()
36 //--------------------------------------------------------------------------------------
37 void ExchangeAPI_Import::setFilePath(const std::string & theFilePath)
39 fillAttribute(theFilePath, myfilePath);
44 //--------------------------------------------------------------------------------------
45 // TODO(spo): make add* as static functions of the class
47 const std::shared_ptr<ModelAPI_Document> & thePart,
48 const std::string & theFilePath)
50 // TODO(spo): check that thePart is not empty
51 std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ExchangeAPI_Import::ID());
52 return ImportPtr(new ExchangeAPI_Import(aFeature, theFilePath));