00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 00002 /* 00003 * This file is part of the libetonyek project. 00004 * 00005 * This Source Code Form is subject to the terms of the Mozilla Public 00006 * License, v. 2.0. If a copy of the MPL was not distributed with this 00007 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 00008 */ 00009 00010 #ifndef IWORKOUTPUTMANAGER_H_INCLUDED 00011 #define IWORKOUTPUTMANAGER_H_INCLUDED 00012 00013 #include <deque> 00014 #include <stack> 00015 00016 #include "IWORKOutputElements.h" 00017 #include "IWORKTypes.h" 00018 00019 namespace libetonyek 00020 { 00021 00029 class IWORKOutputManager 00030 { 00031 // disable copying 00032 IWORKOutputManager(const IWORKOutputManager &); 00033 IWORKOutputManager &operator=(const IWORKOutputManager &); 00034 00035 typedef std::deque<IWORKOutputElements> OutputList_t; 00036 typedef std::stack<IWORKOutputElements> OutputStack_t; 00037 00038 public: 00039 IWORKOutputManager(); 00040 ~IWORKOutputManager(); 00041 00044 void push(); 00045 00048 void pop(); 00049 00056 IWORKOutputID_t save(); 00057 00062 IWORKOutputElements &get(IWORKOutputID_t id); 00067 const IWORKOutputElements &get(IWORKOutputID_t id) const; 00068 00071 IWORKOutputElements &getCurrent(); 00074 const IWORKOutputElements &getCurrent() const; 00075 00076 private: 00077 OutputStack_t m_active; 00078 OutputList_t m_saved; 00079 }; 00080 00081 } 00082 00083 #endif // IWORKOUTPUTMANAGER_H_INCLUDED 00084 00085 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */