Line data Source code
1 :
2 : /* Copyright (c) 2010, Stefan Eilemann <eile@eyescale.ch>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #include "nodeFactory.h"
19 :
20 : #include "canvas.h"
21 : #include "channel.h"
22 : #include "config.h"
23 : #include "layout.h"
24 : #include "node.h"
25 : #include "observer.h"
26 : #include "pipe.h"
27 : #include "segment.h"
28 : #include "server.h"
29 : #include "view.h"
30 : #include "window.h"
31 :
32 : namespace eq
33 : {
34 : namespace admin
35 : {
36 0 : Config* NodeFactory::createConfig(ServerPtr parent)
37 : {
38 0 : return new Config(parent);
39 : }
40 0 : void NodeFactory::releaseConfig(Config* config)
41 : {
42 0 : delete config;
43 0 : }
44 :
45 0 : Node* NodeFactory::createNode(Config* parent)
46 : {
47 0 : return new Node(parent);
48 : }
49 0 : void NodeFactory::releaseNode(Node* node)
50 : {
51 0 : delete node;
52 0 : }
53 :
54 0 : Observer* NodeFactory::createObserver(Config* parent)
55 : {
56 0 : return new Observer(parent);
57 : }
58 0 : void NodeFactory::releaseObserver(Observer* observer)
59 : {
60 0 : delete observer;
61 0 : }
62 :
63 0 : Layout* NodeFactory::createLayout(Config* parent)
64 : {
65 0 : return new Layout(parent);
66 : }
67 0 : void NodeFactory::releaseLayout(Layout* layout)
68 : {
69 0 : delete layout;
70 0 : }
71 :
72 0 : View* NodeFactory::createView(Layout* parent)
73 : {
74 0 : return new View(parent);
75 : }
76 0 : void NodeFactory::releaseView(View* view)
77 : {
78 0 : delete view;
79 0 : }
80 :
81 0 : Canvas* NodeFactory::createCanvas(Config* parent)
82 : {
83 0 : return new Canvas(parent);
84 : }
85 0 : void NodeFactory::releaseCanvas(Canvas* canvas)
86 : {
87 0 : delete canvas;
88 0 : }
89 :
90 0 : Segment* NodeFactory::createSegment(Canvas* parent)
91 : {
92 0 : return new Segment(parent);
93 : }
94 0 : void NodeFactory::releaseSegment(Segment* segment)
95 : {
96 0 : delete segment;
97 0 : }
98 :
99 0 : Pipe* NodeFactory::createPipe(Node* parent)
100 : {
101 0 : return new Pipe(parent);
102 : }
103 0 : void NodeFactory::releasePipe(Pipe* pipe)
104 : {
105 0 : delete pipe;
106 0 : }
107 :
108 0 : Window* NodeFactory::createWindow(Pipe* parent)
109 : {
110 0 : return new Window(parent);
111 : }
112 0 : void NodeFactory::releaseWindow(Window* window)
113 : {
114 0 : delete window;
115 0 : }
116 :
117 0 : Channel* NodeFactory::createChannel(Window* parent)
118 : {
119 0 : return new Channel(parent);
120 : }
121 0 : void NodeFactory::releaseChannel(Channel* channel)
122 : {
123 0 : delete channel;
124 0 : }
125 : }
126 60 : }
|