Back to index

salome-gui  6.5.0
DDS_DicGroup.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef DDS_DICGROUP_H
00024 #define DDS_DICGROUP_H
00025 
00026 #include "DDS.h"
00027 
00028 #include "DDS_DicItem.h"
00029 
00030 #include <MMgt_TShared.hxx>
00031 #include <TColStd_SequenceOfAsciiString.hxx>
00032 #include <NCollection_List.hxx>
00033 
00034 class LDOM_Element;
00035 
00036 DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
00037 
00038 class DDS_DicGroup : public MMgt_TShared
00039 {
00040 public:
00041   DDS_DicGroup( const TCollection_AsciiString& );
00042 
00043   TCollection_AsciiString                    GetName() const;
00044   Standard_EXPORT void                       GetKeys( TColStd_SequenceOfAsciiString& ) const;
00045 
00046   Standard_EXPORT Handle(DDS_DicItem)        GetDicItem( const TCollection_AsciiString& ) const;
00047 
00048   Standard_EXPORT void                       GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
00049   Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
00050 
00051   Standard_EXPORT TCollection_AsciiString    GetActiveUnitSystem() const;
00052   Standard_EXPORT void                       SetActiveUnitSystem( const TCollection_AsciiString& );
00053 
00054 private:
00055   DDS_DicGroup( const DDS_DicGroup& );
00056 
00057   void                                       operator=( const DDS_DicGroup& );
00058 
00059   void                                       FillDataMap( const LDOM_Element&, const LDOM_Element& );
00060 
00061 private:
00062   typedef NCollection_DataMap<TCollection_AsciiString,
00063                               TCollection_ExtendedString> UnitSystemMap;
00064 
00065 private:
00066   TCollection_AsciiString                    myName;
00067   DDS_IndexedDataMapOfDicItems               myDataMap;
00068   UnitSystemMap                              myUnitSystem;
00069   TCollection_AsciiString                    myActiveSystem;
00070   TColStd_SequenceOfAsciiString              myKeys;
00071 
00072   friend class DDS_Dictionary;
00073 
00074 public:
00075   DEFINE_STANDARD_RTTI(DDS_DicGroup)
00076 };
00077 
00078 DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
00079 DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
00080                       TCollection_AsciiString, Handle(DDS_DicGroup))
00081 
00082 #endif