X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultConstruction.h;h=bddac21ee1f8ee2bd8feba7f7bcfca9f552d857a;hb=45400ecc7d183dd2d2edb875bdb36f8fc031bc2c;hp=b24c2f31076d8febe821b74c5e461ea6ebad43f2;hpb=69c8d7e9b1bbea1be3339f80ae3d01611b6aaf4b;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultConstruction.h b/src/Model/Model_ResultConstruction.h index b24c2f310..bddac21ee 100644 --- a/src/Model/Model_ResultConstruction.h +++ b/src/Model/Model_ResultConstruction.h @@ -1,14 +1,17 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModelAPI_ResultConstruction.hxx // Created: 07 Jul 2014 // Author: Mikhail PONIKAROV -#ifndef Model_ResultConstruction_HeaderFile -#define Model_ResultConstruction_HeaderFile +#ifndef Model_ResultConstruction_H_ +#define Model_ResultConstruction_H_ #include "Model.h" #include +#include -/**\class ModelAPI_ResultConstruction +/**\class Model_ResultConstruction * \ingroup DataModel * \brief The construction element result of a feature. * @@ -17,24 +20,51 @@ */ class Model_ResultConstruction : public ModelAPI_ResultConstruction { - boost::shared_ptr myOwner; ///< owner of this result - boost::shared_ptr myShape; ///< shape of this result created "on the fly" -public: - /// Returns the group identifier of this result - virtual std::string group() - {static std::string MY_GROUP = "Construction"; return MY_GROUP;} + std::shared_ptr myOwner; ///< owner of this result + std::shared_ptr myShape; ///< shape of this result created "on the fly" + bool myFacesUpToDate; ///< is true if faces in myuFaces are computed and up to date + std::vector > myFaces; ///< stores the up to date faces if they exist + bool myIsInHistory; + bool myIsInfinite; + public: + /// Request for initialization of data model of the result: adding all attributes + virtual void initAttributes(); + + /// Retuns the parameters of color definition in the resources config manager + MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault); + + /// By default object is displayed in the object browser. + MODEL_EXPORT virtual bool isInHistory() + { + return myIsInHistory; + } + /// Sets the result - MODEL_EXPORT virtual void setShape(boost::shared_ptr theShape); + MODEL_EXPORT virtual void setShape(std::shared_ptr theShape); /// Returns the shape-result produced by this feature - MODEL_EXPORT virtual boost::shared_ptr& shape(); - /// Returns the source feature of this result - //MODEL_EXPORT virtual boost::shared_ptr owner(); + MODEL_EXPORT virtual std::shared_ptr shape(); + + /// Sets the flag that it must be displayed in history (default is true) + MODEL_EXPORT virtual void setIsInHistory(const bool myIsInHistory); + + /// if the construction result may be used as faces, this method returns not zero number of faces + MODEL_EXPORT virtual int facesNum(); + /// if the construction result may be used as faces, this method returns face by zero based index + MODEL_EXPORT virtual std::shared_ptr face(const int theIndex); + + /// By default object is not infinite. + MODEL_EXPORT virtual bool isInfinite(); + /// Sets the flag that it is infinite + MODEL_EXPORT virtual void setInfinite(const bool theInfinite); + /// The construction element is never concealed + MODEL_EXPORT virtual void setIsConcealed(const bool theValue); -protected: + protected: /// Makes a body on the given feature Model_ResultConstruction(); - friend class Model_Document; + friend class Model_Objects; }; #endif