Vuo  2.4.0
VuoComposition.hh
Go to the documentation of this file.
1
10#pragma once
11
12#include "VuoBase.hh"
13
16class VuoCable;
17class VuoComment;
19class VuoNode;
20class VuoProtocol;
22
26class VuoComposition : public VuoBase<VuoCompilerComposition,VuoRendererComposition>
27{
28public:
29 VuoComposition(void);
30 ~VuoComposition(void);
31
32 void setMetadata(VuoCompositionMetadata *metadata, bool takeOwnership);
34
35 void setDirectory(string directory);
36 string getDirectory(void);
37
38 void addNode(VuoNode *node);
39 void removeNode(VuoNode *node);
40 set<VuoNode *> getNodes(void);
41
42 void addCable(VuoCable *cable);
43 void removeCable(VuoCable *cable);
44 set<VuoCable *> getCables(void);
45
46 void addComment(VuoComment *comment);
47 void removeComment(VuoComment *comment);
48 set<VuoComment *> getComments(void);
49
50 void addPublishedInputPort(VuoPublishedPort *port, int index);
51 void addPublishedOutputPort(VuoPublishedPort *port, int index);
52 void removePublishedInputPort(int index);
53 void removePublishedOutputPort(int index);
54 vector<VuoPublishedPort *> getPublishedInputPorts(void);
55 vector<VuoPublishedPort *> getPublishedOutputPorts(void);
58 int getIndexOfPublishedPort(VuoPublishedPort *port, bool isInput);
59 vector<VuoPublishedPort *> getProtocolAwarePublishedPortOrder(VuoProtocol *protocol, bool publishedInputs);
60
61private:
62 VuoCompositionMetadata *metadata;
63 bool ownsMetadata;
64 string directory;
65
66 set<VuoNode *> nodes;
67 set<VuoCable *> cables;
68 set<VuoComment *> comments;
69 vector<VuoPublishedPort *> publishedInputPorts;
70 vector<VuoPublishedPort *> publishedOutputPorts;
71
72 VuoPublishedPort * getPublishedPortWithName(string name, bool isInput);
73};