X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_Application.h;h=75aa172afbaae4798eac9f331427a73551aa4362;hb=a142c8797585ec0b35310ec3608d38b3a4908b7c;hp=77d669257079fc13b303f0bd4203334cf570a16b;hpb=7bc80aeb9d0bf426306a47c247a4af44aac6b5b0;p=modules%2Fshaper.git diff --git a/src/Model/Model_Application.h b/src/Model/Model_Application.h index 77d669257..75aa172af 100644 --- a/src/Model/Model_Application.h +++ b/src/Model/Model_Application.h @@ -6,9 +6,9 @@ #ifndef Model_Application_HeaderFile #define Model_Application_HeaderFile -#include -#include +#include #include +#include // Define handle class DEFINE_STANDARD_HANDLE(Model_Application, TDocStd_Application) @@ -19,19 +19,18 @@ DEFINE_STANDARD_HANDLE(Model_Application, TDocStd_Application) * Application supports the formats and document management. It is uses OCAF-lke * architecture and just implements specific features of the module. */ -class Model_Application: public TDocStd_Application, public ModelAPI_Application +class Model_Application: public TDocStd_Application { public: // useful methods inside of the module // CASCADE RTTI - DEFINE_STANDARD_RTTI(Model_Application) - ; + DEFINE_STANDARD_RTTI(Model_Application); //! Retuns the application: one per process - MODEL_EXPORT static Handle_Model_Application GetApplication(); - //! Returns the main document (on first call creates it) - MODEL_EXPORT ModelAPI_Document* GetMainDocument(); + MODEL_EXPORT static Handle_Model_Application getApplication(); + //! Returns the main document (on first call creates it) by the string identifier + MODEL_EXPORT std::shared_ptr getDocument(std::string theDocID); public: // Redefined OCAF methods @@ -46,8 +45,8 @@ public: Model_Application(); private: - - Handle_Model_Document myMainDoc; ///< main document of an application + /// Map from string identifiers to created documents of an application + std::map > myDocs; }; #endif