Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDS_Dictionary.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 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, or (at your option) any later version.
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 
23 #ifndef DDS_DICTIONARY_H
24 #define DDS_DICTIONARY_H
25 
26 #include "DDS_DicGroup.h"
27 
28 #include <LDOMString.hxx>
29 
30 #include <MMgt_TShared.hxx>
31 
32 class LDOM_Element;
33 class TCollection_AsciiString;
34 
36 
37 class DDS_Dictionary : public MMgt_TShared
38 {
39 public:
40  Standard_EXPORT static Handle(DDS_Dictionary) Get();
41 
42  // Return instance of data dictionary. Create instance if it is NULL.
43 
44  Standard_EXPORT void GetKeys( const TCollection_AsciiString&, TColStd_SequenceOfAsciiString& ) const;
45 
46  Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
47  Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString&,
48  const TCollection_AsciiString& ) const;
49 
50  Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
51  Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString&,
52  const TCollection_AsciiString& ) const;
53  Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
54  Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString&,
55  const TCollection_AsciiString& ) const;
56  Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
57  Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem( const TCollection_AsciiString& ) const;
58  Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
59  Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString&,
60  const TCollection_AsciiString& );
61 
62 
63  static Standard_EXPORT Standard_Boolean Load( const TCollection_AsciiString );
64 
65  static Standard_EXPORT Standard_Real ToSI( const Standard_Real, const Standard_CString );
66  static Standard_EXPORT Standard_Real FromSI( const Standard_Real, const Standard_CString );
67 
68  static Standard_EXPORT LDOMString KeyWord( const TCollection_AsciiString& );
69 
70 protected:
71 
72  Standard_EXPORT virtual Handle(DDS_DicGroup) CreateGroup( const TCollection_AsciiString& ) const;
73 
74 protected:
75 
76  Standard_EXPORT DDS_Dictionary();
77 
78  Standard_EXPORT DDS_Dictionary( const DDS_Dictionary& );
79 
80  Standard_EXPORT void operator=( const DDS_Dictionary& );
81 
82  Standard_EXPORT virtual void FillDataMap( const LDOM_Element& );
83 
84  Standard_EXPORT static void SetDictionary(const Handle(DDS_Dictionary)& theDict);
85 
86 protected:
87 
89 
90 private:
91 
92  static Handle(DDS_Dictionary) myDictionary;
93 
94 public:
95  OCCT_DEFINE_STANDARD_RTTIEXT(DDS_Dictionary,MMgt_TShared)
96 };
97 
98 #endif