src/DDS/DDS_DicGroup.h

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