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 // File: SALOME_Prs.cxx
23 // Created: Wed Apr 28 15:03:43 2004
24 // Author: Sergey ANIKIN
25 // <san@startrex.nnov.opencascade.com>
27 #include "SALOME_Prs.h"
29 //#include "utilities.h"
31 //using namespace std;
34 Dispatches display operation to proper Display() method of SALOME_View
36 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
38 if ( v ) v->Display( this );
42 Dispatches display operation to proper Erase() method of SALOME_View
44 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
46 if ( v ) v->Erase( this, forced );
50 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
52 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
54 if ( v ) v->LocalSelection( this, mode );
58 Dispatches update operation to proper Update() method of SALOME_Displayer
60 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
62 if ( d ) d->Update( this );
66 Dispatches display operation to proper Display() method of SALOME_View
68 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
70 if ( v ) v->Display( this );
74 Dispatches display operation to proper Erase() method of SALOME_View
76 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
78 if ( v ) v->Erase( this, forced );
82 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
84 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
86 if ( v ) v->LocalSelection( this, mode );
90 Dispatches update operation to proper Update() method of SALOME_Displayer
92 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
94 if ( d ) d->Update( this );
98 Dispatches display operation to proper Display() method of SALOME_View
100 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
102 if ( v ) v->Display( this );
106 Dispatches display operation to proper Erase() method of SALOME_View
108 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
110 if ( v ) v->Erase( this, forced );
114 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
116 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
118 if ( v ) v->LocalSelection( this, mode );
122 Dispatches update operation to proper Update() method of SALOME_Displayer
124 void SALOME_Prs2d::Update( SALOME_Displayer* d )
126 if ( d ) d->Update( this );
130 Gives control to SALOME_Prs object, so that it could perform double dispatch
132 void SALOME_View::Display( const SALOME_Prs* prs )
134 prs->DisplayIn( this );
138 Gives control to SALOME_Prs object, so that it could perform double dispatch
140 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
142 prs->EraseIn( this, forced );
146 Gives control to SALOME_Prs object, so that it could perform double dispatch
148 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
150 prs->LocalSelectionIn( this, mode );
154 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
156 void SALOME_View::Display( const SALOME_OCCPrs* )
158 // MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
162 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
164 void SALOME_View::Display( const SALOME_VTKPrs* )
166 // MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
170 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
172 void SALOME_View::Display( const SALOME_Prs2d* )
174 // MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
178 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
180 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
182 // MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
186 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
188 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
190 // MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
194 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
196 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
198 // MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
202 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
204 void SALOME_View::EraseAll( const bool )
206 // MESSAGE( "SALOME_View::EraseAll() called!" );
210 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
212 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
214 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called!
215 // Probably, selection is being activated in uncompatible viewframe." );
219 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
221 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
223 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called!
224 // Probably, selection is being activated in uncompatible viewframe." );
228 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
230 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
232 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called!
233 // Probably, selection is being activated in uncompatible viewframe." );
237 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
239 void SALOME_View::GlobalSelection( const bool ) const
241 // MESSAGE( "SALOME_View::GlobalSelection() called!
242 // Probably, selection is being activated in uncompatible viewframe." );
246 Gives control to SALOME_Prs object, so that it could perform double dispatch
248 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
254 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
256 void SALOME_Displayer::Update( SALOME_OCCPrs* )
258 // MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
262 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
264 void SALOME_Displayer::Update( SALOME_VTKPrs* )
266 // MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
270 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
272 void SALOME_Displayer::Update( SALOME_Prs2d* )
274 // MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );