PluginCache Class Reference

#include <ArmarXGui/libraries/ArmarXGuiBase/PluginCache.h>

Public Member Functions

bool cachePlugin (const QString &pluginPath)
 
bool cacheWidget (QString widgetName, ArmarXWidgetInfoPtr widgetCreator)
 
void clearCacheFile ()
 
void copyResourcesToCache ()
 
QStringList getAvailableWidgetNames () const
 
WidgetCreatorMap getAvailableWidgets () const
 
QByteArray getHash (const QString &pluginPath)
 
ArmarXWidgetInfoPtr getWidgetCreator (const QString &widgetName)
 
 PluginCache (ArmarXManagerPtr manager)
 
void preloadAsync (QStringList widgetNames, int delayMS=1000)
 
void removePluginFromCache (QString pluginPath)
 
void removeWidgetFromCache (QString pluginPath, QString widgetName)
 
 ~PluginCache ()
 

Static Public Member Functions

static bool ContainsAny (const QString &str, const QStringList &items)
 
static QString GetCategoryIconPath (const QString &widgetName)
 
static QString GetIconCachePath ()
 
static QString GetIconPath (const QString &widgetName)
 

Public Attributes

const QString settingsApplicationName = "/PluginCache.conf"
 
const QString settingsOrganization = "KIT"
 

Protected Member Functions

PluginData loadFromCache (const QString &pluginPath)
 
WidgetCreatorMap loadPlugin (QSharedPointer< QPluginLoader > loader)
 
void updateLastModifiedTimestamp (const QString &pluginPath)
 
void writeToCache (const QString &pluginPath)
 

Protected Attributes

std::recursive_mutex cacheMutex
 
const QString cachePath
 
ArmarXManagerPtr manager
 
QMap< QString, PluginDatapluginData
 
std::future< void > preloadFuture
 
QSettings s
 
bool shutdown = false
 

Detailed Description

Definition at line 36 of file PluginCache.h.

Constructor & Destructor Documentation

◆ PluginCache()

Definition at line 18 of file PluginCache.cpp.

◆ ~PluginCache()

Definition at line 48 of file PluginCache.cpp.

Member Function Documentation

◆ cachePlugin()

bool cachePlugin ( const QString &  pluginPath)

Definition at line 57 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cacheWidget()

bool cacheWidget ( QString  widgetName,
ArmarXWidgetInfoPtr  widgetCreator 
)

Definition at line 101 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ clearCacheFile()

void clearCacheFile ( )

Definition at line 252 of file PluginCache.cpp.

◆ ContainsAny()

bool ContainsAny ( const QString &  str,
const QStringList &  items 
)
static

Definition at line 194 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copyResourcesToCache()

void copyResourcesToCache ( )

Definition at line 160 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ getAvailableWidgetNames()

QStringList getAvailableWidgetNames ( ) const

Definition at line 134 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ getAvailableWidgets()

WidgetCreatorMap getAvailableWidgets ( ) const

Definition at line 149 of file PluginCache.cpp.

◆ GetCategoryIconPath()

QString GetCategoryIconPath ( const QString &  widgetName)
static

Definition at line 189 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHash()

QByteArray getHash ( const QString &  pluginPath)

Definition at line 259 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ GetIconCachePath()

QString GetIconCachePath ( )
static

Definition at line 179 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetIconPath()

QString GetIconPath ( const QString &  widgetName)
static

Definition at line 184 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getWidgetCreator()

ArmarXWidgetInfoPtr getWidgetCreator ( const QString &  widgetName)

Definition at line 108 of file PluginCache.cpp.

+ Here is the call graph for this function:

◆ loadFromCache()

PluginData loadFromCache ( const QString &  pluginPath)
protected

Definition at line 356 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadPlugin()

WidgetCreatorMap loadPlugin ( QSharedPointer< QPluginLoader >  loader)
protected

Definition at line 404 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preloadAsync()

void preloadAsync ( QStringList  widgetNames,
int  delayMS = 1000 
)

Definition at line 206 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removePluginFromCache()

void removePluginFromCache ( QString  pluginPath)

Definition at line 289 of file PluginCache.cpp.

◆ removeWidgetFromCache()

void removeWidgetFromCache ( QString  pluginPath,
QString  widgetName 
)

Definition at line 271 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ updateLastModifiedTimestamp()

void updateLastModifiedTimestamp ( const QString &  pluginPath)
protected

Definition at line 314 of file PluginCache.cpp.

+ Here is the caller graph for this function:

◆ writeToCache()

void writeToCache ( const QString &  pluginPath)
protected

Definition at line 332 of file PluginCache.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ cacheMutex

std::recursive_mutex cacheMutex
mutableprotected

Definition at line 68 of file PluginCache.h.

◆ cachePath

const QString cachePath
protected

Definition at line 64 of file PluginCache.h.

◆ manager

ArmarXManagerPtr manager
protected

Definition at line 66 of file PluginCache.h.

◆ pluginData

QMap<QString, PluginData> pluginData
protected

Definition at line 65 of file PluginCache.h.

◆ preloadFuture

std::future<void> preloadFuture
protected

Definition at line 69 of file PluginCache.h.

◆ s

QSettings s
protected

Definition at line 67 of file PluginCache.h.

◆ settingsApplicationName

const QString settingsApplicationName = "/PluginCache.conf"

Definition at line 47 of file PluginCache.h.

◆ settingsOrganization

const QString settingsOrganization = "KIT"

Definition at line 46 of file PluginCache.h.

◆ shutdown

bool shutdown = false
protected

Definition at line 70 of file PluginCache.h.


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