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

📄 dict.h

📁 这是一个做pdf阅读器的源代码文件,是大家学习阅读器资料的很好参考
💻 H
字号:
//========================================================================//// Dict.h//// Copyright 1996-2003 Glyph & Cog, LLC////========================================================================#ifndef DICT_H#define DICT_H#include <aconf.h>#ifdef USE_GCC_PRAGMAS#pragma interface#endif#include "Object.h"//------------------------------------------------------------------------// Dict//------------------------------------------------------------------------struct DictEntry {  char *key;  Object val;};class Dict {public:  // Constructor.  Dict(XRef *xrefA);  // Destructor.  ~Dict();  // Reference counting.  int incRef() { return ++ref; }  int decRef() { return --ref; }  // Get number of entries.  int getLength() { return length; }  // Add an entry.  NB: does not copy key.  void add(char *key, Object *val);  // Check if dictionary is of specified type.  GBool is(char *type);  // Look up an entry and return the value.  Returns a null object  // if <key> is not in the dictionary.  Object *lookup(char *key, Object *obj);  Object *lookupNF(char *key, Object *obj);  // Iterative accessors.  char *getKey(int i);  Object *getVal(int i, Object *obj);  Object *getValNF(int i, Object *obj);  // Set the xref pointer.  This is only used in one special case: the  // trailer dictionary, which is read before the xref table is  // parsed.  void setXRef(XRef *xrefA) { xref = xrefA; }private:  XRef *xref;			// the xref table for this PDF file  DictEntry *entries;		// array of entries  int size;			// size of <entries> array  int length;			// number of entries in dictionary  int ref;			// reference count  DictEntry *find(char *key);};#endif

⌨️ 快捷键说明

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