2009-02-15 16:31:12 +00:00
|
|
|
// Copyright (c) 2005-2009 Jay Berkenbilt
|
2008-04-29 12:55:25 +00:00
|
|
|
//
|
|
|
|
// This file is part of qpdf. This software may be distributed under
|
|
|
|
// the terms of version 2 of the Artistic License which may be found
|
|
|
|
// in the source distribution. It is provided "as is" without express
|
|
|
|
// or implied warranty.
|
|
|
|
|
|
|
|
#ifndef __QPDFXREFENTRY_HH__
|
|
|
|
#define __QPDFXREFENTRY_HH__
|
|
|
|
|
2009-10-19 20:17:14 +00:00
|
|
|
#include <qpdf/DLL.h>
|
2009-08-06 19:00:25 +00:00
|
|
|
|
2009-10-21 00:27:24 +00:00
|
|
|
class QPDFXRefEntry
|
2008-04-29 12:55:25 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Type constants are from the PDF spec section
|
|
|
|
// "Cross-Reference Streams":
|
|
|
|
// 0 = free entry; not used
|
|
|
|
// 1 = "uncompressed"; field 1 = offset
|
|
|
|
// 2 = "compressed"; field 1 = object stream number, field 2 = index
|
|
|
|
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
QPDFXRefEntry();
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
QPDFXRefEntry(int type, int field1, int field2);
|
|
|
|
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
int getType() const;
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
int getOffset() const; // only for type 1
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
int getObjStreamNumber() const; // only for type 2
|
2009-10-21 00:27:24 +00:00
|
|
|
DLL_EXPORT
|
2008-04-29 12:55:25 +00:00
|
|
|
int getObjStreamIndex() const; // only for type 2
|
|
|
|
|
|
|
|
private:
|
|
|
|
int type;
|
|
|
|
int field1;
|
|
|
|
int field2;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __QPDFXREFENTRY_HH__
|