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

📄 mydrawbplustree.h

📁 B+树的演示程序
💻 H
字号:
#pragma once

#include "MyDrawNode.h"
#include "MyBPlusTree.h"

// MyDrawBPlusTree 命令目标

class MyDrawBPlusTree : public CObject
{
public:
	CDC* m_pDC;
	CRect m_viewRect;
	CRect m_maxRect; 
	MyDrawNode m_drawNode;
	MyBPlusTree* m_tree;
	POINT m_position;		// current leaf position.

	long m_drawKey0;		// draw which node	
	int m_drawLevel;
	long m_firstDrawKey0;
	int m_firstDrawLevel;
	int m_iType;			// the type of draw: 1, search.
	bool m_bDraw;
	void* m_insertPoint;
	bool m_bInsert;
	POINT m_inserPosition;
	int m_iNumber;

public:
	MyDrawBPlusTree();
	virtual ~MyDrawBPlusTree();

	void SetDC(CDC* pDC);
	void SetBPlusTree(MyBPlusTree* tree);
	void Create(CDC* pDC,MyBPlusTree* tree);

	void SetMyRect(RECT viewRect);	// view client rect
	long GetFirstNodeKey0();
    int FindRightNB(int level);
	long GetMaxKey(int i,int level);
	long GetMinKey(int level);
	int GetNumberOfNode(int level);
	
	void Coordinate(POINT& position);
	void DrawTree(long key0,int level,int type,void* insertPoint=NULL,int i=-1);
	POINT DrawSubNode(MyNode* pnode);
	void DrawNode(MyNode* pnode,POINT position,int type);
};


⌨️ 快捷键说明

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