Back to index

salome-gui  6.5.0
DDS_Dictionary.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_DICTIONARY_H
00024 #define DDS_DICTIONARY_H
00025 
00026 #include "DDS_DicGroup.h"
00027 
00028 #include <LDOMString.hxx>
00029 
00030 #include <MMgt_TShared.hxx>
00031 
00032 class LDOM_Element;
00033 class TCollection_AsciiString;
00034 
00035 DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
00036 
00037 class DDS_Dictionary : public MMgt_TShared
00038 {
00039 public:
00040   Standard_EXPORT static Handle(DDS_Dictionary)  Get();
00041 
00042   // Return instance of data dictionary. Create instance if it is NULL.
00043 
00044   Standard_EXPORT void                           GetKeys( const TCollection_AsciiString&, TColStd_SequenceOfAsciiString& ) const;
00045 
00046   Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString& ) const;
00047   Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString&,
00048                                                              const TCollection_AsciiString& ) const;
00049 
00050   Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
00051   Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString&,
00052                                                                  const TCollection_AsciiString& ) const;
00053   Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString& ) const;
00054   Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString&,
00055                                                                      const TCollection_AsciiString& ) const;
00056   Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem() const;
00057   Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem( const TCollection_AsciiString& ) const;
00058   Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString& );
00059   Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString&,
00060                                                                       const TCollection_AsciiString& );
00061 
00062 
00063   static Standard_EXPORT Standard_Boolean        Load( const TCollection_AsciiString );
00064 
00065   static Standard_EXPORT Standard_Real           ToSI( const Standard_Real, const Standard_CString );
00066   static Standard_EXPORT Standard_Real           FromSI( const Standard_Real, const Standard_CString );
00067 
00068   static Standard_EXPORT LDOMString              KeyWord( const TCollection_AsciiString& );
00069 
00070 private:
00071   DDS_Dictionary();
00072   DDS_Dictionary( const DDS_Dictionary& );
00073 
00074   void                                           operator=( const DDS_Dictionary& );
00075 
00076   void                                           FillDataMap( const LDOM_Element&, const LDOM_Element& );
00077 
00078 private:
00079   DDS_IndexedDataMapOfDicGroups                  myGroupMap;
00080 
00081 public:
00082   DEFINE_STANDARD_RTTI(DDS_Dictionary)
00083 };
00084 
00085 #endif