?? acell.cpp
字號:
// 結構設計
// 數據單元的結構基類
/*
#ifndef _CELL_STRUCT
#define _CELL_STRUCT
#include "afxtempl.h"
class CCellBase
{
public:
CCellBase ()
{
m_CellType = 1;
m_No = 0;
}
//
bool InValid(){return true;}
long m_CellType; // 單元類型 1 : 長度 2 :點
long m_No; //序號
};
typedef CCellBase* LPCCellBase;
typedef CArray<CCellBase*, CCellBase*> CCellBaseArray;
typedef CCellBaseArray* LPCCellBaseArray;
//長度數據單元的結構
class CLength : public CCellBase
{
public:
CLength()
{
m_Length = 0;
}
double m_Length; // 長度
};
// 數據容器
class CCellArray
{
public:
CCellArray();
bool Add(LPCCellBase pCellBase);
bool Remove(LPCCellBase pCellBase);
private:
CCellBaseArray m_CellArray;
};
bool CCellArray::Add(LPCCellBase pCellBase)
{
if(pCellBase == NULL||!pCellBase->InValid())
return false;
else
m_CellArray.Add(pCellBase);
return true;
}
bool CCellArray::Remove (LPCCellBase pCellBase)
{
if(pCellBase == NULL)
return false;
else
{
int n=m_CellArray.GetSize();
bool Is_Exsit=false;
for(int i=0;i<n;i++)
{
if(m_CellArray[i]==pCellBase)
{
Is_Exsit=true;
m_CellArray.RemoveAt(i);
return true;
}
}
if(!Is_Exsit)
{
return false;
}
}
}
typedef CCellArray* LPCCellArray;
class SysApplication
{
public:
SysApplication();
LPCCellArray GetCellArray();
private:
CCellArray m_DataArray;
};
LPCCellArray SysApplication::GetCellArray()
{
return &m_DataArray;
}
#endif
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -