MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Init

Method Init

engine/Poseidon/IO/Streams/QBStream.cpp:196–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194 _handle = nullptr;
195 _handleOverlapped = nullptr;
196 _serialize = false;
197 _error = true; // no open called yet
198 _locked = true;
199 _lockable = false;
200}
201
202#define WIN_DIR '\\'
203#define UNIX_DIR '/'
204
205#define BEG_SERIALIZE \
206 { \
207 PoseidonAssert(!_serialize); \
208 _serialize = true; \
209 }
210#define END_SERIALIZE \
211 { \
212 PoseidonAssert(_serialize); \
213 _serialize = false; \
214 }
215
216#ifdef NO_MMAP
217#define USE_MAPPING 0
218#else
219#define USE_MAPPING 1
220#endif
221
222} // namespace Poseidon
223
224#if USE_MAPPING
225#include <Poseidon/IO/Streams/FileMapping.hpp>
226#endif
227
228#ifdef _WIN32
229#include <Poseidon/IO/Streams/FileOverlapped.hpp>
230#endif
231
232namespace Poseidon
233{
234
235static int LoadInt(HANDLE f)
236{
237 int i = 0;
238 DWORD rd = 0;
239 ReadFile(f, &i, sizeof(i), &rd, nullptr);
240 if (rd != sizeof(i))

Callers 6

FileBufferLoadedMethod · 0.45
FileBufferMemoryMethod · 0.45
ReallocMethod · 0.45
GetDataMethod · 0.45
SetPrefixMethod · 0.45

Calls 2

unixPathFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected