spreadsheetimpl.h

来自「C++高级编程这本书所附的源代码」· C头文件 代码 · 共 36 行

H
36
字号
// SpreadsheetImpl.h#include "SpreadsheetCell.h"class SpreadsheetApplication; // forward declarationclass SpreadsheetImpl{ public:  SpreadsheetImpl(const SpreadsheetApplication& theApp,	      int inWidth = kMaxWidth, int inHeight = kMaxHeight);  SpreadsheetImpl(const SpreadsheetImpl& src);  ~SpreadsheetImpl();  SpreadsheetImpl& operator=(const SpreadsheetImpl& rhs);  void setCellAt(int x, int y, const SpreadsheetCell& cell);  SpreadsheetCell getCellAt(int x, int y);  int getId();  // Initializing here doesn't work in some compilers  static const int kMaxHeight = 100;  static const int kMaxWidth = 100; protected:  bool inRange(int val, int upper);  void copyFrom(const SpreadsheetImpl& src);  int mWidth, mHeight;  int mId;  SpreadsheetCell** mCells;  const SpreadsheetApplication& mTheApp;  static int sCounter;}; 

⌨️ 快捷键说明

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