eVaf
|
Namespaces | |
Internal | |
Internal implementation of the common eVaf library. | |
Classes | |
class | Event |
Event class for all the eVaf events. More... | |
class | iApp |
eVaf application interface More... | |
class | iConfig |
eVaf configuration interface. More... | |
class | iEventQueue |
The eVaf event queue interface. More... | |
class | iLogger |
Logger interface for eVaf modules and applications. More... | |
class | IniFile |
Class for reading and writing parameter values in INI files. More... | |
class | iProp |
Global properties and variables for eVaf applications. More... | |
class | iRegistry |
Common registry for interfaces. More... | |
Typedefs | |
typedef void(* | FatalMsgHandler) (QString const &msg, QString const &source, QString const &where) |
Prototype for custom fatal message handler. More... | |
Functions | |
COMMON_EXPORT QByteArray | binFromEscapedCharArray (QByteArray const &str) |
Converts escaped 7-bit character arrays to binary arrays. More... | |
COMMON_EXPORT QByteArray | binToEscapedCharArray (QByteArray const &src) |
Converts binary arrays to escaped 7-bit character arrays. More... | |
bool COMMON_EXPORT | init () |
eVaf common library initialized More... | |
bool | isFalse (QString const &str) |
Tests if the string means 'false'. More... | |
bool | isTrue (QString const &str) |
Tests if the string means 'true'. More... | |
COMMON_EXPORT QString | strFromEscapedCharArray (QByteArray const &str) |
Converts escaped 7-bit character arrays to unicode string. More... | |
COMMON_EXPORT QByteArray | strToEscapedCharArray (QString const &str) |
Converts unicode strings to escaped 7-bit character arrays. More... | |
COMMON_EXPORT QVariant | toVariant (QString const &value, QVariant const &defaultValue) |
Converts strings to variant values. More... | |
This library contains interfaces, classes and functions shared by all the eVaf applications and modules. This library is the required dependency for all the other libraries, modules and applications.
The common eVaf library shall be initialized with the eVaf::Common::init() function.
typedef void(* eVaf::Common::FatalMsgHandler) (QString const &msg, QString const &source, QString const &where) |
Prototype for custom fatal message handler.
This is a typedef for a pointer to a function with the following signature:
COMMON_EXPORT QByteArray eVaf::Common::binFromEscapedCharArray | ( | QByteArray const & | str | ) |
Converts escaped 7-bit character arrays to binary arrays.
str | Escaped 7-bit character array |
This function converts an escaped 7-bit character array to the binary array. Numeric character references and character entoty references are expanded to characters and binary bytes.
COMMON_EXPORT QByteArray eVaf::Common::binToEscapedCharArray | ( | QByteArray const & | src | ) |
Converts binary arrays to escaped 7-bit character arrays.
src | Binary array |
This function converts a binary array to the escaped 7-bit character array. Bytes that cannot be output directly as printable 7-bit characters are output as numeric character references. The result can be directly inserted into XML or HTML documents and later converted back with the eVaf::Common::binFromEscapedCharArray() function.
For example, "Hello\r\n" becomes "Hello
".
bool COMMON_EXPORT eVaf::Common::init | ( | ) |
|
inline |
|
inline |
COMMON_EXPORT QString eVaf::Common::strFromEscapedCharArray | ( | QByteArray const & | str | ) |
Converts escaped 7-bit character arrays to unicode string.
str | Escaped 7-bit character array |
This function converts an escaped 7-bit character array to the unicode string. Numeric character references and character entity references are expanded to actual unicode characters.
COMMON_EXPORT QByteArray eVaf::Common::strToEscapedCharArray | ( | QString const & | str | ) |
Converts unicode strings to escaped 7-bit character arrays.
str | Unicode string |
This function converts a unicode (or any) string to the escaped 7-bit character array. Characters that cannot be output directly as a printable 7-bit character are output as numeric character references. The result can be directly inserted into XML or HTML documents and later converted back with the eVaf::Common::strFromEscapedCharArray() function.
For example, "Groß" becomes "Groß".
COMMON_EXPORT QVariant eVaf::Common::toVariant | ( | QString const & | value, |
QVariant const & | defaultValue | ||
) |
Converts strings to variant values.
value | The string |
defaultValue | The default value |
This function converts strings to variant values. The type of the expected value is determined from the default value. If the string fails to convert to the expected type, returns the default value.
If the default value is of one of the following types, then the following conversion rules are applied: