📄 frame_step02.txt
字号:
//*****************************************************
// Step 2
// Desc: 1) 组织Node类的各种子类的私有数据
//
//
//*****************************************************
#ifndef PICTURESH
#define PICTURESH
#include <iostream.h>
class Node;
//------------------------------------------------------
class Picture
{
public:
Picture(char ** array,int wd, int ht);
~Picture();
Picture(const Picture& rhs);
Picture& operator=(const Picture& rhs);
public:
void Display() const;
int Width() const;
int Height() const;
private:
Node * pt;
};
//-------------------------------------------------------
class Node
{
public:
Node();
virtual ~Node() {}
virtual void Display() const=0;
virtual int Width() const=0;
virtual int Height() const=0;
};
//------------------------------------------------------
class DataPic:public Node
{
private:
int w;
int h;
char * data;
};
//------------------------------------------------------
class FramePic:public Node
{
private:
Picture kernel;
};
//------------------------------------------------------
class HCatPic:public Node
{
private:
Picture left;
Picture right;
};
//------------------------------------------------------
class VCatPic:public Node
{
private:
Picture top;
Picture bottom;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -