VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions
makVrf::DtClonableUnicode Class Reference
Inheritance diagram for makVrf::DtClonableUnicode:
Inheritance graph
[legend]

Public Member Functions

 DtClonableUnicode ()
 CTOR.
 DtClonableUnicode (const makVrv::DtUnicode &orig)
 DtClonableUnicode (const DtClonableUnicode &orig)
virtual ~DtClonableUnicode ()
virtual DtClonableUnicodeclone () const
- Public Member Functions inherited from makVrv::DtUnicode
 DtUnicode ()
 CTOR creates an empty string.
 ~DtUnicode ()
 DTOR may NOT deallocate memory as this string may share data.
 DtUnicode (size_t len, DtUnicodeChar c=DtUnicodeChar('\0'))
 CTOR create a string of n length filled with the unicode character c.
 DtUnicode (const DtUnicode &str)
 Copy ctor copies the string, this function will NOT allocate memory for the string, and thus it is fast to pass by value, and create many identical copies of a string.
DtUnicodeoperator= (const DtUnicode &str)
 Assignment operator copies the string, this function will NOT allocate memory for the string, and thus it is fast to pass by value, and create many identical copies of a string.
template<typename QStringType , typename QCoreApp >
QStringType translate () const
 Utility function for translating a DtUnicode variable initialized using the static DtUnicode::tr function, and QLinguist.
void setFromWCharArray (const wchar_t utf16[], int len=-1)
 Initialize via specifying encoding.
void setFromUtf8 (const unsigned char *utf8, int len=-1)
 Set from an UTF-8 encoded string, the string MUST be zero terminated if the length is not passed.
void setFromUtf8 (const std::string &utf8)
void setFromLatin1 (const char *latin, int len=-1)
 Set from an UTF-8 encoded string, the string MUST be zero terminated if the length is not passed.
void setFromUtf16 (const unsigned short *utf16, int len=-1)
 Set from an UTF-16 encoded string, the string MUST be zero terminated if the length is not passed.
void setFromUtf32 (const unsigned int *utf32, int len=-1)
 Set from an UTF-32 encoded string, the string MUST be zero terminated if the length is not passed.
void setFromAscii (const std::string &ascii)
 Set from an ascii string, the string MUST be zero terminated if the length is not passed.
void setFromAscii (const char *ascii, int len=-1)
 Set from an ascii string, the string MUST be zero terminated if the length is not passed.
template<typename QStringType >
void setFromQString (QStringType qstr)
 Template function for setting from Qt 4 style string.
void toAscii (std::string &str) const
 Decode via specifying encoding.
std::string toAscii () const
void toLatin1 (std::string &str) const
 Encode to an Latin-1 string.
std::string toLatin1 () const
void toUtf8 (std::string &str) const
std::string toUtf8 () const
void toWideString (std::wstring &str) const
std::wstring toWideString () const
template<typename QStringType >
QStringType toQString () const
 Template function for outputting a Qt 4 style string.
template<typename QStringType >
void toQString (QStringType &qstr) const
 Template function for initializing a Qt 4 style string.
DtUnicodeoperator+= (const DtUnicode &str)
 Append a string to the end.
DtUnicodeoperator+= (const DtUnicodeChar &x)
 Append a character to the end.
DtUnicode operator+ (const DtUnicode &str) const
 Append two strings together.
bool operator== (const DtUnicode &other) const
 Test if two strings are identical.
bool operator!= (const DtUnicode &other) const
 Test if two strings are not identical.
bool operator< (const DtUnicode &other) const
 Test if a string is less than another based on their first different character or the length.
size_t length () const
 Get the length in Code Units.
size_t sizeInBytes () const
 Get the size in 8bit bytes.
size_t calculateCodePoints () const
 Calculate the number of Code Points.
const CodeUnitcodeUnits () const
 Get an array of code units.
int indexOf (const DtUnicodeChar &x, size_t pos=0) const
 Search for a character starting a pos, returns index, or -1 if not found.
int indexOf (const DtUnicode &x, size_t pos=0) const
 Search for a string starting a pos, returns index, or -1 if not found.
DtUnicode subString (size_t pos=0, int len=-1) const
 Create a substring starting at position, for n characters.
void push_back (const DtUnicodeChar &x)
 Append a unicode character to the string.
void resize (int size)
 Resize a string to a new size, if the size < 0 the string will be empty.

Additional Inherited Members

- Public Types inherited from makVrv::DtUnicode
typedef unsigned short CodeUnit
- Static Public Member Functions inherited from makVrv::DtUnicode
static DtUnicode fromWCharArray (const wchar_t utf16[], int len=-1)
 Static create via specifying encoding.
static DtUnicode fromWideString (const std::wstring &str)
 Set from a std::wstring.
static DtUnicode fromUtf8 (const unsigned char *utf8, int len=-1)
 Create a unicode string from an UTF-16 encoded string, the string MUST be zero terminated if the length is not passed.
static DtUnicode fromUtf8 (const std::string &utf8)
static DtUnicode fromUtf16 (const unsigned short *utf16, int len=-1)
 Create a unicode string from an UTF-16 encoded string, the string MUST be zero terminated if the length is not passed.
static DtUnicode fromUtf32 (const unsigned int *utf32, int len=-1)
 Create a unicode string from an UTF-32 encoded string, the string MUST be zero terminated if the length is not passed.
static DtUnicode fromAscii (const std::string &ascii)
 Create a unicode string from an ascii string, the string MUST be zero terminated if the length is not passed.
static DtUnicode fromAscii (const char *ascii, int len=-1)
 Create a unicode string from an ascii string, the string MUST be zero terminated if the length is not passed.
static DtUnicode tr (const char *ascii)
 Ascii translation function, used to be compatible with Qt's translation tools.
template<typename QStringType >
static DtUnicode fromQString (QStringType qstr)
 Template function for setting from Qt 4 style string.
- Protected Types inherited from makVrv::DtUnicode
enum  Encoding { Ascii, Latin1, Utf8 }
- Protected Member Functions inherited from makVrv::DtUnicode
 DtUnicode (const char *ascii, int len=-1, Encoding encoding=Ascii)
 DtUnicode (const unsigned short *utf16, int len=-1)
 DtUnicode (const unsigned int *utf32, int len=-1)
 DtUnicode (const std::string &ascii)
 DtUnicode (const DtUnicode &a, const DtUnicode &b)
- Protected Attributes inherited from makVrv::DtUnicode
CodeUnitArray myCodeUnits

Constructor & Destructor Documentation

makVrf::DtClonableUnicode::DtClonableUnicode ( )
inline

CTOR.

makVrf::DtClonableUnicode::DtClonableUnicode ( const makVrv::DtUnicode orig)
inline
makVrf::DtClonableUnicode::DtClonableUnicode ( const DtClonableUnicode orig)
inline
virtual makVrf::DtClonableUnicode::~DtClonableUnicode ( )
inlinevirtual

Member Function Documentation

virtual DtClonableUnicode* makVrf::DtClonableUnicode::clone ( ) const
inlinevirtual

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)