From d2b05bb423a04a927ad60dbb91d603ca90ef205f Mon Sep 17 00:00:00 2001 From: sbh Date: Mon, 26 Jan 2015 14:53:56 +0300 Subject: [PATCH] Separate definition from declaration for each ModelAPI class --- src/ModelAPI/CMakeLists.txt | 58 +++++++++------ src/ModelAPI/ModelAPI_Attribute.cpp | 74 +++++++++++++++++++ src/ModelAPI/ModelAPI_Attribute.h | 63 +++------------- src/ModelAPI/ModelAPI_AttributeBoolean.cpp | 21 ++++++ src/ModelAPI/ModelAPI_AttributeBoolean.h | 13 +--- src/ModelAPI/ModelAPI_AttributeDocRef.cpp | 20 +++++ src/ModelAPI/ModelAPI_AttributeDocRef.h | 13 +--- src/ModelAPI/ModelAPI_AttributeDouble.cpp | 20 +++++ src/ModelAPI/ModelAPI_AttributeDouble.h | 13 +--- src/ModelAPI/ModelAPI_AttributeInteger.cpp | 22 ++++++ src/ModelAPI/ModelAPI_AttributeInteger.h | 13 +--- src/ModelAPI/ModelAPI_AttributeRefAttr.cpp | 22 ++++++ src/ModelAPI/ModelAPI_AttributeRefAttr.h | 13 +--- src/ModelAPI/ModelAPI_AttributeRefList.cpp | 23 ++++++ src/ModelAPI/ModelAPI_AttributeRefList.h | 11 +-- src/ModelAPI/ModelAPI_AttributeReference.cpp | 20 +++++ src/ModelAPI/ModelAPI_AttributeReference.h | 13 +--- src/ModelAPI/ModelAPI_AttributeSelection.cpp | 22 ++++++ src/ModelAPI/ModelAPI_AttributeSelection.h | 13 +--- .../ModelAPI_AttributeSelectionList.cpp | 21 ++++++ .../ModelAPI_AttributeSelectionList.h | 13 +--- src/ModelAPI/ModelAPI_AttributeString.cpp | 21 ++++++ src/ModelAPI/ModelAPI_AttributeString.h | 13 +--- src/ModelAPI/ModelAPI_Data.cpp | 15 ++++ src/ModelAPI/ModelAPI_Data.h | 8 +- src/ModelAPI/ModelAPI_Document.cpp | 16 ++++ src/ModelAPI/ModelAPI_Document.h | 8 +- src/ModelAPI/ModelAPI_Plugin.cpp | 12 +++ src/ModelAPI/ModelAPI_Plugin.h | 6 +- src/ModelAPI/ModelAPI_ResultBody.cpp | 18 +++++ src/ModelAPI/ModelAPI_ResultBody.h | 6 +- src/ModelAPI/ModelAPI_ResultGroup.cpp | 18 +++++ src/ModelAPI/ModelAPI_ResultGroup.h | 6 +- 33 files changed, 455 insertions(+), 193 deletions(-) create mode 100644 src/ModelAPI/ModelAPI_Attribute.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeBoolean.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeDocRef.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeDouble.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeInteger.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeRefAttr.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeRefList.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeReference.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeSelection.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeSelectionList.cpp create mode 100644 src/ModelAPI/ModelAPI_AttributeString.cpp create mode 100644 src/ModelAPI/ModelAPI_Data.cpp create mode 100644 src/ModelAPI/ModelAPI_Document.cpp create mode 100644 src/ModelAPI/ModelAPI_Plugin.cpp create mode 100644 src/ModelAPI/ModelAPI_ResultBody.cpp create mode 100644 src/ModelAPI/ModelAPI_ResultGroup.cpp diff --git a/src/ModelAPI/CMakeLists.txt b/src/ModelAPI/CMakeLists.txt index fc00bafd6..738664c17 100644 --- a/src/ModelAPI/CMakeLists.txt +++ b/src/ModelAPI/CMakeLists.txt @@ -7,49 +7,65 @@ INCLUDE(UnitTest) SET(PROJECT_HEADERS ModelAPI.h - ModelAPI_Session.h - ModelAPI_Plugin.h - ModelAPI_Feature.h - ModelAPI_CompositeFeature.h - ModelAPI_Data.h - ModelAPI_Object.h - ModelAPI_Document.h ModelAPI_Attribute.h - ModelAPI_AttributeInteger.h - ModelAPI_AttributeDouble.h + ModelAPI_AttributeBoolean.h ModelAPI_AttributeDocRef.h - ModelAPI_AttributeReference.h + ModelAPI_AttributeDouble.h + ModelAPI_AttributeInteger.h ModelAPI_AttributeRefAttr.h + ModelAPI_AttributeReference.h ModelAPI_AttributeRefList.h - ModelAPI_AttributeBoolean.h - ModelAPI_AttributeString.h ModelAPI_AttributeSelection.h ModelAPI_AttributeSelectionList.h + ModelAPI_AttributeString.h + ModelAPI_AttributeValidator.h + ModelAPI_CompositeFeature.h + ModelAPI_Data.h + ModelAPI_Document.h ModelAPI_Events.h - ModelAPI_Validator.h + ModelAPI_Feature.h ModelAPI_FeatureValidator.h + ModelAPI_Object.h + ModelAPI_Plugin.h + ModelAPI_RefAttrValidator.h ModelAPI_Result.h ModelAPI_ResultBody.h ModelAPI_ResultConstruction.h - ModelAPI_ResultPart.h - ModelAPI_ResultParameters.h ModelAPI_ResultGroup.h + ModelAPI_ResultParameters.h + ModelAPI_ResultPart.h ModelAPI_ResultValidator.h - ModelAPI_AttributeValidator.h + ModelAPI_Session.h ModelAPI_Tools.h - ModelAPI_RefAttrValidator.h + ModelAPI_Validator.h ) SET(PROJECT_SOURCES + ModelAPI_Attribute.cpp + ModelAPI_AttributeBoolean.cpp + ModelAPI_AttributeDocRef.cpp + ModelAPI_AttributeDouble.cpp + ModelAPI_AttributeInteger.cpp + ModelAPI_AttributeRefAttr.cpp + ModelAPI_AttributeReference.cpp + ModelAPI_AttributeRefList.cpp + ModelAPI_AttributeSelection.cpp + ModelAPI_AttributeSelectionList.cpp + ModelAPI_AttributeString.cpp + ModelAPI_CompositeFeature.cpp + ModelAPI_Data.cpp + ModelAPI_Document.cpp ModelAPI_Events.cpp ModelAPI_Feature.cpp - ModelAPI_Session.cpp - ModelAPI_Tools.cpp ModelAPI_Object.cpp + ModelAPI_Plugin.cpp ModelAPI_Result.cpp - ModelAPI_ResultPart.cpp + ModelAPI_ResultBody.cpp ModelAPI_ResultConstruction.cpp - ModelAPI_CompositeFeature.cpp + ModelAPI_ResultGroup.cpp + ModelAPI_ResultPart.cpp + ModelAPI_Session.cpp + ModelAPI_Tools.cpp ) SET(PROJECT_LIBRARIES diff --git a/src/ModelAPI/ModelAPI_Attribute.cpp b/src/ModelAPI/ModelAPI_Attribute.cpp new file mode 100644 index 000000000..249353c54 --- /dev/null +++ b/src/ModelAPI/ModelAPI_Attribute.cpp @@ -0,0 +1,74 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_Attribute.cpp +// Created: 2 Apr 2014 +// Author: Mikhail PONIKAROV + +#include + +ModelAPI_Attribute::~ModelAPI_Attribute() +{ +} + + /// Sets the owner of this attribute +void ModelAPI_Attribute::setObject(const std::shared_ptr& theObject) +{ + myObject = theObject; +} + + /// Returns the owner of this attribute +const std::shared_ptr& ModelAPI_Attribute::owner() const +{ + return myObject; +} + + /// Returns true if attribute was initialized by some value +bool ModelAPI_Attribute::isInitialized() +{ + return myIsInitialized; +} + +void ModelAPI_Attribute::setInitialized() +{ + myIsInitialized = true; +} + +void ModelAPI_Attribute::setIsArgument(const bool theFlag) +{ + myIsArgument = theFlag; +} + +bool ModelAPI_Attribute::isArgument() +{ + return myIsArgument; +} + +bool ModelAPI_Attribute::setImmutable(const bool theFlag) +{ + bool aResult = myIsImmutable; + myIsImmutable = theFlag; + return aResult; +} + +bool ModelAPI_Attribute::isImmutable() +{ + return myIsImmutable; +} + +const std::string& ModelAPI_Attribute::id() const +{ + return myID; +} + +ModelAPI_Attribute::ModelAPI_Attribute() +{ + myIsInitialized = false; + myIsArgument = true; + myIsImmutable = false; +} + + /// Sets the ID of the attribute in Data (called from Data) +void ModelAPI_Attribute::setID(const std::string theID) +{ + myID = theID; +} diff --git a/src/ModelAPI/ModelAPI_Attribute.h b/src/ModelAPI/ModelAPI_Attribute.h index a8abce8b8..a43bce2a8 100644 --- a/src/ModelAPI/ModelAPI_Attribute.h +++ b/src/ModelAPI/ModelAPI_Attribute.h @@ -34,83 +34,44 @@ class ModelAPI_Attribute MODELAPI_EXPORT virtual std::string attributeType() = 0; /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_Attribute() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_Attribute(); /// Sets the owner of this attribute - MODELAPI_EXPORT virtual void setObject(const std::shared_ptr& theObject) - { - myObject = theObject; - } + MODELAPI_EXPORT virtual void setObject(const std::shared_ptr& theObject); /// Returns the owner of this attribute - MODELAPI_EXPORT const std::shared_ptr& owner() const - { - return myObject; - } + MODELAPI_EXPORT const std::shared_ptr& owner() const; /// Returns true if attribute was initialized by some value - MODELAPI_EXPORT bool isInitialized() - { - return myIsInitialized; - } + MODELAPI_EXPORT bool isInitialized(); /// Makes attribute initialized - MODELAPI_EXPORT void setInitialized() - { - myIsInitialized = true; - } + MODELAPI_EXPORT void setInitialized(); /// Set this attribute is argument for result (change of this attribute requires update of result). /// By default it is true. - MODELAPI_EXPORT void setIsArgument(const bool theFlag) - { - myIsArgument = theFlag; - } + MODELAPI_EXPORT void setIsArgument(const bool theFlag); /// Returns true if attribute causes the result change - MODELAPI_EXPORT bool isArgument() - { - return myIsArgument; - } + MODELAPI_EXPORT bool isArgument(); /// Immutable argument can not be changed programaticaly (e.g. by constraint) /// By default it is false. /// Returns the previous state of the attribute's immutability. - MODELAPI_EXPORT bool setImmutable(const bool theFlag) - { - bool aResult = myIsImmutable; - myIsImmutable = theFlag; - return aResult; - } + MODELAPI_EXPORT bool setImmutable(const bool theFlag); /// Returns true if can not be changed programaticaly - MODELAPI_EXPORT bool isImmutable() - { - return myIsImmutable; - } + MODELAPI_EXPORT bool isImmutable(); /// ID of the attribute in Data - MODELAPI_EXPORT const std::string& id() const - { - return myID; - } + MODELAPI_EXPORT const std::string& id() const; protected: /// Objects are created for features automatically - ModelAPI_Attribute() - { - myIsInitialized = false; - myIsArgument = true; - myIsImmutable = false; - } + ModelAPI_Attribute(); /// Sets the ID of the attribute in Data (called from Data) - MODELAPI_EXPORT void setID(const std::string theID) - { - myID = theID; - } + MODELAPI_EXPORT void setID(const std::string theID); friend class Model_Data; }; diff --git a/src/ModelAPI/ModelAPI_AttributeBoolean.cpp b/src/ModelAPI/ModelAPI_AttributeBoolean.cpp new file mode 100644 index 000000000..722c14fcd --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeBoolean.cpp @@ -0,0 +1,21 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeBoolean.cpp +// Created: 2 june 2014 +// Author: Vitaly Smetannikov + +#include "ModelAPI_AttributeBoolean.h" + +std::string ModelAPI_AttributeBoolean::attributeType() +{ + return type(); +} + +/// To virtually destroy the fields of successors +ModelAPI_AttributeBoolean::~ModelAPI_AttributeBoolean() +{ +} + +ModelAPI_AttributeBoolean::ModelAPI_AttributeBoolean() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeBoolean.h b/src/ModelAPI/ModelAPI_AttributeBoolean.h index d7b9bac82..122ffa70f 100644 --- a/src/ModelAPI/ModelAPI_AttributeBoolean.h +++ b/src/ModelAPI/ModelAPI_AttributeBoolean.h @@ -30,21 +30,14 @@ class ModelAPI_AttributeBoolean : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeBoolean() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeBoolean(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeBoolean() - { - } + MODELAPI_EXPORT ModelAPI_AttributeBoolean(); }; typedef std::shared_ptr AttributeBooleanPtr; diff --git a/src/ModelAPI/ModelAPI_AttributeDocRef.cpp b/src/ModelAPI/ModelAPI_AttributeDocRef.cpp new file mode 100644 index 000000000..69563831a --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeDocRef.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeDocRef.cpp +// Created: 2 Apr 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_AttributeDocRef.h" + +std::string ModelAPI_AttributeDocRef::attributeType() +{ + return type(); +} + +ModelAPI_AttributeDocRef::~ModelAPI_AttributeDocRef() +{ +} + +ModelAPI_AttributeDocRef::ModelAPI_AttributeDocRef() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeDocRef.h b/src/ModelAPI/ModelAPI_AttributeDocRef.h index 61c0c7b7f..b1149c7f3 100644 --- a/src/ModelAPI/ModelAPI_AttributeDocRef.h +++ b/src/ModelAPI/ModelAPI_AttributeDocRef.h @@ -31,21 +31,14 @@ class ModelAPI_AttributeDocRef : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeDocRef() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeDocRef(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeDocRef() - { - } + MODELAPI_EXPORT ModelAPI_AttributeDocRef(); }; typedef std::shared_ptr AttributeDocRefPtr; diff --git a/src/ModelAPI/ModelAPI_AttributeDouble.cpp b/src/ModelAPI/ModelAPI_AttributeDouble.cpp new file mode 100644 index 000000000..7847dfabd --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeDouble.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeDouble.cpp +// Created: 2 Apr 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_AttributeDouble.h" + +std::string ModelAPI_AttributeDouble::attributeType() +{ + return type(); +} + +ModelAPI_AttributeDouble::~ModelAPI_AttributeDouble() +{ +} + +ModelAPI_AttributeDouble::ModelAPI_AttributeDouble() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeDouble.h b/src/ModelAPI/ModelAPI_AttributeDouble.h index 121af02a5..498b40509 100644 --- a/src/ModelAPI/ModelAPI_AttributeDouble.h +++ b/src/ModelAPI/ModelAPI_AttributeDouble.h @@ -30,21 +30,14 @@ class ModelAPI_AttributeDouble : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeDouble() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeDouble(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeDouble() - { - } + MODELAPI_EXPORT ModelAPI_AttributeDouble(); }; //! Pointer on double attribute diff --git a/src/ModelAPI/ModelAPI_AttributeInteger.cpp b/src/ModelAPI/ModelAPI_AttributeInteger.cpp new file mode 100644 index 000000000..afb2376a9 --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeInteger.cpp @@ -0,0 +1,22 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeInteger.cpp +// Created: 2 Apr 2014 +// Author: Mikhail PONIKAROV + +#include + + +std::string ModelAPI_AttributeInteger::attributeType() +{ + return type(); +} + +/// To virtually destroy the fields of successors +ModelAPI_AttributeInteger::~ModelAPI_AttributeInteger() +{ +} + +ModelAPI_AttributeInteger::ModelAPI_AttributeInteger() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeInteger.h b/src/ModelAPI/ModelAPI_AttributeInteger.h index 676352b19..c1bc9e6af 100644 --- a/src/ModelAPI/ModelAPI_AttributeInteger.h +++ b/src/ModelAPI/ModelAPI_AttributeInteger.h @@ -34,21 +34,14 @@ class ModelAPI_AttributeInteger : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeInteger() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeInteger(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeInteger() - { - } + MODELAPI_EXPORT ModelAPI_AttributeInteger(); }; //! Pointer on double attribute diff --git a/src/ModelAPI/ModelAPI_AttributeRefAttr.cpp b/src/ModelAPI/ModelAPI_AttributeRefAttr.cpp new file mode 100644 index 000000000..35bd2d74d --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeRefAttr.cpp @@ -0,0 +1,22 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeRefAttr.cpp +// Created: 8 May 2014 +// Author: Mikhail PONIKAROV + + +#include "ModelAPI_AttributeRefAttr.h" + + +std::string ModelAPI_AttributeRefAttr::attributeType() +{ + return type(); +} + +ModelAPI_AttributeRefAttr::~ModelAPI_AttributeRefAttr() +{ +} + +ModelAPI_AttributeRefAttr::ModelAPI_AttributeRefAttr() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeRefAttr.h b/src/ModelAPI/ModelAPI_AttributeRefAttr.h index bfbd03ff6..bd4c7c4f4 100644 --- a/src/ModelAPI/ModelAPI_AttributeRefAttr.h +++ b/src/ModelAPI/ModelAPI_AttributeRefAttr.h @@ -41,21 +41,14 @@ class ModelAPI_AttributeRefAttr : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeRefAttr() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeRefAttr(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeRefAttr() - { - } + MODELAPI_EXPORT ModelAPI_AttributeRefAttr(); }; typedef std::shared_ptr AttributeRefAttrPtr; diff --git a/src/ModelAPI/ModelAPI_AttributeRefList.cpp b/src/ModelAPI/ModelAPI_AttributeRefList.cpp new file mode 100644 index 000000000..ded44b22c --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeRefList.cpp @@ -0,0 +1,23 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeRefList.cpp +// Created: 8 May 2014 +// Author: Mikhail PONIKAROV + + +#include "ModelAPI_AttributeRefList.h" + +std::string ModelAPI_AttributeRefList::attributeType() +{ + return type(); +} + +ModelAPI_AttributeRefList::~ModelAPI_AttributeRefList() +{ + +} + +ModelAPI_AttributeRefList::ModelAPI_AttributeRefList() +{ +} + diff --git a/src/ModelAPI/ModelAPI_AttributeRefList.h b/src/ModelAPI/ModelAPI_AttributeRefList.h index 513404266..9384d2855 100644 --- a/src/ModelAPI/ModelAPI_AttributeRefList.h +++ b/src/ModelAPI/ModelAPI_AttributeRefList.h @@ -26,10 +26,7 @@ class ModelAPI_AttributeRefList : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// Appends the feature to the end of a list MODELAPI_EXPORT virtual void append(ObjectPtr theObject) = 0; @@ -46,11 +43,11 @@ class ModelAPI_AttributeRefList : public ModelAPI_Attribute /// Returns the referenced object by the zero-based index MODELAPI_EXPORT virtual ObjectPtr object(const int theIndex) const = 0; + MODELAPI_EXPORT virtual ~ModelAPI_AttributeRefList(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeRefList() - { - } + MODELAPI_EXPORT ModelAPI_AttributeRefList(); + }; typedef std::shared_ptr AttributeRefListPtr; diff --git a/src/ModelAPI/ModelAPI_AttributeReference.cpp b/src/ModelAPI/ModelAPI_AttributeReference.cpp new file mode 100644 index 000000000..4c1360820 --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeReference.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeReference.cpp +// Created: 8 May 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_AttributeReference.h" + +std::string ModelAPI_AttributeReference::attributeType() +{ + return type(); +} + +ModelAPI_AttributeReference::~ModelAPI_AttributeReference() +{ +} + +ModelAPI_AttributeReference::ModelAPI_AttributeReference() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeReference.h b/src/ModelAPI/ModelAPI_AttributeReference.h index 3f02aa917..c90d78fe7 100644 --- a/src/ModelAPI/ModelAPI_AttributeReference.h +++ b/src/ModelAPI/ModelAPI_AttributeReference.h @@ -31,21 +31,14 @@ class ModelAPI_AttributeReference : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeReference() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeReference(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeReference() - { - } + MODELAPI_EXPORT ModelAPI_AttributeReference(); }; typedef std::shared_ptr AttributeReferencePtr; diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.cpp b/src/ModelAPI/ModelAPI_AttributeSelection.cpp new file mode 100644 index 000000000..e5accc0ca --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeSelection.cpp @@ -0,0 +1,22 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeSelection.cpp +// Created: 2 Oct 2014 +// Author: Mikhail PONIKAROV + + +#include "ModelAPI_AttributeSelection.h" + + +std::string ModelAPI_AttributeSelection::attributeType() +{ + return type(); +} + +ModelAPI_AttributeSelection::~ModelAPI_AttributeSelection() +{ +} + +ModelAPI_AttributeSelection::ModelAPI_AttributeSelection() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.h b/src/ModelAPI/ModelAPI_AttributeSelection.h index fc7675f48..19b31f541 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelection.h +++ b/src/ModelAPI/ModelAPI_AttributeSelection.h @@ -39,10 +39,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - virtual std::string attributeType() - { - return type(); - } + virtual std::string attributeType(); /// Returns a textual string of the selection virtual std::string namingName() = 0; @@ -55,15 +52,11 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute virtual void selectSubShape(const std::string& theType, const std::string& theSubShapeName) = 0; /// To virtually destroy the fields of successors - virtual ~ModelAPI_AttributeSelection() - { - } + virtual ~ModelAPI_AttributeSelection(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeSelection() - { - } + MODELAPI_EXPORT ModelAPI_AttributeSelection(); }; //! Pointer on double attribute diff --git a/src/ModelAPI/ModelAPI_AttributeSelectionList.cpp b/src/ModelAPI/ModelAPI_AttributeSelectionList.cpp new file mode 100644 index 000000000..e88f4c7a8 --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeSelectionList.cpp @@ -0,0 +1,21 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeSelectionList.cpp +// Created: 22 Oct 2014 +// Author: Mikhail PONIKAROV + + +#include "ModelAPI_AttributeSelectionList.h" + +std::string ModelAPI_AttributeSelectionList::attributeType() +{ + return type(); +} + +ModelAPI_AttributeSelectionList::~ModelAPI_AttributeSelectionList() +{ +} + +MODELAPI_EXPORT ModelAPI_AttributeSelectionList::ModelAPI_AttributeSelectionList() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeSelectionList.h b/src/ModelAPI/ModelAPI_AttributeSelectionList.h index dbcdb0bc9..04157e1c4 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelectionList.h +++ b/src/ModelAPI/ModelAPI_AttributeSelectionList.h @@ -47,21 +47,14 @@ class ModelAPI_AttributeSelectionList : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - virtual std::string attributeType() - { - return type(); - } + virtual std::string attributeType(); /// To virtually destroy the fields of successors - virtual ~ModelAPI_AttributeSelectionList() - { - } + virtual ~ModelAPI_AttributeSelectionList(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeSelectionList() - { - } + MODELAPI_EXPORT ModelAPI_AttributeSelectionList(); }; //! Pointer on double attribute diff --git a/src/ModelAPI/ModelAPI_AttributeString.cpp b/src/ModelAPI/ModelAPI_AttributeString.cpp new file mode 100644 index 000000000..19df8f5dd --- /dev/null +++ b/src/ModelAPI/ModelAPI_AttributeString.cpp @@ -0,0 +1,21 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_AttributeString.cpp +// Created: 2 Apr 2014 +// Author: Mikhail PONIKAROV + + +#include "ModelAPI_AttributeString.h" + +std::string ModelAPI_AttributeString::attributeType() +{ + return type(); +} + +ModelAPI_AttributeString::~ModelAPI_AttributeString() +{ +} + +ModelAPI_AttributeString::ModelAPI_AttributeString() +{ +} diff --git a/src/ModelAPI/ModelAPI_AttributeString.h b/src/ModelAPI/ModelAPI_AttributeString.h index 26f740113..26f4b4e8a 100644 --- a/src/ModelAPI/ModelAPI_AttributeString.h +++ b/src/ModelAPI/ModelAPI_AttributeString.h @@ -32,21 +32,14 @@ class ModelAPI_AttributeString : public ModelAPI_Attribute } /// Returns the type of this class of attributes, not static method - MODELAPI_EXPORT virtual std::string attributeType() - { - return type(); - } + MODELAPI_EXPORT virtual std::string attributeType(); /// To virtually destroy the fields of successors - MODELAPI_EXPORT virtual ~ModelAPI_AttributeString() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_AttributeString(); protected: /// Objects are created for features automatically - MODELAPI_EXPORT ModelAPI_AttributeString() - { - } + MODELAPI_EXPORT ModelAPI_AttributeString(); }; //! Pointer on double attribute diff --git a/src/ModelAPI/ModelAPI_Data.cpp b/src/ModelAPI/ModelAPI_Data.cpp new file mode 100644 index 000000000..8ac37cef5 --- /dev/null +++ b/src/ModelAPI/ModelAPI_Data.cpp @@ -0,0 +1,15 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_Data.cpp +// Created: 21 Mar 2014 +// Author: Mikhail PONIKAROV + +#include + +ModelAPI_Data::~ModelAPI_Data() +{ +} + +ModelAPI_Data::ModelAPI_Data() +{ +} diff --git a/src/ModelAPI/ModelAPI_Data.h b/src/ModelAPI/ModelAPI_Data.h index 03e21b36f..0b40d16f7 100644 --- a/src/ModelAPI/ModelAPI_Data.h +++ b/src/ModelAPI/ModelAPI_Data.h @@ -108,9 +108,7 @@ class MODELAPI_EXPORT ModelAPI_Data virtual void erase() = 0; /// To virtually destroy the fields of successors - virtual ~ModelAPI_Data() - { - } + virtual ~ModelAPI_Data(); /// Stores the state of the object to execute it later accordingly virtual void execState(const ModelAPI_ExecState theState) = 0; @@ -133,9 +131,7 @@ class MODELAPI_EXPORT ModelAPI_Data std::list > > >& theRefs) = 0; protected: /// Objects are created for features automatically - ModelAPI_Data() - { - } + ModelAPI_Data(); }; typedef std::shared_ptr DataPtr; diff --git a/src/ModelAPI/ModelAPI_Document.cpp b/src/ModelAPI/ModelAPI_Document.cpp new file mode 100644 index 000000000..d0c603912 --- /dev/null +++ b/src/ModelAPI/ModelAPI_Document.cpp @@ -0,0 +1,16 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_Document.cpp +// Created: 28 Feb 2014 +// Author: Mikhail PONIKAROV + +#include + +ModelAPI_Document::~ModelAPI_Document() +{ +} + +/// Only for SWIG wrapping it is here +ModelAPI_Document::ModelAPI_Document() +{ +} diff --git a/src/ModelAPI/ModelAPI_Document.h b/src/ModelAPI/ModelAPI_Document.h index 99311a628..b0aabbec3 100644 --- a/src/ModelAPI/ModelAPI_Document.h +++ b/src/ModelAPI/ModelAPI_Document.h @@ -67,9 +67,7 @@ public: virtual int size(const std::string& theGroupID, const bool theHidden = false) = 0; /// To virtually destroy the fields of successors - virtual ~ModelAPI_Document() - { - } + MODELAPI_EXPORT virtual ~ModelAPI_Document(); /// Creates a construction cresults virtual std::shared_ptr createConstruction( @@ -90,9 +88,7 @@ public: protected: /// Only for SWIG wrapping it is here - MODELAPI_EXPORT ModelAPI_Document() - { - } + MODELAPI_EXPORT ModelAPI_Document(); }; //! Pointer on document object diff --git a/src/ModelAPI/ModelAPI_Plugin.cpp b/src/ModelAPI/ModelAPI_Plugin.cpp new file mode 100644 index 000000000..ff5bc9b34 --- /dev/null +++ b/src/ModelAPI/ModelAPI_Plugin.cpp @@ -0,0 +1,12 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_Plugin.cpp +// Created: 31 Mar 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_Plugin.h" + +ModelAPI_Plugin::~ModelAPI_Plugin() +{ + +} diff --git a/src/ModelAPI/ModelAPI_Plugin.h b/src/ModelAPI/ModelAPI_Plugin.h index b23bf3f12..6493a27e5 100644 --- a/src/ModelAPI/ModelAPI_Plugin.h +++ b/src/ModelAPI/ModelAPI_Plugin.h @@ -1,6 +1,6 @@ // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -// File: ModelAPI_Plugin.hxx +// File: ModelAPI_Plugin.h // Created: 31 Mar 2014 // Author: Mikhail PONIKAROV @@ -25,9 +25,7 @@ class MODELAPI_EXPORT ModelAPI_Plugin virtual std::shared_ptr createFeature(std::string theFeatureID) = 0; /// To virtually destroy the fields of successors - virtual ~ModelAPI_Plugin() - { - } + virtual ~ModelAPI_Plugin(); }; #endif diff --git a/src/ModelAPI/ModelAPI_ResultBody.cpp b/src/ModelAPI/ModelAPI_ResultBody.cpp new file mode 100644 index 000000000..9d001619d --- /dev/null +++ b/src/ModelAPI/ModelAPI_ResultBody.cpp @@ -0,0 +1,18 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_ResultBody.cpp +// Created: 07 Jul 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_ResultBody.h" + +ModelAPI_ResultBody::~ModelAPI_ResultBody() +{ + +} + +std::string ModelAPI_ResultBody::groupName() +{ + return group(); +} + diff --git a/src/ModelAPI/ModelAPI_ResultBody.h b/src/ModelAPI/ModelAPI_ResultBody.h index 7fce7f512..ff4ce6e19 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.h +++ b/src/ModelAPI/ModelAPI_ResultBody.h @@ -25,11 +25,9 @@ class ModelAPI_ResultBody : public ModelAPI_Result { public: + MODELAPI_EXPORT virtual ~ModelAPI_ResultBody(); /// Returns the group identifier of this result - virtual std::string groupName() - { - return group(); - } + MODELAPI_EXPORT virtual std::string groupName(); /// Returns the group identifier of this result inline static std::string group() diff --git a/src/ModelAPI/ModelAPI_ResultGroup.cpp b/src/ModelAPI/ModelAPI_ResultGroup.cpp new file mode 100644 index 000000000..fc5f564c8 --- /dev/null +++ b/src/ModelAPI/ModelAPI_ResultGroup.cpp @@ -0,0 +1,18 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + +// File: ModelAPI_ResultGroup.cpp +// Created: 07 Jul 2014 +// Author: Mikhail PONIKAROV + +#include "ModelAPI_ResultGroup.h" + +ModelAPI_ResultGroup::~ModelAPI_ResultGroup() +{ + +} + +std::string ModelAPI_ResultGroup::groupName() +{ + return group(); +} + diff --git a/src/ModelAPI/ModelAPI_ResultGroup.h b/src/ModelAPI/ModelAPI_ResultGroup.h index 372cea121..365445f4d 100644 --- a/src/ModelAPI/ModelAPI_ResultGroup.h +++ b/src/ModelAPI/ModelAPI_ResultGroup.h @@ -21,11 +21,9 @@ class ModelAPI_ResultGroup : public ModelAPI_Result { public: + MODELAPI_EXPORT virtual ~ModelAPI_ResultGroup(); /// Returns the group identifier of this result - virtual std::string groupName() - { - return group(); - } + MODELAPI_EXPORT virtual std::string groupName(); /// Returns the group identifier of this result inline static std::string group() -- 2.39.2