Vuo
2.0.3
renderer
VuoRendererKeyListForReadOnlyDictionary.cc
Go to the documentation of this file.
1
10
#include "
VuoRendererKeyListForReadOnlyDictionary.hh
"
11
#include "
VuoRendererReadOnlyDictionary.hh
"
12
#include "
VuoCompilerMakeListNodeClass.hh
"
13
#include "
VuoNodeClass.hh
"
14
#include "
VuoPort.hh
"
15
20
VuoRendererKeyListForReadOnlyDictionary::VuoRendererKeyListForReadOnlyDictionary
(
VuoNode
*baseNode,
VuoRendererSignaler
*signaler)
21
:
VuoRendererHiddenInputAttachment
(baseNode, signaler)
22
{
23
}
24
30
bool
VuoRendererKeyListForReadOnlyDictionary::isKeyListForReadOnlyDictionary
(
VuoNode
*baseNode)
31
{
32
if
(!
VuoCompilerMakeListNodeClass::isMakeListNodeClassName
(baseNode->
getNodeClass
()->
getClassName
()))
33
return
false
;
34
35
VuoPort
*hostPort =
getUnderlyingHostPortForNode
(baseNode);
36
VuoNode
*hostNode =
getUnderlyingHostNodeForNode
(baseNode);
37
bool
providesKeysToMakeReadOnlyDictionaryNode = (hostPort &&
38
(hostPort->
getClass
()->
getName
() ==
"keys"
) &&
39
(
VuoRendererReadOnlyDictionary::isReadOnlyDictionary
(hostNode)));
40
return
providesKeysToMakeReadOnlyDictionaryNode;
41
}
42
47
VuoNode
*
VuoRendererKeyListForReadOnlyDictionary::getValueListNode
()
48
{
49
VuoNode
*hostNode =
getUnderlyingHostNode
();
50
if
(!hostNode)
51
return
NULL;
52
53
VuoPort
*valueListInputPort = hostNode->
getInputPortWithName
(
"values"
);
54
return
getListNodeConnectedToInputPort
(valueListInputPort);
55
}
56
60
VuoPort
*
VuoRendererKeyListForReadOnlyDictionary::getRenderedHostPort
()
61
{
62
// The port that will ultimately make use of this node's output values is two nodes downstream.
63
return
getUnderlyingHostPortForNode
(
getUnderlyingHostNodeForNode
(this->
getBase
()));
64
}
65
69
VuoNode
*
VuoRendererKeyListForReadOnlyDictionary::getRenderedHostNode
()
70
{
71
// The node that will ultimately make use of this node's output values is two nodes downstream.
72
return
getUnderlyingHostNodeForNode
(
getUnderlyingHostNodeForNode
(this->
getBase
()));
73
}
74
80
set<VuoNode *>
VuoRendererKeyListForReadOnlyDictionary::getCoattachments
(
void
)
81
{
82
VuoNode
*dictionaryNode =
getUnderlyingHostNode
();
83
VuoNode
*valueListNode =
getValueListNode
();
84
85
set<VuoNode *> coattachments;
86
87
if
(dictionaryNode)
88
coattachments.insert(dictionaryNode);
89
if
(valueListNode)
90
coattachments.insert(valueListNode);
91
return
coattachments;
92
}
Generated on Tue Apr 28 2020 16:54:05 for Vuo by
1.8.17