diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-01-26 23:31:31 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-01-30 19:11:03 +0100 |
commit | 2e4e25a9342b7c938748bc8bb795e406dbcbfc39 (patch) | |
tree | 20be4372ddd0df7e3482409ff5b6be40dbaf2d43 /include | |
parent | c62ab2ee9f153aa623ed5ffab764f453941da4c7 (diff) | |
download | qpdf-2e4e25a9342b7c938748bc8bb795e406dbcbfc39.tar.zst |
Fix some comments
Diffstat (limited to 'include')
-rw-r--r-- | include/qpdf/QPDFJob.hh | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 4a1f205e..076501ff 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -106,10 +106,10 @@ class QPDFJob QPDF_DLL bool createsOutput() const; - // CONFIGURATION - // (implemented in QPDFJob_config.cc) - + // SEE BELOW FOR MORE PUBLIC METHODS AND CLASSES private: + // These structures are private but we need to define them before + // the public Config classes. struct CopyAttachmentFrom { std::string path; @@ -146,6 +146,34 @@ class QPDFJob }; public: + // CONFIGURATION + + // Configuration classes are implemented in QPDFJob_config.cc. + + // The config() method returns a shared pointer to a Config + // object. The Config object contains methods that correspond with + // qpdf command-line arguments. You can use a fluent interface to + // configure a QPDFJob object that would do exactly the same thing + // as a specific qpdf command. The example pdf-job.cc contains an + // example of this usage. You can also use initializeFromJson or + // initializeFromArgv to initialize a QPDFJob object. + + // Notes about the Config methods: + // + // * Most of the method declarations are automatically generated + // in header files that are included within the class + // definitions. They correspond in predictable ways to the + // command-line arguments and are generated from the same code + // that generates the command-line argument parsing code. + // + // * Methods return pointers, rather than references, to + // configuration objects. References might feel more familiar to + // users of fluent interfaces, so why do we use pointers? 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. + class Config; class AttConfig @@ -247,7 +275,6 @@ class QPDFJob Config* config; }; - // Configuration is performed by calling methods XXX QXXXQ document class Config { friend class QPDFJob; @@ -290,6 +317,8 @@ class QPDFJob }; friend class Config; + // Return a top-level configuration item. See CONFIGURATION above + // for details. QPDF_DLL std::shared_ptr<Config> config(); |