IWORKOutputManager.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  * This file is part of the libetonyek project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #ifndef IWORKOUTPUTMANAGER_H_INCLUDED
11 #define IWORKOUTPUTMANAGER_H_INCLUDED
12 
13 #include <deque>
14 #include <stack>
15 
16 #include "IWORKOutputElements.h"
17 #include "IWORKTypes.h"
18 
19 namespace libetonyek
20 {
21 
30 {
31  // disable copying
34 
35  typedef std::deque<IWORKOutputElements> OutputList_t;
36  typedef std::stack<IWORKOutputElements> OutputStack_t;
37 
38 public:
41 
44  void push();
45 
48  void pop();
49 
57 
67  const IWORKOutputElements &get(IWORKOutputID_t id) const;
68 
74  const IWORKOutputElements &getCurrent() const;
75 
76 private:
77  OutputStack_t m_active;
78  OutputList_t m_saved;
79 };
80 
81 }
82 
83 #endif // IWORKOUTPUTMANAGER_H_INCLUDED
84 
85 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition: IWORKBezierElement.cpp:18
Definition: IWORKOutputElements.h:29
A manager for output elements.
Definition: IWORKOutputManager.h:29
IWORKOutputManager & operator=(const IWORKOutputManager &)
int id
Definition: IWORKToken.cpp:44
unsigned IWORKOutputID_t
Definition: IWORKTypes_fwd.h:26
std::deque< IWORKOutputElements > OutputList_t
Definition: IWORKOutputManager.h:35
IWORKOutputID_t save()
Save the current output element.
Definition: IWORKOutputManager.cpp:39
IWORKOutputElements & getCurrent()
Get the current output element.
Definition: IWORKOutputManager.cpp:57
OutputStack_t m_active
Definition: IWORKOutputManager.h:77
std::stack< IWORKOutputElements > OutputStack_t
Definition: IWORKOutputManager.h:36
void push()
Push a new output element onto the stack.
Definition: IWORKOutputManager.cpp:28
~IWORKOutputManager()
Definition: IWORKOutputManager.cpp:22
OutputList_t m_saved
Definition: IWORKOutputManager.h:78
IWORKOutputManager()
Definition: IWORKOutputManager.cpp:15
void pop()
Pop a output element from the stack.
Definition: IWORKOutputManager.cpp:33

Generated for libetonyek by doxygen 1.8.13