fw4spl
|
Defines ID for fwTools::Object. It is used to associate ID with object. More...
#include <fwID.hpp>
Public Types | |
enum | Policy { EMPTY = 1, GENERATE, MUST_EXIST } |
typedef std::string | IDType |
Public Member Functions | |
virtual bool | isA (const std::string &type) const |
Static Public Member Functions | |
static bool | isTypeOf (const std::string &type) |
static FWTOOLS_API bool | exist (IDType _id) |
static FWTOOLS_API std::shared_ptr< ::fwTools::Object > | getObject (IDType requestID) |
Retrieve the object attached to the given id. Return a null sptr if no correspondence exist. More... | |
Protected Member Functions | |
FWTOOLS_API bool | hasID () const |
Return true if the object has an id set. More... | |
FWTOOLS_API IDType | getID (Policy policy=GENERATE) const |
Returns the id of the object. If it is not set and the policy value is. More... | |
virtual FWTOOLS_API void | setID (IDType newID) |
Set a newID for the object, (newID must not exist in fwID), the oldest one is released. More... | |
FWTOOLS_API void | resetID () |
Release the id for the object. More... | |
fwID () | |
Constructor : does nothing. | |
Demangling methods | |
virtual const std::string & | getLeafClassname () const |
return object's classname without its namespace, i.e. BaseObject | |
virtual const std::string & | getClassname () const |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Defines ID for fwTools::Object. It is used to associate ID with object.
|
static |
Test if the given id exist (i.e recorded in fwID dictionary)
[in] | _id | : the id to test. |
Definition at line 33 of file fwID.cpp.
Referenced by fwGui::GuiRegistry::actionServiceSetActive(), fwGui::GuiRegistry::actionServiceSetExecutable(), fwGui::GuiRegistry::actionServiceSetVisible(), fwGui::GuiRegistry::actionServiceStarting(), fwGui::GuiRegistry::actionServiceStopping(), fwGui::ActionCallbackBase::check(), ctrlSelection::BookmarkSrv::configuring(), fwGui::ActionCallbackBase::execute(), fwServices::get(), fwServices::AppConfigManager::getConfigRoot(), getID(), fwGui::registrar::MenuBarRegistrar::manage(), fwGui::registrar::MenuRegistrar::manage(), fwGui::registrar::ViewRegistrar::manage(), fwGui::registrar::ToolBarRegistrar::manage(), fwGui::registrar::ViewRegistrar::manageMenuBar(), fwGui::registrar::ViewRegistrar::manageToolBar(), guiQt::SSignalShortcut::starting(), preferences::Plugin::stop(), gui::action::SStarter::stopping(), fwGui::registrar::MenuBarRegistrar::unmanage(), fwGui::registrar::MenuRegistrar::unmanage(), fwGui::registrar::ViewRegistrar::unmanage(), fwGui::registrar::ToolBarRegistrar::unmanage(), fwGui::registrar::ViewRegistrar::unmanageMenuBar(), fwGui::registrar::ViewRegistrar::unmanageToolBar(), fwGui::GuiRegistry::unregisterActionSIDToParentSID(), fwGui::GuiRegistry::unregisterSIDContainer(), fwGui::GuiRegistry::unregisterSIDMenu(), fwGui::GuiRegistry::unregisterSIDMenuBar(), fwGui::GuiRegistry::unregisterSIDToolBar(), gui::action::SBooleanSlotCaller::updating(), gui::action::SSlotCaller::updating(), gui::action::SModifyLayout::updating(), ctrlSelection::ImageUpdateAxis::updating(), and gui::action::SStarter::updating().
Returns the id of the object. If it is not set and the policy value is.
Definition at line 78 of file fwID.cpp.
References EMPTY, exist(), GENERATE, getClassname(), and MUST_EXIST.
Referenced by fwServices::IService::configure(), gui::action::SSlotCaller::configuring(), fwServices::helper::Config::createProxy(), fwRenderQt::SRender::getAspectRatioMode(), fwServices::IService::getAutoConnections(), fwServices::AppConfigManager::getConfigRoot(), fwServices::IService::getObject(), fwServices::IService::getObjectId(), fwRenderQt::IAdaptor::getScene2DRender(), fwRenderVTK::IAdaptor::initialize(), fwGui::IGuiContainerSrv::initialize(), fwServices::helper::Config::parseConnections(), fwServices::IService::reconfiguring(), guiQt::editor::SActivityView::starting(), gui::action::SConfigLauncher::starting(), visuVTKAdaptor::SImage::updateImageOpacity(), visuVTKAdaptor::SModelSeries::updateNormalMode(), and uiMedDataQt::SSeriesViewer::updating().
|
static |
Retrieve the object attached to the given id. Return a null sptr if no correspondence exist.
Definition at line 117 of file fwID.cpp.
References SLM_ASSERT.
Referenced by uiMedDataQt::widget::ActivityDataView::checkAndComputeData(), uiMedDataQt::widget::ActivityDataView::checkData(), ctrlSelection::BookmarkSrv::configuring(), fwServices::helper::Config::createConnections(), fwServices::helper::Config::createProxy(), fwServices::helper::Config::disconnectProxies(), fwRenderQt::SRender::dispatchInteraction(), uiMedDataQt::widget::ActivityDataView::eventFilter(), fwServices::get(), fwServices::AppConfigManager::getConfigRoot(), fwRenderQt::IAdaptor::getScene2DRender(), uiMedDataQt::widget::Selector::getSeries(), uiMedDataQt::widget::Selector::getSeriesFromStudyIndex(), uiMedDataQt::editor::SModelSeriesList::onCurrentItemChanged(), uiMedDataQt::editor::SSeries::onExportClicked(), gui::action::SBooleanSlotCaller::updating(), uiMedDataQt::action::SInitNewSeries::updating(), gui::action::SSlotCaller::updating(), ctrlSelection::ImageUpdateAxis::updating(), and uiMedDataQt::editor::SSeries::updating().
|
protected |
|
protected |
|
protectedvirtual |
Set a newID for the object, (newID must not exist in fwID), the oldest one is released.
Definition at line 56 of file fwID.cpp.
References OSLM_FATAL_IF.