Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d Medical Imaging Interaction Toolkit
berry::Platform Class Reference

#include <berryPlatform.h>

## Static Public Member Functions

static IExtensionRegistryGetExtensionRegistry ()

static 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 198 of file berryPlatform.h.

## Member Function Documentation

static

Returns the adapter manager used for extending IAdaptable objects.

Returns
the adapter manager for this platform

Definition at line 83 of file berryPlatform.cpp.

## ◆ GetApplicationArgs()

 QStringList berry::Platform::GetApplicationArgs ( )
static

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

Definition at line 221 of file berryPlatform.cpp.

## ◆ GetConfigurationLocation()

 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
ctkLocation::CONFIGURATION_FILTER

Definition at line 78 of file berryPlatform.cpp.

Referenced by GetConfigurationPath().

## ◆ GetConfigurationPath()

 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.

Definition at line 68 of file berryPlatform.cpp.

References GetConfigurationLocation().

## ◆ GetDebugOption()

 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
 option the name of the option to lookup
Returns
the value of the requested debug option or QString::null

Definition at line 237 of file berryPlatform.cpp.

## ◆ GetExtensionRegistry()

 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
IExtensionRegistry

Definition at line 88 of file berryPlatform.cpp.

## ◆ GetInstallLocation()

 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
ctkLocation::INSTALL_FILTER

Definition at line 113 of file berryPlatform.cpp.

Referenced by GetInstallPath().

## ◆ GetInstallPath()

 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.

Definition at line 103 of file berryPlatform.cpp.

References GetInstallLocation().

## ◆ GetInstanceLocation()

 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
ctkLocation::INSTANCE_FILTER

Definition at line 129 of file berryPlatform.cpp.

Referenced by GetInstancePath().

## ◆ GetInstancePath()

 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.

Definition at line 118 of file berryPlatform.cpp.

References GetInstanceLocation().

## ◆ GetOS()

 int berry::Platform::GetOS ( )
static

Definition at line 134 of file berryPlatform.cpp.

## ◆ GetOSArch()

 int berry::Platform::GetOSArch ( )
static

Definition at line 139 of file berryPlatform.cpp.

## ◆ GetPlugin()

 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
 symbolicName the 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.

Definition at line 226 of file berryPlatform.cpp.

## ◆ GetPlugins()

 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
 symbolicName the symbolic name of the plug-ins that are to be returned. version the 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.

Definition at line 231 of file berryPlatform.cpp.

## ◆ GetPreferencesService()

 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 and preference import/export.

Clients are also able to acquire the IPreferencesService service via CTK mechanisms and use it for preference functions.

Returns
an object to interface into the preference mechanism

Definition at line 93 of file berryPlatform.cpp.

## ◆ GetProduct()

 IProduct::Pointer 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

Definition at line 242 of file berryPlatform.cpp.

Referenced by SafeHandleNavigatorView().

## ◆ GetStateLocation()

 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
 plugin the plugin whose state location if returned
Returns
a local file system path
Exceptions
 ctkIllegalStateException if no instance location was specified RuntimeException if the plug-in state area could not be created.

Definition at line 195 of file berryPlatform.cpp.

Referenced by GetStatePath().

## ◆ GetStatePath()

 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
 plugin the plug-in whose state location is returned
Returns
a local file system path TODO Investigate the usage of a service factory
Deprecated:
(as of 2015_05) Use GetStateLocation instead.

Definition at line 189 of file berryPlatform.cpp.

References GetStateLocation().

## ◆ GetUserLocation()

 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
ctkLocation::USER_FILTER

Definition at line 211 of file berryPlatform.cpp.

Referenced by GetUserPath().

## ◆ GetUserPath()

 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.

Definition at line 200 of file berryPlatform.cpp.

References GetUserLocation().

## ◆ IsBSD()

 bool berry::Platform::IsBSD ( )
static

Definition at line 162 of file berryPlatform.cpp.

## ◆ IsLinux()

 bool berry::Platform::IsLinux ( )
static

Definition at line 171 of file berryPlatform.cpp.

## ◆ IsRunning()

 bool berry::Platform::IsRunning ( )
static

Definition at line 216 of file berryPlatform.cpp.

## ◆ IsUnix()

 bool berry::Platform::IsUnix ( )
static

Definition at line 144 of file berryPlatform.cpp.

## ◆ IsVMS()

 bool berry::Platform::IsVMS ( )
static

Definition at line 180 of file berryPlatform.cpp.

## ◆ IsWindows()

 bool berry::Platform::IsWindows ( )
static

Definition at line 153 of file berryPlatform.cpp.

## ◆ ARCH_ALPHA

 const int berry::Platform::ARCH_ALPHA
static

Definition at line 222 of file berryPlatform.h.

## ◆ ARCH_AMD64

 const int berry::Platform::ARCH_AMD64
static

Definition at line 230 of file berryPlatform.h.

## ◆ ARCH_ARM

 const int berry::Platform::ARCH_ARM
static

Definition at line 231 of file berryPlatform.h.

## ◆ ARCH_HPPA

 const int berry::Platform::ARCH_HPPA
static

Definition at line 226 of file berryPlatform.h.

## ◆ ARCH_IA32

 const int berry::Platform::ARCH_IA32
static

Definition at line 223 of file berryPlatform.h.

## ◆ ARCH_IA64

 const int berry::Platform::ARCH_IA64
static

Definition at line 224 of file berryPlatform.h.

## ◆ ARCH_MIPS

 const int berry::Platform::ARCH_MIPS
static

Definition at line 225 of file berryPlatform.h.

## ◆ ARCH_POWER

 const int berry::Platform::ARCH_POWER
static

Definition at line 228 of file berryPlatform.h.

## ◆ ARCH_PPC

 const int berry::Platform::ARCH_PPC
static

Definition at line 227 of file berryPlatform.h.

## ◆ ARCH_SPARC

 const int berry::Platform::ARCH_SPARC
static

Definition at line 229 of file berryPlatform.h.

## ◆ OS_AIX

 const int berry::Platform::OS_AIX
static

Definition at line 205 of file berryPlatform.h.

## ◆ OS_CYGWIN

 const int berry::Platform::OS_CYGWIN
static

Definition at line 216 of file berryPlatform.h.

## ◆ OS_FREE_BSD

 const int berry::Platform::OS_FREE_BSD
static

Definition at line 204 of file berryPlatform.h.

## ◆ OS_HPUX

 const int berry::Platform::OS_HPUX
static

Definition at line 206 of file berryPlatform.h.

## ◆ OS_IRIX

 const int berry::Platform::OS_IRIX
static

Definition at line 212 of file berryPlatform.h.

## ◆ OS_LINUX

 const int berry::Platform::OS_LINUX
static

Definition at line 208 of file berryPlatform.h.

## ◆ OS_MAC_OS_X

 const int berry::Platform::OS_MAC_OS_X
static

Definition at line 209 of file berryPlatform.h.

## ◆ OS_NET_BSD

 const int berry::Platform::OS_NET_BSD
static

Definition at line 210 of file berryPlatform.h.

## ◆ OS_OPEN_BSD

 const int berry::Platform::OS_OPEN_BSD
static

Definition at line 211 of file berryPlatform.h.

## ◆ OS_QNX

 const int berry::Platform::OS_QNX
static

Definition at line 214 of file berryPlatform.h.

## ◆ OS_SOLARIS

 const int berry::Platform::OS_SOLARIS
static

Definition at line 213 of file berryPlatform.h.

## ◆ OS_TRU64

 const int berry::Platform::OS_TRU64
static

Definition at line 207 of file berryPlatform.h.

## ◆ OS_UNKNOWN_UNIX

 const int berry::Platform::OS_UNKNOWN_UNIX
static

Definition at line 217 of file berryPlatform.h.

## ◆ OS_VMS

 const int berry::Platform::OS_VMS
static

Definition at line 220 of file berryPlatform.h.

## ◆ OS_VXWORKS

 const int berry::Platform::OS_VXWORKS
static

Definition at line 215 of file berryPlatform.h.

## ◆ OS_WINDOWS_CE

 const int berry::Platform::OS_WINDOWS_CE
static

Definition at line 219 of file berryPlatform.h.

## ◆ OS_WINDOWS_NT

 const int berry::Platform::OS_WINDOWS_NT
static

Definition at line 218 of file berryPlatform.h.

## ◆ PI_RUNTIME

 const QString berry::Platform::PI_RUNTIME
static

Definition at line 202 of file berryPlatform.h.

## ◆ PROP_APPLICATION

 const QString berry::Platform::PROP_APPLICATION
static

Definition at line 239 of file berryPlatform.h.

## ◆ PROP_FORCE_PLUGIN_INSTALL

 const QString berry::Platform::PROP_FORCE_PLUGIN_INSTALL
static

Definition at line 237 of file berryPlatform.h.

## ◆ PROP_IGNOREAPP

 const QString berry::Platform::PROP_IGNOREAPP
static

Definition at line 240 of file berryPlatform.h.

## ◆ PROP_NEWINSTANCE

 const QString berry::Platform::PROP_NEWINSTANCE
static

Definition at line 235 of file berryPlatform.h.

## ◆ PROP_PLUGIN_DIRS

 const QString berry::Platform::PROP_PLUGIN_DIRS
static

Definition at line 236 of file berryPlatform.h.

## ◆ PROP_QTPLUGIN_PATH

 const QString berry::Platform::PROP_QTPLUGIN_PATH
static

Definition at line 233 of file berryPlatform.h.

## ◆ PROP_XARGS

 const QString berry::Platform::PROP_XARGS
static

Definition at line 242 of file berryPlatform.h.

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