btnode.h
来自「有计算机图形学、图像处理、dbms、sniffer、中游俄罗斯外挂、othell」· C头文件 代码 · 共 60 行
H
60 行
// BTNODE.h: interface for the BTNODE class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_BTNODE_H__BD234231_727E_49B8_9819_658CFF47AFFE__INCLUDED_)
#define AFX_BTNODE_H__BD234231_727E_49B8_9819_658CFF47AFFE__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "KEY.h"
#include "DEF.h"
#define RIGHT 0
#define LEFT 1
class BTNODE
{
public:
BYTE tag;//tag=0非终端
BYTE rtag:4,wtag:4;
PDB DB_THIS;
unsigned short keynum;
PDB parent;
KEY *key;//KEY key[M+1];//0号单元要用,多一个单元防止溢出
union _pointer
{
PDB *ptr;
//BTNODE **ptr;//BTNODE *ptr[M+2];//0号单元要用,多一个单元防止溢出
struct _address1
{
PDB *recptr;
//int *recptr;//int recptr[M+1];//1.临时认为是int型 ; 2.0号单元要用,多一个单元防止溢出
PDB left;
PDB right;
}address1;
}pointer;
public:
WORD KeyLength;
BTNODE();
BTNODE(BOOL t,unsigned short m,BYTE KeyType,WORD KeyLength);
BTNODE(PDB db_addr,BYTE *buf,unsigned short m,BYTE KeyType,WORD KeyLength);
BTNODE *ReadChild(const CFile &f, unsigned int pos,unsigned short m);
BTNODE *ReadBrother(const CFile &f,BOOL type,unsigned short m);//读出的brother的parent=NULL
BOOL WriteDisk();
virtual ~BTNODE();
};
#endif // !defined(AFX_BTNODE_H__BD234231_727E_49B8_9819_658CFF47AFFE__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?