Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
}
 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 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

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.

Constructor & Destructor Documentation

CurveCreator_Operation::CurveCreator_Operation ( )
CurveCreator_Operation::~CurveCreator_Operation ( )

References clear().

Member Function Documentation

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

Returns myPData for convenience purpose.

References clear(), myPData, and NULL.

void CurveCreator_Operation::clear ( )
private

References myPData, myType, NULL, and Unknown.

void CurveCreator_Operation::getCoords ( int *  thePInt,
CurveCreator::Coordinates theCoords 
) const
private
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.

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.

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.

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.

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.

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.

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.

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.

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.

Member Data Documentation

void* CurveCreator_Operation::myPData
private
Type CurveCreator_Operation::myType
private

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