-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <PlaneGCSSolver_Defs.h>
-#include <ModelAPI_Attribute.h>
-#include <ModelAPI_Feature.h>
-
-#include <list>
+#include <map>
#include <memory>
+class ModelAPI_Attribute;
+
+class PlaneGCSSolver_EntityWrapper;
+typedef std::shared_ptr<PlaneGCSSolver_EntityWrapper> EntityWrapperPtr;
+
/**
* Wrapper providing operations with entities regardless the solver.
*/
/// \brief Return the External flag
bool isExternal() const { return myExternal; }
+ /// \brief Store names of attributes and their values if necessary
+ void setAdditionalAttributes(const std::map<std::string, EntityWrapperPtr>& theAttribues)
+ { myAdditionalAttributes = theAttribues; }
+ /// \brief Return the list of additional attributes
+ const std::map<std::string, EntityWrapperPtr>& additionalAttributes() const
+ { return myAdditionalAttributes; }
+
+protected:
+ /// \brief Update entity by the values of theAttribute
+ /// \return \c true if any value of attribute is not equal to the stored in the entity
+ virtual bool update(std::shared_ptr<ModelAPI_Attribute> theAttribute)
+ { return false; }
+
+ friend class PlaneGCSSolver_AttributeBuilder;
+
private:
bool myExternal;
+ std::map<std::string, EntityWrapperPtr> myAdditionalAttributes;
};
-typedef std::shared_ptr<PlaneGCSSolver_EntityWrapper> EntityWrapperPtr;
-
#endif