diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2019-01-25 12:08:00 -0800 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2019-01-25 12:32:37 -0800 |
commit | 70e7cee96028889ab709fa3c479225e584fcb77f (patch) | |
tree | 07892d0edfe0bb1f001a3bbd0518e81723f45c02 | |
parent | 9431e1b91598fc255234ede10c22208ad18685cd (diff) | |
download | bitcoin-70e7cee96028889ab709fa3c479225e584fcb77f.tar.xz |
Trivial: Doxygenize existing CBufferedFile and VectorReader comments
-rw-r--r-- | src/streams.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/streams.h b/src/streams.h index 0809c96be1..4e600f1826 100644 --- a/src/streams.h +++ b/src/streams.h @@ -139,7 +139,7 @@ private: public: - /* + /** * @param[in] type Serialization Type * @param[in] version Serialization Version (including any flags) * @param[in] data Referenced byte vector to overwrite/append @@ -153,7 +153,7 @@ public: } } - /* + /** * (other params same as above) * @param[in] args A list of items to deserialize starting at pos. */ @@ -715,15 +715,15 @@ private: const int nType; const int nVersion; - FILE *src; // source file - uint64_t nSrcPos; // how many bytes have been read from source - uint64_t nReadPos; // how many bytes have been read from this - uint64_t nReadLimit; // up to which position we're allowed to read - uint64_t nRewind; // how many bytes we guarantee to rewind - std::vector<char> vchBuf; // the buffer + FILE *src; //!< source file + uint64_t nSrcPos; //!< how many bytes have been read from source + uint64_t nReadPos; //!< how many bytes have been read from this + uint64_t nReadLimit; //!< up to which position we're allowed to read + uint64_t nRewind; //!< how many bytes we guarantee to rewind + std::vector<char> vchBuf; //!< the buffer protected: - // read data from the source to fill the buffer + //! read data from the source to fill the buffer bool Fill() { unsigned int pos = nSrcPos % vchBuf.size(); unsigned int readNow = vchBuf.size() - pos; @@ -768,12 +768,12 @@ public: } } - // check whether we're at the end of the source file + //! check whether we're at the end of the source file bool eof() const { return nReadPos == nSrcPos && feof(src); } - // read a number of bytes + //! read a number of bytes void read(char *pch, size_t nSize) { if (nSize + nReadPos > nReadLimit) throw std::ios_base::failure("Read attempted past buffer limit"); @@ -795,12 +795,12 @@ public: } } - // return the current reading position + //! return the current reading position uint64_t GetPos() const { return nReadPos; } - // rewind to a given reading position + //! rewind to a given reading position bool SetPos(uint64_t nPos) { nReadPos = nPos; if (nReadPos + nRewind < nSrcPos) { @@ -826,8 +826,8 @@ public: return true; } - // prevent reading beyond a certain position - // no argument removes the limit + //! prevent reading beyond a certain position + //! no argument removes the limit bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) { if (nPos < nReadPos) return false; @@ -842,7 +842,7 @@ public: return (*this); } - // search for a given byte in the stream, and remain positioned on it + //! search for a given byte in the stream, and remain positioned on it void FindByte(char ch) { while (true) { if (nReadPos == nSrcPos) |