OWBI1::Char16 Class Reference

The Char16 class is an abstraction for a double byte character. More...

#include <OWBI1_Char16.hpp>

List of all members.

Public Types

typedef UInt16 Char16::* safe_bool

Public Member Functions

 Char16 ()
 Create a new Char16 object with a value of zero.
 Char16 (const Char16 &arg)
 Copy constructor.
 Char16 (char c)
 Create a new Char16 object from a single byte character.
 Char16 (const String &x)
 Create a new Char16 object from the 1st byte of a string.
 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.
 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.
 Char16 (UInt32 val)
 Create a new Char16 object of an unsigned 32 bit value.
 Char16 (Int32 val)
 Create a new Char16 object of an signed 32 bit value.
 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 (Real64 val)
 Create a new Char16 object from a real 64 value.
 Char16 (Bool val)
 Create a new Char16 object from a boolean value.
UInt16 getValue () const
 operator UInt16 () const
Char16operator= (const Char16 &arg)
 Assignment operator.
bool operator== (const Char16 &arg) const
 Equality operator.
bool operator!= (const Char16 &arg) const
 Inequality operator.
bool operator< (const Char16 &arg) const
 Less than operator.
bool operator<= (const Char16 &arg) const
 Less than or equal operator.
bool operator> (const Char16 &arg) const
 Greater than operator.
bool operator>= (const Char16 &arg) const
 Greater than or equal operator.
Char16operator+= (const Char16 &arg)
 Add another Char16 object to this one.
Char16operator-= (const Char16 &arg)
 Subtract another Char16 object from this one.
Char16operator *= (const Char16 &arg)
 Multiply this Char16 object by another.
Char16operator/= (const Char16 &arg)
 Divide this Char16 object by another.
 operator safe_bool () const
bool operator! () const
String toString () const
 Convert this to UTF8.
void writeObject (std::ostream &ostrm) const
 Write this object to an output stream.
void readObject (std::istream &istrm)
 Read this object from an input stream.

Private Attributes

UInt16 m_value


Detailed Description

The Char16 class is an abstraction for a double byte character.

Definition at line 52 of file OWBI1_Char16.hpp.


Member Typedef Documentation

typedef UInt16 Char16::* OWBI1::Char16::safe_bool
 

Definition at line 247 of file OWBI1_Char16.hpp.


Constructor & Destructor Documentation

OWBI1::Char16::Char16  )  [inline]
 

Create a new Char16 object with a value of zero.

Definition at line 58 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 const Char16 arg  )  [inline]
 

Copy constructor.

Parameters:
arg The Char16 object this object will be a copy of.

Definition at line 63 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 char  c  )  [inline, explicit]
 

Create a new Char16 object from a single byte character.

Parameters:
c The character this Char16 object will contain.

Definition at line 68 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 const String x  )  [explicit]
 

Create a new Char16 object from the 1st byte of a string.

Parameters:
x The string to take the character from that will be contained by this Char16 object.

Definition at line 58 of file OWBI1_Char16.cpp.

References OWBI1::String::c_str(), m_value, and OW_NAMESPACE::UTF8Utils::UTF8toUCS2().

OWBI1::Char16::Char16 UInt16  val  )  [inline]
 

Create a new Char16 object of an unsigned 16 bit value.

Note that this constructor is explicitly non-explicit :-) IOW, implicit conversion from UInt16 is desireable for this class.

Parameters:
val The unsigned 16 bit value this object will contain.

Definition at line 81 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Int16  val  )  [inline, explicit]
 

Create a new Char16 object of an signed 16 bit value.

Parameters:
val The signed 16 bit value this object will contain.

Definition at line 86 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 UInt8  val  )  [inline, explicit]
 

Create a new Char16 object of an unsigned 8 bit value.

Parameters:
val The unsigned 8 bit value this object will contain.

Definition at line 91 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Int8  val  )  [inline, explicit]
 

Create a new Char16 object of an signed 8 bit value.

Parameters:
val The signed 8 bit value this object will contain.

Definition at line 96 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 UInt32  val  )  [inline, explicit]
 

Create a new Char16 object of an unsigned 32 bit value.

Parameters:
val The unsigned 32 bit value this object will contain.

Definition at line 101 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Int32  val  )  [inline, explicit]
 

Create a new Char16 object of an signed 32 bit value.

Parameters:
val The signed 32 bit value this object will contain.

Definition at line 106 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 UInt64  val  )  [inline, explicit]
 

Create a new Char16 object of an unsigned 64 bit value.

Parameters:
val The unsigned 64 bit value this object will contain.

Definition at line 111 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Int64  val  )  [inline, explicit]
 

Create a new Char16 object of an signed 64 bit value.

Parameters:
val The signed 64 bit value this object will contain.

Definition at line 116 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Real32  val  )  [inline, explicit]
 

Create a new Char16 object from a real 32 value.

Parameters:
val The real 32 value this object will contain.

Definition at line 121 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Real64  val  )  [inline, explicit]
 

Create a new Char16 object from a real 64 value.

Parameters:
val The real 64 value this object will contain.

Definition at line 126 of file OWBI1_Char16.hpp.

OWBI1::Char16::Char16 Bool  val  )  [inline, explicit]
 

Create a new Char16 object from a boolean value.

Parameters:
val The boolean value this object will contain.

Definition at line 131 of file OWBI1_Char16.hpp.


Member Function Documentation

UInt16 OWBI1::Char16::getValue  )  const [inline]
 

Returns:
The value of this object as a unsigned 16 bit value.

Definition at line 135 of file OWBI1_Char16.hpp.

Referenced by OWBI1::CIMValue::get(), OWBI1::operator *(), OWBI1::operator!=(), OWBI1::operator+(), OWBI1::operator-(), OWBI1::operator/(), OWBI1::operator<<(), and OWBI1::operator==().

Char16& OWBI1::Char16::operator *= const Char16 arg  )  [inline]
 

Multiply this Char16 object by another.

Parameters:
arg The Char16 object to multiply this one by.
Returns:
A reference to this object.

Definition at line 231 of file OWBI1_Char16.hpp.

References m_value.

OWBI1::Char16::operator safe_bool  )  const [inline]
 

Definition at line 248 of file OWBI1_Char16.hpp.

References m_value.

OWBI1::Char16::operator UInt16  )  const [inline]
 

Returns:
The value of this object as a unsigned 16 bit value.

Definition at line 139 of file OWBI1_Char16.hpp.

bool OWBI1::Char16::operator!  )  const [inline]
 

Definition at line 250 of file OWBI1_Char16.hpp.

bool OWBI1::Char16::operator!= const Char16 arg  )  const [inline]
 

Inequality operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if the given Char16 object is not equal to this one.

Definition at line 164 of file OWBI1_Char16.hpp.

References m_value.

Char16& OWBI1::Char16::operator+= const Char16 arg  )  [inline]
 

Add another Char16 object to this one.

Parameters:
arg The Char16 object to add to this one.
Returns:
A reference to this object.

Definition at line 211 of file OWBI1_Char16.hpp.

References m_value.

Char16& OWBI1::Char16::operator-= const Char16 arg  )  [inline]
 

Subtract another Char16 object from this one.

Parameters:
arg The Char16 object to subtract from this one.
Returns:
A reference to this object.

Definition at line 221 of file OWBI1_Char16.hpp.

References m_value.

Char16& OWBI1::Char16::operator/= const Char16 arg  )  [inline]
 

Divide this Char16 object by another.

Parameters:
arg The Char16 object to divide this one by.
Returns:
A reference to this object.

Definition at line 241 of file OWBI1_Char16.hpp.

References m_value.

bool OWBI1::Char16::operator< const Char16 arg  )  const [inline]
 

Less than operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if this object is less than the given Char16 object.

Definition at line 173 of file OWBI1_Char16.hpp.

References m_value.

bool OWBI1::Char16::operator<= const Char16 arg  )  const [inline]
 

Less than or equal operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if this object is less than or equal to the given Char16 object.

Definition at line 183 of file OWBI1_Char16.hpp.

References m_value.

Char16& OWBI1::Char16::operator= const Char16 arg  )  [inline]
 

Assignment operator.

Parameters:
arg The Char16 to assign to this object.
Returns:
A reference to this object after the assignment has been made.

Definition at line 145 of file OWBI1_Char16.hpp.

References m_value.

bool OWBI1::Char16::operator== const Char16 arg  )  const [inline]
 

Equality operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if the given Char16 object is equal to this one.

Definition at line 155 of file OWBI1_Char16.hpp.

References m_value.

bool OWBI1::Char16::operator> const Char16 arg  )  const [inline]
 

Greater than operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if this object is greater than the given Char16 object.

Definition at line 192 of file OWBI1_Char16.hpp.

References m_value.

bool OWBI1::Char16::operator>= const Char16 arg  )  const [inline]
 

Greater than or equal operator.

Parameters:
arg The Char16 object to compare this object with.
Returns:
true if this object is greater than or equal to the given Char16 object.

Definition at line 202 of file OWBI1_Char16.hpp.

References m_value.

void OWBI1::Char16::readObject std::istream &  istrm  ) 
 

Read this object from an input stream.

Parameters:
istrm The input stream to read this object from.

String OWBI1::Char16::toString  )  const
 

Convert this to UTF8.

Definition at line 65 of file OWBI1_Char16.cpp.

References m_value, and OW_NAMESPACE::UTF8Utils::UCS2toUTF8().

Referenced by OWBI1::StringBuffer::operator+=().

void OWBI1::Char16::writeObject std::ostream &  ostrm  )  const
 

Write this object to an output stream.

Parameters:
ostrm The output stream to write this object to.


Member Data Documentation

UInt16 OWBI1::Char16::m_value [private]
 

Definition at line 267 of file OWBI1_Char16.hpp.

Referenced by Char16(), operator *=(), operator safe_bool(), operator!=(), operator+=(), operator-=(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), and toString().


The documentation for this class was generated from the following files:
Generated on Thu Feb 9 09:18:24 2006 for openwbem by  doxygen 1.4.6