From fd732066706c4a830b48e6a439f307e5db4f7e39 Mon Sep 17 00:00:00 2001 From: Julien Malik <julien.malik@c-s.fr> Date: Tue, 13 Sep 2011 15:52:31 +0200 Subject: [PATCH] ENH: remove Common dir --- Code/Common/CMakeLists.txt | 12 --- Code/Common/foo.cxx | 0 Code/Common/otbWrapperEvent.h | 64 --------------- Code/Common/otbWrapperEventsListener.h | 56 ------------- Code/Common/otbWrapperEventsSender.h | 106 ------------------------- 5 files changed, 238 deletions(-) delete mode 100644 Code/Common/CMakeLists.txt delete mode 100644 Code/Common/foo.cxx delete mode 100644 Code/Common/otbWrapperEvent.h delete mode 100644 Code/Common/otbWrapperEventsListener.h delete mode 100644 Code/Common/otbWrapperEventsSender.h diff --git a/Code/Common/CMakeLists.txt b/Code/Common/CMakeLists.txt deleted file mode 100644 index 3ba4a7a01b..0000000000 --- a/Code/Common/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -file(GLOB srcs "*.cxx") - -add_library(OTBWrapperCommon ${srcs}) -target_link_libraries(OTBWrapperCommon OTBCommon OTBIO) -install(TARGETS OTBWrapperCommon - RUNTIME DESTINATION bin - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib/static) - -install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include/otbapp - FILES_MATCHING PATTERN "*.h") - \ No newline at end of file diff --git a/Code/Common/foo.cxx b/Code/Common/foo.cxx deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Code/Common/otbWrapperEvent.h b/Code/Common/otbWrapperEvent.h deleted file mode 100644 index 9d498ac819..0000000000 --- a/Code/Common/otbWrapperEvent.h +++ /dev/null @@ -1,64 +0,0 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbWrapperEvent_h -#define __otbWrapperEvent_h - -namespace otb -{ -namespace Wrapper -{ - -class ITK_EXPORT Event -{ -public: - /** Constructor */ - Event(): m_Type("Unknown"), m_InstanceId("Unknown") {} - Event(const std::string& type, const std::string& id): m_Type(type), m_InstanceId(id) {} - virtual ~Event(){} - - void SetType(const std::string& type) - { - m_Type = type; - } - - const std::string& GetType() const - { - return m_Type; - } - - void SetInstanceId(const std::string& id) - { - m_InstanceId = id; - } - - const std::string& GetInstanceId() const - { - return m_InstanceId; - } - -private: - /// Type - std::string m_Type; - - /// Instance Id - std::string m_InstanceId; -}; - -} -} -#endif diff --git a/Code/Common/otbWrapperEventsListener.h b/Code/Common/otbWrapperEventsListener.h deleted file mode 100644 index 2d3a521b0f..0000000000 --- a/Code/Common/otbWrapperEventsListener.h +++ /dev/null @@ -1,56 +0,0 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbWrapperEventsListener_h -#define __otbWrapperEventsListener_h - -namespace otb -{ -namespace Wrapper -{ - -/** - * \class WrapperEventsListener - * - * Vectorization view interface specification for the model - * - * \ingroup Visualization - */ - -template <class TEvent> class EventsListener -{ -public: - /** Standard class typedefs */ - typedef EventsListener Self; - - // Update the display - virtual void Notify(const TEvent& event) = 0; - -protected: - /** Constructor */ - EventsListener() {} - /** Destructor */ - virtual ~EventsListener() {} - -private: - EventsListener(const Self&); //purposely not implemented - void operator =(const Self&); //purposely not implemented -}; - -} -} // end namespace otb -#endif diff --git a/Code/Common/otbWrapperEventsSender.h b/Code/Common/otbWrapperEventsSender.h deleted file mode 100644 index d4452f3282..0000000000 --- a/Code/Common/otbWrapperEventsSender.h +++ /dev/null @@ -1,106 +0,0 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbWrapperEventsSender_h -#define __otbWrapperEventsSender_h - -#include "itkObject.h" - -#include "otbWrapperEventsListener.h" - -#include <set> - -namespace otb -{ -namespace Wrapper -{ - -/** \class EventsSender - * - * Base class for events sending. Listener may register to this class - * to receive the events. - */ -template <class TEvent = void> -class EventsSender -// : public itk::Object -{ -public: - /** Standard class typedefs */ - typedef EventsSender Self; - typedef itk::Object Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - // Define the event type - typedef TEvent EventType; - - // Define the listener type - typedef EventsListener<EventType> ListenerType; - - /** PreprocessingViewInterface storage */ - typedef std::set<ListenerType *> ListenersSetType; - - /** Register a new listener */ - virtual bool RegisterListener(ListenerType * listener) - { - return (m_RegisteredListeners.insert(listener).second); - } - - /** Unregister a listener */ - virtual void UnRegisterListener(ListenerType * listener) - { - m_RegisteredListeners.erase(listener); - } - - virtual void UnRegisterAllListeners() - { - m_RegisteredListeners.clear(); - } - - /** Notify changes to all registered listeners */ - virtual void NotifyAll(const EventType& event = NULL) - { - for (typename ListenersSetType::iterator it = m_RegisteredListeners.begin(); - it != m_RegisteredListeners.end(); - ++it) - { - this->NotifyListener(*it, event); - } - } - - /** Notify changes to a given listener */ - virtual void NotifyListener(ListenerType * listener, const EventType& event = NULL) - { - listener->Notify(event); - } - -protected: - /** Constructor */ - EventsSender() {} - /** Destructor */ - virtual ~EventsSender() {} - -private: - EventsSender(const Self&); //purposely not implemented - void operator =(const Self&); //purposely not implemented - - /** Registered listeners */ - ListenersSetType m_RegisteredListeners; -}; -} -} -#endif -- GitLab