virtual ~ConstructionAPI_Plane();
INTERFACE_7(ConstructionPlugin_Plane::ID(),
- creationMethod, ConstructionPlugin_Plane::METHOD(), String, /** Creation method */,
- face, ConstructionPlugin_Plane::FACE(), Selection, /** Plane face */,
- distance, ConstructionPlugin_Plane::DISTANCE(), Double, /** Distance */,
- A, ConstructionPlugin_Plane::A(), Double, /** Parameter A for general equation */,
- B, ConstructionPlugin_Plane::B(), Double, /** Parameter B for general equation */,
- C, ConstructionPlugin_Plane::C(), Double, /** Parameter C for general equation */,
- D, ConstructionPlugin_Plane::D(), Double, /** Parameter D for general equation */
+ creationMethod, ConstructionPlugin_Plane::METHOD(), ModelAPI_AttributeString, /** Creation method */,
+ face, ConstructionPlugin_Plane::FACE(), ModelAPI_AttributeSelection, /** Plane face */,
+ distance, ConstructionPlugin_Plane::DISTANCE(), ModelAPI_AttributeDouble, /** Distance */,
+ A, ConstructionPlugin_Plane::A(), ModelAPI_AttributeDouble, /** Parameter A for general equation */,
+ B, ConstructionPlugin_Plane::B(), ModelAPI_AttributeDouble, /** Parameter B for general equation */,
+ C, ConstructionPlugin_Plane::C(), ModelAPI_AttributeDouble, /** Parameter C for general equation */,
+ D, ConstructionPlugin_Plane::D(), ModelAPI_AttributeDouble, /** Parameter D for general equation */
)
/// Set face and distance
virtual ~ConstructionAPI_Point();
INTERFACE_3(ConstructionPlugin_Point::ID(),
- x, ConstructionPlugin_Point::X(), Double, /** X attribute */,
- y, ConstructionPlugin_Point::Y(), Double, /** Y attribute */,
- z, ConstructionPlugin_Point::Z(), Double, /** Z attribute */)
+ x, ConstructionPlugin_Point::X(), ModelAPI_AttributeDouble, /** X attribute */,
+ y, ConstructionPlugin_Point::Y(), ModelAPI_AttributeDouble, /** Y attribute */,
+ z, ConstructionPlugin_Point::Z(), ModelAPI_AttributeDouble, /** Z attribute */)
/// Set point values
CONSTRUCTIONAPI_EXPORT
)
#TODO(spo): is ${CAS_DEFINITIONS} necessary?
-ADD_DEFINITIONS(-DCONSTRUCTIONAPI_EXPORTS ${CAS_DEFINITIONS})
+ADD_DEFINITIONS(-DEXCHANGEAPI_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(ExchangeAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(ExchangeAPI ${PROJECT_LIBRARIES})
//--------------------------------------------------------------------------------------
#include "ExchangeAPI_Export.h"
-
-#include <ModelHighAPI_Selection.h>
+//--------------------------------------------------------------------------------------
#include <ModelHighAPI_Tools.h>
//--------------------------------------------------------------------------------------
ExchangeAPI_Export::ExchangeAPI_Export(
virtual ~ExchangeAPI_Export();
INTERFACE_3(ExchangePlugin_ExportFeature::ID(),
- filePath, ExchangePlugin_ExportFeature::FILE_PATH_ID(), String, /** File path */,
- fileFormat, ExchangePlugin_ExportFeature::FILE_FORMAT_ID(), String, /** File format */,
- selectionList, ExchangePlugin_ExportFeature::SELECTION_LIST_ID(), SelectionList, /** Selection list */
+ filePath, ExchangePlugin_ExportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */,
+ fileFormat, ExchangePlugin_ExportFeature::FILE_FORMAT_ID(), ModelAPI_AttributeString, /** File format */,
+ selectionList, ExchangePlugin_ExportFeature::SELECTION_LIST_ID(), ModelAPI_AttributeSelectionList, /** Selection list */
)
/// Set file path (without execute)
//--------------------------------------------------------------------------------------
#include "ExchangeAPI_Import.h"
-
-#include <ModelAPI_Document.h>
-#include <ModelAPI_Feature.h>
-
+//--------------------------------------------------------------------------------------
#include <ModelHighAPI_Tools.h>
//--------------------------------------------------------------------------------------
ExchangeAPI_Import::ExchangeAPI_Import(
virtual ~ExchangeAPI_Import();
INTERFACE_1(ExchangePlugin_ImportFeature::ID(),
- filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), String, /** File path */)
+ filePath, ExchangePlugin_ImportFeature::FILE_PATH_ID(), ModelAPI_AttributeString, /** File path */)
/// Set point values
EXCHANGEAPI_EXPORT
void setFilePath(const std::string & theFilePath);
};
-//! Importer on Import object
+//! Pointer on Import object
typedef std::shared_ptr<ExchangeAPI_Import> ImportPtr;
/**\ingroup CPPHighAPI
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
-#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */
+#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */
//--------------------------------------------------------------------------------------
// See ModelAPI_Feature functions
-#define FN_Boolean boolean
-#define FN_DocRef document
-#define FN_Double real
-#define FN_Integer integer
-#define FN_RefAttr refattr
-#define FN_Reference reference
-#define FN_RefList reflist
-#define FN_Selection selection
-#define FN_SelectionList selectionList
-#define FN_String string
+#define FN_ModelAPI_AttributeBoolean boolean
+#define FN_ModelAPI_AttributeDocRef document
+#define FN_ModelAPI_AttributeDouble real
+#define FN_ModelAPI_AttributeInteger integer
+#define FN_ModelAPI_AttributeRefAttr refattr
+#define FN_ModelAPI_AttributeReference reference
+#define FN_ModelAPI_AttributeRefList reflist
+#define FN_ModelAPI_AttributeSelection selection
+#define FN_ModelAPI_AttributeSelectionList selectionList
+#define FN_ModelAPI_AttributeString string
//--------------------------------------------------------------------------------------
#define VAR_NAME(NAME) my##NAME
// Used in INTERFACE_N for create variable and getter
#define DEFINE_ATTRIBUTE(NAME, TYPE, COMMENT) \
COMMENT \
- std::shared_ptr<ModelAPI_Attribute##TYPE> NAME() const { return VAR_NAME(NAME); } \
+ std::shared_ptr<TYPE> NAME() const { return VAR_NAME(NAME); } \
protected: \
- std::shared_ptr<ModelAPI_Attribute##TYPE> VAR_NAME(NAME); \
+ std::shared_ptr<TYPE> VAR_NAME(NAME); \
public:
//--------------------------------------------------------------------------------------