summaryrefslogtreecommitdiff
path: root/cpp/poppler-page-private.h
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2010-11-07 16:19:34 +0100
committerPino Toscano <pino@kde.org>2010-11-07 16:19:34 +0100
commit91e3f7b4ea42a5821fd78e1edf55e95250c9bc68 (patch)
tree3fd710ab9734602f6e224dec86792086301d4ebd /cpp/poppler-page-private.h
parentfa7c41cb9c52ecd3d7c574455b1258a3021b8c75 (diff)
[cpp] add an internal way to get a 'page_private' of a 'page'
useful for getting a 'page_private' in the implementation of other cpp classes without the need to add friends to 'page'
Diffstat (limited to 'cpp/poppler-page-private.h')
-rw-r--r--cpp/poppler-page-private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/poppler-page-private.h b/cpp/poppler-page-private.h
index 654478b9..b208cb8e 100644
--- a/cpp/poppler-page-private.h
+++ b/cpp/poppler-page-private.h
@@ -19,6 +19,8 @@
#ifndef POPPLER_PAGE_PRIVATE_H
#define POPPLER_PAGE_PRIVATE_H
+#include "poppler-page.h"
+
class Page;
namespace poppler
@@ -37,6 +39,9 @@ public:
Page *page;
int index;
page_transition *transition;
+
+ static inline page_private* get(const poppler::page *p)
+ { return const_cast<poppler::page *>(p)->d; }
};
}