diff options
author | Jeffrey Walton <noloader@gmail.com> | 2020-09-20 06:29:13 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2020-09-20 06:29:13 -0400 |
commit | 58e7247a9c7e96de4320e0b6b33d698bd45277cd (patch) | |
tree | c9fb981870c2f43899529db6ea261c99820d4573 | |
parent | c280ccd33b3d85dbd2e5a3edd4fbeeded65a2288 (diff) | |
download | cryptopp-git-58e7247a9c7e96de4320e0b6b33d698bd45277cd.tar.gz |
Update documentation
-rw-r--r-- | cryptlib.h | 8 | ||||
-rw-r--r-- | files.h | 4 |
2 files changed, 10 insertions, 2 deletions
@@ -1871,8 +1871,12 @@ public: /// \brief Provides the number of bytes ready for retrieval
/// \return the number of bytes ready for retrieval
- /// \details All retrieval functions return the actual number of bytes retrieved, which is
- /// the lesser of the request number and MaxRetrievable()
+ /// \details The number of bytes available are dependent on the source. If an exact value is
+ /// available, then the exact value is returned. The exact value can include 0 if the source
+ /// is exhausted.
+ /// \details Some stream-based sources do not allow seeking() on the underlying stream, such
+ /// as some FileSource(). If the stream does not allow seeking() then MaxRetrievable()
+ /// returns LWORD_MAX to indicate there are still bytes to be retrieved.
virtual lword MaxRetrievable() const;
/// \brief Determines whether bytes are ready for retrieval
@@ -62,6 +62,10 @@ public: /// \returns the internal stream pointer
const std::istream* GetStream() const {return m_stream;}
+ /// \brief Provides the number of bytes ready for retrieval
+ /// \return the number of bytes ready for retrieval
+ /// \details All retrieval functions return the actual number of bytes retrieved, which is
+ /// the lesser of the request number and MaxRetrievable()
lword MaxRetrievable() const;
size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true);
size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const;
|