Salome HOME
5d6276b4b556b31db0264aeeaf7c3f096448eb79
[modules/visu.git] / src / VISU_I / VISU_CutLinesBase_i.hh
1 // Copyright (C) 2007-2011  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     VISU_Actor*
53     CreateActor();
54
55     virtual 
56     void 
57     SetNbLines(CORBA::Long theNb);
58
59     virtual
60     CORBA::Long
61     GetNbLines();
62
63     virtual
64     void
65     SetAllCurvesInverted(CORBA::Boolean theInvert);
66
67     virtual
68     CORBA::Boolean
69     IsAllCurvesInverted();
70
71     virtual
72     void
73     SetCurveInverted(CORBA::Long theCurveNumber,
74                      CORBA::Boolean theInvert);
75
76     virtual
77     CORBA::Boolean
78     IsCurveInverted(CORBA::Long theCurveNumber);
79
80     virtual
81     void
82     SetUseAbsoluteLength(CORBA::Boolean theAbsLength);
83
84     virtual
85     CORBA::Boolean 
86     IsUseAbsoluteLength();
87
88     typedef std::map<int,bool> TCurvesInv;
89     TCurvesInv
90     GetCurvesInverted() 
91     {
92       return myMapCurvesInverted;
93     }
94
95     void
96     CopyCurvesInverted(const TCurvesInv& theCurves);
97
98     VISU_CutLinesBasePL* 
99     GetSpecificPL() const
100     { 
101       return myCutLinesBasePL; 
102     }
103     
104   protected:
105     //! Extends VISU_ColoredPrs3d_i::CreatePipeLine
106     virtual 
107     void
108     CreatePipeLine(VISU_PipeLine* thePipeLine);
109
110     VISU_CutLinesBasePL *myCutLinesBasePL;
111     TCurvesInv myMapCurvesInverted;
112     CORBA::Boolean myUseAbsLength;
113
114   public:
115     //! Extends VISU_ColoredPrs3d_i::Create
116     virtual 
117     Storable* 
118     Create(const std::string& theMeshName, 
119            VISU::Entity theEntity,
120            const std::string& theFieldName, 
121            CORBA::Long theTimeStampNumber);
122
123     //! Extends VISU_ColoredPrs3d_i::ToStream
124     virtual 
125     void
126     ToStream(std::ostringstream& theStr);
127
128     //! Extends VISU_ColoredPrs3d_i::Restore
129     virtual
130     Storable* 
131     Restore(SALOMEDS::SObject_ptr theSObject,
132             const Storable::TRestoringMap& theMap);
133
134     virtual 
135     void
136     SameAs(const Prs3d_i* theOrigin);
137
138     void BuildTableOfReal(SALOMEDS::SObject_var theSObject,
139                           bool theIsCutSegment = false);
140   };
141 }
142
143 #endif