1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // VISU OBJECT : interactive object for VISU entities implementation
21 // File : VISU_MultiResult_i.hh
22 // Author : Alexey PETROV
25 #ifndef __VISU_MULTI_RESULT_I_H__
26 #define __VISU_MULTI_RESULT_I_H__
28 #ifndef ENABLE_MULTIPR
29 # define RESULT_CLASS_NAME Result_i
31 # define RESULT_CLASS_NAME MultiResult_i
33 #include "VISU_Result_i.hh"
34 #include "MULTIPR_Obj.hxx"
40 //----------------------------------------------------------------------------
41 class MultiResult_i : public virtual Result_i
43 MultiResult_i(const MultiResult_i&);
46 typedef Result_i TSuperClass;
48 MultiResult_i(SALOMEDS::Study_ptr theStudy,
49 const ESourceId& theSourceId,
50 const ECreationId& theCreationId,
51 CORBA::Boolean theIsBuildImmediately,
52 CORBA::Boolean theIsBuildFields,
53 CORBA::Boolean theIsBuildMinMax,
54 CORBA::Boolean theIsBuildGroups);
66 VISU::Result::EntityNames*
67 GetPartNames(const char* theMeshName);
70 VISU::Result::Resolutions*
71 GetResolutions(const char* theMeshName,
72 const char* thePartName);
75 VISU::Result::Resolution
76 GetResolution(const char* theMeshName,
77 const char* thePartName);
81 SetResolution(const char* theMeshName,
82 const char* thePartName,
83 VISU::Result::Resolution theResolution);
86 typedef std::string TPartName;
87 typedef std::vector<TPartName> TPartNames;
89 typedef size_t TPartID;
90 typedef std::string TPath;
91 typedef std::string TMeshName;
102 typedef std::map<TFileName, TPartInfo> TPartInfos;
103 TPartInfos myPartInfos;
105 typedef std::map<TPartName, TFileName> TPartName2FileName;
106 typedef std::map<TPartName, VISU::Result::Resolution> TPartName2Resolution;
107 typedef std::set<VISU::Result::Resolution> TResolutions;
109 typedef std::set<std::string> TRepresentationKey;
110 typedef std::map<TRepresentationKey, PInput> TRepresentation2Input;
112 typedef std::set<TPartName> TSubPartNames;
113 typedef std::map<TPartName, TSubPartNames> TMainPart2SubPartNames;
116 multipr::Obj myMultiprObj;
117 TPartName2FileName myPartName2FileName;
118 TPartName2Resolution myPartName2Resolution;
119 TMainPart2SubPartNames myMainPart2SubPartNames;
121 TRepresentation2Input myRepresentation2Input;
126 Build(SALOMEDS::SObject_ptr theSObject,
127 CORBA::Boolean theIsAtOnce = true) ;
131 BuildDataTree(const std::string& theResultEntry);
140 Create(const char* theFileName);
144 Restore(SALOMEDS::SObject_ptr theSObject,
145 const Storable::TRestoringMap& theMap,
146 const std::string& thePrefix,
147 CORBA::Boolean theIsMultiFile);
149 //---------------------------------------------------------------
152 Save(SALOMEDS::SComponent_ptr theComponent,
153 const std::string& theURL,
156 TFileNames& theFileNames,
157 TFileNames& theFiles);
161 CanCopy(SALOMEDS::SObject_ptr theObject);
165 ToStream(std::ostringstream& theStr);
169 GetInput(const std::string& theMeshName = "",
170 VISU::Entity theEntity = VISU::NONE,
171 const std::string& theFieldName = "",
172 CORBA::Long theTimeStampNumber = -1);
177 #endif // ENABLE_MULTIPR
179 #endif // __VISU_MULTI_RESULT_I_H__