Regina 7.0 Calculation Engine
|
File formats and the filesystem. More...
Classes | |
class | regina::FileInfo |
Stores information about a Regina data file, including file format and version. More... | |
class | regina::GlobalDirs |
Provides global routines that return directories in which various components of Regina are installed on the system. More... | |
Enumerations | |
enum | regina::FileFormat { regina::REGINA_BINARY_GEN_1 = 1 , regina::REGINA_XML_GEN_2 = 2 , regina::REGINA_XML_GEN_3 = 3 , regina::REGINA_CURRENT_FILE_FORMAT = REGINA_XML_GEN_3 } |
Represents each generation of Regina's file formats. More... | |
Functions | |
void | regina::swap (FileInfo &a, FileInfo &b) noexcept |
Swaps the contents of the two given file information objects. More... | |
File formats and the filesystem.
enum regina::FileFormat |
Represents each generation of Regina's file formats.
These constants are intended to capture "generational changes" to the file format, where backward compatibility is broken (i.e., where older versions of Regina that do not know about the new generation format cannot even attempt to read its data files at all).
In constrast, they do not capture incremental changes (e.g., new elements in data files that correspond to new features of Regina, which are simply ignored when an older version of Regina sees them).
Put differently: within each generation, the file formats should be considered "interoperable", in that they maintain both forward and backward compatibility as far as possible. In contrast, between generations the file formats are not compatible at all, and require some form of explicit conversion.
Of course, Regina can still read and write some older generation formats; these abilities are indicated alongside the constants below.
Swaps the contents of the two given file information objects.
This global routine simply calls FileInfo::swap(); it is provided so that FileInfo meets the C++ Swappable requirements.
a | the object whose contents should be swapped with b. |
b | the object whose contents should be swapped with a. |