Version: 9.12.0
CurveCreator_Operation Class Reference

This is the support class that describes a modification operation that can be applied to CurveCreator_Curve.

#include <CurveCreator_Operation.hxx>

Public Types

enum  Type {
  Unknown = 0 , AddPoints , RemovePoints , InsertPoints ,
  SetType , Clear , SetCoordinates , SetClosed ,
  MoveSection , Join , AddSection , RemoveSection ,
  RenameSection , SetColorSection
}
 This is a type of CurveCreator_Curve modification operation. More...
 

Public Member Functions

 CurveCreator_Operation ()
 Empty constructor. More...
 
 ~CurveCreator_Operation ()
 Destructor. More...
 
bool init (const Type theType)
 This method initializes the object with an operation without parameters. More...
 
bool init (const Type theType, const int theIntParam)
 This method initializes the object with an operation with one integer parameter. More...
 
bool init (const Type theType, const int theIntParam1, const int theIntParam2)
 This method initializes the object with an operation with two integer parameters. More...
 
bool init (const Type theType, const int theIntParam1, const int theIntParam2[3])
 This method initializes the object with an operation with 4 integer parameter (1 as first param + 3 as interger array) More...
 
bool init (const Type theType, const std::list< int > theParamList)
 This method initializes the object with an operation with two integer parameters. More...
 
bool init (const Type theType, const CurveCreator_ICurve::SectionToPointList &theParamList1)
 This method initializes the object with an operation with list of pairs of integer parameters. More...
 
bool init (const Type theType, const CurveCreator::Coordinates &theCoords, const int theIntParam)
 This method initializes the object with an operation with one CurveCreator::Coordinates parameter and one integer parameter. More...
 
bool init (const Type theType, const CurveCreator_ICurve::SectionToPointCoordsList &theParamList1)
 This method initializes the object with an operation with list of pairs of integer parameters and CurveCreator::Coordinates parameters. More...
 
bool init (const CurveCreator_Operation::Type theType, const std::string &theName, const CurveCreator::Coordinates &theCoords, const int theIntParam1, const int theIntParam2)
 This method initializes the object with an operation with one string, one CurveCreator::Coordinates parameter and two integer parameters. More...
 
bool init (const CurveCreator_Operation::Type theType, const std::string &theName, const int theIntParam1)
 This method initializes the object with an operation with one string parameter and one integer. More...
 
void apply (CurveCreator_Curve *theCurve)
 This method applies the current operation to theCurve. More...
 

Private Member Functions

void * allocate (const size_t theSize)
 This method allocates required memory for the operation data. More...
 
void clear ()
 This method clears initialized data pointers. More...
 
void getCoords (int *thePInt, CurveCreator::Coordinates &theCoords) const
 This method returns the coordinates read from thePInt. More...
 

Private Attributes

Type myType
 
void * myPData
 

Member Enumeration Documentation

◆ Type

Enumerator
Unknown 

Unknown method.

AddPoints 

Method CurveCreator_Curve::addPoints.

RemovePoints 

Method CurveCreator_Curve::removePoints.

InsertPoints 

Method CurveCreator_Curve::insertPoints.

SetType 

Method CurveCreator_Curve::setType.

Clear 

Method CurveCreator_Curve::clear.

SetCoordinates 

Method CurveCreator_Curve::setCoordinates.

SetClosed 

Method CurveCreator_Curve::setClosed.

MoveSection 

Method CurveCreator_Curve::moveSection.

Join 

Method CurveCreator_Curve::join.

AddSection 

Method CurveCreator_Curve::addSection.

RemoveSection 

Method CurveCreator_Curve::removeSection.

RenameSection 

Method CurveCreator_Curve::renameSection.

SetColorSection 

Method CurveCreator_Curve::setColorSection.

Constructor & Destructor Documentation

◆ CurveCreator_Operation()

CurveCreator_Operation::CurveCreator_Operation ( )

◆ ~CurveCreator_Operation()

CurveCreator_Operation::~CurveCreator_Operation ( )

References clear().

Member Function Documentation

◆ allocate()

void * CurveCreator_Operation::allocate ( const size_t  theSize)
private

Returns myPData for convenience purpose.

References clear(), and myPData.

◆ apply()

◆ clear()

void CurveCreator_Operation::clear ( )
private

References myPData, myType, and Unknown.

◆ getCoords()

void CurveCreator_Operation::getCoords ( int *  thePInt,
CurveCreator::Coordinates theCoords 
) const
private

◆ init() [1/10]

bool CurveCreator_Operation::init ( const CurveCreator_Operation::Type  theType,
const std::string &  theName,
const CurveCreator::Coordinates theCoords,
const int  theIntParam1,
const int  theIntParam2 
)

It is applicable to the following operations:

  • AddSection
  • InsertPoints
  • SetCoordinates
Returns
true in case of success; false otherwise.

References AddSection, allocate(), and myType.

◆ init() [2/10]

bool CurveCreator_Operation::init ( const CurveCreator_Operation::Type  theType,
const std::string &  theName,
const int  theIntParam1 
)

It is applicable to the following operations:

  • RenameSection
Returns
true in case of success; false otherwise.

References allocate(), myType, and RenameSection.

◆ init() [3/10]

bool CurveCreator_Operation::init ( const Type  theType)

It is applicable to the following operations:

  • Clear
Returns
true in case of success; false otherwise.

References Clear, clear(), and myType.

◆ init() [4/10]

bool CurveCreator_Operation::init ( const Type  theType,
const CurveCreator::Coordinates theCoords,
const int  theIntParam 
)

It is applicable to the following operations:

  • AddPoints
Returns
true in case of success; false otherwise.

References AddPoints, allocate(), and myType.

◆ init() [5/10]

bool CurveCreator_Operation::init ( const Type  theType,
const CurveCreator_ICurve::SectionToPointCoordsList theParamList1 
)

It is applicable to the following operations:

  • InsertPoints
Returns
true in case of success; false otherwise.

References allocate(), InsertPoints, myType, and SetCoordinates.

◆ init() [6/10]

bool CurveCreator_Operation::init ( const Type  theType,
const CurveCreator_ICurve::SectionToPointList theParamList1 
)

It is applicable to the following operations:

  • RemovePoints
Returns
true in case of success; false otherwise.

References allocate(), myType, and RemovePoints.

◆ init() [7/10]

bool CurveCreator_Operation::init ( const Type  theType,
const int  theIntParam 
)

It is applicable to the following operations:

  • RemoveSection
Returns
true in case of success; false otherwise.

References allocate(), myType, and RemoveSection.

◆ init() [8/10]

bool CurveCreator_Operation::init ( const Type  theType,
const int  theIntParam1,
const int  theIntParam2 
)

It is applicable to the following operations:

  • SetType
  • SetClosed
  • MoveSection
  • Join (with 2 int arguments)
Returns
true in case of success; false otherwise.

References allocate(), Join, MoveSection, myType, SetClosed, and SetType.

◆ init() [9/10]

bool CurveCreator_Operation::init ( const Type  theType,
const int  theIntParam1,
const int  theIntParam2[3] 
)

References allocate(), myType, and SetColorSection.

◆ init() [10/10]

bool CurveCreator_Operation::init ( const Type  theType,
const std::list< int >  theParamList 
)

It is applicable to the following operations:

  • Join (with a list of int arguments)
Returns
true in case of success; false otherwise.

References allocate(), Join, and myType.

Member Data Documentation

◆ myPData

void* CurveCreator_Operation::myPData
private

◆ myType

Type CurveCreator_Operation::myType
private

The documentation for this class was generated from the following files: