IWORKDirectCollector.h Source File documentation

IWORKDirectCollector.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 IWORKDIRECTCOLLECTOR_H_INCLUDED
11 #define IWORKDIRECTCOLLECTOR_H_INCLUDED
12
13 #include <deque>
14
15 #include "IWORKXMLContext.h"
16
17 namespace libetonyek
18 {
19
20 template<typename Type, class Container = std::deque<Type> >
21 class IWORKDirectCollector
22 {
23 public:
24 IWORKDirectCollector(Container &collection)
25 : m_collection(collection)
26 {
27 }
28
29 template<class Context, class State>
30 IWORKXMLContextPtr_t makeContext(State &state) const
31 {
32 return libetonyek::makeContext<Context>(state, m_collection);
33 }
34
35 bool pending() const
36 {
37 return false;
38 }
39
40 void push()
41 {
42 }
43
44 private:
45 Container &m_collection;
46 };
47
48 }
49
50 #endif // IWORKDIRECTCOLLECTOR_H_INCLUDED
51
52 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libetonyek::IWORKDirectCollector::pending
bool pending() const
Definition: IWORKDirectCollector.h:35
libetonyek
Definition: IWORKBezierElement.cpp:18
libetonyek::IWORKXMLContextPtr_t
std::shared_ptr< IWORKXMLContext > IWORKXMLContextPtr_t
Definition: IWORKXMLContext.h:18
libetonyek::IWORKDirectCollector::IWORKDirectCollector
IWORKDirectCollector(Container &collection)
Definition: IWORKDirectCollector.h:24
libetonyek::IWORKDirectCollector::push
void push()
Definition: IWORKDirectCollector.h:40
libetonyek::IWORKDirectCollector::m_collection
Container & m_collection
Definition: IWORKDirectCollector.h:45
libetonyek::IWORKDirectCollector
Definition: IWORKDirectCollector.h:21
IWORKXMLContext.h
libetonyek::IWORKDirectCollector::makeContext
IWORKXMLContextPtr_t makeContext(State &state) const
Definition: IWORKDirectCollector.h:30