PureMVC PureMVC

include/PureMVC/Interfaces/IAggregate.hpp

Go to the documentation of this file.
00001 //  IAggregate.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_IAGGREGATE_HPP__)
00010 #define __PUREMVC_INTERFACES_IAGGREGATE_HPP__
00011 
00012 // STL include
00013 #include <memory>
00014 #include <utility>
00015 // PureMVC include
00016 #if !defined(__PUREMVC_HPP__)
00017 #define __PUREMVC_INCLUDE__
00018 #include "../PureMVC.hpp"
00019 #endif /* __PUREMVC_HPP__ */
00020 
00021 #include "IIterator.hpp"
00022 
00023 namespace PureMVC
00024 {
00025     namespace Interfaces
00026     {
00030         template<typename _Type>
00031         struct IAggregate
00032         {
00033             typedef _Type type;
00034 
00035             typedef std::auto_ptr<IIterator<_Type> > Iterator;
00036 
00042             virtual void setIterator(IIterator<_Type>& iterator) const = 0;
00043 
00049             virtual Iterator getIterator(void) const = 0;
00050 
00054             virtual ~IAggregate() { };
00055         };
00056     }
00057 }
00058 
00059 #endif /* __PUREMVC_INTERFACES_IAGGREGATE_HPP__ */