⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 units.hpp

📁 使用BorlandC++4.5编译的一个MUD客户端程序
💻 HPP
字号:
head	2.1;access;symbols;locks; strict;comment	@// @;2.1date	95.10.24.15.52.51;	author tsurace;	state Release;branches;next	1.1;1.1date	95.10.05.17.57.08;	author tsurace;	state Beta;branches;next	;desc@Size/position/dimension classes.@2.1log@Roll.@text@#ifndef UNITS_HPP
#define UNITS_HPP

// Unit classes to help make things more complicated.  <:
// $Id: units.hpp 1.1 1995/10/05 17:57:08 tsurace Beta tsurace $
//

// 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
@1.1log@Initial revision@text@d5 1a5 1// $Id$@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -