Adobe.com
Contents Suites Classes Class Index Member Index

ai::WCHARStr Class Reference

In Windows only. More...

#include <IAIUnicodeString.h>

List of all members.

Public Types

typedef wchar_t WCHAR
 Type equivalent to Windows WCHAR type.
typedef const WCHARLPCWSTR
 Type equivalent to Windows LPCWSTR type.
typedef WCHARLPWSTR
 Type equivalent to Windows LPWSTR type.

Public Member Functions

 WCHARStr ()
 Constructs an empty WCHARStr object.
 WCHARStr (const ai::UnicodeString &string)
 Constructs a WCHARStr object from the contents of a UnicodeString.
 WCHARStr (const ASUnicode *string)
 Constructs a WCHARStr object from the contents pointed at by a 0-terminated array of ASUnicode.
 WCHARStr (const WCHARStr &p)
 Copy constructor, creates a copy of a WCHARStr object.
virtual ~WCHARStr ()
 Destructor.
WCHARStroperator= (const WCHARStr &rhs)
 Assignment operator.
LPCWSTR as_LPCWSTR () const
 Converts the contents of this object to LPCWSTR.
const ASUnicodeas_ASUnicode () const
 Converts the contents of this object to ASUnicode.
size_t length () const
 Computes the length of the string contents of this object.
 operator const ASUnicode * () const

Protected Attributes

std::basic_string< WCHARfConstStr

Detailed Description

In Windows only.

An adapter object that helps move data back and forth between Windows functions and the UnicodeString class when the VisualStudio compiler's options are set to treat wchar_t as an intrinsic type.

This class requires that UTF16 and wchar_t be the same size.

This class provides a very thin object veneer on the Windows string pointer types. The object takes a copy of the data with which it is constructed.


Member Typedef Documentation

typedef const WCHAR* ai::WCHARStr::LPCWSTR

Type equivalent to Windows LPCWSTR type.

Type equivalent to Windows LPWSTR type.

typedef wchar_t ai::WCHARStr::WCHAR

Type equivalent to Windows WCHAR type.


Constructor & Destructor Documentation

ai::WCHARStr::WCHARStr (  )  [inline]

Constructs an empty WCHARStr object.

Returns:
The WCHARStr object.
ai::WCHARStr::WCHARStr ( const ai::UnicodeString string  )  [inline]

Constructs a WCHARStr object from the contents of a UnicodeString.

Parameters:
string The source Unicode string.
Returns:
The WCHARStr object.

References AI_STATIC_CHECK, and fConstStr.

ai::WCHARStr::WCHARStr ( const ASUnicode string  )  [inline]

Constructs a WCHARStr object from the contents pointed at by a 0-terminated array of ASUnicode.

It is assumed that the contents of the source are UTF-16 code units in platform byte order.

Parameters:
string The source string data, UTF-16 code units in platform byte order.

References AI_STATIC_CHECK, and fConstStr.

ai::WCHARStr::WCHARStr ( const WCHARStr p  )  [inline]

Copy constructor, creates a copy of a WCHARStr object.

Parameters:
p The object to copy.
virtual ai::WCHARStr::~WCHARStr (  )  [inline, virtual]

Destructor.


Member Function Documentation

const ASUnicode * ai::WCHARStr::as_ASUnicode (  )  const [inline]

Converts the contents of this object to ASUnicode.

The returned value is only valid for the lifetime of this object.

Returns:
A pointer to the ASUnicode value.

References AI_STATIC_CHECK, and as_LPCWSTR().

Referenced by operator const ASUnicode *().

LPCWSTR ai::WCHARStr::as_LPCWSTR (  )  const [inline]

Converts the contents of this object to LPCWSTR.

The returned value is only valid for the lifetime of this object.

Returns:
The LPCWSTR value.

References fConstStr.

Referenced by as_ASUnicode().

size_t ai::WCHARStr::length (  )  const [inline]

Computes the length of the string contents of this object.

Returns:
The number of WCHAR characters.

References fConstStr.

ai::WCHARStr::operator const ASUnicode * (  )  const [inline]

References as_ASUnicode().

WCHARStr& ai::WCHARStr::operator= ( const WCHARStr rhs  )  [inline]

Assignment operator.

References fConstStr.


Member Data Documentation

std::basic_string<WCHAR> ai::WCHARStr::fConstStr [protected]

The documentation for this class was generated from the following file:


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks