Qt IOC Container 3.5


qic::Util Class Reference

#include <Util.h>

List of all members.


Static Public Member Functions

static Qt::ConnectionType translateConnectionType (QString type)
static QString translateVariable (QString name)
static QString getEnvVariable (QString name)
static QString getSetting (QString name, QString defaultValue)
static QString asXml (QDomNode &node)
static void loadPlugin (QString id, QString plugin_path, QHash< QString, QPluginLoader * > &loader_map, QHash< QString, QObject * > &object_map)

Detailed Description

Author:
Zhihong "John" Wang

Definition at line 16 of file Util.h.


Member Function Documentation

QString Util::asXml QDomNode &  node  )  [static]
 

Convert DOM node to QString.

Definition at line 38 of file Util.cpp.

Referenced by qic::XmlObjectDefinitionReader::parseObjectPropertySubTag().

QString Util::getEnvVariable QString  name  )  [static]
 

Get the value of environment variable specified by name.

Exceptions:
EnvironmentVariableNotFoundException 

Definition at line 93 of file Util.cpp.

Referenced by qic::XmlObjectDefinitionReader::loadInjectorPlugins(), qic::XmlObjectDefinitionReader::loadParserPlugins(), and translateVariable().

QString Util::getSetting QString  name,
QString  defaultValue
[static]
 

Get QSettings values specified by name.

Definition at line 86 of file Util.cpp.

Referenced by translateVariable().

void Util::loadPlugin QString  id,
QString  plugin_path,
QHash< QString, QPluginLoader * > &  loader_map,
QHash< QString, QObject * > &  object_map
[static]
 

Load the plugin object specified by the id and plugin path. Save it in object_map; save the loader in loader_map

Exceptions:
PluginLoadingException if cannot load plugin.

Definition at line 107 of file Util.cpp.

Referenced by qic::DefaultApplicationContext::registerReferenceInjector().

Qt::ConnectionType Util::translateConnectionType QString  type  )  [static]
 

Translate wire type from string to Qt::ConnectionType.

Supported type: auto, direct, queued.

Definition at line 19 of file Util.cpp.

Referenced by qic::DefaultApplicationContext::wireObject().

QString Util::translateVariable QString  name  )  [static]
 

Substitute variable values in the string. Find the variable in QSettings, then in Environment.

Parameters:
name the source string. May contain environment variables such as ${PATH}
Returns:
the string with environment variables replace with actual values.

Definition at line 48 of file Util.cpp.

References getEnvVariable(), and getSetting().

Referenced by qic::XmlObjectDefinitionReader::parseObjectPropertySubTag().


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