All functionality that needs different implemenations per platform will go in here. More...
Functions | |
Whole | GetCPUCount () |
Get the amount of logical processors, a reasononable amount to use for thread creation. More... | |
String | GetPlatform () |
Gets the platform currently being run on. More... | |
MaxInt | GetTimeStamp () |
Get a timestamp. More... | |
Whole | GetTimeStampResolution () |
Get the resolution of the timestamp in microseconds. More... | |
All functionality that needs different implemenations per platform will go in here.
If we did our jobs right You not need to change anything to compile on different platforms exvept the build target. If you want, the platform can be manually defined in this section and this should be the only place that you need to change to compile this on a supported platform. Just remark all the lines that are not your platform using "//" and unremark your platform.
Should you choose to port this to your platform, make sure that all the required libraries are installed, then make sure to write an implementation for each of the functions in crossplatform.cpp, then you should get to the nitty gritty of making the minor platforms inconsistencies work.
For most games there will be no need to directly call these functions, however if you decide your game is an exception, there is one key thing to remember about all of these functions. All of these may perform/behave slightly differently.
Whole Mezzanine::crossplatform::GetCPUCount | ( | ) |
Get the amount of logical processors, a reasononable amount to use for thread creation.
This returns whatever your OS thinks is the count of CPUs. This could include Hyperthreading unit on Intel's chip, or it might not, it could include the threads from Niagra CPUs or it might not, it could return just about any value on a given piece of and should return a reasonable value for how many threads should be used.
Definition at line 97 of file crossplatform.cpp.
String Mezzanine::crossplatform::GetPlatform | ( | ) |
Gets the platform currently being run on.
Definition at line 78 of file crossplatform.cpp.
MaxInt Mezzanine::crossplatform::GetTimeStamp | ( | ) |
Get a timestamp.
Definition at line 91 of file crossplatform.cpp.
Whole Mezzanine::crossplatform::GetTimeStampResolution | ( | ) |
Get the resolution of the timestamp in microseconds.
Definition at line 94 of file crossplatform.cpp.