39#ifndef BLOCXX_CHAR16_HPP_INCLUDE_GUARD_
40#define BLOCXX_CHAR16_HPP_INCLUDE_GUARD_
41#include "blocxx/BLOCXX_config.h"
72 explicit Char16(
char c) : m_value(c) {}
90 explicit Char16(Int16 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)) {}
143 operator UInt16()
const {
return getValue(); }
159 bool operator== (
const Char16& arg)
const
168 bool operator!= (
const Char16& arg)
const
187 bool operator<= (
const Char16& arg)
const
206 bool operator>= (
const Char16& arg)
const
256 String toUTF8() const BLOCXX_DEPRECATED;
265 void writeObject(
std::streambuf & ostrm) const;
270 void readObject(
std::streambuf & istrm);
276inline
bool operator== (
char c, const
Char16& arg)
280inline bool operator== (
const Char16& arg,
int v)
284inline bool operator== (
int v,
const Char16& arg)
288inline bool operator!= (
const Char16& arg,
int v)
292inline bool operator!= (
int v,
const Char16& arg)
296inline bool operator!= (
char c,
const Char16& arg)
300inline bool operator< (
char c,
const Char16& arg)
304inline bool operator<= (
char c,
const Char16& arg)
308inline bool operator> (
char c,
const Char16& arg)
312inline bool operator>= (
char c,
const Char16& arg)
332BLOCXX_COMMON_API std::ostream& operator<< (std::ostream& ostrm,
const Char16& arg);
#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.
The Bool class is an abstraction for the boolean data type.
The Char16 class is an abstraction for a double byte character.
Char16(UInt8 val)
Create a new Char16 object of an unsigned 8 bit value.
Char16(Int32 val)
Create a new Char16 object of an signed 32 bit value.
Char16(Int16 val)
Create a new Char16 object of an signed 16 bit value.
Char16()
Create a new Char16 object with a value of zero.
Char16(UInt32 val)
Create a new Char16 object of an unsigned 32 bit value.
Char16(Real64 val)
Create a new Char16 object from a real 64 value.
Char16(const Char16 &arg)
Copy constructor.
Char16(UInt64 val)
Create a new Char16 object of an unsigned 64 bit value.
Char16(Int64 val)
Create a new Char16 object of an signed 64 bit value.
Char16(Real32 val)
Create a new Char16 object from a real 32 value.
Char16(char c)
Create a new Char16 object from a single byte character.
Char16(Bool val)
Create a new Char16 object from a boolean value.
Char16(UInt16 val)
Create a new Char16 object of an unsigned 16 bit value.
Char16(Int8 val)
Create a new Char16 object of an signed 8 bit value.
This String class is an abstract data type that represents as NULL terminated string of characters.