Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 51 lines (43 sloc) 1.541 kB
f2ae825 @mhroth add pdm10 branch
authored
1 /*
2f26a8e @mhroth Store canvas position in MessageObject and store them as floats.
authored
2 * Copyright 2009,2011 Reality Jockey, Ltd.
f2ae825 @mhroth add pdm10 branch
authored
3 * info@rjdj.me
4 * http://rjdj.me/
5 *
6 * This file is part of ZenGarden.
7 *
8 * ZenGarden is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * ZenGarden is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with ZenGarden. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23 #include "MessageOutlet.h"
b535b21 @mhroth update MessageOutlet to function properly.
authored
24 #include "PdGraph.h"
f2ae825 @mhroth add pdm10 branch
authored
25
7329847 @mhroth Add static factory method to all objects in order to create an object…
authored
26 MessageObject *MessageOutlet::newObject(PdMessage *initMessage, PdGraph *graph) {
27 return new MessageOutlet(initMessage, graph);
28 }
29
875e436 @mhroth Remove numMessageInlets, numMessageOutlets.
authored
30 // MessageOutlets is initialised with one outlet because it handles all outgoing connections
31 // for the containing graph.
7329847 @mhroth Add static factory method to all objects in order to create an object…
authored
32 MessageOutlet::MessageOutlet(PdMessage *initMessage, PdGraph *graph) : MessageObject(1, 1, graph) {
eb87ee0 @mhroth Allow arbitrary number of inlets and outlets in PdGraphs. Allow inlet…
authored
33 canvasX = 0;
f2ae825 @mhroth add pdm10 branch
authored
34 }
35
36 MessageOutlet::~MessageOutlet() {
875e436 @mhroth Remove numMessageInlets, numMessageOutlets.
authored
37 // nothing to do
f2ae825 @mhroth add pdm10 branch
authored
38 }
39
875e436 @mhroth Remove numMessageInlets, numMessageOutlets.
authored
40 bool MessageOutlet::isLeafNode() {
41 return true;
42 }
43
d94e9cd @mhroth Massive refactor to use concept of a global context. Unfortunately th…
authored
44 ObjectType MessageOutlet::getObjectType() {
45 return MESSAGE_OUTLET;
46 }
47
2f26a8e @mhroth Store canvas position in MessageObject and store them as floats.
authored
48 void MessageOutlet::receiveMessage(int inletIndex, PdMessage *message) {
eb87ee0 @mhroth Allow arbitrary number of inlets and outlets in PdGraphs. Allow inlet…
authored
49 sendMessage(0, message);
b535b21 @mhroth update MessageOutlet to function properly.
authored
50 }
Something went wrong with that request. Please try again.