#ifndef _COMMON_WIDESTRING_HPP_
#define _COMMON_WIDESTRING_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_GLOBALDATA_HPP_
#include <common/gdata.hpp>
#endif

class WideString : public GlobalData<WORD>
{
public:
	WideString(void);
	WideString(const WideString &someWideString);
	WideString(const String &ansiString);
	~WideString();
	WideString &operator=(const WideString &someWideString);
	WideString &operator=(const String &ansiString);
	WORD operator==(const WideString &someWideString)const;
  WORD operator==(const String &ansiString)const;
private:
	void ansiToWideString(const String &ansiString);
};

inline
WideString::WideString(void)
{
}

inline
WideString::WideString(const WideString &someWideString)
{
  *this=someWideString;
}

inline
WideString::WideString(const String &ansiString)
{
  *this=ansiString;
}

inline
WideString::~WideString()
{
}

inline
WideString &WideString::operator=(const WideString &someWideString)
{
	(GlobalData<WORD>&)*this=(GlobalData<WORD>&)someWideString;
	return *this;
}

inline
WideString &WideString::operator=(const String &ansiString)
{
	ansiToWideString(ansiString);
  return *this;
}

inline
WORD WideString::operator==(const WideString &someWideString)const
{
	return (GlobalData<WORD>&)*this==(GlobalData<WORD>&)someWideString;
}

inline
WORD WideString::operator==(const String &ansiString)const
{
	WideString wideChar(ansiString);
  return *this==wideChar;
}
#endif
