Foxit PDF SDK
CFX_PSVTemplate< BaseType > Class Template Reference

Inherits CFX_Object.

Public Member Functions

 CFX_PSVTemplate ()
 Constructor.
 
 CFX_PSVTemplate (BaseType new_x, BaseType new_y)
 Constructor, with parameters. More...
 
 CFX_PSVTemplate (const CFX_PSVTemplate &other)
 Copy constructor. More...
 
void Add (BaseType x, BaseType y)
 Add a point. More...
 
FXT_PSVoperator*= (BaseType lamda)
 Overload operator *=. More...
 
FXT_PSVoperator+= (const FXT_PSV &obj)
 Overload operator +=. More...
 
FXT_PSVoperator-= (const FXT_PSV &obj)
 Overload operator -=. More...
 
FXT_PSVoperator/= (BaseType lamda)
 Overload operator /=. More...
 
void Reset ()
 Reset to the base point. More...
 
void Set (BaseType x, BaseType y)
 Set values. More...
 
void Set (const FXT_PSV &psv)
 Set values. More...
 
void Subtract (BaseType x, BaseType y)
 Subtract a point. More...
 

Public Attributes

BaseType x
 x coordinate of the point.
 
BaseType y
 y coordinate of the point.
 

Friends

FX_BOOL operator!= (const FXT_PSV &obj1, const FXT_PSV &obj2)
 Overload operator !=. More...
 
FXT_PSV operator* (const FXT_PSV &obj, BaseType lamda)
 Overload operator *. More...
 
FXT_PSV operator* (BaseType lamda, const FXT_PSV &obj)
 Overload operator *. More...
 
FXT_PSV operator+ (const FXT_PSV &obj1, const FXT_PSV &obj2)
 Overload operator +. More...
 
FXT_PSV operator- (const FXT_PSV &obj1, const FXT_PSV &obj2)
 Overload operator -. More...
 
FXT_PSV operator/ (const FXT_PSV &obj, BaseType lamda)
 Overload operator /. More...
 
FX_BOOL operator== (const FXT_PSV &obj1, const FXT_PSV &obj2)
 Overload operator ==. More...
 

Detailed Description

template<class BaseType>
class CFX_PSVTemplate< BaseType >

The class represents a template for a point on the plane.

Constructor & Destructor Documentation

◆ CFX_PSVTemplate() [1/2]

template<class BaseType>
CFX_PSVTemplate< BaseType >::CFX_PSVTemplate ( BaseType  new_x,
BaseType  new_y 
)
inline

Constructor, with parameters.

Parameters
[in]new_xx coordinate of the point.
[in]new_yy coordinate of the point.

◆ CFX_PSVTemplate() [2/2]

template<class BaseType>
CFX_PSVTemplate< BaseType >::CFX_PSVTemplate ( const CFX_PSVTemplate< BaseType > &  other)
inline

Copy constructor.

Parameters
[in]otherAnother object.

Member Function Documentation

◆ Add()

template<class BaseType>
void CFX_PSVTemplate< BaseType >::Add ( BaseType  x,
BaseType  y 
)
inline

Add a point.

Parameters
[in]xx coordinate of the subtrahend point.
[in]yx coordinate of the subtrahend point.
Returns
None.

◆ operator*=()

template<class BaseType>
FXT_PSV& CFX_PSVTemplate< BaseType >::operator*= ( BaseType  lamda)
inline

Overload operator *=.

Parameters
[in]lamdaA value to be multiplied.
Returns
A reference to current object itself.

◆ operator+=()

template<class BaseType>
FXT_PSV& CFX_PSVTemplate< BaseType >::operator+= ( const FXT_PSV obj)
inline

Overload operator +=.

Parameters
[in]objAnother value object.
Returns
A reference to current object itself.

◆ operator-=()

template<class BaseType>
FXT_PSV& CFX_PSVTemplate< BaseType >::operator-= ( const FXT_PSV obj)
inline

Overload operator -=.

Parameters
[in]objAnother value object.
Returns
A reference to current object itself.

◆ operator/=()

template<class BaseType>
FXT_PSV& CFX_PSVTemplate< BaseType >::operator/= ( BaseType  lamda)
inline

Overload operator /=.

Parameters
[in]lamdaA value to be divided.
Returns
A reference to current object itself.

◆ Reset()

template<class BaseType>
void CFX_PSVTemplate< BaseType >::Reset ( )
inline

Reset to the base point.

Returns
None.

◆ Set() [1/2]

template<class BaseType>
void CFX_PSVTemplate< BaseType >::Set ( BaseType  x,
BaseType  y 
)
inline

Set values.

Parameters
[in]xx coordinate of the point.
[in]yx coordinate of the point.
Returns
None.

◆ Set() [2/2]

template<class BaseType>
void CFX_PSVTemplate< BaseType >::Set ( const FXT_PSV psv)
inline

Set values.

Parameters
[in]psvAnother value object.
Returns
None.

◆ Subtract()

template<class BaseType>
void CFX_PSVTemplate< BaseType >::Subtract ( BaseType  x,
BaseType  y 
)
inline

Subtract a point.

Parameters
[in]xx coordinate of the addend point.
[in]yx coordinate of the addend point.
Returns
None.

Friends And Related Function Documentation

◆ operator!=

template<class BaseType>
FX_BOOL operator!= ( const FXT_PSV obj1,
const FXT_PSV obj2 
)
friend

Overload operator !=.

Parameters
[in]obj1First value object.
[in]obj2Second value object.
Returns
true means input value objects are not equal, while false means equal.

◆ operator* [1/2]

template<class BaseType>
FXT_PSV operator* ( const FXT_PSV obj,
BaseType  lamda 
)
friend

Overload operator *.

Parameters
[in]objA value object.
[in]lamdaA value to multiply.
Returns
A value object as result.

◆ operator* [2/2]

template<class BaseType>
FXT_PSV operator* ( BaseType  lamda,
const FXT_PSV obj 
)
friend

Overload operator *.

Parameters
[in]lamdaA value to multiply.
[in]objA value object to multiply.
Returns
A value object as result.

◆ operator+

template<class BaseType>
FXT_PSV operator+ ( const FXT_PSV obj1,
const FXT_PSV obj2 
)
friend

Overload operator +.

Parameters
[in]obj1First value object.
[in]obj2Second value object.
Returns
A value object as result.

◆ operator-

template<class BaseType>
FXT_PSV operator- ( const FXT_PSV obj1,
const FXT_PSV obj2 
)
friend

Overload operator -.

Parameters
[in]obj1First value object.
[in]obj2Second value object.
Returns
A value object as result.

◆ operator/

template<class BaseType>
FXT_PSV operator/ ( const FXT_PSV obj,
BaseType  lamda 
)
friend

Overload operator /.

Parameters
[in]objA value object.
[in]lamdaA value to be divided.
Returns
A value object as result.

◆ operator==

template<class BaseType>
FX_BOOL operator== ( const FXT_PSV obj1,
const FXT_PSV obj2 
)
friend

Overload operator ==.

Parameters
[in]obj1First value object.
[in]obj2Second value object.
Returns
true means input value objects are equal, while false means not equal.