Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <PlatformManager.h>
Classes | |
struct | FileSystemInfo |
Loaded file systems. More... | |
Public Member Functions | |
bool | checkCPUTechnology (CpuTechnology tech) |
Returns true if technology from CpuTechnology enumeration support by installed CPU. | |
void | copyToClipboard (const c8 *text) |
copies text to the clipboard | |
FileSystem * | createFileSystem (const std::string &path, const std::string &type) |
Thread * | createThread () |
u32 | getBufferMemory () |
u32 | getCPUCacheSize (u32 level) |
Returns cache size in k-bytes. | |
f32 | getCPUFrequency () |
Returns the Frequency the CPU is operating at. | |
const char * | getCPUVendorId () |
u32 | getFreeMemory () |
u32 | getFreeSwap () |
u16 | getLogicalProcessorsNum () |
Returns the number of logical processors per physical processors. | |
u16 | getPhysicalProcessorsNum () |
Returns the number of physical processors. | |
u32 | getSharedMemory () |
c8 * | getTextFromClipboard () |
Timer * | getTimer () |
u32 | getTotalMemory () |
u32 | getTotalSwap () |
PlatformManager () | |
Default constructor. | |
void | registerFileSystemFactory (const std::string &type, FileSystemFactory *factory) |
void | removeAllFileSystems () |
void | removeAllThreads () |
void | removeFileSystem (FileSystem *fs) |
void | removeFileSystemFactory (const std::string &type) |
void | removePlatformDriver () |
void | removeThread (Thread *thread) |
void | removeThread (const u32 &id) |
void | removeTimer () |
void | setPlatformDriver (PlatformDriver *driver) |
void | setTimer (Timer *timer) |
void | sleep (u32 miliseconds) |
void | start () |
void | stop () |
~PlatformManager () | |
Static Public Member Functions | |
static PlatformManager * | getInstance () |
Get instance. | |
Protected Member Functions | |
void | initializeImpl () |
void | uninitializeImpl () |
void | updateImpl (f32 elapsedTime) |
Protected Attributes | |
std::map< std::string, FileSystemFactory * > | mFileSystemFactories |
Factories available to create file systems, indexed by type (String identifier e.g. 'FileSystem', 'ZipFileSystem') | |
std::map< u32, FileSystemInfo > | mFileSystems |
PlatformDriver * | mPlatformDriver |
std::map< u32, Thread * > | mThreads |
Timer * | mTimer |
Class which manages the platform settings the Game runs on. Because the Game is designed to be platform-independent, it dynamically loads a library containing all the platform-specific elements like dialogs etc. This class manages that load and provides a simple interface to the platform.
platform::PlatformManager::PlatformManager | ( | ) |
Default constructor.
References getInstance(), engine::Object::mObjectType, mPlatformDriver, mTimer, and engine::OT_PLATFORM_MANAGER.
platform::PlatformManager::~PlatformManager | ( | ) |
References getInstance().
bool platform::PlatformManager::checkCPUTechnology | ( | CpuTechnology | tech | ) |
Returns true if technology from CpuTechnology enumeration support by installed CPU.
References platform::PlatformDriver::checkCPUTechnology(), and mPlatformDriver.
void platform::PlatformManager::copyToClipboard | ( | const c8 * | text | ) |
copies text to the clipboard
References platform::PlatformDriver::copyToClipboard(), and mPlatformDriver.
FileSystem * platform::PlatformManager::createFileSystem | ( | const std::string & | path, |
const std::string & | type | ||
) |
Thread * platform::PlatformManager::createThread | ( | ) |
References platform::PlatformDriver::createThread(), platform::Thread::getID(), mPlatformDriver, and mThreads.
u32 platform::PlatformManager::getBufferMemory | ( | ) |
returns buffer memory size is returned in bytes.
References platform::PlatformDriver::getBufferMemory(), and mPlatformDriver.
Returns cache size in k-bytes.
References platform::PlatformDriver::getCPUCacheSize(), and mPlatformDriver.
f32 platform::PlatformManager::getCPUFrequency | ( | ) |
Returns the Frequency the CPU is operating at.
References platform::PlatformDriver::getCPUFrequency(), and mPlatformDriver.
const char * platform::PlatformManager::getCPUVendorId | ( | ) |
Returns the CPU's vendor identification string, or "Generic_x86" if it doesn't exist on installed processor.
References platform::PlatformDriver::getCPUVendorId(), and mPlatformDriver.
u32 platform::PlatformManager::getFreeMemory | ( | ) |
returns free memory size is returned in bytes.
References platform::PlatformDriver::getFreeMemory(), and mPlatformDriver.
u32 platform::PlatformManager::getFreeSwap | ( | ) |
returns free swap size is returned in bytes.
References platform::PlatformDriver::getFreeSwap(), and mPlatformDriver.
PlatformManager * platform::PlatformManager::getInstance | ( | ) | [static] |
Get instance.
Reimplemented from core::Singleton< PlatformManager >.
Referenced by initializeImpl(), render::RenderTarget::initProperties(), PlatformManager(), start(), stop(), uninitializeImpl(), and ~PlatformManager().
u16 platform::PlatformManager::getLogicalProcessorsNum | ( | ) |
Returns the number of logical processors per physical processors.
References platform::PlatformDriver::getLogicalProcessorsNum(), and mPlatformDriver.
u16 platform::PlatformManager::getPhysicalProcessorsNum | ( | ) |
Returns the number of physical processors.
References platform::PlatformDriver::getPhysicalProcessorsNum(), and mPlatformDriver.
u32 platform::PlatformManager::getSharedMemory | ( | ) |
returns shared memory size is returned in bytes.
References platform::PlatformDriver::getSharedMemory(), and mPlatformDriver.
c8 * platform::PlatformManager::getTextFromClipboard | ( | ) |
gets text from the clipboard
References platform::PlatformDriver::getTextFromClipboard(), and mPlatformDriver.
Timer * platform::PlatformManager::getTimer | ( | ) |
References mTimer.
Referenced by engine::EngineManager::initializeImpl().
u32 platform::PlatformManager::getTotalMemory | ( | ) |
returns total memory size is returned in bytes.
References platform::PlatformDriver::getTotalMemory(), and mPlatformDriver.
u32 platform::PlatformManager::getTotalSwap | ( | ) |
returns total swap size is returned in bytes.
References platform::PlatformDriver::getTotalSwap(), and mPlatformDriver.
void platform::PlatformManager::initializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References getInstance(), platform::PlatformDriver::initialize(), and mPlatformDriver.
void platform::PlatformManager::registerFileSystemFactory | ( | const std::string & | type, |
FileSystemFactory * | factory | ||
) |
References mFileSystemFactories.
void platform::PlatformManager::removeAllFileSystems | ( | ) |
void platform::PlatformManager::removeAllThreads | ( | ) |
References mPlatformDriver, mThreads, and platform::PlatformDriver::removeThread().
void platform::PlatformManager::removeFileSystem | ( | FileSystem * | fs | ) |
void platform::PlatformManager::removeFileSystemFactory | ( | const std::string & | type | ) |
References mFileSystemFactories.
void platform::PlatformManager::removePlatformDriver | ( | ) |
References mPlatformDriver.
void platform::PlatformManager::removeThread | ( | const u32 & | id | ) |
References mPlatformDriver, mThreads, and platform::PlatformDriver::removeThread().
void platform::PlatformManager::removeThread | ( | Thread * | thread | ) |
References platform::Thread::getID().
void platform::PlatformManager::removeTimer | ( | ) |
References mTimer.
void platform::PlatformManager::setPlatformDriver | ( | PlatformDriver * | driver | ) |
References mPlatformDriver.
void platform::PlatformManager::sleep | ( | u32 | miliseconds | ) |
sleep for the given number of miliseconds this can be used to give some CPU time to other processes
References mPlatformDriver, and platform::PlatformDriver::sleep().
void platform::PlatformManager::start | ( | ) |
References getInstance(), mPlatformDriver, and platform::PlatformDriver::start().
Referenced by engine::EngineManager::start().
void platform::PlatformManager::stop | ( | ) |
References getInstance(), mPlatformDriver, and platform::PlatformDriver::stop().
Referenced by engine::EngineManager::stop().
void platform::PlatformManager::uninitializeImpl | ( | ) | [protected, virtual] |
Reimplemented from engine::Object.
References getInstance(), and removeAllFileSystems().
void platform::PlatformManager::updateImpl | ( | f32 | elapsedTime | ) | [protected, virtual] |
Reimplemented from engine::Object.
std::map<std::string, FileSystemFactory*> platform::PlatformManager::mFileSystemFactories [protected] |
Factories available to create file systems, indexed by type (String identifier e.g. 'FileSystem', 'ZipFileSystem')
Referenced by createFileSystem(), registerFileSystemFactory(), removeAllFileSystems(), removeFileSystem(), and removeFileSystemFactory().
std::map<u32, FileSystemInfo> platform::PlatformManager::mFileSystems [protected] |
Referenced by createFileSystem(), removeAllFileSystems(), and removeFileSystem().
PlatformDriver* platform::PlatformManager::mPlatformDriver [protected] |
Referenced by checkCPUTechnology(), copyToClipboard(), createThread(), getBufferMemory(), getCPUCacheSize(), getCPUFrequency(), getCPUVendorId(), getFreeMemory(), getFreeSwap(), getLogicalProcessorsNum(), getPhysicalProcessorsNum(), getSharedMemory(), getTextFromClipboard(), getTotalMemory(), getTotalSwap(), initializeImpl(), PlatformManager(), removeAllThreads(), removePlatformDriver(), removeThread(), setPlatformDriver(), sleep(), start(), and stop().
std::map<u32, Thread*> platform::PlatformManager::mThreads [protected] |
Referenced by createThread(), removeAllThreads(), and removeThread().
Timer* platform::PlatformManager::mTimer [protected] |
Referenced by getTimer(), PlatformManager(), removeTimer(), and setTimer().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:08 by
Doxygen
(1.7.4)
|