Commit a6e94cc3 authored by hybrid's avatar hybrid

Changed name and signature of getOperationSystemVersion, which is now...

Changed name and signature of getOperationSystemVersion, which is now correctly called getOperatingSystemVersion. Also changed the internal type and OSOperator creation.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3778 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 45914a47
Changes in 1.8 (??.??.2011) Changes in 1.8 (??.??.2011)
- Renamed IOSOperator::getOperationSystemVersion to getOperatingSystemVersion. Changed return type from wchar_t to core::stringc, as that's the internal representation the name is built on.
- Added IGUITabControl::insertTab, IGUITabControl::removeTab, IGUITabControl::clear and IGUITabControl::getTabAt - Added IGUITabControl::insertTab, IGUITabControl::removeTab, IGUITabControl::clear and IGUITabControl::getTabAt
- Added IGUIListBox::getItemAt - Added IGUIListBox::getItemAt
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define __I_OS_OPERATOR_H_INCLUDED__ #define __I_OS_OPERATOR_H_INCLUDED__
#include "IReferenceCounted.h" #include "IReferenceCounted.h"
#include "irrString.h"
namespace irr namespace irr
{ {
...@@ -14,12 +15,15 @@ namespace irr ...@@ -14,12 +15,15 @@ namespace irr
class IOSOperator : public virtual IReferenceCounted class IOSOperator : public virtual IReferenceCounted
{ {
public: public:
//! Get the current operation system version as string.
//! Destructor virtual const core::stringc& getOperatingSystemVersion() const = 0;
virtual ~IOSOperator() {}
//! Get the current operation system version as string. //! Get the current operation system version as string.
virtual const wchar_t* getOperationSystemVersion() const = 0; /** \deprecated Use getOperatingSystemVersion instead. This method will be removed in Irrlicht 1.9. */
_IRR_DEPRECATED_ const wchar_t* getOperationSystemVersion() const
{
return core::stringw(getOperatingSystemVersion()).c_str();
}
//! Copies text to the clipboard //! Copies text to the clipboard
virtual void copyToClipboard(const c8* text) const = 0; virtual void copyToClipboard(const c8* text) const = 0;
...@@ -44,4 +48,3 @@ public: ...@@ -44,4 +48,3 @@ public:
} // end namespace } // end namespace
#endif #endif
...@@ -56,7 +56,7 @@ CIrrDeviceFB::CIrrDeviceFB(const SIrrlichtCreationParameters& params) ...@@ -56,7 +56,7 @@ CIrrDeviceFB::CIrrDeviceFB(const SIrrlichtCreationParameters& params)
linuxversion += " "; linuxversion += " ";
linuxversion += FBInfo.machine; linuxversion += FBInfo.machine;
Operator = new COSOperator(linuxversion.c_str()); Operator = new COSOperator(linuxversion);
os::Printer::log(linuxversion.c_str(), ELL_INFORMATION); os::Printer::log(linuxversion.c_str(), ELL_INFORMATION);
// create window // create window
......
...@@ -101,7 +101,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param) ...@@ -101,7 +101,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
linuxversion += " "; linuxversion += " ";
linuxversion += LinuxInfo.machine; linuxversion += LinuxInfo.machine;
Operator = new COSOperator(linuxversion.c_str(), this); Operator = new COSOperator(linuxversion, this);
os::Printer::log(linuxversion.c_str(), ELL_INFORMATION); os::Printer::log(linuxversion.c_str(), ELL_INFORMATION);
// create keymap // create keymap
......
...@@ -94,7 +94,7 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param) ...@@ -94,7 +94,7 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
sdlversion += "."; sdlversion += ".";
sdlversion += Info.version.patch; sdlversion += Info.version.patch;
Operator = new COSOperator(sdlversion.c_str()); Operator = new COSOperator(sdlversion);
os::Printer::log(sdlversion.c_str(), ELL_INFORMATION); os::Printer::log(sdlversion.c_str(), ELL_INFORMATION);
// create keymap // create keymap
......
...@@ -910,7 +910,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) ...@@ -910,7 +910,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
// get windows version and create OS operator // get windows version and create OS operator
core::stringc winversion; core::stringc winversion;
getWindowsVersion(winversion); getWindowsVersion(winversion);
Operator = new COSOperator(winversion.c_str()); Operator = new COSOperator(winversion);
os::Printer::log(winversion.c_str(), ELL_INFORMATION); os::Printer::log(winversion.c_str(), ELL_INFORMATION);
// get handle to exe file // get handle to exe file
......
...@@ -346,7 +346,7 @@ CIrrDeviceWinCE::CIrrDeviceWinCE(const SIrrlichtCreationParameters& params) ...@@ -346,7 +346,7 @@ CIrrDeviceWinCE::CIrrDeviceWinCE(const SIrrlichtCreationParameters& params)
core::stringc winversion; core::stringc winversion;
getWindowsVersion(winversion); getWindowsVersion(winversion);
Operator = new COSOperator(winversion.c_str()); Operator = new COSOperator(winversion);
os::Printer::log(winversion.c_str(), ELL_INFORMATION); os::Printer::log(winversion.c_str(), ELL_INFORMATION);
HINSTANCE hInstance = GetModuleHandle(0); HINSTANCE hInstance = GetModuleHandle(0);
......
...@@ -29,14 +29,14 @@ namespace irr ...@@ -29,14 +29,14 @@ namespace irr
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
// constructor linux // constructor linux
COSOperator::COSOperator(const c8* osversion, CIrrDeviceLinux* device) COSOperator::COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device)
: IrrDeviceLinux(device) : OperatingSystem(osVersion), IrrDeviceLinux(device)
{ {
} }
#endif #endif
// constructor // constructor
COSOperator::COSOperator(const c8* osVersion) : OperatingSystem(osVersion) COSOperator::COSOperator(const core::stringc& osVersion) : OperatingSystem(osVersion)
{ {
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("COSOperator"); setDebugName("COSOperator");
...@@ -45,9 +45,9 @@ COSOperator::COSOperator(const c8* osVersion) : OperatingSystem(osVersion) ...@@ -45,9 +45,9 @@ COSOperator::COSOperator(const c8* osVersion) : OperatingSystem(osVersion)
//! returns the current operating system version as string. //! returns the current operating system version as string.
const wchar_t* COSOperator::getOperationSystemVersion() const const core::stringc& COSOperator::getOperatingSystemVersion() const
{ {
return OperatingSystem.c_str(); return OperatingSystem;
} }
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#define __C_OS_OPERATOR_H_INCLUDED__ #define __C_OS_OPERATOR_H_INCLUDED__
#include "IOSOperator.h" #include "IOSOperator.h"
#include "irrString.h"
#include "IrrCompileConfig.h"
namespace irr namespace irr
{ {
...@@ -21,12 +19,12 @@ public: ...@@ -21,12 +19,12 @@ public:
// constructor // constructor
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
COSOperator(const c8* osversion, CIrrDeviceLinux* device); COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device);
#endif #endif
COSOperator(const c8* osversion); COSOperator(const core::stringc& osversion);
//! returns the current operation system version as string. //! returns the current operation system version as string.
virtual const wchar_t* getOperationSystemVersion() const; virtual const core::stringc& getOperatingSystemVersion() const;
//! copies text to the clipboard //! copies text to the clipboard
virtual void copyToClipboard(const c8* text) const; virtual void copyToClipboard(const c8* text) const;
...@@ -48,7 +46,7 @@ public: ...@@ -48,7 +46,7 @@ public:
private: private:
core::stringw OperatingSystem; core::stringc OperatingSystem;
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_) #if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
CIrrDeviceLinux * IrrDeviceLinux; CIrrDeviceLinux * IrrDeviceLinux;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment