1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // VISU OBJECT : interactive object for VISU entities implementation
23 // File : VISU_MultiResult_i.hh
24 // Author : Alexey PETROV
27 #ifndef __VISU_MULTI_RESULT_I_H__
28 #define __VISU_MULTI_RESULT_I_H__
30 #ifndef ENABLE_MULTIPR
31 # define RESULT_CLASS_NAME Result_i
33 # define RESULT_CLASS_NAME MultiResult_i
35 #include "VISU_Result_i.hh"
36 #include "MULTIPR_Obj.hxx"
42 //----------------------------------------------------------------------------
43 class MultiResult_i : public virtual Result_i
45 MultiResult_i(const MultiResult_i&);
48 typedef Result_i TSuperClass;
50 MultiResult_i(SALOMEDS::Study_ptr theStudy,
51 const ESourceId& theSourceId,
52 const ECreationId& theCreationId,
53 CORBA::Boolean theIsBuildImmediately,
54 CORBA::Boolean theIsBuildFields,
55 CORBA::Boolean theIsBuildMinMax,
56 CORBA::Boolean theIsBuildGroups);
68 VISU::Result::EntityNames*
69 GetPartNames(const char* theMeshName);
72 VISU::Result::Resolutions*
73 GetResolutions(const char* theMeshName,
74 const char* thePartName);
77 VISU::Result::Resolution
78 GetResolution(const char* theMeshName,
79 const char* thePartName);
83 SetResolution(const char* theMeshName,
84 const char* thePartName,
85 VISU::Result::Resolution theResolution);
88 typedef std::string TPartName;
89 typedef std::vector<TPartName> TPartNames;
91 typedef size_t TPartID;
92 typedef std::string TPath;
93 typedef std::string TMeshName;
101 TFileName myFileName;
104 typedef std::map<TFileName, TPartInfo> TPartInfos;
105 TPartInfos myPartInfos;
107 typedef std::map<TPartName, TFileName> TPartName2FileName;
108 typedef std::map<TPartName, VISU::Result::Resolution> TPartName2Resolution;
109 typedef std::set<VISU::Result::Resolution> TResolutions;
111 typedef std::set<std::string> TRepresentationKey;
112 typedef std::map<TRepresentationKey, PInput> TRepresentation2Input;
114 typedef std::set<TPartName> TSubPartNames;
115 typedef std::map<TPartName, TSubPartNames> TMainPart2SubPartNames;
118 multipr::Obj myMultiprObj;
119 TPartName2FileName myPartName2FileName;
120 TPartName2Resolution myPartName2Resolution;
121 TMainPart2SubPartNames myMainPart2SubPartNames;
123 TRepresentation2Input myRepresentation2Input;
128 Build(SALOMEDS::SObject_ptr theSObject,
129 CORBA::Boolean theIsAtOnce = true) ;
133 BuildDataTree(const std::string& theResultEntry);
142 Create(const char* theFileName);
146 Restore(SALOMEDS::SObject_ptr theSObject,
147 const Storable::TRestoringMap& theMap,
148 const std::string& thePrefix,
149 CORBA::Boolean theIsMultiFile);
151 //---------------------------------------------------------------
154 Save(SALOMEDS::SComponent_ptr theComponent,
155 const std::string& theURL,
158 TFileNames& theFileNames,
159 TFileNames& theFiles);
163 CanCopy(SALOMEDS::SObject_ptr theObject);
167 ToStream(std::ostringstream& theStr);
171 GetInput(const std::string& theMeshName = "",
172 VISU::Entity theEntity = VISU::NONE,
173 const std::string& theFieldName = "",
174 CORBA::Long theTimeStampNumber = -1);
179 #endif // ENABLE_MULTIPR
181 #endif // __VISU_MULTI_RESULT_I_H__