Version: 9.16.0
CurveCreator_Operation.hxx
Go to the documentation of this file.
1// Copyright (C) 2013-2026 CEA, EDF, 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, or (at your option) any later version.
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: CurveCreator_Operation.hxx
21// Author: Sergey KHROMOV
22
23#ifndef _CurveCreator_Operation_HeaderFile
24#define _CurveCreator_Operation_HeaderFile
25
26#include "CurveCreator.hxx"
29
30#include <string>
31#include <vector>
32
34
35
41{
42
43public:
44
48 enum Type
49 {
50 Unknown = 0,
64 };
65
70
75
84 bool init(const Type theType);
85
94 bool init(const Type theType, const int theIntParam);
95
107 bool init(const Type theType, const int theIntParam1,
108 const int theIntParam2);
109
114 bool init(const Type theType, const int theIntParam1,
115 const int theIntParam2[3]);
116
117
126 bool init(const Type theType, const std::list<int> theParamList);
127
137 bool init(const Type theType,
138 const CurveCreator_ICurve::SectionToPointList &theParamList1);
139
149 bool init(const Type theType, const CurveCreator::Coordinates &theCoords,
150 const int theIntParam);
151
161 bool init(const Type theType,
163
175 bool init(const CurveCreator_Operation::Type theType,
176 const std::string& theName,
177 const CurveCreator::Coordinates &theCoords,
178 const int theIntParam1,
179 const int theIntParam2);
180
181
191 bool init(const CurveCreator_Operation::Type theType,
192 const std::string &theName,
193 const int theIntParam1 );
194
198 void apply(CurveCreator_Curve *theCurve);
199
200private:
201
206 void *allocate(const size_t theSize);
207
211 void clear();
212
216 void getCoords(int *thePInt, CurveCreator::Coordinates &theCoords) const;
217
218private:
219
221 void *myPData;
222
223};
224
225#endif
The CurveCreator_Curve object is represented as one or more sets of connected points; thus CurveCreat...
Definition: CurveCreator_Curve.hxx:51
std::deque< SectionToPoint > SectionToPointList
Definition: CurveCreator_ICurve.hxx:76
std::deque< std::pair< SectionToPoint, CurveCreator::Coordinates > > SectionToPointCoordsList
Definition: CurveCreator_ICurve.hxx:78
This is the support class that describes a modification operation that can be applied to CurveCreator...
Definition: CurveCreator_Operation.hxx:41
Type myType
Definition: CurveCreator_Operation.hxx:220
void clear()
This method clears initialized data pointers.
Definition: CurveCreator_Operation.cxx:490
Type
This is a type of CurveCreator_Curve modification operation.
Definition: CurveCreator_Operation.hxx:49
@ SetClosed
Method CurveCreator_Curve::setClosed.
Definition: CurveCreator_Operation.hxx:57
@ RenameSection
Method CurveCreator_Curve::renameSection.
Definition: CurveCreator_Operation.hxx:62
@ Join
Method CurveCreator_Curve::join.
Definition: CurveCreator_Operation.hxx:59
@ AddSection
Method CurveCreator_Curve::addSection.
Definition: CurveCreator_Operation.hxx:60
@ Clear
Method CurveCreator_Curve::clear.
Definition: CurveCreator_Operation.hxx:55
@ SetCoordinates
Method CurveCreator_Curve::setCoordinates.
Definition: CurveCreator_Operation.hxx:56
@ RemovePoints
Method CurveCreator_Curve::removePoints.
Definition: CurveCreator_Operation.hxx:52
@ InsertPoints
Method CurveCreator_Curve::insertPoints.
Definition: CurveCreator_Operation.hxx:53
@ MoveSection
Method CurveCreator_Curve::moveSection.
Definition: CurveCreator_Operation.hxx:58
@ SetType
Method CurveCreator_Curve::setType.
Definition: CurveCreator_Operation.hxx:54
@ RemoveSection
Method CurveCreator_Curve::removeSection.
Definition: CurveCreator_Operation.hxx:61
@ SetColorSection
Method CurveCreator_Curve::setColorSection.
Definition: CurveCreator_Operation.hxx:63
@ AddPoints
Method CurveCreator_Curve::addPoints.
Definition: CurveCreator_Operation.hxx:51
@ Unknown
Unknown method.
Definition: CurveCreator_Operation.hxx:50
void getCoords(int *thePInt, CurveCreator::Coordinates &theCoords) const
This method returns the coordinates read from thePInt.
Definition: CurveCreator_Operation.cxx:505
CurveCreator_Operation()
Empty constructor.
Definition: CurveCreator_Operation.cxx:38
void * myPData
Definition: CurveCreator_Operation.hxx:221
void apply(CurveCreator_Curve *theCurve)
This method applies the current operation to theCurve.
Definition: CurveCreator_Operation.cxx:352
void * allocate(const size_t theSize)
This method allocates required memory for the operation data.
Definition: CurveCreator_Operation.cxx:475
~CurveCreator_Operation()
Destructor.
Definition: CurveCreator_Operation.cxx:48
bool init(const Type theType)
This method initializes the object with an operation without parameters.
Definition: CurveCreator_Operation.cxx:62
std::deque< TypeCoord > Coordinates
List of coordinates in format depends on section dimension: 2D: [x1, y1, x2, y2, x3,...
Definition: CurveCreator.hxx:42