Foxit PDF SDK

Public Member Functions | Public Attributes | Friends | List of all members
CFX_PSVTemplate< BaseType > Class Template Reference
FXCRT

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_PSV & | operator*= (BaseType lamda)
| Overload operator *=. More...
FXT_PSV & | operator+= (const FXT_PSV &obj)
| Overload operator +=. More...
FXT_PSV & | operator-= (const FXT_PSV &obj)
| Overload operator -=. More...
FXT_PSV & | operator/= (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* (BaseType lamda, const FXT_PSV &obj)
| Overload operator *. More...
FXT_PSV | operator* (const FXT_PSV &obj, BaseType lamda)
| 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_x | x coordinate of the point.
  [in] | new_y | y 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] | other | Another object.

## Member Function Documentation

## ◆ Add()

template<class BaseType>

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

Add a point.

Parameters

  [in] | x | x coordinate of the subtrahend point.
  [in] | y | x coordinate of the subtrahend point.

Returns
  None.

## ◆ operator*=()

template<class BaseType>

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

Overload operator *=.

Parameters

  [in] | lamda | A 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] | obj | Another 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] | obj | Another 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] | lamda | A 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] | x | x coordinate of the point.
  [in] | y | x 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] | psv | Another value object.

Returns
  None.

## ◆ Subtract()

template<class BaseType>

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

Subtract a point.

Parameters

  [in] | x | x coordinate of the addend point.
  [in] | y | x 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] | obj1 | First value object.
  [in] | obj2 | Second value object.

Returns
  true means input value objects are not equal, while false means equal.

## ◆ operator* [1/2]

template<class BaseType>

FXT_PSV operator* | ( | BaseType | lamda,
|  | const FXT_PSV & | obj
| ) |  |
| friend

Overload operator *.

Parameters

  [in] | lamda | A value to multiply.
  [in] | obj | A value object to multiply.

Returns
  A value object as result.

## ◆ operator* [2/2]

template<class BaseType>

FXT_PSV operator* | ( | const FXT_PSV & | obj,
|  | BaseType | lamda
| ) |  |
| friend

Overload operator *.

Parameters

  [in] | obj | A value object.
  [in] | lamda | A value 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] | obj1 | First value object.
  [in] | obj2 | Second 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] | obj1 | First value object.
  [in] | obj2 | Second 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] | obj | A value object.
  [in] | lamda | A 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] | obj1 | First value object.
  [in] | obj2 | Second value object.

Returns
  true means input value objects are equal, while false means not equal.