gist_ustk.cc

来自「Libgist is an implementation of the Gene」· CC 代码 · 共 60 行

CC
60
字号
// gist_ustk.cc// Copyright (c) 1998, Regents of the University of California// $Id: gist_ustk.cc,v 1.4 1998/09/24 05:21:43 marcel Exp $#ifdef __GNUG__#pragma implementation "gist_ustk.h"#endif#include "gist_ustk.h"gist_ustk::~gist_ustk(){}void gist_ustk::push(    const gist_p&	page,    int2 		idx){    assert(_top < max_ustk_sz);    _stack[_top].page = page;    _stack[_top].idx = idx;    _top++;}gist_ustk_entry *gist_ustk::top(    int 		fromTop){    assert(_top - fromTop > 0);    return (&_stack[_top-fromTop-1]);}gist_ustk_entry *gist_ustk::pop(){    assert(_top > 0);    _top--;    return (&_stack[_top]);}boolgist_ustk::is_full(){    return _top >= max_ustk_sz;}boolgist_ustk::is_empty(){    return _top == 0;}boolgist_ustk::is_root(int fromTop){    return fromTop == _top - 1;}

⌨️ 快捷键说明

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