Skip to content

Commit 70e7cee

Browse files
committed
Trivial: Doxygenize existing CBufferedFile and VectorReader comments
1 parent 9431e1b commit 70e7cee

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/streams.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ class VectorReader
139139

140140
public:
141141

142-
/*
142+
/**
143143
* @param[in] type Serialization Type
144144
* @param[in] version Serialization Version (including any flags)
145145
* @param[in] data Referenced byte vector to overwrite/append
@@ -153,7 +153,7 @@ class VectorReader
153153
}
154154
}
155155

156-
/*
156+
/**
157157
* (other params same as above)
158158
* @param[in] args A list of items to deserialize starting at pos.
159159
*/
@@ -715,15 +715,15 @@ class CBufferedFile
715715
const int nType;
716716
const int nVersion;
717717

718-
FILE *src; // source file
719-
uint64_t nSrcPos; // how many bytes have been read from source
720-
uint64_t nReadPos; // how many bytes have been read from this
721-
uint64_t nReadLimit; // up to which position we're allowed to read
722-
uint64_t nRewind; // how many bytes we guarantee to rewind
723-
std::vector<char> vchBuf; // the buffer
718+
FILE *src; //!< source file
719+
uint64_t nSrcPos; //!< how many bytes have been read from source
720+
uint64_t nReadPos; //!< how many bytes have been read from this
721+
uint64_t nReadLimit; //!< up to which position we're allowed to read
722+
uint64_t nRewind; //!< how many bytes we guarantee to rewind
723+
std::vector<char> vchBuf; //!< the buffer
724724

725725
protected:
726-
// read data from the source to fill the buffer
726+
//! read data from the source to fill the buffer
727727
bool Fill() {
728728
unsigned int pos = nSrcPos % vchBuf.size();
729729
unsigned int readNow = vchBuf.size() - pos;
@@ -768,12 +768,12 @@ class CBufferedFile
768768
}
769769
}
770770

771-
// check whether we're at the end of the source file
771+
//! check whether we're at the end of the source file
772772
bool eof() const {
773773
return nReadPos == nSrcPos && feof(src);
774774
}
775775

776-
// read a number of bytes
776+
//! read a number of bytes
777777
void read(char *pch, size_t nSize) {
778778
if (nSize + nReadPos > nReadLimit)
779779
throw std::ios_base::failure("Read attempted past buffer limit");
@@ -795,12 +795,12 @@ class CBufferedFile
795795
}
796796
}
797797

798-
// return the current reading position
798+
//! return the current reading position
799799
uint64_t GetPos() const {
800800
return nReadPos;
801801
}
802802

803-
// rewind to a given reading position
803+
//! rewind to a given reading position
804804
bool SetPos(uint64_t nPos) {
805805
nReadPos = nPos;
806806
if (nReadPos + nRewind < nSrcPos) {
@@ -826,8 +826,8 @@ class CBufferedFile
826826
return true;
827827
}
828828

829-
// prevent reading beyond a certain position
830-
// no argument removes the limit
829+
//! prevent reading beyond a certain position
830+
//! no argument removes the limit
831831
bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) {
832832
if (nPos < nReadPos)
833833
return false;
@@ -842,7 +842,7 @@ class CBufferedFile
842842
return (*this);
843843
}
844844

845-
// search for a given byte in the stream, and remain positioned on it
845+
//! search for a given byte in the stream, and remain positioned on it
846846
void FindByte(char ch) {
847847
while (true) {
848848
if (nReadPos == nSrcPos)

0 commit comments

Comments
 (0)