filters
Catalog.h00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef CATALOG_H
00010 #define CATALOG_H
00011
00012 #include <aconf.h>
00013
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017
00018 class XRef;
00019 class Object;
00020 class Page;
00021 class PageAttrs;
00022 struct Ref;
00023 class LinkDest;
00024
00025
00026
00027
00028
00029 class Catalog {
00030 public:
00031
00032
00033 Catalog(XRef *xrefA);
00034
00035
00036 ~Catalog();
00037
00038
00039 GBool isOk() { return ok; }
00040
00041
00042 int getNumPages() { return numPages; }
00043
00044
00045 Page *getPage(int i) { return pages[i-1]; }
00046
00047
00048 Ref *getPageRef(int i) { return &pageRefs[i-1]; }
00049
00050
00051 GString *getBaseURI() { return baseURI; }
00052
00053
00054
00055 GString *readMetadata();
00056
00057
00058 Object *getStructTreeRoot() { return &structTreeRoot; }
00059
00060
00061
00062 int findPage(int num, int gen);
00063
00064
00065
00066 LinkDest *findDest(GString *name);
00067
00068 Object *getOutline() { return &outline; }
00069
00070 private:
00071
00072 XRef *xref;
00073 Page **pages;
00074 Ref *pageRefs;
00075 int numPages;
00076 int pagesSize;
00077 Object dests;
00078 Object nameTree;
00079 GString *baseURI;
00080 Object metadata;
00081 Object structTreeRoot;
00082 Object outline;
00083 GBool ok;
00084
00085 int readPageTree(Dict *pages, PageAttrs *attrs, int start, int callDepth);
00086 Object *findDestInTree(Object *tree, GString *name, Object *obj);
00087 };
00088
00089 #endif
|