aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-01-26 23:18:03 +0100
committerJay Berkenbilt <ejb@ql.org>2022-01-30 19:11:03 +0100
commitc62ab2ee9f153aa623ed5ffab764f453941da4c7 (patch)
treea3ccc60592fcd7e4a723d9c4306d626562ce0179 /include
parent03f3369f35b2303166e8d36547c8a0aba6626c1b (diff)
downloadqpdf-c62ab2ee9f153aa623ed5ffab764f453941da4c7.tar.zst
QPDFJob: use pointers instead of references for Config
Why? The main methods that create them return smart pointers so that users can initialize them when needed, which you can't do with references. Returning pointers instead of references makes for a more uniform interface.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFJob.hh48
-rw-r--r--include/qpdf/auto_job_c_att.hh14
-rw-r--r--include/qpdf/auto_job_c_copy_att.hh4
-rw-r--r--include/qpdf/auto_job_c_enc.hh26
-rw-r--r--include/qpdf/auto_job_c_main.hh146
-rw-r--r--include/qpdf/auto_job_c_uo.hh8
6 files changed, 123 insertions, 123 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh
index 99199b89..4a1f205e 100644
--- a/include/qpdf/QPDFJob.hh
+++ b/include/qpdf/QPDFJob.hh
@@ -154,17 +154,17 @@ class QPDFJob
friend class Config;
public:
QPDF_DLL
- Config& endAddAttachment();
+ Config* endAddAttachment();
QPDF_DLL
- AttConfig& path(char const* parameter);
+ AttConfig* path(char const* parameter);
# include <qpdf/auto_job_c_att.hh>
private:
- AttConfig(Config&);
+ AttConfig(Config*);
AttConfig(AttConfig const&) = delete;
- Config& config;
+ Config* config;
AddAttachment att;
};
@@ -174,17 +174,17 @@ class QPDFJob
friend class Config;
public:
QPDF_DLL
- Config& endCopyAttachmentsFrom();
+ Config* endCopyAttachmentsFrom();
QPDF_DLL
- CopyAttConfig& path(char const* parameter);
+ CopyAttConfig* path(char const* parameter);
# include <qpdf/auto_job_c_copy_att.hh>
private:
- CopyAttConfig(Config&);
+ CopyAttConfig(Config*);
CopyAttConfig(CopyAttConfig const&) = delete;
- Config& config;
+ Config* config;
CopyAttachmentFrom caf;
};
@@ -194,19 +194,19 @@ class QPDFJob
friend class Config;
public:
QPDF_DLL
- Config& endPages();
+ Config* endPages();
QPDF_DLL
- PagesConfig& pageSpec(std::string const& filename,
+ PagesConfig* pageSpec(std::string const& filename,
std::string const& range,
char const* password = nullptr);
# include <qpdf/auto_job_c_pages.hh>
private:
- PagesConfig(Config&);
+ PagesConfig(Config*);
PagesConfig(PagesConfig const&) = delete;
- Config& config;
+ Config* config;
};
class UOConfig
@@ -215,17 +215,17 @@ class QPDFJob
friend class Config;
public:
QPDF_DLL
- Config& endUnderlayOverlay();
+ Config* endUnderlayOverlay();
QPDF_DLL
- UOConfig& path(char const* parameter);
+ UOConfig* path(char const* parameter);
# include <qpdf/auto_job_c_uo.hh>
private:
- UOConfig(Config&);
+ UOConfig(Config*);
UOConfig(PagesConfig const&) = delete;
- Config& config;
+ Config* config;
};
class EncConfig
@@ -234,17 +234,17 @@ class QPDFJob
friend class Config;
public:
QPDF_DLL
- Config& endEncrypt();
+ Config* endEncrypt();
QPDF_DLL
- EncConfig& path(char const* parameter);
+ EncConfig* path(char const* parameter);
# include <qpdf/auto_job_c_enc.hh>
private:
- EncConfig(Config&);
+ EncConfig(Config*);
EncConfig(PagesConfig const&) = delete;
- Config& config;
+ Config* config;
};
// Configuration is performed by calling methods XXX QXXXQ document
@@ -253,13 +253,13 @@ class QPDFJob
friend class QPDFJob;
public:
QPDF_DLL
- Config& inputFile(char const* filename);
+ Config* inputFile(char const* filename);
QPDF_DLL
- Config& emptyInput();
+ Config* emptyInput();
QPDF_DLL
- Config& outputFile(char const* filename);
+ Config* outputFile(char const* filename);
QPDF_DLL
- Config& replaceInput();
+ Config* replaceInput();
QPDF_DLL
std::shared_ptr<CopyAttConfig> copyAttachmentsFrom();
diff --git a/include/qpdf/auto_job_c_att.hh b/include/qpdf/auto_job_c_att.hh
index 156964a8..a65d8908 100644
--- a/include/qpdf/auto_job_c_att.hh
+++ b/include/qpdf/auto_job_c_att.hh
@@ -3,10 +3,10 @@
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//
-QPDF_DLL AttConfig& replace();
-QPDF_DLL AttConfig& key(char const* parameter);
-QPDF_DLL AttConfig& filename(char const* parameter);
-QPDF_DLL AttConfig& creationdate(char const* parameter);
-QPDF_DLL AttConfig& moddate(char const* parameter);
-QPDF_DLL AttConfig& mimetype(char const* parameter);
-QPDF_DLL AttConfig& description(char const* parameter);
+QPDF_DLL AttConfig* replace();
+QPDF_DLL AttConfig* key(char const* parameter);
+QPDF_DLL AttConfig* filename(char const* parameter);
+QPDF_DLL AttConfig* creationdate(char const* parameter);
+QPDF_DLL AttConfig* moddate(char const* parameter);
+QPDF_DLL AttConfig* mimetype(char const* parameter);
+QPDF_DLL AttConfig* description(char const* parameter);
diff --git a/include/qpdf/auto_job_c_copy_att.hh b/include/qpdf/auto_job_c_copy_att.hh
index bae11e9d..8049dc6d 100644
--- a/include/qpdf/auto_job_c_copy_att.hh
+++ b/include/qpdf/auto_job_c_copy_att.hh
@@ -3,5 +3,5 @@
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//
-QPDF_DLL CopyAttConfig& prefix(char const* parameter);
-QPDF_DLL CopyAttConfig& password(char const* parameter);
+QPDF_DLL CopyAttConfig* prefix(char const* parameter);
+QPDF_DLL CopyAttConfig* password(char const* parameter);
diff --git a/include/qpdf/auto_job_c_enc.hh b/include/qpdf/auto_job_c_enc.hh
index 8c84fc81..c5b10c6b 100644
--- a/include/qpdf/auto_job_c_enc.hh
+++ b/include/qpdf/auto_job_c_enc.hh
@@ -3,16 +3,16 @@
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//
-QPDF_DLL EncConfig& extract(char const* parameter);
-QPDF_DLL EncConfig& annotate(char const* parameter);
-QPDF_DLL EncConfig& print(char const* parameter);
-QPDF_DLL EncConfig& modify(char const* parameter);
-QPDF_DLL EncConfig& cleartextMetadata();
-QPDF_DLL EncConfig& forceV4();
-QPDF_DLL EncConfig& accessibility(char const* parameter);
-QPDF_DLL EncConfig& assemble(char const* parameter);
-QPDF_DLL EncConfig& form(char const* parameter);
-QPDF_DLL EncConfig& modifyOther(char const* parameter);
-QPDF_DLL EncConfig& useAes(char const* parameter);
-QPDF_DLL EncConfig& forceR5();
-QPDF_DLL EncConfig& allowInsecure();
+QPDF_DLL EncConfig* extract(char const* parameter);
+QPDF_DLL EncConfig* annotate(char const* parameter);
+QPDF_DLL EncConfig* print(char const* parameter);
+QPDF_DLL EncConfig* modify(char const* parameter);
+QPDF_DLL EncConfig* cleartextMetadata();
+QPDF_DLL EncConfig* forceV4();
+QPDF_DLL EncConfig* accessibility(char const* parameter);
+QPDF_DLL EncConfig* assemble(char const* parameter);
+QPDF_DLL EncConfig* form(char const* parameter);
+QPDF_DLL EncConfig* modifyOther(char const* parameter);
+QPDF_DLL EncConfig* useAes(char const* parameter);
+QPDF_DLL EncConfig* forceR5();
+QPDF_DLL EncConfig* allowInsecure();
diff --git a/include/qpdf/auto_job_c_main.hh b/include/qpdf/auto_job_c_main.hh
index 3e6bdf69..3ebc8c7e 100644
--- a/include/qpdf/auto_job_c_main.hh
+++ b/include/qpdf/auto_job_c_main.hh
@@ -3,76 +3,76 @@
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//
-QPDF_DLL Config& allowWeakCrypto();
-QPDF_DLL Config& check();
-QPDF_DLL Config& checkLinearization();
-QPDF_DLL Config& coalesceContents();
-QPDF_DLL Config& decrypt();
-QPDF_DLL Config& deterministicId();
-QPDF_DLL Config& externalizeInlineImages();
-QPDF_DLL Config& filteredStreamData();
-QPDF_DLL Config& flattenRotation();
-QPDF_DLL Config& generateAppearances();
-QPDF_DLL Config& ignoreXrefStreams();
-QPDF_DLL Config& isEncrypted();
-QPDF_DLL Config& json();
-QPDF_DLL Config& keepInlineImages();
-QPDF_DLL Config& linearize();
-QPDF_DLL Config& listAttachments();
-QPDF_DLL Config& newlineBeforeEndstream();
-QPDF_DLL Config& noOriginalObjectIds();
-QPDF_DLL Config& noWarn();
-QPDF_DLL Config& optimizeImages();
-QPDF_DLL Config& passwordIsHexKey();
-QPDF_DLL Config& preserveUnreferenced();
-QPDF_DLL Config& preserveUnreferencedResources();
-QPDF_DLL Config& progress();
-QPDF_DLL Config& qdf();
-QPDF_DLL Config& rawStreamData();
-QPDF_DLL Config& recompressFlate();
-QPDF_DLL Config& removePageLabels();
-QPDF_DLL Config& requiresPassword();
-QPDF_DLL Config& showEncryption();
-QPDF_DLL Config& showEncryptionKey();
-QPDF_DLL Config& showLinearization();
-QPDF_DLL Config& showNpages();
-QPDF_DLL Config& showPages();
-QPDF_DLL Config& showXref();
-QPDF_DLL Config& staticAesIv();
-QPDF_DLL Config& staticId();
-QPDF_DLL Config& suppressPasswordRecovery();
-QPDF_DLL Config& suppressRecovery();
-QPDF_DLL Config& verbose();
-QPDF_DLL Config& warningExit0();
-QPDF_DLL Config& withImages();
-QPDF_DLL Config& collate(char const* parameter);
-QPDF_DLL Config& splitPages(char const* parameter);
-QPDF_DLL Config& compressionLevel(char const* parameter);
-QPDF_DLL Config& copyEncryption(char const* parameter);
-QPDF_DLL Config& encryptionFilePassword(char const* parameter);
-QPDF_DLL Config& forceVersion(char const* parameter);
-QPDF_DLL Config& iiMinBytes(char const* parameter);
-QPDF_DLL Config& jobJsonFile(char const* parameter);
-QPDF_DLL Config& jsonObject(char const* parameter);
-QPDF_DLL Config& keepFilesOpenThreshold(char const* parameter);
-QPDF_DLL Config& linearizePass1(char const* parameter);
-QPDF_DLL Config& minVersion(char const* parameter);
-QPDF_DLL Config& oiMinArea(char const* parameter);
-QPDF_DLL Config& oiMinHeight(char const* parameter);
-QPDF_DLL Config& oiMinWidth(char const* parameter);
-QPDF_DLL Config& password(char const* parameter);
-QPDF_DLL Config& passwordFile(char const* parameter);
-QPDF_DLL Config& removeAttachment(char const* parameter);
-QPDF_DLL Config& rotate(char const* parameter);
-QPDF_DLL Config& showAttachment(char const* parameter);
-QPDF_DLL Config& showObject(char const* parameter);
-QPDF_DLL Config& compressStreams(char const* parameter);
-QPDF_DLL Config& decodeLevel(char const* parameter);
-QPDF_DLL Config& flattenAnnotations(char const* parameter);
-QPDF_DLL Config& jsonKey(char const* parameter);
-QPDF_DLL Config& keepFilesOpen(char const* parameter);
-QPDF_DLL Config& normalizeContent(char const* parameter);
-QPDF_DLL Config& objectStreams(char const* parameter);
-QPDF_DLL Config& passwordMode(char const* parameter);
-QPDF_DLL Config& removeUnreferencedResources(char const* parameter);
-QPDF_DLL Config& streamData(char const* parameter);
+QPDF_DLL Config* allowWeakCrypto();
+QPDF_DLL Config* check();
+QPDF_DLL Config* checkLinearization();
+QPDF_DLL Config* coalesceContents();
+QPDF_DLL Config* decrypt();
+QPDF_DLL Config* deterministicId();
+QPDF_DLL Config* externalizeInlineImages();
+QPDF_DLL Config* filteredStreamData();
+QPDF_DLL Config* flattenRotation();
+QPDF_DLL Config* generateAppearances();
+QPDF_DLL Config* ignoreXrefStreams();
+QPDF_DLL Config* isEncrypted();
+QPDF_DLL Config* json();
+QPDF_DLL Config* keepInlineImages();
+QPDF_DLL Config* linearize();
+QPDF_DLL Config* listAttachments();
+QPDF_DLL Config* newlineBeforeEndstream();
+QPDF_DLL Config* noOriginalObjectIds();
+QPDF_DLL Config* noWarn();
+QPDF_DLL Config* optimizeImages();
+QPDF_DLL Config* passwordIsHexKey();
+QPDF_DLL Config* preserveUnreferenced();
+QPDF_DLL Config* preserveUnreferencedResources();
+QPDF_DLL Config* progress();
+QPDF_DLL Config* qdf();
+QPDF_DLL Config* rawStreamData();
+QPDF_DLL Config* recompressFlate();
+QPDF_DLL Config* removePageLabels();
+QPDF_DLL Config* requiresPassword();
+QPDF_DLL Config* showEncryption();
+QPDF_DLL Config* showEncryptionKey();
+QPDF_DLL Config* showLinearization();
+QPDF_DLL Config* showNpages();
+QPDF_DLL Config* showPages();
+QPDF_DLL Config* showXref();
+QPDF_DLL Config* staticAesIv();
+QPDF_DLL Config* staticId();
+QPDF_DLL Config* suppressPasswordRecovery();
+QPDF_DLL Config* suppressRecovery();
+QPDF_DLL Config* verbose();
+QPDF_DLL Config* warningExit0();
+QPDF_DLL Config* withImages();
+QPDF_DLL Config* collate(char const* parameter);
+QPDF_DLL Config* splitPages(char const* parameter);
+QPDF_DLL Config* compressionLevel(char const* parameter);
+QPDF_DLL Config* copyEncryption(char const* parameter);
+QPDF_DLL Config* encryptionFilePassword(char const* parameter);
+QPDF_DLL Config* forceVersion(char const* parameter);
+QPDF_DLL Config* iiMinBytes(char const* parameter);
+QPDF_DLL Config* jobJsonFile(char const* parameter);
+QPDF_DLL Config* jsonObject(char const* parameter);
+QPDF_DLL Config* keepFilesOpenThreshold(char const* parameter);
+QPDF_DLL Config* linearizePass1(char const* parameter);
+QPDF_DLL Config* minVersion(char const* parameter);
+QPDF_DLL Config* oiMinArea(char const* parameter);
+QPDF_DLL Config* oiMinHeight(char const* parameter);
+QPDF_DLL Config* oiMinWidth(char const* parameter);
+QPDF_DLL Config* password(char const* parameter);
+QPDF_DLL Config* passwordFile(char const* parameter);
+QPDF_DLL Config* removeAttachment(char const* parameter);
+QPDF_DLL Config* rotate(char const* parameter);
+QPDF_DLL Config* showAttachment(char const* parameter);
+QPDF_DLL Config* showObject(char const* parameter);
+QPDF_DLL Config* compressStreams(char const* parameter);
+QPDF_DLL Config* decodeLevel(char const* parameter);
+QPDF_DLL Config* flattenAnnotations(char const* parameter);
+QPDF_DLL Config* jsonKey(char const* parameter);
+QPDF_DLL Config* keepFilesOpen(char const* parameter);
+QPDF_DLL Config* normalizeContent(char const* parameter);
+QPDF_DLL Config* objectStreams(char const* parameter);
+QPDF_DLL Config* passwordMode(char const* parameter);
+QPDF_DLL Config* removeUnreferencedResources(char const* parameter);
+QPDF_DLL Config* streamData(char const* parameter);
diff --git a/include/qpdf/auto_job_c_uo.hh b/include/qpdf/auto_job_c_uo.hh
index 4e4afd49..a02cd1f8 100644
--- a/include/qpdf/auto_job_c_uo.hh
+++ b/include/qpdf/auto_job_c_uo.hh
@@ -3,7 +3,7 @@
// Edits will be automatically overwritten if the build is
// run in maintainer mode.
//
-QPDF_DLL UOConfig& to(char const* parameter);
-QPDF_DLL UOConfig& from(char const* parameter);
-QPDF_DLL UOConfig& repeat(char const* parameter);
-QPDF_DLL UOConfig& password(char const* parameter);
+QPDF_DLL UOConfig* to(char const* parameter);
+QPDF_DLL UOConfig* from(char const* parameter);
+QPDF_DLL UOConfig* repeat(char const* parameter);
+QPDF_DLL UOConfig* password(char const* parameter);