Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Static Private Member Functions | Static Private Attributes | List of all members
camitk::Core Class Reference

Core class specifies the basic static information for the CamiTK API. More...

#include <Core.h>

Static Public Member Functions

runtime directory information

get the camitk component extension directory name

Returns
a null QString, checkable with isNull(), if no component dir found
static const QString getComponentDir ()
 
static const QString getActionDir ()
 get the camitk action directory name More...
 
static const QString getModuleDir (const QString &subpath=QString())
 get the camitk module extension directory name More...
 
static const QString getTestDataDir ()
 get the camitk test data directory name More...
 
static const QString getCoreLibDir ()
 get the camitk core lib directory name (where the camitkcore dll/shared/dynamic lib is) More...
 
static const QString getConfig ()
 get more information about installation, etc... More...
 

Static Public Attributes

miscallaneous utility method or variables

complete version string

static const char * version = "CamiTK 3.0.7"
 
static const char * shortVersion = "camitk-3.0"
 short version string (all in lower case, without the patch number) More...
 
static const char * installDir = "/usr"
 fall-back install directory (if the autodetection did not work...) More...
 
static const char * soVersion = "3"
 version used for so name More...
 

Static Private Member Functions

static bool checkCoreLibDir (QString dir)
 
static const QString getBinDirName ()
 return the name of the bin directory More...
 
static const QString getRootDir ()
 get the camitk root directory name (it is either the build dir or the installation directory) More...
 
static const bool hasBinaryVersionSubdir ()
 does this plateform puts all dll/so/dylib in a CamiTK::shortVersion directory More...
 
static const QString hasBuildTypeDirectory ()
 check if plateform has debug/release subdirs More...
 
static const bool hasMacOSDirectory ()
 check if on MacOS (TODO test this!) More...
 
static const bool isInstalled ()
 check if installed More...
 
static const QString sharedDirectory ()
 name of main directory where the shared lib (dll, so or dylib) can be found It is "bin" on windows, "lib" on unix (unless isInstalled() is true, then it is still in bin) More...
 

Static Private Attributes

static QString binDirName
 name of the bin directory (can be "bin" or "binDebug" for installed debug version!) More...
 

Detailed Description

Core class specifies the basic static information for the CamiTK API.

Member Function Documentation

bool camitk::Core::checkCoreLibDir ( QString  dir)
staticprivate
Returns
true only if the camitk core lib is in the given directory

References soVersion.

Referenced by getCoreLibDir(), and getRootDir().

const QString camitk::Core::getActionDir ( )
static

get the camitk action directory name

Returns
a null QString, checkable with isNull(), if no action dir found

References CAMITK_ERROR, getRootDir(), hasBinaryVersionSubdir(), hasBuildTypeDirectory(), sharedDirectory(), and shortVersion.

Referenced by camitk::ExtensionManager::autoloadActionExtensions(), getConfig(), main(), and camitk::SettingsDialog::on_addActionExtensionButton_released().

static const QString camitk::Core::getBinDirName ( )
staticprivate

return the name of the bin directory

const QString camitk::Core::getComponentDir ( )
static
const QString camitk::Core::getConfig ( )
static
const QString camitk::Core::getCoreLibDir ( )
static

get the camitk core lib directory name (where the camitkcore dll/shared/dynamic lib is)

References checkCoreLibDir(), getRootDir(), hasBuildTypeDirectory(), and sharedDirectory().

Referenced by camitk::ExtensionManager::autoloadComponentExtensions(), getConfig(), and main().

const QString camitk::Core::getModuleDir ( const QString &  subpath = QString())
static

get the camitk module extension directory name

Parameters
subpathname of the module type (and subdirectory) to get (this simplifies getting the subdir name on plateform with hasBuildTypeDirectory()
Returns
a null QString, checkable with isNull(), if no module dir found

References CAMITK_INFO, getRootDir(), hasBinaryVersionSubdir(), hasBuildTypeDirectory(), sharedDirectory(), and shortVersion.

const QString camitk::Core::getRootDir ( )
staticprivate

get the camitk root directory name (it is either the build dir or the installation directory)

Returns
a null QString, checkable with isNull(), if no installation dir found

References binDirName, CAMITK_ERROR, checkCoreLibDir(), hasBuildTypeDirectory(), hasMacOSDirectory(), and installDir.

Referenced by getActionDir(), getComponentDir(), getConfig(), getCoreLibDir(), getModuleDir(), getTestDataDir(), and isInstalled().

const QString camitk::Core::getTestDataDir ( )
static

get the camitk test data directory name

Returns
a null QString, checkable with isNull(), if no test data directory found

References CAMITK_ERROR, getRootDir(), hasBinaryVersionSubdir(), and shortVersion.

Referenced by camitk::Application::Application(), ExtensionGenerator::generateCMakeLists(), getConfig(), and main().

const bool camitk::Core::hasBinaryVersionSubdir ( )
staticprivate

does this plateform puts all dll/so/dylib in a CamiTK::shortVersion directory

References isInstalled().

Referenced by getActionDir(), getComponentDir(), getConfig(), getModuleDir(), and getTestDataDir().

const QString camitk::Core::hasBuildTypeDirectory ( )
staticprivate

check if plateform has debug/release subdirs

Returns
null string if not debug/release plateform or build type if debug/release plateform

Referenced by getActionDir(), getComponentDir(), getConfig(), getCoreLibDir(), getModuleDir(), and getRootDir().

const bool camitk::Core::hasMacOSDirectory ( )
staticprivate

check if on MacOS (TODO test this!)

Referenced by getConfig(), and getRootDir().

const bool camitk::Core::isInstalled ( )
staticprivate

check if installed

References getRootDir(), and installDir.

Referenced by getConfig(), hasBinaryVersionSubdir(), and sharedDirectory().

const QString camitk::Core::sharedDirectory ( )
staticprivate

name of main directory where the shared lib (dll, so or dylib) can be found It is "bin" on windows, "lib" on unix (unless isInstalled() is true, then it is still in bin)

References binDirName, and isInstalled().

Referenced by getActionDir(), getComponentDir(), getConfig(), getCoreLibDir(), and getModuleDir().

Member Data Documentation

QString camitk::Core::binDirName
staticprivate

name of the bin directory (can be "bin" or "binDebug" for installed debug version!)

Referenced by getRootDir(), and sharedDirectory().

const char * camitk::Core::installDir = "/usr"
static

fall-back install directory (if the autodetection did not work...)

Referenced by getConfig(), getRootDir(), isInstalled(), and main().

const char * camitk::Core::shortVersion = "camitk-3.0"
static

short version string (all in lower case, without the patch number)

Referenced by getActionDir(), getComponentDir(), getConfig(), getModuleDir(), and getTestDataDir().

const char * camitk::Core::soVersion = "3"
static
const char * camitk::Core::version = "CamiTK 3.0.7"
static

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