Salome HOME
Merge from V5_1_main 14/05/2010
[modules/visu.git] / src / VISU_I / VISU_CutLinesBase_i.hh
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
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.
7 //
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.
12 //
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
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : VISU_CutLinesBase_i.hh
21 //  Author : Oleg UVAROV
22 //  Module : VISU
23 //
24 #ifndef VISU_CutLinesBase_i_HeaderFile
25 #define VISU_CutLinesBase_i_HeaderFile
26
27 #include "VISU_I.hxx"
28 #include "VISU_ScalarMap_i.hh"
29
30 class VISU_CutLinesBasePL;
31
32 namespace VISU
33 {
34   //----------------------------------------------------------------------------
35   class VISU_I_EXPORT CutLinesBase_i : public virtual POA_VISU::CutLinesBase,
36                                        public virtual ScalarMap_i
37   {
38     CutLinesBase_i(const CutLinesBase_i&);
39
40   public:
41     //----------------------------------------------------------------------------
42     typedef ScalarMap_i TSuperClass;
43     typedef VISU::CutLinesBase TInterface;
44
45     explicit
46     CutLinesBase_i(EPublishInStudyMode thePublishInStudyModep);
47
48     virtual
49     ~CutLinesBase_i();
50
51     virtual 
52     void 
53     SetNbLines(CORBA::Long theNb);
54
55     virtual
56     CORBA::Long
57     GetNbLines();
58
59     virtual
60     void
61     SetAllCurvesInverted(CORBA::Boolean theInvert);
62
63     virtual
64     CORBA::Boolean
65     IsAllCurvesInverted();
66
67     virtual
68     void
69     SetCurveInverted(CORBA::Long theCurveNumber,
70                      CORBA::Boolean theInvert);
71
72     virtual
73     CORBA::Boolean
74     IsCurveInverted(CORBA::Long theCurveNumber);
75
76     virtual
77     void
78     SetUseAbsoluteLength(CORBA::Boolean theAbsLength);
79
80     virtual
81     CORBA::Boolean 
82     IsUseAbsoluteLength();
83
84     typedef std::map<int,bool> TCurvesInv;
85     TCurvesInv
86     GetCurvesInverted() 
87     {
88       return myMapCurvesInverted;
89     }
90
91     void
92     CopyCurvesInverted(const TCurvesInv& theCurves);
93
94     VISU_CutLinesBasePL* 
95     GetSpecificPL() const
96     { 
97       return myCutLinesBasePL; 
98     }
99     
100   protected:
101     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
102     virtual 
103     void
104     CreatePipeLine(VISU_PipeLine* thePipeLine);
105
106     VISU_CutLinesBasePL *myCutLinesBasePL;
107     TCurvesInv myMapCurvesInverted;
108     CORBA::Boolean myUseAbsLength;
109
110   public:
111     //! Extends VISU_ColoredPrs3d_i::Create
112     virtual 
113     Storable* 
114     Create(const std::string& theMeshName, 
115            VISU::Entity theEntity,
116            const std::string& theFieldName, 
117            CORBA::Long theTimeStampNumber);
118
119     //! Extends VISU_ColoredPrs3d_i::ToStream
120     virtual 
121     void
122     ToStream(std::ostringstream& theStr);
123
124     //! Extends VISU_ColoredPrs3d_i::Restore
125     virtual
126     Storable* 
127     Restore(SALOMEDS::SObject_ptr theSObject,
128             const Storable::TRestoringMap& theMap);
129
130     virtual 
131     void
132     SameAs(const Prs3d_i* theOrigin);
133
134     void BuildTableOfReal(SALOMEDS::SObject_var theSObject,
135                           bool theIsCutSegment = false);
136   };
137 }
138
139 #endif