Salome HOME
Merge branch 'master' into agy/NewPV1_For_850
[modules/gui.git] / src / DDS / DDS_Dictionary.h
index 5ecf488da89092988ca20eec52c8b901892199db..3db4752dd87a780d449dc9d9b80d4ea59b7723d0 100644 (file)
@@ -1,24 +1,25 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef DDS_DICTIONARY_H
 #define DDS_DICTIONARY_H
 
 
 #include <LDOMString.hxx>
 
-#include <MMgt_TShared.hxx>
+#include <Standard_Transient.hxx>
 
 class LDOM_Element;
 class TCollection_AsciiString;
 
-DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
+DEFINE_STANDARD_HANDLE(DDS_Dictionary, Standard_Transient)
 
-class DDS_Dictionary : public MMgt_TShared
+class DDS_Dictionary : public Standard_Transient
 {
 public:
   Standard_EXPORT static Handle(DDS_Dictionary)  Get();
@@ -66,19 +67,32 @@ public:
 
   static Standard_EXPORT LDOMString              KeyWord( const TCollection_AsciiString& );
 
-private:
-  DDS_Dictionary();
-  DDS_Dictionary( const DDS_Dictionary& );
+protected:
 
-  void                                           operator=( const DDS_Dictionary& );
+  Standard_EXPORT virtual Handle(DDS_DicGroup)   CreateGroup( const TCollection_AsciiString& ) const;
 
-  void                                           FillDataMap( const LDOM_Element&, const LDOM_Element& );
+protected:
+
+  Standard_EXPORT DDS_Dictionary();
+
+  Standard_EXPORT DDS_Dictionary( const DDS_Dictionary& );
+
+  Standard_EXPORT void                           operator=( const DDS_Dictionary& );
+
+  Standard_EXPORT virtual void                   FillDataMap( const LDOM_Element& );
+
+  Standard_EXPORT static void                    SetDictionary(const Handle(DDS_Dictionary)& theDict);
+
+protected:
 
-private:
   DDS_IndexedDataMapOfDicGroups                  myGroupMap;
 
+private:
+
+  static Handle(DDS_Dictionary)                  myDictionary;
+
 public:
-  DEFINE_STANDARD_RTTI(DDS_Dictionary)
+  DEFINE_STANDARD_RTTIEXT(DDS_Dictionary, Standard_Transient)
 };
 
 #endif