2012-12-31 02:05:17 +00:00
|
|
|
// Copyright (c) 2005-2013 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 __QPDFOBJECT_HH__
|
|
|
|
#define __QPDFOBJECT_HH__
|
|
|
|
|
2009-10-19 20:17:14 +00:00
|
|
|
#include <qpdf/DLL.h>
|
2009-08-06 19:00:25 +00:00
|
|
|
|
2008-04-29 12:55:25 +00:00
|
|
|
#include <string>
|
|
|
|
|
2010-06-06 13:32:08 +00:00
|
|
|
class QPDF;
|
|
|
|
class QPDFObjectHandle;
|
|
|
|
|
2009-10-21 00:27:24 +00:00
|
|
|
class QPDFObject
|
2008-04-29 12:55:25 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~QPDFObject() {}
|
|
|
|
virtual std::string unparse() = 0;
|
2010-06-06 13:32:08 +00:00
|
|
|
|
|
|
|
// Accessor to give specific access to non-public methods
|
|
|
|
class ObjAccessor
|
|
|
|
{
|
|
|
|
friend class QPDF;
|
|
|
|
friend class QPDFObjectHandle;
|
|
|
|
private:
|
|
|
|
static void releaseResolved(QPDFObject* o)
|
|
|
|
{
|
|
|
|
if (o)
|
|
|
|
{
|
|
|
|
o->releaseResolved();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
friend class ObjAccessor;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void releaseResolved() {}
|
2008-04-29 12:55:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __QPDFOBJECT_HH__
|