1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef DDS_DICGROUP_H
24 #define DDS_DICGROUP_H
28 #include "DDS_DicItem.h"
30 #include <MMgt_TShared.hxx>
31 #include <TColStd_SequenceOfAsciiString.hxx>
32 #include <NCollection_List.hxx>
36 DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
38 class DDS_DicGroup : public MMgt_TShared
41 Standard_EXPORT DDS_DicGroup( const TCollection_AsciiString& );
43 Standard_EXPORT TCollection_AsciiString GetName() const;
44 Standard_EXPORT void GetKeys( TColStd_SequenceOfAsciiString& ) const;
46 Standard_EXPORT Handle(DDS_DicItem) GetDicItem( const TCollection_AsciiString& ) const;
48 Standard_EXPORT void GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
49 Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
51 Standard_EXPORT TCollection_AsciiString GetActiveUnitSystem() const;
52 Standard_EXPORT void SetActiveUnitSystem( const TCollection_AsciiString& );
54 virtual Standard_EXPORT Handle(DDS_DicItem) CreateItem() const;
58 Standard_EXPORT DDS_DicGroup( const DDS_DicGroup& );
60 Standard_EXPORT void operator=( const DDS_DicGroup& );
62 Standard_EXPORT virtual void FillDataMap( const LDOM_Element&, const LDOM_Element& );
64 Standard_EXPORT Standard_Boolean AddDicItem( const TCollection_AsciiString&,
65 const Handle(DDS_DicItem)& );
67 Standard_EXPORT Standard_Boolean HasDicItem( const TCollection_AsciiString& ) const;
69 Standard_EXPORT void RemoveAllDicItems();
72 DDS_IndexedDataMapOfDicItems& GetItemMap() const;
74 Standard_EXPORT Standard_Boolean AddUnitSystem( const TCollection_AsciiString&,
75 const TCollection_ExtendedString& );
79 typedef NCollection_DataMap<TCollection_AsciiString,
80 TCollection_ExtendedString> UnitSystemMap;
83 TCollection_AsciiString myName;
84 DDS_IndexedDataMapOfDicItems myDataMap;
85 UnitSystemMap myUnitSystem;
86 TCollection_AsciiString myActiveSystem;
87 TColStd_SequenceOfAsciiString myKeys;
89 friend class DDS_Dictionary;
92 DEFINE_STANDARD_RTTI(DDS_DicGroup)
95 DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
96 DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
97 TCollection_AsciiString, Handle(DDS_DicGroup))