DiskLoc is a class in the MongoDB C++ Driver that represents the physical location of a document on disk. It contains two properties: a 32-bit integer representing the file number and a 64-bit integer representing the offset within the file.
Here are some code examples using DiskLoc:
// create a DiskLoc object with file number 1 and offset 1000 DiskLoc dl(1, 1000);
// check if two DiskLoc objects refer to the same location bool sameLoc = (dl1 == dl2);
// get the file number of a DiskLoc object int fileNum = dl.getFileNumber();
// get the offset within the file of a DiskLoc object long long offset = dl.getOfs();
These examples demonstrate how to create, compare, and retrieve information from DiskLoc objects.
The DiskLoc class is part of the MongoDB C++ Driver library, which is used for interacting with MongoDB databases using C++.
C++ (Cpp) DiskLoc - 30 examples found. These are the top rated real world C++ (Cpp) examples of DiskLoc extracted from open source projects. You can rate examples to help us improve the quality of examples.