00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKDATATREENODESELECTION_H_ 00020 #define MITKDATATREENODESELECTION_H_ 00021 00022 #include <berryIStructuredSelection.h> 00023 #include <mitkDataNode.h> 00024 #include "mitkGUICommonPluginDll.h" 00025 00026 00027 namespace mitk { 00028 00029 class MITK_GUI_COMMON_PLUGIN DataNodeSelection : public virtual berry::IStructuredSelection 00030 { 00031 00032 public: 00033 00034 berryObjectMacro(DataNodeSelection); 00035 00036 DataNodeSelection(); 00037 DataNodeSelection(DataNode::Pointer node); 00038 DataNodeSelection(const std::vector<DataNode::Pointer>& nodes); 00039 00040 virtual Object::Pointer GetFirstElement() const; 00041 virtual iterator Begin() const; 00042 virtual iterator End() const; 00043 00044 virtual int Size() const; 00045 00046 virtual ContainerType::Pointer ToVector() const; 00047 00051 bool IsEmpty() const; 00052 00053 bool operator==(const berry::Object* obj) const; 00054 00055 protected: 00056 00057 ContainerType::Pointer m_Selection; 00058 }; 00059 00060 } 00061 00062 00063 #endif /* MITKDATATREENODESELECTION_H_ */