ML Reference
Reentrant Classes

Classes

class  ml::SubImage
 This class manages/represents a rectangular 6d image region which is organized linearly in memory. More...
class  ml::TSubImageBox< intT >
 This class defines a rectangular subimage region of standard ML dimensions. More...
class  ml::TSubImage< DATATYPE >
 This template class manages/represents a rectangular 6d image region in memory which is organized linearly. More...
class  ml::DateTime
 Class for performing date/time arithmetics, comparisons and formatting. More...
class  ml::RuntimeDict
 This file declares the class RuntimeDict, which manages a set of instances of class RuntimeTypes. More...
class  ml::RuntimeType
 RuntimeType contains type and inheritance information of a class and a static dictionary with information on all created instances of RuntimeType. More...

File access functions working with valid UTF-8 Unicode file names

ML_UTILS_EXPORT FILE * MLfopen (const char *fileName, const char *mode) ML_RETURN_VALUE_SHOULD_BE_USED
 Thread-safety: These functions are reentrant.

Unicode string conversion

ML_UTILS_EXPORT MLuint16MLConvertUTF8ToUTF16 (const char *inputString) ML_RETURN_VALUE_SHOULD_BE_USED
 Thread-safety: These functions are reentrant.
ML_UTILS_EXPORT MLuint32MLConvertUTF8ToUTF32 (const char *inputString) ML_RETURN_VALUE_SHOULD_BE_USED
 Converts the given char string inputString (UTF8, terminated by 0) to UTF32, returns a newly allocated string that must be freed with MLFree(), returns NULL on error.
ML_UTILS_EXPORT char * MLConvertUTF16ToUTF8 (const MLuint16 *inputWideString) ML_RETURN_VALUE_SHOULD_BE_USED
 Converts the given wide string inputWideString (UTF16, terminated by 0) to UTF8, returns a newly allocated wide string that must be freed with MLFree(), returns NULL on error.
ML_UTILS_EXPORT char * MLConvertUTF8ToLatin1 (const char *inputUTFString) ML_RETURN_VALUE_SHOULD_BE_USED
 Converts the given UTF8 encoded and null terminated string inputUTFString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(), returns NULL on error.
ML_UTILS_EXPORT char * MLConvertUTF16ToLatin1 (const MLuint16 *inputUTF16WideString) ML_RETURN_VALUE_SHOULD_BE_USED
 Converts the given UTF16 encoded wide and null terminated string inputUTF16WideString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(), returns NULL on error.
ML_UTILS_EXPORT char * MLConvertLatin1ToUTF8 (const char *inputLatin1String) ML_RETURN_VALUE_SHOULD_BE_USED
 Converts the given Latin1 encoded and null terminated string inputLatin1String into a UTF8 string, the returned string must be freed with MLFree(), returns NULL on error.
ML_UTILS_EXPORT MLuint16MLConvertLatin1ToUTF16 (const char *inputLatin1String) ML_RETURN_VALUE_SHOULD_BE_USED
 Convert the given Latin1 encoded and null terminated string inputLatin1String to a UTF16 string, the returned string must be freed with MLFree(), returns NULL on error.

Detailed Description

The following classes in the ML are known to be reentrant. This means that different instances of a reentrant class can be used different threads, but two different threads may not access the same instance at the same time (so manual synchronization is needed if two threads want to access the same instance).

Note: This list is not yet complete, but it will grow over time.


Function Documentation

ML_UTILS_EXPORT MLuint16* MLConvertLatin1ToUTF16 ( const char *  inputLatin1String)

Convert the given Latin1 encoded and null terminated string inputLatin1String to a UTF16 string, the returned string must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT char* MLConvertLatin1ToUTF8 ( const char *  inputLatin1String)

Converts the given Latin1 encoded and null terminated string inputLatin1String into a UTF8 string, the returned string must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT char* MLConvertUTF16ToLatin1 ( const MLuint16 inputUTF16WideString)

Converts the given UTF16 encoded wide and null terminated string inputUTF16WideString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT char* MLConvertUTF16ToUTF8 ( const MLuint16 inputWideString)

Converts the given wide string inputWideString (UTF16, terminated by 0) to UTF8, returns a newly allocated wide string that must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT char* MLConvertUTF8ToLatin1 ( const char *  inputUTFString)

Converts the given UTF8 encoded and null terminated string inputUTFString to a Latin1 string, converting all non Latin1 chars to '?', the returned string must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT MLuint16* MLConvertUTF8ToUTF16 ( const char *  inputString)

Thread-safety: These functions are reentrant.

Converts the given char string inputString (UTF8, terminated by 0) to UTF16, returns a newly allocated string that must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT MLuint32* MLConvertUTF8ToUTF32 ( const char *  inputString)

Converts the given char string inputString (UTF8, terminated by 0) to UTF32, returns a newly allocated string that must be freed with MLFree(), returns NULL on error.

ML_UTILS_EXPORT FILE* MLfopen ( const char *  fileName,
const char *  mode 
)

Thread-safety: These functions are reentrant.

Opens the file with name fileName with the access permissions given by mode, and returns a FILE pointer or NULL on failure. This method is equivalent to the stdio fopen implementation, see the fopen documentation for available mode flags ("r","w","a",...). In contrast to the original fopen method, this method accepts an UTF-8 encoded string and uses the unicode WIN32 API on Windows. On Unix systems, this method maps to fopen directly. If NULL is returned then errno describes the error.