fw4spl
|
Defines an helper to modify an fwData::Composite and create in parallel the message to announce this modification. More...
#include <Composite.hpp>
Public Member Functions | |
FWDATATOOLS_API | Composite (::fwData::Composite::wptr _composite) |
Constructor. Initialize parameters. | |
FWDATATOOLS_API | ~Composite () |
Destrucotr. Do nothing. | |
FWDATATOOLS_API void | add (std::string _compositeKey,::fwData::Object::sptr _newObject) |
Add an object in the composite. More... | |
FWDATATOOLS_API void | remove (std::string _compositeKey) |
Remove an object in the composite. More... | |
FWDATATOOLS_API void | clear () |
Clear all objects in the composite. More... | |
FWDATATOOLS_API void | swap (std::string _compositeKey,::fwData::Object::sptr _newObject) |
Replace an object in the composite. More... | |
FWDATATOOLS_API void | notify () |
Send the message of modification. More... | |
Defines an helper to modify an fwData::Composite and create in parallel the message to announce this modification.
Definition at line 22 of file SrcLib/core/fwDataTools/include/fwDataTools/helper/Composite.hpp.
void fwDataTools::helper::Composite::add | ( | std::string | _compositeKey, |
::fwData::Object::sptr | _newObject | ||
) |
Add an object in the composite.
[in] | _compositeKey | key of the object in the composite. |
[in] | _newObject | object to add in the composite |
Prepare the message to announce the modification.
Definition at line 38 of file SrcLib/core/fwDataTools/src/fwDataTools/helper/Composite.cpp.
References OSLM_FATAL_IF.
Referenced by ctrlSelection::SManage::addOrSwap(), ctrlSelection::SManage::clear(), fwDataTools::helper::MedicalImageAdaptor::createTransferFunction(), fwDataTools::helper::Image::createTransferFunctionPool(), uiTF::TransferFunctionEditor::initTransferFunctions(), uiTF::TransferFunctionEditor::swapping(), and uiMedDataQt::editor::SOrganTransformation::updating().
void fwDataTools::helper::Composite::clear | ( | ) |
Clear all objects in the composite.
Prepare the message to announce the modification.
Definition at line 71 of file SrcLib/core/fwDataTools/src/fwDataTools/helper/Composite.cpp.
Referenced by ctrlSelection::SManage::clear(), and uiTF::TransferFunctionEditor::swapping().
void fwDataTools::helper::Composite::notify | ( | ) |
Send the message of modification.
_serviceSource | service used to send the message |
_allowLoops | if true, the _serviceSource will receive the message |
Definition at line 114 of file SrcLib/core/fwDataTools/src/fwDataTools/helper/Composite.cpp.
References OSLM_INFO_IF, fwData::Composite::s_ADDED_OBJECTS_SIG, fwData::Composite::s_CHANGED_OBJECTS_SIG, and fwData::Composite::s_REMOVED_OBJECTS_SIG.
Referenced by ctrlSelection::SManage::addOrSwap(), ctrlSelection::SManage::clear(), fwDataTools::helper::MedicalImageAdaptor::createTransferFunction(), fwDataTools::helper::Image::createTransferFunctionPool(), uiTF::TransferFunctionEditor::initTransferFunctions(), ctrlSelection::SManage::remove(), ctrlSelection::SManage::removeIfPresent(), ctrlSelection::SManage::swap(), uiTF::TransferFunctionEditor::swapping(), uiMedDataQt::editor::SOrganTransformation::updating(), and ~Composite().
void fwDataTools::helper::Composite::remove | ( | std::string | _compositeKey | ) |
Remove an object in the composite.
[in] | _compositeKey | key of the object in the composite. |
Prepare the message to announce the modification.
Definition at line 53 of file SrcLib/core/fwDataTools/src/fwDataTools/helper/Composite.cpp.
References OSLM_FATAL_IF.
Referenced by ctrlSelection::SManage::remove(), ctrlSelection::SManage::removeIfPresent(), uiTF::TransferFunctionEditor::swapping(), and uiMedDataQt::editor::SOrganTransformation::updating().
void fwDataTools::helper::Composite::swap | ( | std::string | _compositeKey, |
::fwData::Object::sptr | _newObject | ||
) |
Replace an object in the composite.
[in] | _compositeKey | key of the object in the composite. |
[in] | _newObject | the new object to add in the composite. |
Prepare the message to announce the modification.
Definition at line 87 of file SrcLib/core/fwDataTools/src/fwDataTools/helper/Composite.cpp.
References OSLM_FATAL_IF, and OSLM_INFO.
Referenced by ctrlSelection::SManage::addOrSwap(), ctrlSelection::SManage::swap(), and uiMedDataQt::editor::SOrganTransformation::updating().