MCPcopy Create free account
hub / github.com/davisking/dlib / seekoff

Method seekoff

dlib/vectorstream/vectorstream.h:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 pos_type seekoff(off_type off, std::ios_base::seekdir dir,
54 std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out )
55 {
56 DLIB_CASSERT(mode == std::ios_base::in, "vectorstream does not support std::ios_base::out");
57 switch (dir)
58 {
59 case std::ios_base::beg:
60 read_pos = off;
61 break;
62 case std::ios_base::cur:
63 read_pos += off;
64 break;
65 case std::ios_base::end:
66 read_pos = buffer.size() + off;
67 break;
68 default:
69 break;
70 }
71 return pos_type(read_pos);
72 }
73
74 // ------------------------ OUTPUT FUNCTIONS ------------------------
75

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected