1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
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/
19 // File: SALOME_Prs.cxx
20 // Created: Wed Apr 28 15:03:43 2004
21 // Author: Sergey ANIKIN
22 // <san@startrex.nnov.opencascade.com>
25 #include "SALOME_Prs.h"
27 //#include "utilities.h"
29 //using namespace std;
32 Dispatches display operation to proper Display() method of SALOME_View
34 void SALOME_OCCPrs::DisplayIn( SALOME_View* v ) const
36 if ( v ) v->Display( this );
40 Dispatches display operation to proper Erase() method of SALOME_View
42 void SALOME_OCCPrs::EraseIn( SALOME_View* v, const bool forced ) const
44 if ( v ) v->Erase( this, forced );
48 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
50 void SALOME_OCCPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
52 if ( v ) v->LocalSelection( this, mode );
56 Dispatches update operation to proper Update() method of SALOME_Displayer
58 void SALOME_OCCPrs::Update( SALOME_Displayer* d )
60 if ( d ) d->Update( this );
64 Dispatches display operation to proper Display() method of SALOME_View
66 void SALOME_VTKPrs::DisplayIn( SALOME_View* v ) const
68 if ( v ) v->Display( this );
72 Dispatches display operation to proper Erase() method of SALOME_View
74 void SALOME_VTKPrs::EraseIn( SALOME_View* v, const bool forced ) const
76 if ( v ) v->Erase( this, forced );
80 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
82 void SALOME_VTKPrs::LocalSelectionIn( SALOME_View* v, const int mode ) const
84 if ( v ) v->LocalSelection( this, mode );
88 Dispatches update operation to proper Update() method of SALOME_Displayer
90 void SALOME_VTKPrs::Update( SALOME_Displayer* d )
92 if ( d ) d->Update( this );
96 Dispatches display operation to proper Display() method of SALOME_View
98 void SALOME_Prs2d::DisplayIn( SALOME_View* v ) const
100 if ( v ) v->Display( this );
104 Dispatches display operation to proper Erase() method of SALOME_View
106 void SALOME_Prs2d::EraseIn( SALOME_View* v, const bool forced ) const
108 if ( v ) v->Erase( this, forced );
112 Dispatches operation to proper LocalSelectionIn() method of SALOME_View
114 void SALOME_Prs2d::LocalSelectionIn( SALOME_View* v, const int mode ) const
116 if ( v ) v->LocalSelection( this, mode );
120 Dispatches update operation to proper Update() method of SALOME_Displayer
122 void SALOME_Prs2d::Update( SALOME_Displayer* d )
124 if ( d ) d->Update( this );
128 Gives control to SALOME_Prs object, so that it could perform double dispatch
130 void SALOME_View::Display( const SALOME_Prs* prs )
132 prs->DisplayIn( this );
136 Gives control to SALOME_Prs object, so that it could perform double dispatch
138 void SALOME_View::Erase( const SALOME_Prs* prs, const bool forced )
140 prs->EraseIn( this, forced );
144 Gives control to SALOME_Prs object, so that it could perform double dispatch
146 void SALOME_View::LocalSelection( const SALOME_Prs* prs, const int mode )
148 prs->LocalSelectionIn( this, mode );
152 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
154 void SALOME_View::Display( const SALOME_OCCPrs* )
156 // MESSAGE( "SALOME_View::Display( const SALOME_OCCPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
160 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
162 void SALOME_View::Display( const SALOME_VTKPrs* )
164 // MESSAGE( "SALOME_View::Display( const SALOME_VTKPrs& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
168 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
170 void SALOME_View::Display( const SALOME_Prs2d* )
172 // MESSAGE( "SALOME_View::Display( const SALOME_Prs2d& ) called! Probably, presentation is being displayed in uncompatible viewframe." );
176 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
178 void SALOME_View::Erase( const SALOME_OCCPrs*, const bool )
180 // MESSAGE( "SALOME_View::Erase( const SALOME_OCCPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
184 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
186 void SALOME_View::Erase( const SALOME_VTKPrs*, const bool )
188 // MESSAGE( "SALOME_View::Erase( const SALOME_VTKPrs& ) called! Probably, presentation is being erased in uncompatible viewframe." );
192 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
194 void SALOME_View::Erase( const SALOME_Prs2d*, const bool )
196 // MESSAGE( "SALOME_View::Erase( const SALOME_Prs2d& ) called! Probably, presentation is being erased in uncompatible viewframe." );
200 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
202 void SALOME_View::EraseAll( const bool )
204 // MESSAGE( "SALOME_View::EraseAll() called!" );
208 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
210 void SALOME_View::LocalSelection( const SALOME_OCCPrs*, const int )
212 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_OCCPrs* ) called! \
213 // Probably, selection is being activated in uncompatible viewframe." );
217 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
219 void SALOME_View::LocalSelection( const SALOME_VTKPrs*, const int )
221 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_VTKPrs* ) called! \
222 // Probably, selection is being activated in uncompatible viewframe." );
226 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
228 void SALOME_View::LocalSelection( const SALOME_Prs2d*, const int )
230 // MESSAGE( "SALOME_View::LocalSelection( const SALOME_Prs2d* ) called! \
231 // Probably, selection is being activated in uncompatible viewframe." );
235 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
237 void SALOME_View::GlobalSelection( const bool ) const
239 // MESSAGE( "SALOME_View::GlobalSelection() called! \
240 // Probably, selection is being activated in uncompatible viewframe." );
244 Gives control to SALOME_Prs object, so that it could perform double dispatch
246 void SALOME_Displayer::UpdatePrs( SALOME_Prs* prs )
252 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
254 void SALOME_Displayer::Update( SALOME_OCCPrs* )
256 // MESSAGE( "SALOME_Displayer::Update( SALOME_OCCPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
260 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
262 void SALOME_Displayer::Update( SALOME_VTKPrs* )
264 // MESSAGE( "SALOME_Displayer::Update( SALOME_VTKPrs* ) called! Probably, presentation is being updated in uncompatible viewframe." );
268 Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.
270 void SALOME_Displayer::Update( SALOME_Prs2d* )
272 // MESSAGE( "SALOME_Displayer::Update( SALOME_Prs2d* ) called! Probably, presentation is being updated in uncompatible viewframe." );