IT_Bus::String Class Reference

#include <it_bus/string.h>

Inheritance diagram for IT_Bus::String:

IT_Bus::StringBuilder List of all members.

Detailed Description

The String class represents the public interface of the Bus internationalized string.

It has roughly the same interface as the ISO/ANSI C++ std::basic_string class.

Definition at line 21 of file string.h.

Public Types

enum  
enum  
typedef char * iterator
typedef const char * const_iterator
typedef IT_UShort UChar
 Represents a utf16 code point.

Public Member Functions

 String (const char *str, IT_StringRep::Policy policy, size_t n=npos, const char *encoding=0, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 IONA-specific constructor to allow an String to refer to an existing char[] without copying it.
 String (const UChar *uchars, IT_StringRep::Policy policy, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Constructor from utf16 characters.
 String (const UChar *sb, const IT_String &encoding, size_t n=npos, IT_StringRep::Policy policy=IT_StringRep::COPY, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Deprecated.
 String (const wchar_t *wb, size_t n=npos, IT_StringRep::Policy policy=IT_StringRep::COPY, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Constructor from wchar_t*.
size_t max_size () const
char operator[] (size_t index) const
char & at (size_t index)
Stringoperator= (const String &other)
Stringoperator= (const IT_String &other)
Stringoperator= (const char *str)
Stringoperator= (char c)
iterator insert (iterator p, char c= '\0', IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
Stringinsert (size_t pos, const UChar *uchars, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Insert utf16 characters.
Stringoperator+= (const IT_String &other)
Stringoperator+= (const String &other)
Stringoperator+= (const char *str)
Stringoperator+= (char c)
Stringappend (const UChar *uchars, size_t n=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Append utf16 characters.
iterator erase (iterator p, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
iterator erase (iterator first, iterator last, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
Stringreplace (size_t pos, size_t n, const UChar *uchars, size_t n2=npos, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER)
 Replace with utf16 string.
int compare (size_t pos1, size_t n1, const String &s, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) const
int compare (size_t pos1, size_t n1, const String &s, size_t pos2, size_t n2, IT_ExceptionHandler &eh=IT_EXCEPTION_HANDLER) const

Static Public Attributes

static const String EMPTY

Private Attributes

StringBody * m_body


Constructor & Destructor Documentation

IT_Bus::String::String ( const char *  str,
IT_StringRep::Policy  policy,
size_t  n = npos,
const char *  encoding = 0,
IT_ExceptionHandler &  eh = IT_EXCEPTION_HANDLER 
)

IONA-specific constructor to allow an String to refer to an existing char[] without copying it.

This is not a C++ standard string constructor.

IT_Bus::String::String ( const UChar uchars,
IT_StringRep::Policy  policy,
size_t  n = npos,
IT_ExceptionHandler &  eh = IT_EXCEPTION_HANDLER 
)

Constructor from utf16 characters.

Parameters:
uchars utf16 character array.
policy COPY to copy uchars, REFER to
n Number of utf16 characters. If unspecified assume uchars is null terminated point to uchars without copying.


Member Function Documentation

String& IT_Bus::String::insert ( size_t  pos,
const UChar uchars,
size_t  n = npos,
IT_ExceptionHandler &  eh = IT_EXCEPTION_HANDLER 
)

Insert utf16 characters.

Parameters:
pos Position to insert.
uchars utf16 characters to insert.
n Number of utf16 characters. If unspecified assume uchars is null terminated.

String& IT_Bus::String::append ( const UChar uchars,
size_t  n = npos,
IT_ExceptionHandler &  eh = IT_EXCEPTION_HANDLER 
)

Append utf16 characters.

Parameters:
uchars utf16 characters to insert.
n Number of utf16 characters. If unspecified assume uchars is null terminated.

String& IT_Bus::String::replace ( size_t  pos,
size_t  n,
const UChar uchars,
size_t  n2 = npos,
IT_ExceptionHandler &  eh = IT_EXCEPTION_HANDLER 
)

Replace with utf16 string.

Parameters:
pos Position of text to replace.
n Length of text to replace.
uchars utf16 string.
n Length of uchars, npos means uchars is null terminated.


Generated on Tue Mar 20 15:28:08 2007 for Artix by  doxygen 1.5.1-p1