]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_DeformedShapeAndScalarMap_i.hh
Salome HOME
a50f64df60d501c059a807cb628548c54b785d98
[modules/visu.git] / src / VISU_I / VISU_DeformedShapeAndScalarMap_i.hh
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU OBJECT : interactive object for VISU entities implementation
23 // File:    VISU_DeformedShapeAndScalarMap_i.hh
24 // Author:  Eugeny Nikolaev
25 // Module : VISU
26 //
27 #ifndef VISU_DeformedShapeAndScalarMap_i_HeaderFile
28 #define VISU_DeformedShapeAndScalarMap_i_HeaderFile
29
30 #include "VISU_ScalarMap_i.hh"
31
32 class VISU_DeformedShapeAndScalarMapPL;
33
34 namespace VISU
35 {
36   //----------------------------------------------------------------------------  
37   //! Class of Scalar Map on Deformed Shape presentation.
38   class VISU_I_EXPORT DeformedShapeAndScalarMap_i : public virtual POA_VISU::DeformedShapeAndScalarMap,
39                                                     public virtual ScalarMap_i
40   {
41     static int myNbPresent;
42     DeformedShapeAndScalarMap_i(const DeformedShapeAndScalarMap_i&);
43     
44   public:
45     //----------------------------------------------------------------------------     
46     typedef ScalarMap_i TSuperClass;
47     typedef VISU::DeformedShapeAndScalarMap TInterface;
48         
49     explicit
50     DeformedShapeAndScalarMap_i(EPublishInStudyMode thePublishInStudyModep);
51     
52     virtual
53     ~DeformedShapeAndScalarMap_i();
54
55     virtual
56     VISU::VISUType
57     GetType()
58     { 
59       return VISU::TDEFORMEDSHAPEANDSCALARMAP;
60     }
61     
62     virtual 
63     void
64     SetScale(CORBA::Double theScale);
65
66     virtual
67     CORBA::Double 
68     GetScale();
69
70     virtual 
71     void
72     SameAs(const Prs3d_i* theOrigin);
73
74     VISU_DeformedShapeAndScalarMapPL* 
75     GetSpecificPL()
76     { 
77       return myDeformedShapeAndScalarMapPL;
78     }
79    
80   protected:
81     //! Redefines VISU_ColoredPrs3d_i::SetField
82     virtual
83     void
84     SetField(VISU::PField theField);
85
86     //! Redefines VISU_ColoredPrs3d_i::CreatePipeLine
87     virtual
88     void
89     CreatePipeLine(VISU_PipeLine* thePipeLine);
90
91     //! Redefines VISU_ColoredPrs3d_i::CheckIsPossible
92     virtual 
93     bool 
94     CheckIsPossible();
95
96   public:
97     //! Redefines VISU_ColoredPrs3d_i::IsPossible
98     static
99     size_t
100     IsPossible(Result_i* theResult, 
101                const std::string& theMeshName, 
102                VISU::Entity theEntity,
103                const std::string& theFieldName, 
104                CORBA::Long theTimeStampNumber,
105                bool theIsMemoryCheck);
106
107     //! Redefines VISU_ColoredPrs3d_i::IsPossible
108     virtual
109     Storable* 
110     Create(const std::string& theMeshName, 
111            VISU::Entity theEntity,
112            const std::string& theFieldName, 
113            CORBA::Long theTimeStampNumber);
114
115     //! Redefines VISU_ColoredPrs3d_i::ToStream
116     virtual
117     void
118     ToStream(std::ostringstream& theStr);
119
120     //! Redefines VISU_ColoredPrs3d_i::Restore
121     virtual
122     Storable* 
123     Restore(SALOMEDS::SObject_ptr theSObject,
124             const Storable::TRestoringMap& theMap);
125     
126     static const std::string myComment;
127
128     virtual
129     const char* 
130     GetComment() const;
131
132     virtual
133     QString 
134     GenerateName();
135
136     virtual
137     const char* 
138     GetIconName();
139     
140     virtual
141     VISU_Actor* 
142     CreateActor();
143
144     virtual
145     void
146     UpdateActor(VISU_Actor* theActor) ;
147
148     virtual 
149     void
150     SetScalarField(VISU::Entity theEntity,
151                    const char* theFieldName,
152                    CORBA::Long theTimeStampNumber);
153
154     virtual
155     VISU::Entity
156     GetScalarEntity();
157
158     virtual
159     char* 
160     GetScalarFieldName();
161
162     virtual
163     CORBA::Long
164     GetScalarTimeStampNumber();
165
166     virtual 
167     VISU::PField
168     GetScalarField();
169
170   private:
171     VISU_DeformedShapeAndScalarMapPL *myDeformedShapeAndScalarMapPL;
172
173     PField myScalarField;
174     VISU::Entity myScalarEntity;
175     std::string myScalarFieldName;
176     CORBA::Long myScalarTimeStampNumber;
177   };
178 }
179 #endif