]> SALOME platform Git repositories - modules/gui.git/blob - src/DDS/DDS_Dictionary.h
Salome HOME
5ecf488da89092988ca20eec52c8b901892199db
[modules/gui.git] / src / DDS / DDS_Dictionary.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 #ifndef DDS_DICTIONARY_H
23 #define DDS_DICTIONARY_H
24
25 #include "DDS_DicGroup.h"
26
27 #include <LDOMString.hxx>
28
29 #include <MMgt_TShared.hxx>
30
31 class LDOM_Element;
32 class TCollection_AsciiString;
33
34 DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
35
36 class DDS_Dictionary : public MMgt_TShared
37 {
38 public:
39   Standard_EXPORT static Handle(DDS_Dictionary)  Get();
40
41   // Return instance of data dictionary. Create instance if it is NULL.
42
43   Standard_EXPORT void                           GetKeys( const TCollection_AsciiString&, TColStd_SequenceOfAsciiString& ) const;
44
45   Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString& ) const;
46   Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString&,
47                                                              const TCollection_AsciiString& ) const;
48
49   Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
50   Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString&,
51                                                                  const TCollection_AsciiString& ) const;
52   Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString& ) const;
53   Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString&,
54                                                                      const TCollection_AsciiString& ) const;
55   Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem() const;
56   Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem( const TCollection_AsciiString& ) const;
57   Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString& );
58   Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString&,
59                                                                       const TCollection_AsciiString& );
60
61
62   static Standard_EXPORT Standard_Boolean        Load( const TCollection_AsciiString );
63
64   static Standard_EXPORT Standard_Real           ToSI( const Standard_Real, const Standard_CString );
65   static Standard_EXPORT Standard_Real           FromSI( const Standard_Real, const Standard_CString );
66
67   static Standard_EXPORT LDOMString              KeyWord( const TCollection_AsciiString& );
68
69 private:
70   DDS_Dictionary();
71   DDS_Dictionary( const DDS_Dictionary& );
72
73   void                                           operator=( const DDS_Dictionary& );
74
75   void                                           FillDataMap( const LDOM_Element&, const LDOM_Element& );
76
77 private:
78   DDS_IndexedDataMapOfDicGroups                  myGroupMap;
79
80 public:
81   DEFINE_STANDARD_RTTI(DDS_Dictionary)
82 };
83
84 #endif