Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
berry::Platform Class Reference

#include <berryPlatform.h>

Static Public Member Functions

static IAdapterManagerGetAdapterManager ()
 
static IExtensionRegistryGetExtensionRegistry ()
 
static mitk::IPreferencesServiceGetPreferencesService ()
 
static SmartPointer< IProductGetProduct ()
 
static QVariant GetDebugOption (const QString &option)
 
static QT_DEPRECATED QDir GetConfigurationPath ()
 
static ctkLocation * GetConfigurationLocation ()
 
static QT_DEPRECATED QDir GetInstallPath ()
 
static ctkLocation * GetInstallLocation ()
 
static QT_DEPRECATED QDir GetInstancePath ()
 
static ctkLocation * GetInstanceLocation ()
 
static QT_DEPRECATED bool GetStatePath (QDir &statePath, const QSharedPointer< ctkPlugin > &plugin, bool create=true)
 
static QDir GetStateLocation (const QSharedPointer< ctkPlugin > &plugin)
 
static QT_DEPRECATED QDir GetUserPath ()
 
static ctkLocation * GetUserLocation ()
 
static int GetOS ()
 
static int GetOSArch ()
 
static bool IsUnix ()
 
static bool IsWindows ()
 
static bool IsBSD ()
 
static bool IsLinux ()
 
static bool IsVMS ()
 
static bool IsRunning ()
 
static QStringList GetApplicationArgs ()
 
static QSharedPointer< ctkPlugin > GetPlugin (const QString &symbolicName)
 
static QList< QSharedPointer< ctkPlugin > > GetPlugins (const QString &symbolicName, const QString &version=QString())
 

Static Public Attributes

static const QString PI_RUNTIME
 
static const int OS_FREE_BSD
 
static const int OS_AIX
 
static const int OS_HPUX
 
static const int OS_TRU64
 
static const int OS_LINUX
 
static const int OS_MAC_OS_X
 
static const int OS_NET_BSD
 
static const int OS_OPEN_BSD
 
static const int OS_IRIX
 
static const int OS_SOLARIS
 
static const int OS_QNX
 
static const int OS_VXWORKS
 
static const int OS_CYGWIN
 
static const int OS_UNKNOWN_UNIX
 
static const int OS_WINDOWS_NT
 
static const int OS_WINDOWS_CE
 
static const int OS_VMS
 
static const int ARCH_ALPHA
 
static const int ARCH_IA32
 
static const int ARCH_IA64
 
static const int ARCH_MIPS
 
static const int ARCH_HPPA
 
static const int ARCH_PPC
 
static const int ARCH_POWER
 
static const int ARCH_SPARC
 
static const int ARCH_AMD64
 
static const int ARCH_ARM
 
static const QString PROP_QTPLUGIN_PATH
 
static const QString PROP_NEWINSTANCE
 
static const QString PROP_PLUGIN_DIRS
 
static const QString PROP_FORCE_PLUGIN_INSTALL
 
static const QString PROP_APPLICATION
 
static const QString PROP_IGNOREAPP
 
static const QString PROP_XARGS
 

Detailed Description

The central class of the BlueBerry Platform Runtime. This class cannot be instantiated or subclassed by clients; all functionality is provided by static methods. Features include:

  • the platform registry of installed plug-ins
  • the platform adapter manager
  • the platform log

Most users don't have to worry about Platform's lifecycle. However, if your code can call methods of this class when Platform is not running, it becomes necessary to check IsRunning() before making the call. A runtime exception might be thrown or incorrect result might be returned if a method from this class is called while Platform is not running.

Definition at line 202 of file berryPlatform.h.

Member Function Documentation

◆ GetAdapterManager()

static IAdapterManager* berry::Platform::GetAdapterManager ( )
static

Returns the adapter manager used for extending IAdaptable objects.

Returns
the adapter manager for this platform
See also
IAdapterManager

◆ GetApplicationArgs()

static QStringList berry::Platform::GetApplicationArgs ( )
static

Returns the applications command line arguments which have not been consumed by the platform.

◆ GetConfigurationLocation()

static ctkLocation* berry::Platform::GetConfigurationLocation ( )
static

Returns the location of the configuration information used to run this instance of BlueBerry. The configuration area typically contains the list of plug-ins available for use, various settings (those shared across different instances of the same configuration) and any other such data needed by plug-ins. null is returned if the platform is running without a configuration location.

This method is equivalent to acquiring the org.commontk.service.datalocation.Location service with the property "type" equal to ctkLocation::CONFIGURATION_FILTER.

Returns
the location of the platform's configuration data area or null if none
See also
ctkLocation::CONFIGURATION_FILTER

◆ GetConfigurationPath()

static QT_DEPRECATED QDir berry::Platform::GetConfigurationPath ( )
static

Returns the path of the configuration information used to run this instance of the BlueBerry platform. The configuration area typically contains the list of plug-ins available for use, various settings (those shared across different instances of the same configuration) and any other such data needed by plug-ins. An empty path is returned if the platform is running without a configuration location.

Returns
the location of the platform's configuration data area
Deprecated:
(as of 2015_05) Use GetConfigurationLocation() instead.

◆ GetDebugOption()

static QVariant berry::Platform::GetDebugOption ( const QString &  option)
static

Returns the identified option. A null QString is returned if no such option is found. Options are specified in the general form <plug-in id>/<option-path>. For example, org.blueberry.core.runtime/debug

Clients are also able to acquire the DebugOptions service and query it for debug options.

Parameters
optionthe name of the option to lookup
Returns
the value of the requested debug option or QString::null

◆ GetExtensionRegistry()

static IExtensionRegistry* berry::Platform::GetExtensionRegistry ( )
static

Returns the extension registry for this platform. May return null if the registry has not been created yet.

Returns
existing extension registry or null
See also
IExtensionRegistry

◆ GetInstallLocation()

static ctkLocation* berry::Platform::GetInstallLocation ( )
static

Returns the location of the base installation for the running platform null is returned if the platform is running without a configuration location.

This method is equivalent to acquiring the org.commontk.service.datalocation.Location service with the property "type" equal to ctkLocation::INSTALL_FILTER.

Returns
the location of the platform's installation area or null if none
See also
ctkLocation::INSTALL_FILTER

◆ GetInstallPath()

static QT_DEPRECATED QDir berry::Platform::GetInstallPath ( )
static

Returns the path of the base installation for the running platform

Returns
the location of the platform's installation area or null if none
Deprecated:
(as of 2015_05) Use GetInstallLocation() instead.

◆ GetInstanceLocation()

static ctkLocation* berry::Platform::GetInstanceLocation ( )
static

Returns the location of the platform's working directory (also known as the instance data area). null is returned if the platform is running without an instance location.

This method is equivalent to acquiring the org.commontk.service.datalocation.Location service with the property "type" equal to ctkLocation::INSTANCE_FILTER.

Returns
the location of the platform's instance data area or null if none
See also
ctkLocation::INSTANCE_FILTER

◆ GetInstancePath()

static QT_DEPRECATED QDir berry::Platform::GetInstancePath ( )
static

Returns the path of the platform's working directory (also known as the instance data area). An empty path is returned if the platform is running without an instance location.

Returns
the location of the platform's instance data area or null if none
Deprecated:
(as of 2015_05) Use GetInstanceLocation() instead.

◆ GetOS()

static int berry::Platform::GetOS ( )
static

◆ GetOSArch()

static int berry::Platform::GetOSArch ( )
static

◆ GetPlugin()

static QSharedPointer<ctkPlugin> berry::Platform::GetPlugin ( const QString &  symbolicName)
static

Returns the resolved plug-in with the specified symbolic name that has the highest version. If no resolved plug-ins are installed that have the specified symbolic name then null is returned.

Note that clients may want to filter the results based on the state of the plug-ins.

Parameters
symbolicNamethe symbolic name of the plug-in to be returned.
Returns
the plug-in that has the specified symbolic name with the highest version, or null if no plug-in is found.

◆ GetPlugins()

static QList<QSharedPointer<ctkPlugin> > berry::Platform::GetPlugins ( const QString &  symbolicName,
const QString &  version = QString() 
)
static

Returns all plug-ins with the specified symbolic name. If no resolved plug-ins with the specified symbolic name can be found, an empty list is returned. If the version argument is not null then only the plug-ins that have the specified symbolic name and a version greater than or equal to the specified version are returned. The returned plug-ins are ordered in descending plug-in version order.

Note that clients may want to filter the results based on the state of the plug-ins.

Parameters
symbolicNamethe symbolic name of the plug-ins that are to be returned.
versionthe version that the returned plug-in versions must match, or QString() if no version matching is to be done.
Returns
the list of plug-ins with the specified name that match the specified version and match rule, or null if no plug-ins are found.

◆ GetPreferencesService()

static mitk::IPreferencesService* berry::Platform::GetPreferencesService ( )
static

Return the interface into the preference mechanism. The returned object can be used for such operations as searching for preference values across multiple scopes.

Returns
an object to interface into the preference mechanism

◆ GetProduct()

static SmartPointer<IProduct> berry::Platform::GetProduct ( )
static

Returns the product which was selected when running this BlueBerry instance or null if none

Returns
the current product or null if none

◆ GetStateLocation()

static QDir berry::Platform::GetStateLocation ( const QSharedPointer< ctkPlugin > &  plugin)
static

Returns the location in the local file system of the plug-in state area for the given plug-in. If the plug-in state area did not exist prior to this call, it is created.

The plug-in state area is a file directory within the platform's metadata area where a plug-in is free to create files. The content and structure of this area is defined by the plug-in, and the particular plug-in is solely responsible for any files it puts there. It is recommended for plug-in preference settings and other configuration parameters.

Parameters
pluginthe plugin whose state location if returned
Returns
a local file system path
Exceptions
ctkIllegalStateExceptionif no instance location was specified
RuntimeExceptionif the plug-in state area could not be created.

◆ GetStatePath()

static QT_DEPRECATED bool berry::Platform::GetStatePath ( QDir &  statePath,
const QSharedPointer< ctkPlugin > &  plugin,
bool  create = true 
)
static

Returns the path in the local file system of the plug-in state area for the given plug-in. If the plug-in state area did not exist prior to this call, it is created.

The plug-in state area is a file directory within the platform's metadata area where a plug-in is free to create files. The content and structure of this area is defined by the plug-in, and the particular plug-in is solely responsible for any files it puts there. It is recommended for plug-in preference settings and other configuration parameters.

Parameters
statePath
pluginthe plug-in whose state location is returned
create
Returns
a local file system path TODO Investigate the usage of a service factory
Deprecated:
(as of 2015_05) Use GetStateLocation instead.

◆ GetUserLocation()

static ctkLocation* berry::Platform::GetUserLocation ( )
static

Returns the location of the platform's user data area. The user data area is a location on the system which is specific to the system's current user. By default it is located relative to the location given by the system property "user.home". null is returned if the platform is running without an user location.

This method is equivalent to acquiring the org.commontk.service.datalocation.Location service with the property "type" equal to ctkLocation::USER_FILTER.

Returns
the location of the platform's user data area or null if none
See also
ctkLocation::USER_FILTER

◆ GetUserPath()

static QT_DEPRECATED QDir berry::Platform::GetUserPath ( )
static

Returns the path of the platform's user data area. The user data area is a location on the system which is specific to the system's current user. By default it is located relative to the location given by the System property "user.home". An empty path is returned if the platform is running without an user location.

Returns
the location of the platform's user data area or null if none
Deprecated:
(as of 2015_05) Use GetUserLocation() instead.

◆ IsBSD()

static bool berry::Platform::IsBSD ( )
static

◆ IsLinux()

static bool berry::Platform::IsLinux ( )
static

◆ IsRunning()

static bool berry::Platform::IsRunning ( )
static

◆ IsUnix()

static bool berry::Platform::IsUnix ( )
static

◆ IsVMS()

static bool berry::Platform::IsVMS ( )
static

◆ IsWindows()

static bool berry::Platform::IsWindows ( )
static

Member Data Documentation

◆ ARCH_ALPHA

const int berry::Platform::ARCH_ALPHA
static

Definition at line 226 of file berryPlatform.h.

◆ ARCH_AMD64

const int berry::Platform::ARCH_AMD64
static

Definition at line 234 of file berryPlatform.h.

◆ ARCH_ARM

const int berry::Platform::ARCH_ARM
static

Definition at line 235 of file berryPlatform.h.

◆ ARCH_HPPA

const int berry::Platform::ARCH_HPPA
static

Definition at line 230 of file berryPlatform.h.

◆ ARCH_IA32

const int berry::Platform::ARCH_IA32
static

Definition at line 227 of file berryPlatform.h.

◆ ARCH_IA64

const int berry::Platform::ARCH_IA64
static

Definition at line 228 of file berryPlatform.h.

◆ ARCH_MIPS

const int berry::Platform::ARCH_MIPS
static

Definition at line 229 of file berryPlatform.h.

◆ ARCH_POWER

const int berry::Platform::ARCH_POWER
static

Definition at line 232 of file berryPlatform.h.

◆ ARCH_PPC

const int berry::Platform::ARCH_PPC
static

Definition at line 231 of file berryPlatform.h.

◆ ARCH_SPARC

const int berry::Platform::ARCH_SPARC
static

Definition at line 233 of file berryPlatform.h.

◆ OS_AIX

const int berry::Platform::OS_AIX
static

Definition at line 209 of file berryPlatform.h.

◆ OS_CYGWIN

const int berry::Platform::OS_CYGWIN
static

Definition at line 220 of file berryPlatform.h.

◆ OS_FREE_BSD

const int berry::Platform::OS_FREE_BSD
static

Definition at line 208 of file berryPlatform.h.

◆ OS_HPUX

const int berry::Platform::OS_HPUX
static

Definition at line 210 of file berryPlatform.h.

◆ OS_IRIX

const int berry::Platform::OS_IRIX
static

Definition at line 216 of file berryPlatform.h.

◆ OS_LINUX

const int berry::Platform::OS_LINUX
static

Definition at line 212 of file berryPlatform.h.

◆ OS_MAC_OS_X

const int berry::Platform::OS_MAC_OS_X
static

Definition at line 213 of file berryPlatform.h.

◆ OS_NET_BSD

const int berry::Platform::OS_NET_BSD
static

Definition at line 214 of file berryPlatform.h.

◆ OS_OPEN_BSD

const int berry::Platform::OS_OPEN_BSD
static

Definition at line 215 of file berryPlatform.h.

◆ OS_QNX

const int berry::Platform::OS_QNX
static

Definition at line 218 of file berryPlatform.h.

◆ OS_SOLARIS

const int berry::Platform::OS_SOLARIS
static

Definition at line 217 of file berryPlatform.h.

◆ OS_TRU64

const int berry::Platform::OS_TRU64
static

Definition at line 211 of file berryPlatform.h.

◆ OS_UNKNOWN_UNIX

const int berry::Platform::OS_UNKNOWN_UNIX
static

Definition at line 221 of file berryPlatform.h.

◆ OS_VMS

const int berry::Platform::OS_VMS
static

Definition at line 224 of file berryPlatform.h.

◆ OS_VXWORKS

const int berry::Platform::OS_VXWORKS
static

Definition at line 219 of file berryPlatform.h.

◆ OS_WINDOWS_CE

const int berry::Platform::OS_WINDOWS_CE
static

Definition at line 223 of file berryPlatform.h.

◆ OS_WINDOWS_NT

const int berry::Platform::OS_WINDOWS_NT
static

Definition at line 222 of file berryPlatform.h.

◆ PI_RUNTIME

const QString berry::Platform::PI_RUNTIME
static

Definition at line 206 of file berryPlatform.h.

◆ PROP_APPLICATION

const QString berry::Platform::PROP_APPLICATION
static

Definition at line 243 of file berryPlatform.h.

◆ PROP_FORCE_PLUGIN_INSTALL

const QString berry::Platform::PROP_FORCE_PLUGIN_INSTALL
static

Definition at line 241 of file berryPlatform.h.

◆ PROP_IGNOREAPP

const QString berry::Platform::PROP_IGNOREAPP
static

Definition at line 244 of file berryPlatform.h.

◆ PROP_NEWINSTANCE

const QString berry::Platform::PROP_NEWINSTANCE
static

Definition at line 239 of file berryPlatform.h.

◆ PROP_PLUGIN_DIRS

const QString berry::Platform::PROP_PLUGIN_DIRS
static

Definition at line 240 of file berryPlatform.h.

◆ PROP_QTPLUGIN_PATH

const QString berry::Platform::PROP_QTPLUGIN_PATH
static

Definition at line 237 of file berryPlatform.h.

◆ PROP_XARGS

const QString berry::Platform::PROP_XARGS
static

Definition at line 246 of file berryPlatform.h.


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