#include <featurefactory.h>
Static Public Member Functions | |
| static const QList< QByteArray > & | keys () |
| static AbstractFeature * | create (const QByteArray &key, JavaVM *jvm, QObject *parent=0) |
| static QString | title (const QByteArray &key) |
| static QString | description (const QByteArray &key) |
| static void | loadPlugins (JavaVM *jvm) |
| static void | unloadPlugins () |
Note that QByteArray is more than enough for keys. There is no need for QString, and we definitely don't want the keys to be language dependant.
Also on the topic of QByteArray, from the Qt 4.0.0 documentation: "Using QByteArray is much more convenient than using const char *. Behind the scenes, it always ensures that the data is followed by a '\0' terminator, and uses implicit sharing (copy-on-write) to reduce memory usage and avoid needless copying of data."
| const QList< QByteArray > & FeatureFactory::keys | ( | ) | [static] |
Warning: This method is not thread-safe until it returns from the first call.
| AbstractFeature * FeatureFactory::create | ( | const QByteArray & | key, | |
| JavaVM * | jvm, | |||
| QObject * | parent = 0 | |||
| ) | [static] |
Creates an instance of a feature, specified using the given key. The jvm, and parent parameters are both passed directly to the given feature 's constructor as needed.
Note: Not all feature s make use of the jvm, but some do. Hence, to handle this generically, a valid Java Virtual Machine must always be passed.
Note: This method uses case in-sensitive key matching.
| QString FeatureFactory::title | ( | const QByteArray & | key | ) | [static] |
| QString FeatureFactory::description | ( | const QByteArray & | key | ) | [static] |
| void FeatureFactory::loadPlugins | ( | JavaVM * | jvm | ) | [static] |
Warning: This must not be called if any plugin created features are still in use.
| void FeatureFactory::unloadPlugins | ( | ) | [static] |
Warning: This must not be called if any plugin created features are still in use.
1.5.2