Version: 6.3.1

src/VISU_I/VISU_ResultUtils.hh

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
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 
00020 //  VISU OBJECT : interactive object for VISU entities implementation
00021 //  File   : VISU_ResultUtils.hh
00022 //  Author : Alexey PETROV
00023 //  Module : VISU
00024 //
00025 #ifndef __VISU_RESULT_UTILS_H__
00026 #define __VISU_RESULT_UTILS_H__
00027 
00028 #include "VISU_Result_i.hh"
00029 #include "SALOME_Event.h"
00030 
00031 #include <set>
00032 
00033 namespace VISU
00034 {
00035   //----------------------------------------------------------------------------
00036   struct TUpdateObjBrowser: public SALOME_Event
00037   {
00038     int myStudyId;
00039     CORBA::Boolean* myIsDone;
00040     TUpdateObjBrowser(const int theStudyId, CORBA::Boolean* theIsDone);
00041 
00042     virtual
00043     void
00044     Execute();
00045   };
00046 
00047 
00048   //----------------------------------------------------------------------------
00049   struct TResultManager
00050   {
00051     Result_i* myResult;
00052 
00053     TResultManager(Result_i* theResult);
00054 
00055     ~TResultManager();
00056   };
00057 
00058 
00059   //----------------------------------------------------------------------------
00060   struct TTransactionManager
00061   {
00062     _PTR(StudyBuilder) myStudyBuilder;
00063 
00064     TTransactionManager(_PTR(Study) theStudyDocument);
00065 
00066     ~TTransactionManager();
00067   };
00068 
00069 
00070   //----------------------------------------------------------------------------
00071   QString
00072   GenerateName(const std::string& theName);
00073 
00074 
00075   //----------------------------------------------------------------------------
00076   bool
00077   SplitName(const std::string& theName,
00078          std::string& theBase,
00079          std::string& theSuffix,
00080          char theDelimeter = ':');
00081 
00082 
00083   //----------------------------------------------------------------------------
00084   std::string
00085   MakeFileName(const std::string& theName,
00086             const void* thePointer);
00087     
00088     
00089   //----------------------------------------------------------------------------
00090   void
00091   BuildEntities(Result_i* theResult,
00092           Result_i::PInput theInput,
00093           CORBA::Boolean* theIsDone,
00094           const std::string& theResultEntry,
00095           CORBA::Boolean theIsAtOnce,
00096           CORBA::Boolean theIsBuildGroups,
00097           CORBA::Boolean theIsBuildFields,
00098           CORBA::Boolean theIsBuildParts,
00099           _PTR(Study) theStudy);
00100 
00101   
00102   //----------------------------------------------------------------------------
00103   void
00104   BuildGroups(Result_i* theResult,
00105            Result_i::PInput theInput,
00106            CORBA::Boolean* theIsDone,
00107            CORBA::Boolean theIsBuild,
00108            CORBA::Boolean theIsAtOnce,
00109            _PTR(Study) theStudy);
00110 
00111   
00112   //----------------------------------------------------------------------------
00113   void
00114   BuildFields(Result_i* theResult,
00115            Result_i::PInput theInput,
00116            CORBA::Boolean* theIsDone,
00117            CORBA::Boolean theIsBuild,
00118            CORBA::Boolean theIsAtOnce,
00119            _PTR(Study) theStudy);
00120 
00121   
00122   //----------------------------------------------------------------------------
00123   void
00124   BuildMinMax(Result_i* theResult,
00125            Result_i::PInput theInput,
00126            CORBA::Boolean* theIsDone,
00127            CORBA::Boolean theIsBuild);
00128 
00129 
00130   //----------------------------------------------------------------------------
00131   void
00132   BuildFieldDataTree(Result_i* theResult,
00133                Result_i::PInput theInput,
00134                CORBA::Boolean* theIsFieldsDone,
00135                CORBA::Boolean theIsBuildFields,
00136                CORBA::Boolean* theIsMinMaxDone,
00137                CORBA::Boolean theIsBuildMinMax,
00138                _PTR(Study) theStudy);
00139 
00140   //----------------------------------------------------------------------------
00141   bool
00142   RemoveFile(const std::string& theFileName,
00143           bool theRemoveEmptyDir = true);
00144 
00145   //----------------------------------------------------------------------------
00146   bool
00147   CopyFile(const std::string& theSourceFileName,
00148         const std::string& theTargetFileName);
00149 
00150   //----------------------------------------------------------------------------
00151 }
00152 
00153 
00154 #endif // __VISU_RESULT_UTILS_H__
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