COSOperator.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef __C_OS_OPERATOR_H_INCLUDED__
  5. #define __C_OS_OPERATOR_H_INCLUDED__
  6. #include "IOSOperator.h"
  7. namespace irr
  8. {
  9. class CIrrDeviceLinux;
  10. //! The Operating system operator provides operation system specific methods and informations.
  11. class COSOperator : public IOSOperator
  12. {
  13. public:
  14. // constructor
  15. #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
  16. COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device);
  17. #endif
  18. COSOperator(const core::stringc& osversion);
  19. //! returns the current operation system version as string.
  20. virtual const core::stringc& getOperatingSystemVersion() const;
  21. //! copies text to the clipboard
  22. #if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
  23. virtual void copyToClipboard(const wchar_t* text) const;
  24. #else
  25. virtual void copyToClipboard(const c8* text) const;
  26. #endif
  27. //! gets text from the clipboard
  28. //! \return Returns 0 if no string is in there.
  29. #if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
  30. virtual const wchar_t* getTextFromClipboard() const;
  31. #else
  32. virtual const c8* getTextFromClipboard() const;
  33. #endif
  34. //! gets the processor speed in megahertz
  35. //! \param Mhz:
  36. //! \return Returns true if successful, false if not
  37. virtual bool getProcessorSpeedMHz(u32* MHz) const;
  38. //! gets the total and available system RAM in kB
  39. //! \param Total: will contain the total system memory
  40. //! \param Avail: will contain the available memory
  41. //! \return Returns true if successful, false if not
  42. virtual bool getSystemMemory(u32* Total, u32* Avail) const;
  43. private:
  44. core::stringc OperatingSystem;
  45. #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
  46. CIrrDeviceLinux * IrrDeviceLinux;
  47. #endif
  48. };
  49. } // end namespace
  50. #endif