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