Version: 6.3.1

src/QDS/QDS.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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 QDS_H
00024 #define QDS_H
00025 
00026 #ifdef WIN32
00027 #if defined QDS_EXPORTS
00028 #define QDS_EXPORT __declspec(dllexport)
00029 #else
00030 #define QDS_EXPORT __declspec(dllimport)
00031 #endif
00032 #else
00033 #define QDS_EXPORT
00034 #endif
00035 
00036 #if defined WIN32
00037 #pragma warning ( disable:4251 )
00038 #pragma warning ( disable:4786 )
00039 #endif
00040 
00041 #include <QString>
00042 #include <QList>
00043 
00044 #include <TCollection_ExtendedString.hxx>
00045 
00046 class QDS_Datum;
00047 class Handle(TCollection_HAsciiString);
00048 class Handle(TCollection_HExtendedString);
00049 
00050 class QDS_EXPORT QDS
00051 {
00052 public:
00054   typedef enum
00055   {
00056     None = 0x00,                   
00057     Label = 0x01,                  
00058     Control = 0x02,                
00059     Units = 0x04,                  
00060     NotFormat = 0x08,              
00061     NotAccel = 0x10,               
00062     UnitsWithLabel = 0x20,         
00063     All = Label | Control | Units  
00064   } DatumFlags;
00065 
00066 public:
00067   static bool                       load( const QString& );
00068 
00069   static QString                    unitSystemLabel( const QString&,
00070                                                      const QString& = QString() );
00071   static QString                    activeUnitSystem( const QString& = QString() );
00072   static void                       setActiveUnitSystem( const QString&,
00073                                                          const QString& = QString() );
00074 
00075   static QString                    toQString( const TCollection_AsciiString& );
00076   static QString                    toQString( const TCollection_ExtendedString& );
00077   static QString                    toQString( const Handle(TCollection_HAsciiString)& );
00078   static QString                    toQString( const Handle(TCollection_HExtendedString)& );
00079 
00080   static TCollection_AsciiString    toAsciiString( const QString& );
00081   static TCollection_AsciiString    toAsciiString( const TCollection_ExtendedString& );
00082   static TCollection_AsciiString    toAsciiString( const Handle(TCollection_HExtendedString)& );
00083 
00084   static TCollection_ExtendedString toExtString( const QString& );
00085   static TCollection_ExtendedString toExtString( const TCollection_AsciiString& );
00086 
00087 protected:
00088   static void                       insertDatum( QDS_Datum* );
00089   static void                       removeDatum( QDS_Datum* );
00090 
00091 private:
00092   static QList<QDS_Datum*>          _datumList;
00093 };
00094 
00095 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS