diff options
author | Jay Berkenbilt <ejb@ql.org> | 2019-06-22 03:32:47 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-06-22 16:13:27 +0200 |
commit | 79f6b4823b95b65290a045a59fdd4a8d9b302708 (patch) | |
tree | b94d273dd51e64a7144b669cf5ed91d826cc1387 /include/qpdf/FileInputSource.hh | |
parent | 864a546af6e1c17e0de2dc2be6da105f454b6e54 (diff) | |
download | qpdf-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.hh | 21 |
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 |