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)
- 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 IGUIListBox::getItemAt
......
......@@ -6,6 +6,7 @@
#define __I_OS_OPERATOR_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrString.h"
namespace irr
{
......@@ -14,12 +15,15 @@ namespace irr
class IOSOperator : public virtual IReferenceCounted
{
public:
//! Destructor
virtual ~IOSOperator() {}
//! Get the current operation system version as string.
virtual const core::stringc& getOperatingSystemVersion() const = 0;
//! 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
virtual void copyToClipboard(const c8* text) const = 0;
......@@ -44,4 +48,3 @@ public:
} // end namespace
#endif
......@@ -56,7 +56,7 @@ CIrrDeviceFB::CIrrDeviceFB(const SIrrlichtCreationParameters& params)
linuxversion += " ";
linuxversion += FBInfo.machine;
Operator = new COSOperator(linuxversion.c_str());
Operator = new COSOperator(linuxversion);
os::Printer::log(linuxversion.c_str(), ELL_INFORMATION);
// create window
......
......@@ -101,7 +101,7 @@ CIrrDeviceLinux::CIrrDeviceLinux(const SIrrlichtCreationParameters& param)
linuxversion += " ";
linuxversion += LinuxInfo.machine;
Operator = new COSOperator(linuxversion.c_str(), this);
Operator = new COSOperator(linuxversion, this);
os::Printer::log(linuxversion.c_str(), ELL_INFORMATION);
// create keymap
......
......@@ -94,7 +94,7 @@ CIrrDeviceSDL::CIrrDeviceSDL(const SIrrlichtCreationParameters& param)
sdlversion += ".";
sdlversion += Info.version.patch;
Operator = new COSOperator(sdlversion.c_str());
Operator = new COSOperator(sdlversion);
os::Printer::log(sdlversion.c_str(), ELL_INFORMATION);
// create keymap
......
......@@ -910,7 +910,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
// get windows version and create OS operator
core::stringc winversion;
getWindowsVersion(winversion);
Operator = new COSOperator(winversion.c_str());
Operator = new COSOperator(winversion);
os::Printer::log(winversion.c_str(), ELL_INFORMATION);
// get handle to exe file
......
......@@ -346,7 +346,7 @@ CIrrDeviceWinCE::CIrrDeviceWinCE(const SIrrlichtCreationParameters& params)
core::stringc winversion;
getWindowsVersion(winversion);
Operator = new COSOperator(winversion.c_str());
Operator = new COSOperator(winversion);
os::Printer::log(winversion.c_str(), ELL_INFORMATION);
HINSTANCE hInstance = GetModuleHandle(0);
......
......@@ -29,14 +29,14 @@ namespace irr
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
// constructor linux
COSOperator::COSOperator(const c8* osversion, CIrrDeviceLinux* device)
: IrrDeviceLinux(device)
COSOperator::COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device)
: OperatingSystem(osVersion), IrrDeviceLinux(device)
{
}
#endif
// constructor
COSOperator::COSOperator(const c8* osVersion) : OperatingSystem(osVersion)
COSOperator::COSOperator(const core::stringc& osVersion) : OperatingSystem(osVersion)
{
#ifdef _DEBUG
setDebugName("COSOperator");
......@@ -45,9 +45,9 @@ COSOperator::COSOperator(const c8* osVersion) : OperatingSystem(osVersion)
//! 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 @@
#define __C_OS_OPERATOR_H_INCLUDED__
#include "IOSOperator.h"
#include "irrString.h"
#include "IrrCompileConfig.h"
namespace irr
{
......@@ -21,12 +19,12 @@ public:
// constructor
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
COSOperator(const c8* osversion, CIrrDeviceLinux* device);
COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device);
#endif
COSOperator(const c8* osversion);
COSOperator(const core::stringc& osversion);
//! 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
virtual void copyToClipboard(const c8* text) const;
......@@ -48,7 +46,7 @@ public:
private:
core::stringw OperatingSystem;
core::stringc OperatingSystem;
#if defined(_IRR_COMPILE_WITH_X11_DEVICE_)
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