PureMVC PureMVC

include/PureMVC/Interfaces/IModel.hpp

Go to the documentation of this file.
00001 //  IModel.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_IMODEL_HPP__)
00010 #define __PUREMVC_INTERFACES_IMODEL_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 "IProxy.hpp"
00021 #include "IAggregate.hpp"
00022 
00023 namespace PureMVC
00024 {
00025     namespace Interfaces
00026     {
00045         struct PUREMVC_API IModel
00046         {
00047             typedef std::auto_ptr<IAggregate<std::string> > ProxyNames;
00048 
00054             virtual void registerProxy(IProxy* proxy) = 0;
00055 
00062             virtual IProxy const& retrieveProxy(std::string const& proxy_name) const = 0;
00063 
00070             virtual IProxy& retrieveProxy(std::string const& proxy_name) = 0;
00071 
00078             virtual IProxy* removeProxy(std::string const& proxy_name) = 0;
00079 
00086             virtual bool hasProxy(std::string const& proxy_name) const = 0;
00087 
00093             virtual ProxyNames listProxyNames(void) const = 0;
00094 
00098             virtual ~IModel(void);
00099         };
00100     }
00101 }
00102 
00103 #endif /* __PUREMVC_INTERFACES_IMODEL_HPP__ */