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

Generated for libetonyek by doxygen 1.12.0