Go to the documentation of this file.
39 #ifndef BLOCXX_CHAR16_HPP_INCLUDE_GUARD_
40 #define BLOCXX_CHAR16_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
56 class BLOCXX_COMMON_API Char16
62 Char16() : m_value(0) {}
67 Char16(
const Char16& arg) : m_value(arg.m_value) {}
72 explicit Char16(
char c) : m_value(c) {}
78 explicit Char16(
const String& x);
85 Char16(UInt16 val) : m_value(val) {}
90 explicit Char16(Int16 val) : m_value(val) {}
95 explicit Char16(
UInt8 val) : m_value(val) {}
100 explicit Char16(
Int8 val) : m_value(val) {}
105 explicit Char16(UInt32 val) : m_value(val) {}
110 explicit Char16(Int32 val) : m_value(val) {}
115 explicit Char16(UInt64 val) : m_value(static_cast<UInt16>(val)) {}
120 explicit Char16(Int64 val) : m_value(static_cast<UInt16>(val)) {}
125 explicit Char16(Real32 val) : m_value(static_cast<UInt16>(val)) {}
130 explicit Char16(Real64 val) : m_value(static_cast<UInt16>(val)) {}
139 UInt16 getValue()
const {
return m_value; }
143 operator UInt16()
const {
return getValue(); }
149 Char16& operator= (
const Char16& arg)
151 m_value = arg.m_value;
265 void writeObject(
std::streambuf & ostrm) const;
270 void readObject(
std::streambuf & istrm);
276 inline
bool operator== (
char c, const
Char16& arg)
288 inline bool operator!= (
const Char16& arg,
int v)
290 return (arg.getValue() != v);
292 inline bool operator!= (
int v,
const Char16& arg)
294 return (arg.getValue() != v);
296 inline bool operator!= (
char c,
const Char16& arg)
298 return Char16(c) != arg;
300 inline bool operator< (
char c,
const Char16& arg)
308 inline bool operator> (
char c,
const Char16& arg)
312 inline bool operator>= (
char c,
const Char16& arg)
316 inline Char16
operator+ (
const Char16& arg1,
const Char16& arg2)
318 return Char16(UInt16(arg1.getValue() + arg2.getValue()));
320 inline Char16
operator- (
const Char16& arg1,
const Char16& arg2)
322 return Char16(UInt16(arg1.getValue() - arg2.getValue()));
324 inline Char16
operator* (
const Char16& arg1,
const Char16& arg2)
326 return Char16(UInt16(arg1.getValue() * arg2.getValue()));
328 inline Char16
operator/ (
const Char16& arg1,
const Char16& arg2)
330 return Char16(UInt16(arg1.getValue() / arg2.getValue()));
332 BLOCXX_COMMON_API std::ostream&
operator<< (std::ostream& ostrm,
const Char16& arg);
bool operator<(const Array< T > &x, const Array< T > &y)
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
ostream & operator<<(ostream &ostrm, const Bool &arg)
Insert the string representation of a Bool object into a given stream.
Char16 operator*(const Char16 &arg1, const Char16 &arg2)
Char16(UInt16 val)
Create a new Char16 object of an unsigned 16 bit value.
Char16(Int16 val)
Create a new Char16 object of an signed 16 bit value.
The Char16 class is an abstraction for a double byte character.
bool operator>=(const Array< T > &x, const Array< T > &y)
Determine if one Array is greater than or equal to another.
#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)
The Bool class is an abstraction for the boolean data type.
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
This String class is an abstract data type that represents as NULL terminated string of characters.
Char16 operator-(const Char16 &arg1, const Char16 &arg2)
Char16(UInt8 val)
Create a new Char16 object of an unsigned 8 bit value.
Char16(Int8 val)
Create a new Char16 object of an signed 8 bit value.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)
Char16 operator+(const Char16 &arg1, const Char16 &arg2)
bool operator==(const Array< T > &x, const Array< T > &y)
Char16(UInt32 val)
Create a new Char16 object of an unsigned 32 bit value.
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.
Char16 operator/(const Char16 &arg1, const Char16 &arg2)
bool operator<=(const Array< T > &x, const Array< T > &y)
Determine if one Array is less than or equal to another.
bool operator>(const Array< T > &x, const Array< T > &y)
Determine if one Array is greater than another.