summaryrefslogtreecommitdiffstats
path: root/include/qpdf/FileInputSource.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-06-22 03:32:47 +0200
committerJay Berkenbilt <ejb@ql.org>2019-06-22 16:13:27 +0200
commit79f6b4823b95b65290a045a59fdd4a8d9b302708 (patch)
treeb94d273dd51e64a7144b669cf5ed91d826cc1387 /include/qpdf/FileInputSource.hh
parent864a546af6e1c17e0de2dc2be6da105f454b6e54 (diff)
downloadqpdf-79f6b4823b95b65290a045a59fdd4a8d9b302708.tar.zst
Convert remaining public classes to use Members pattern
Have classes contain only a single private member of type PointerHolder<Members>. This makes it safe to change the structure of the Members class without breaking binary compatibility. Many of the classes already follow this pattern quite successfully. This brings in the rest of the class that are part of the public API.
Diffstat (limited to 'include/qpdf/FileInputSource.hh')
-rw-r--r--include/qpdf/FileInputSource.hh21
1 files changed, 17 insertions, 4 deletions
diff --git a/include/qpdf/FileInputSource.hh b/include/qpdf/FileInputSource.hh
index 0845f241..1bf2a2de 100644
--- a/include/qpdf/FileInputSource.hh
+++ b/include/qpdf/FileInputSource.hh
@@ -54,11 +54,24 @@ class FileInputSource: public InputSource
FileInputSource(FileInputSource const&);
FileInputSource& operator=(FileInputSource const&);
- void destroy();
+ class Members
+ {
+ friend class FileInputSource;
- bool close_file;
- std::string filename;
- FILE* file;
+ public:
+ QPDF_DLL
+ ~Members();
+
+ private:
+ Members(bool close_file);
+ Members(Members const&);
+
+ bool close_file;
+ std::string filename;
+ FILE* file;
+ };
+
+ PointerHolder<Members> m;
};
#endif // QPDF_FILEINPUTSOURCE_HH