Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

AnonymousString Class Reference

Inheritance diagram for AnonymousString:

UniString UniString List of all members.

Public Member Functions

 this ()
AnonymousString set (char[] content)
AnonymousString set (wchar[] content)
AnonymousString set (dchar[] content)
char[] utf8 (char[] dst=null)
wchar[] utf16 (wchar[] dst=null)
dchar[] utf32 (dchar[] dst=null)
void[] convert (void[] dst, uint dstType, uint *ate)
void set (char[] content)
void set (wchar[] content)
void set (dchar[] content)

Private Member Functions

AnonymousString set (void[] content, uint type)
void[] update (void[] ret)

Private Attributes

uint type
bool local
void[] buffer
void[] content

Detailed Description

Anonymous string can used to pass encoding-agnostic content across contract boundaries

Definition at line 71 of file AnonymousString.d.


Member Function Documentation

this  )  [inline]
 

Construct an AnonymousString ~ set up conversion buffer

Definition at line 84 of file AnonymousString.d.

References buffer.

AnonymousString set char[]  content  )  [inline]
 

Set utf8 content

Definition at line 95 of file AnonymousString.d.

Referenced by set().

AnonymousString set wchar[]  content  )  [inline]
 

Set utf16 content

Definition at line 106 of file AnonymousString.d.

References set().

AnonymousString set dchar[]  content  )  [inline]
 

Set utf32 content

Definition at line 117 of file AnonymousString.d.

References set().

AnonymousString set void[]  content,
uint  type
[inline, private]
 

Set content

Definition at line 128 of file AnonymousString.d.

References content, type(), and type.

char [] utf8 char[]  dst = null  )  [inline]
 

Convert to the UniString types. The optional argument dst will be resized as required to house the conversion. To minimize heap allocation, use the following pattern:

String string;

wchar[] buffer; wchar[] result = string.toUtf16 (buffer);

if (result.length > buffer.length) buffer = result;

You can also provide a buffer from the stack, but the output will be moved to the heap if said buffer is not large enough

Reimplemented from UniString.

Definition at line 154 of file AnonymousString.d.

References convert().

wchar [] utf16 wchar[]  dst = null  )  [inline]
 

Reimplemented from UniString.

Definition at line 159 of file AnonymousString.d.

References convert().

dchar [] utf32 dchar[]  dst = null  )  [inline]
 

Reimplemented from UniString.

Definition at line 164 of file AnonymousString.d.

References convert().

void [] convert void[]  dst,
uint  dstType,
uint *  ate
[inline]
 

Convert to the UniString types. Output buffer argument dst will be resized as required to house the conversion. To minimize heap allocation, use the following pattern:

String string;

wchar[] buffer; wchar[] result = string.toUtf16 (buffer);

if (result.length > buffer.length) buffer = result;

You can also provide a buffer from the stack, but the output will be moved to the heap if said buffer is not large enough

Definition at line 188 of file AnonymousString.d.

References assert(), buffer, content, local, type, and update().

Referenced by utf16(), utf32(), and utf8().

void [] update void[]  ret  )  [inline, private]
 

Definition at line 255 of file AnonymousString.d.

References buffer, and local.

Referenced by convert().

void set char[]  content  ) 
 

void set wchar[]  content  ) 
 

void set dchar[]  content  ) 
 


Member Data Documentation

uint type [private]
 

Definition at line 73 of file AnonymousString.d.

Referenced by convert(), and set().

bool local [private]
 

Definition at line 74 of file AnonymousString.d.

Referenced by convert(), and update().

void [] buffer [private]
 

Definition at line 75 of file AnonymousString.d.

Referenced by convert(), this(), and update().

void [] content [private]
 

Definition at line 76 of file AnonymousString.d.

Referenced by convert(), and set().


The documentation for this class was generated from the following files:
Generated on Sat Dec 24 17:28:37 2005 for Mango by  doxygen 1.4.0