PureMVC PureMVC
|
00001 // IMediator.hpp 00002 // PureMVC_C++ 00003 // 00004 // PureMVC Port to C++ by Tang Khai Phuong <phuong.tang@puremvc.org> 00005 // PureMVC - Copyright(c) 2006-2011 Futurescale, Inc., Some rights reserved. 00006 // Your reuse is governed by the Creative Commons Attribution 3.0 License 00007 // 00008 00009 #if !defined(__PUREMVC_INTERFACES_IMEDIATOR_HPP__) 00010 #define __PUREMVC_INTERFACES_IMEDIATOR_HPP__ 00011 00012 // STL include 00013 #include <string> 00014 // PureMVC include 00015 #if !defined(__PUREMVC_HPP__) 00016 #define __PUREMVC_INCLUDE__ 00017 #include "../PureMVC.hpp" 00018 #endif /* __PUREMVC_HPP__ */ 00019 00020 #include "INotifier.hpp" 00021 #include "IAggregate.hpp" 00022 00023 namespace PureMVC 00024 { 00025 namespace Interfaces 00026 { 00063 struct PUREMVC_API IMediator : public virtual INotifier 00064 { 00065 typedef std::auto_ptr<IAggregate<std::string> > NotificationNames; 00066 00072 virtual std::string const& getMediatorName(void) const = 0; 00073 00079 virtual void const* getViewComponent(void) const = 0; 00080 00086 virtual void setViewComponent(void const* view_component) = 0; 00087 00093 virtual NotificationNames listNotificationInterests(void) const = 0; 00094 00100 virtual void handleNotification(INotification const& notification) = 0; 00101 00105 virtual void onRegister(void) = 0; 00106 00110 virtual void onRemove(void) = 0; 00111 00115 virtual ~IMediator(void); 00116 }; 00117 } 00118 } 00119 00120 #endif /* __PUREMVC_INTERFACES_IMEDIATOR_HPP__ */