@@ -139,7 +139,7 @@ class VectorReader
139
139
140
140
public:
141
141
142
- /*
142
+ /* *
143
143
* @param[in] type Serialization Type
144
144
* @param[in] version Serialization Version (including any flags)
145
145
* @param[in] data Referenced byte vector to overwrite/append
@@ -153,7 +153,7 @@ class VectorReader
153
153
}
154
154
}
155
155
156
- /*
156
+ /* *
157
157
* (other params same as above)
158
158
* @param[in] args A list of items to deserialize starting at pos.
159
159
*/
@@ -715,15 +715,15 @@ class CBufferedFile
715
715
const int nType;
716
716
const int nVersion;
717
717
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
724
724
725
725
protected:
726
- // read data from the source to fill the buffer
726
+ // ! read data from the source to fill the buffer
727
727
bool Fill () {
728
728
unsigned int pos = nSrcPos % vchBuf.size ();
729
729
unsigned int readNow = vchBuf.size () - pos;
@@ -768,12 +768,12 @@ class CBufferedFile
768
768
}
769
769
}
770
770
771
- // check whether we're at the end of the source file
771
+ // ! check whether we're at the end of the source file
772
772
bool eof () const {
773
773
return nReadPos == nSrcPos && feof (src);
774
774
}
775
775
776
- // read a number of bytes
776
+ // ! read a number of bytes
777
777
void read (char *pch, size_t nSize) {
778
778
if (nSize + nReadPos > nReadLimit)
779
779
throw std::ios_base::failure (" Read attempted past buffer limit" );
@@ -795,12 +795,12 @@ class CBufferedFile
795
795
}
796
796
}
797
797
798
- // return the current reading position
798
+ // ! return the current reading position
799
799
uint64_t GetPos () const {
800
800
return nReadPos;
801
801
}
802
802
803
- // rewind to a given reading position
803
+ // ! rewind to a given reading position
804
804
bool SetPos (uint64_t nPos) {
805
805
nReadPos = nPos;
806
806
if (nReadPos + nRewind < nSrcPos) {
@@ -826,8 +826,8 @@ class CBufferedFile
826
826
return true ;
827
827
}
828
828
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
831
831
bool SetLimit (uint64_t nPos = std::numeric_limits<uint64_t >::max()) {
832
832
if (nPos < nReadPos)
833
833
return false ;
@@ -842,7 +842,7 @@ class CBufferedFile
842
842
return (*this );
843
843
}
844
844
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
846
846
void FindByte (char ch) {
847
847
while (true ) {
848
848
if (nReadPos == nSrcPos)
0 commit comments