CPP02 1.0
読み取り中…
検索中…
一致する文字列を見つけられません
Point クラス

#include <Point.hpp>

Point 連携図
Collaboration graph

公開メンバ関数

 Point ()
 Default constructor.
 
 Point (const float x_val, const float y_val)
 Constructor taking two float values.
 
 Point (const Point &other)
 Copy constructor.
 
Pointoperator= (const Point &other)
 Copy assignment operator.
 
 ~Point ()
 Destructor.
 
Fixed getX () const
 Gets the x-coordinate of the point.
 
Fixed getY () const
 Gets the y-coordinate of the point.
 

詳解

Point.hpp28 行目に定義があります。

構築子と解体子

◆ Point() [1/3]

Point::Point ( )

Default constructor.

Initializes the x and y coordinates to 0.0.

Point.cpp30 行目に定義があります。

◆ Point() [2/3]

Point::Point ( const float  x_val,
const float  y_val 
)

Constructor taking two float values.

Initializes the x and y coordinates with the given float values.

引数
x_valThe x-coordinate.
y_valThe y-coordinate.

Point.cpp39 行目に定義があります。

◆ Point() [3/3]

Point::Point ( const Point other)

Copy constructor.

Initializes a new Point object by copying the coordinates from another Point object.

引数
otherThe Point object to copy from.

Point.cpp47 行目に定義があります。

◆ ~Point()

Point::~Point ( )

Destructor.

Point.cpp67 行目に定義があります。

関数詳解

◆ getX()

Fixed Point::getX ( ) const

Gets the x-coordinate of the point.

戻り値
The x-coordinate as a Fixed object.

Point.cpp74 行目に定義があります。

◆ getY()

Fixed Point::getY ( ) const

Gets the y-coordinate of the point.

戻り値
The y-coordinate as a Fixed object.

Point.cpp81 行目に定義があります。

◆ operator=()

Point & Point::operator= ( const Point other)

Copy assignment operator.

Assigns the coordinates of another Point object to the current object. Note that x and y are const, so assignment has no practical effect.

引数
otherThe Point object to assign from.
戻り値
A reference to the current Point object.

Point.cpp57 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: