Regina Calculation Engine
|
Overall structure of the calculation engine. More...
Classes | |
class | regina::ShareableObject |
Facilitates mirroring objects in the underlying C++ calculation engine using the various wrapper classes provided in the various external interfaces (such as the Python interface). More... | |
Macros | |
#define | REGINA_API |
All non-templated, non-static functions, classes and global variables that are part of Regina's public interface must be declared with REGINA_API. More... | |
#define | REGINA_LOCAL |
Classes and functions that are local to the current compilation unit and should not be publicly exported may be declared with REGINA_LOCAL. More... | |
Functions | |
REGINA_API const char * | regina::getVersionString () |
Returns the full version number of this calculation engine. More... | |
REGINA_API int | regina::getVersionMajor () |
Returns the major version number of this calculation engine. More... | |
REGINA_API int | regina::getVersionMinor () |
Returns the minor version number of this calculation engine. More... | |
REGINA_API bool | regina::versionUsesUTF8 (const char *version) |
Did the given version of Regina consistently use UTF-8 in its data files? More... | |
REGINA_API int | regina::testEngine (int value) |
Tests to see if an interface can successfully communicate with the underlying C++ calculation engine. More... | |
Overall structure of the calculation engine.
#define REGINA_API |
All non-templated, non-static functions, classes and global variables that are part of Regina's public interface must be declared with REGINA_API.
In addition, global variables must also be declared with extern
as per normal. Otherwise things may (and in some environments will) break when external applications try to use Regina with optimisations such as gcc's -fvisibility=hidden
.
Note: When building the Regina calculation engine shared library, REGINA_DLL_EXPORTS must be defined (this ensures that API symbols are marked for export). When importing (using) this library, REGINA_DLL_EXPORTS must not be defined (this ensures that API symbols are marked for import instead).
#define REGINA_LOCAL |
Classes and functions that are local to the current compilation unit and should not be publicly exported may be declared with REGINA_LOCAL.
Use of this macro is optional.
REGINA_API int regina::getVersionMajor | ( | ) |
Returns the major version number of this calculation engine.
For instance, version 2.3.1 would have major version 2.
REGINA_API int regina::getVersionMinor | ( | ) |
Returns the minor version number of this calculation engine.
For instance, version 2.3.1 would have minor version 3.
REGINA_API const char* regina::getVersionString | ( | ) |
Returns the full version number of this calculation engine.
For instance, version 2.3.1 would have full version "2.3.1"
.
REGINA_API int regina::testEngine | ( | int | value | ) |
Tests to see if an interface can successfully communicate with the underlying C++ calculation engine.
This routine simply uses the engine to return the same value that is passed to it; it can be used to test whether communications between the interface and the C++ engine are working properly.
value | any integer; this same integer will be returned. |
REGINA_API bool regina::versionUsesUTF8 | ( | const char * | version | ) |
Did the given version of Regina consistently use UTF-8 in its data files?
In Regina versions 4.4 and below, no particular attention was paid to character encodings. As a result, the GUI typically stored data in LATIN1 (the default for the Qt libraries).
As of Regina 4.5, all strings are now stored in UTF-8 where possible.
This routine allows programs to determine which regime a particular version of Regina belongs to. This can be useful when working with Regina data files on a low-level basis.
Any whitespace in the version string will confuse the result, and the return value will be undefined.
As a special case, an empty string is treated as belonging to the UTF-8 regime.
version | a version string from some release of Regina, such as "4.2". This must not contain any whitespace padding. |
true
if the given version uses UTF-8 consistently, or false
if the given version is an older version that did not pay attention to character encodings.