]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Use full attribute type name in INTERFACE_N
authorspo <sergey.pokhodenko@opencascade.com>
Tue, 7 Jun 2016 10:26:44 +0000 (13:26 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 17 Jun 2016 11:41:04 +0000 (14:41 +0300)
src/ConstructionAPI/ConstructionAPI_Plane.h
src/ConstructionAPI/ConstructionAPI_Point.h
src/ExchangeAPI/CMakeLists.txt
src/ExchangeAPI/ExchangeAPI_Export.cpp
src/ExchangeAPI/ExchangeAPI_Export.h
src/ExchangeAPI/ExchangeAPI_Import.cpp
src/ExchangeAPI/ExchangeAPI_Import.h
src/ModelHighAPI/ModelHighAPI_Interface.h
src/ModelHighAPI/ModelHighAPI_Macro.h

index b1dbfcc70260551d853086f0da1a4a10387c6b5c..75936094e7af3a705de01a725b04074d8df854d4 100644 (file)
@@ -45,13 +45,13 @@ public:
   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
index f1c67a34709bd56af87482464278cd78ac2626cb..f1b8da8bc69e880d2d33a0022bace837d00a9555 100644 (file)
@@ -40,9 +40,9 @@ public:
   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
index 12279e3c64a34710bc77a0271e30500cdd6e1e1d..b520552f57b87387425dbf437d3597e8e8ea4625 100644 (file)
@@ -32,7 +32,7 @@ INCLUDE_DIRECTORIES(
 )
 
 #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})
 
index ace1fe58df97c569cc1d83cdbfc4b23a85c16dc7..263f14d89ea79a65ce23cfbcf6423eb40496d497 100644 (file)
@@ -6,8 +6,7 @@
 
 //--------------------------------------------------------------------------------------
 #include "ExchangeAPI_Export.h"
-
-#include <ModelHighAPI_Selection.h>
+//--------------------------------------------------------------------------------------
 #include <ModelHighAPI_Tools.h>
 //--------------------------------------------------------------------------------------
 ExchangeAPI_Export::ExchangeAPI_Export(
index 02429cc81c86190a765969e317caf4396a57c06a..bb336c94cf1887943ecfe10fbdc4783f659c83b1 100644 (file)
@@ -41,9 +41,9 @@ public:
   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)
index 6cc2c169ff2219efd12b717ef509af0b13cf7926..fe1bf0bf0648435963aa728ba64bc75948c1b500 100644 (file)
@@ -6,10 +6,7 @@
 
 //--------------------------------------------------------------------------------------
 #include "ExchangeAPI_Import.h"
-
-#include <ModelAPI_Document.h>
-#include <ModelAPI_Feature.h>
-
+//--------------------------------------------------------------------------------------
 #include <ModelHighAPI_Tools.h>
 //--------------------------------------------------------------------------------------
 ExchangeAPI_Import::ExchangeAPI_Import(
index 0d9900d6ef5806c45d93f49dc2d4a2395a55767b..095172a18964edbcb61732e5d48f167dab00d9c9 100644 (file)
@@ -36,14 +36,14 @@ public:
   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
index 86206884434f166ff3c87315f590273da02ffdb0..c9719f41a7f230a2a098d551b0460c6155f54bfb 100644 (file)
@@ -51,4 +51,4 @@ protected:
 
 //--------------------------------------------------------------------------------------
 //--------------------------------------------------------------------------------------
-#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */ 
+#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_ */
index 2c20bfa4ffb9452a090a356581e4410534b91519..a2ef23c6bc7de12167245e82d162be983556b7ac 100644 (file)
 
 //--------------------------------------------------------------------------------------
 // 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
@@ -30,9 +30,9 @@
 // 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:
 
 //--------------------------------------------------------------------------------------