📄 list.cpp
字号:
// List.cpp: implementation of the RxList class.////////////////////////////////////////////////////////////////////////#include "stdafx.h"#include "List.h"#ifdef _DEBUG#undef THIS_FILEstatic char THIS_FILE[]=__FILE__;#define new DEBUG_NEW#endif//////////////////////////////////////////////////////////////////////// Construction/Destruction//////////////////////////////////////////////////////////////////////ListItem::ListItem(short x, short y, short z){ this->x = x; this->y = y; this->z = z;}ListItem ListItem::operator =(const ListItem& li){ this->x = li.x; this->y = li.y; this->z = li.z; return *this;}RxList::RxList(){ m_pList = NULL; m_iHead = m_iTail = -1; m_iSize = 0;}RxList::RxList(int iSize){ m_iSize = iSize; m_pList = (ListItem*)::VirtualAlloc(NULL, sizeof(ListItem) * m_iSize, MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE); m_iHead = m_iTail = -1;}RxList::~RxList(){ if (m_pList) { ::VirtualFree(m_pList, sizeof(ListItem) * m_iSize, MEM_DECOMMIT); ::VirtualFree(m_pList, 0, MEM_RELEASE); }}void RxList::ClearAll(){ m_iHead = m_iTail = -1;}void RxList::SetSize(int iSize){ if (m_pList) { ::VirtualFree(m_pList, sizeof(ListItem) * m_iSize, MEM_DECOMMIT); ::VirtualFree(m_pList, 0, MEM_RELEASE); } m_iSize = iSize; m_pList = (ListItem*)::VirtualAlloc(NULL, sizeof(ListItem) * m_iSize, MEM_RESERVE | MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE); m_iHead = m_iTail = -1;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -