X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultPart.h;h=cda7bf6cd5f25a290116d6a99ce03f042d353243;hb=647f62a71de86575a6c5ac73c61371d336c8da75;hp=b2daa5dfe961f9fd24c70e60dadb2ff32794da81;hpb=c0565e75ce0bd2f2994dc9874c4775cf7a4cb7ad;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultPart.h b/src/Model/Model_ResultPart.h index b2daa5dfe..cda7bf6cd 100644 --- a/src/Model/Model_ResultPart.h +++ b/src/Model/Model_ResultPart.h @@ -1,14 +1,16 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModelAPI_ResultPart.hxx // Created: 07 Jul 2014 // Author: Mikhail PONIKAROV -#ifndef Model_ResultPart_HeaderFile -#define Model_ResultPart_HeaderFile +#ifndef Model_ResultPart_H_ +#define Model_ResultPart_H_ #include "Model.h" #include -/**\class ModelAPI_ResultPart +/**\class Model_ResultPart * \ingroup DataModel * \brief The Part document, result of a creation of new part feature. * @@ -17,18 +19,24 @@ */ class Model_ResultPart : public ModelAPI_ResultPart { -public: - /// Returns the group identifier of this result - virtual std::string group() - {static std::string MY_GROUP = "Parts"; return MY_GROUP;} + public: /// Returns the part-document of this result - MODEL_EXPORT virtual boost::shared_ptr partDoc(); + MODEL_EXPORT virtual std::shared_ptr partDoc(); /// Part has no stored feature: this method returns NULL - MODEL_EXPORT virtual boost::shared_ptr owner(); + MODEL_EXPORT virtual std::shared_ptr owner(); + + /// Sets this document as current and if it is not loaded yet, loads it + MODEL_EXPORT virtual void activate(); protected: /// makes a result on a temporary feature (an action) - Model_ResultPart(const boost::shared_ptr& theFeature); + Model_ResultPart(); + + /// Sets the data manager of an object (document does), here also attributes are initialized + virtual void setData(std::shared_ptr theData); + + /// Returns true if document is activated (loaded into the memory) + virtual bool isActivated(); friend class Model_Document; };