sword::StringMgr Class Reference

StringMgr is a way to provide UTf8 handling by the Sword frontend Each platform, if it's up-to-date, should provide functions to handle unicode and utf8. More...

#include <stringmgr.h>

Collaboration diagram for sword::StringMgr:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual char * upperUTF8 (char *text, unsigned int max=0) const
 Converts the param to an upper case Utf8 string.
virtual char * upperLatin1 (char *text, unsigned int max=0) const
 Converts the param to an uppercase latin1 string.

Static Public Member Functions

static void setSystemStringMgr (StringMgr *newStringMgr)
 Sets the global StringMgr handle.
static StringMgr * getSystemStringMgr ()
 Returns the global StringMgr handle.
static bool hasUTF8Support ()
 Checks whether Utf8 support is available.

Protected Member Functions

 StringMgr ()
 Default constructor.
 StringMgr (const StringMgr &)
 Copy constructor.
virtual ~StringMgr ()
 Destructor.
virtual bool supportsUnicode () const

Static Private Attributes

static StringMgr * systemStringMgr

Friends

class __staticsystemStringMgr

Detailed Description

StringMgr is a way to provide UTf8 handling by the Sword frontend Each platform, if it's up-to-date, should provide functions to handle unicode and utf8.

This class makes it possible to implement Unicode support on the user-side and not in Sword itself.

Definition at line 36 of file stringmgr.h.


Constructor & Destructor Documentation

sword::StringMgr::StringMgr (  )  [protected]

Default constructor.

Protected to make instances on user side impossible, because this is a Singleton


Member Function Documentation

static void sword::StringMgr::setSystemStringMgr ( StringMgr *  newStringMgr  )  [static]

Sets the global StringMgr handle.

Parameters:
newStringMgr The new global StringMgr. This pointer will be deleted by this StringMgr

static StringMgr* sword::StringMgr::getSystemStringMgr (  )  [static]

Returns the global StringMgr handle.

Returns:
The global string handle

static bool sword::StringMgr::hasUTF8Support (  )  [inline, static]

Checks whether Utf8 support is available.

Override the function supportsUnicode() to tell whether your implementation has utf8 support.

Returns:
True if this implementation provides support for Utf8 handling or false if just latin1 handling is available

Definition at line 53 of file stringmgr.h.

virtual char* sword::StringMgr::upperUTF8 ( char *  text,
unsigned int  max = 0 
) const [virtual]

Converts the param to an upper case Utf8 string.

Parameters:
text The text encoded in utf8 which should be turned into an upper case string
max Only change max chars

virtual char* sword::StringMgr::upperLatin1 ( char *  text,
unsigned int  max = 0 
) const [virtual]

Converts the param to an uppercase latin1 string.

Parameters:
text The text encoded in latin1 which should be turned into an upper case string


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