📄 units.hpp
字号:
#ifndef UNITS_HPP
#define UNITS_HPP
// Unit classes to help make things more complicated. <:
// $Id: units.hpp 2.1 1995/10/24 15:52:51 tsurace Beta $
//
// Pos - position class
class Pos
{
public:
Pos(int x = 0, int y = 0) : _x(x), _y(y) {;};
// Default copy and assign should be just fine
const int X() const { return _x; };
const int Y() const { return _y; };
int & X() { return _x; };
int & Y() { return _y; };
protected:
int _x;
int _y;
};
// Size - size class
class Size
{
public:
Size(int width, int height): _width(width), _height(height) {;};
// Default assign/copy should be fine
virtual ~Size() {;};
int Height() const { return _height; };
int & Height() { return _height; };
int Width() const { return _width; };
int & Width() { return _width; };
private:
int _width;
int _height;
};
#endif // UNITS_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -